Introduction
A vendor portal is an online platform that allows businesses to interact with their suppliers, vendors, and other partners. It serves as a central hub for managing vendor relationships, facilitating communication, and streamlining procurement processes.
Vendor management: The portal allows businesses to onboard vendors, manage contracts, and update vendor information.
Purchase order management: Vendors can view and accept purchase orders, and businesses can track the status of orders in real-time.
Invoice management: Vendors can submit invoices electronically, and businesses can review, approve, and pay invoices through the portal.
Reporting and analytics: The portal provide data and insights on vendor performance, purchase history, and other metrics that help businesses optimize their supply chain.
Authentication
Get Access Token
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/auth/login"payload = json.dumps({"username": "admin@kaispe.com","password": "pass123"})headers = {'x-unique-string': 'vendor_portal','Content-Type': 'application/json'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"token_type": "Bearer","expires_in": "4 hours","token": "accessToken"}
This endpoint is used to get the JWT access token.
HTTP Request
POST {{BASE_URL}}/auth/login
Authorization
To authorize, use this code:
import portalapi = portal.authorize('accessToken')
Make sure to replace
accessToken
with the token you get by calling the Get Access Token API.
VP API uses a JWT token to allow access to the API which is retrieved by the Get Access Token API.
VP API expects for the token to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer accessToken
Manage Vendors
Create User with vendor role
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/user"payload = json.dumps({"name": "Bilal Ul Haque","email": "bilalulhaque16@gmail.com","password": "pass123","gender": "male","roleId": 1009,"tenantId": 1059})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"statusCode": 201,"status": "Successfull","message": "Created successfully","data": {"activeStatus": "active","id": 1001,"name": "Bilal Ul Haque","email": "bilalulhaque16@gmail.com","password": "$2b$10$sMYZjTTbdsShYq37zhS/q.BUo3jqGY6Y0zcm2G6JvJB0JS.HyHP8C","roleId": 1009,"tenantId": 1040,"updatedAt": "2025-04-17T10:28:06.102Z","createdAt": "2025-04-17T10:28:06.102Z"}}
This endpoint creates a Vendor.
HTTP Request
POST {{BASE_URL}}/user
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
name | String | Yes | N/A | Name of the user |
String | Yes | N/A | Email address of the user | |
password | String | Yes | N/A | Password for the user account |
gender | String | Yes | N/A | Gender of the user |
roleId | Int | Yes | N/A | Role ID of the user |
tenantId | Int | Yes | N/A | Tenant ID of the user |
Create Vendor
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/vendor"payload = json.dumps({"creditLimit": 0,"taxRegistrationNumber": "a","billingAddress": "a","shippingAddress": "a","email": "bi@gm.com","vendorGroupId": 1000,"phoneNumber": "a","currencyCode": 1000,"paymentTerms": null,"paymentMethod": null,"companyName": "ABC","tradeLicenseNo": "","businessAddress": "","businessName": "","businessDirectPhone": "","businessEmail": "","businessCellPhone": "","authorizedName": "","authorizedTitle": "","authorizedEmail": "","authorizedDirectPhone": "","authorizedCellPhone": "","billingPOBox": "","billingZipCode": "","billingCity": "","billingCountry": "","billingName": "","billingTitle": "","billingEmail": "","billingDirectPhone": "","billingCellPhone": "","legalStatusOfCompany": "","auth": "","vendorType": "supplier","vendorUniqueId": "a","defaultContact": 1002})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"statusCode": 201,"status": "Successfull","message": "Created successfully","data": {"id": 1000,"creditLimit": 0,"taxRegistrationNumber": "a","billingAddress": "a","shippingAddress": "a","email": "bi@gm.com","vendorGroupId": 1000,"phoneNumber": "a","currencyCode": 1000,"paymentTerms": null,"paymentMethod": null,"companyName": "ABC","tradeLicenseNo": "","businessAddress": "","businessName": "","businessDirectPhone": "","businessEmail": "","businessCellPhone": "","authorizedName": "","authorizedTitle": "","authorizedEmail": "","authorizedDirectPhone": "","authorizedCellPhone": "","billingPOBox": "","billingZipCode": "","billingCity": "","billingCountry": "","billingName": "","billingTitle": "","billingEmail": "","billingDirectPhone": "","billingCellPhone": "","legalStatusOfCompany": "","auth": "","vendorType": "supplier","vendorUniqueId": "a","defaultContact": 1002,"vendorStatus": "active","updatedAt": "2025-04-17T10:51:24.688Z","createdAt": "2025-04-17T10:51:24.688Z"}}
This endpoint creates a Vendor.
HTTP Request
POST {{BASE_URL}}/vendor
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
creditLimit | Number | Yes | N/A | Vendor's credit limit |
taxRegistrationNumber | String | Yes | N/A | Tax registration number |
billingAddress | String | Yes | N/A | Billing address |
shippingAddress | String | Yes | N/A | Shipping address |
String | Yes | N/A | Vendor contact email | |
vendorGroupId | Integer | Yes | N/A | Vendor group identifier |
phoneNumber | String | Yes | N/A | Primary contact number |
currencyCode | Integer | Yes | N/A | Currency code for transactions |
paymentTerms | Integer/Null | No | N/A | Payment terms ID |
paymentMethod | Integer/Null | No | N/A | Payment method ID |
companyName | String | Yes | N/A | Legal company name |
tradeLicenseNo | String | No | N/A | Trade license number |
businessAddress | String | No | N/A | Business physical address |
businessName | String | No | N/A | Business trading name |
businessDirectPhone | String | No | N/A | Business direct line |
businessEmail | String | No | N/A | Business email address |
businessCellPhone | String | No | N/A | Business mobile number |
authorizedName | String | No | N/A | Authorized person's name |
authorizedTitle | String | No | N/A | Authorized person's title |
authorizedEmail | String | No | N/A | Authorized person's email |
authorizedDirectPhone | String | No | N/A | Authorized person's direct line |
authorizedCellPhone | String | No | N/A | Authorized person's mobile |
billingPOBox | String | No | N/A | Billing PO Box number |
billingZipCode | String | No | N/A | Billing zip/postal code |
billingCity | String | No | N/A | Billing city |
billingCountry | String | No | N/A | Billing country |
billingName | String | No | N/A | Billing contact name |
billingTitle | String | No | N/A | Billing contact title |
billingEmail | String | No | N/A | Billing contact email |
billingDirectPhone | String | No | N/A | Billing contact direct line |
billingCellPhone | String | No | N/A | Billing contact mobile |
legalStatusOfCompany | String | No | N/A | Company legal structure |
auth | String | No | N/A | Authorization code |
vendorType | String | Yes | Must be "supplier" or "customer" | Vendor classification |
vendorUniqueId | String | Yes | N/A | Unique vendor identifier |
defaultContact | Integer | Yes | N/A | Default contact person ID |
Get all vendors
import requestsurl = "{{BASE_URL}}/api/v1/vendor"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
import requestsurl = "{{BASE_URL}}/api/v1/vendor/1000"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("DELETE", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"status": 200,"data": {"docs": [{"id": 1000,"name": null,"rating": null,"creditLimit": "0.00","taxRegistrationNumber": "a","shippingAddress": "a","email": "bi@gm.com","phoneNumber": "a","paymentTermsId": null,"paymentMethod": null,"defaultContact": 1002,"currencyCode": 1000,"companyName": "ABC","tradeLicenseNo": "","businessAddress": "","businessName": "","businessDirectPhone": "","businessEmail": "","businessCellPhone": "","authorizedName": "","authorizedTitle": "","authorizedEmail": "","authorizedDirectPhone": "","authorizedCellPhone": "","billingAddress": "a","billingPOBox": "","billingZipCode": "","billingCity": "","billingCountry": "","billingName": "","billingTitle": "","billingEmail": "","billingDirectPhone": "","billingCellPhone": "","legalStatusOfCompany": "","auth": "","vendorGroupId": 1000,"vendorStatus": "active","vendorType": "supplier","vendorUniqueId": "a","vendorReasonForNotSubmittingTnC": null,"adminReasonForMakingVendorCritical": null,"TnCsubmitted": null,"createdAt": "2025-04-17T10:51:24.000Z","updatedAt": "2025-04-17T10:51:24.000Z","paymentTerms": null,"bankDetails": [],"user": {"id": 1002,"name": "Bilal Ul Haque","email": "bilal@email.com","password": "$2b$10$zn/IGRxmoMAWfJubN7yR/eBtbgLR5OnnlzSXPmgde5tYZkpQ2Zbb2","image": null,"companyTagLine": null,"gender": null,"roleId": 1009,"tenantId": 1040,"activeStatus": "active","vendorId": null,"otp": null,"departmentId": null,"designation": null,"currencyId": null},"contactInfoDetails": [],"_paymentTerm": null,"vendorTypeHistory": []}],"totalDocs": 0,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": null,"hasPrevPage": false,"hasNextPage": false,"prevPage": null,"nextPage": null}}
This endpoint retrieves all vendors.
HTTP Request
GET {{BASE_URL}}/vendor
Update Vendor
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/vendor/1000"payload = json.dumps({"name": "","creditLimit": 0,"taxRegistrationNumber": "a","billingAddress": "a","shippingAddress": "a","email": "bi@gm.com","vendorGroupId": 1000,"vendorUniqueId": "a","phoneNumber": "a","currencyCode": 1000,"paymentTerms": null,"paymentMethod": null,"vendorType": "supplier","companyName": "ABC","tradeLicenseNo": "","businessAddress": "","businessName": "","businessDirectPhone": "","businessEmail": "","businessCellPhone": "","authorizedName": "","authorizedTitle": "","authorizedEmail": "","authorizedDirectPhone": "","authorizedCellPhone": "","billingPOBox": "","billingZipCode": "","billingCity": "","billingCountry": "","billingName": "","billingTitle": "","billingEmail": "","billingDirectPhone": "","billingCellPhone": "","legalStatusOfCompany": "","auth": ""})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("PATCH", url, headers=headers, data=payload)print(response.text)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/request-for-quotation"payload = json.dumps({"vendorIdList": [1001, 1002],"vendorGroupId": 2001,"itemGroupId": 3001,"description": "Annual office supplies procurement","document_url": "https://example.com/docs/rfq123.pdf","documentDate": "2025-04-20","lastSubmissionDate": "2025-05-01","deliveryDate": "2025-05-15","status": "DRAFT","paymentTerms": 1,"paymentMethod": 2,"currency": 840,"vendorQuoteLine": [{"lineAmount": 150,"itemId": 1059,"quantity": 565,"uomId": 1003,"currency": 1008}]})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"statusCode": 200,"status": "Successfull","message": "Updated successfully"}
This endpoint updates a RFQ.
HTTP Request
PATCH {{BASE_URL}}/vendor/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
name | String | Yes | N/A | Name of the user |
String | Yes | N/A | Email address of the user | |
password | String | Yes | N/A | Password for the user account |
gender | String | Yes | N/A | Gender of the user |
roleId | Int | Yes | N/A | Role ID of the user |
vendor | Object | Yes | N/A | Vendor details |
- name | String | Yes | N/A | Name of the vendor |
- creditLimit | Int | Yes | N/A | Credit limit of the vendor |
- taxRegistrationNumber | String | Yes | N/A | Tax registration number of the vendor |
- billingAddress | String | Yes | N/A | Billing address of the vendor |
- shippingAddress | String | Yes | N/A | Shipping address of the vendor |
String | Yes | N/A | Email address of the vendor | |
- phoneNo | String | Yes | N/A | Phone number of the vendor |
- currencyCode | Int | Yes | N/A | Currency code of the vendor |
- paymentTerms | Int | Yes | N/A | Payment terms of the vendor |
- paymentMethod | Int | Yes | N/A | Payment method of the vendor |
- companyName | String | Yes | N/A | Company name of the vendor |
- tradeLicenseNo | String | Yes | N/A | Trade license number of the vendor |
- businessAddress | String | Yes | N/A | Business address of the vendor |
- businessName | String | Yes | N/A | Business name of the vendor |
- businessDirectPhone | String | Yes | N/A | Business direct phone number of the vendor |
- businessEmail | String | Yes | N/A | Business email address of the vendor |
- businessCellPhone | String | Yes | N/A | Business cell phone number of the vendor |
- authorizedName | String | Yes | N/A | Authorized person's name |
- authorizedTitle | String | Yes | N/A | Authorized person's title |
- authorizedEmail | String | Yes | N/A | Authorized person's email address |
- authorizedDirectPhone | String | Yes | N/A | Authorized person's direct phone number |
- authorizedCellPhone | String | Yes | N/A | Authorized person's cell phone number |
- billingPOBox | String | Yes | N/A | Billing PO Box |
- billingZipCode | String | Yes | N/A | Billing zip code |
- billingCity | String | Yes | N/A | Billing city |
- billingCountry | String | Yes | N/A | Billing country |
- billingName | String | Yes | N/A | Billing name |
- billingTitle | String | Yes | N/A | Billing title |
- billingEmail | String | Yes | N/A | Billing email address |
- billingDirectPhone | String | Yes | N/A | Billing direct phone number |
- billingCellPhone | String | Yes | N/A | Billing cell phone number |
- legalStatusOfCompany | String | Yes | N/A | Legal status of the company |
- auth | String | Yes | N/A | Authorization code |
Delete Vendor
import requestsurl = "{{BASE_URL}}/api/v1/request-for-quotation"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
import requestsurl = "{{BASE_URL}}/api/v1/request-for-quotation/1000"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("DELETE", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
Successfully deleted
This endpoint deletes vendor.
HTTP Request
DELETE {{BASE_URL}}/vendor/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Request For Quotation
Get All RFQs
import requestsurl = "{{BASE_URL}}/api/v1/purchaseOrderHeader"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
import requestsurl = "{{BASE_URL}}/api/v1/purchaseOrderHeader/1000"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("DELETE", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"status": 200,"data": {"docs": [{"documentDate": "2024-05-02","id": 1144,"vendorId": 1086,"description": "comparison","deliveryDate": "2024-05-31T00:00:00.000Z","status": "draft","paymentTerms": null,"paymentMethod": 1000,"currency": 1001,"deletedAt": null,"rfqNumber": "RFQ-1714633280930","createdAt": "2024-05-02T07:01:20.000Z","updatedAt": "2024-05-02T07:01:20.000Z","vendor": {"id": 1086,"name": null,"email": "nera8daqa@pelagius.net","currencyCode": 1000,"paymentTerms": 1000,"paymentMethod": 1000,"companyName": "zeeX0"},"currencies": {"name": "USD","currencyCode": "USD"},"paymentTerm": null,"paymentMethods": {"id": 1000,"name": "8998"},"vendorQuoteLine": [{"id": 1394,"itemId": 1013,"quantity": "3.00","uomId": 1000,"unitCost": "3.00","currency": 1001,"lineAmount": "9.00","quoteNum": 1144,"deliveryDate": "2024-05-31T00:00:00.000Z","rfqNumber": "RFQ-1714633280930","vendorId": 1086,"deletedAt": null,"createdAt": "2024-05-02T07:01:20.000Z","updatedAt": "2024-05-02T07:01:20.000Z","item": {"name": "string","description": "string","imageUrl": null,"unitCost": "3.00"},"currencies": {"name": "USD","currencyCode": "USD"},"uom": {"name": "KG","description": "KG"}},{"id": 1395,"itemId": 1008,"quantity": "3.00","uomId": 1000,"unitCost": "6000.00","currency": 1001,"lineAmount": "18000.00","quoteNum": 1144,"deliveryDate": "2024-05-31T00:00:00.000Z","rfqNumber": "RFQ-1714633280930","vendorId": 1086,"deletedAt": null,"createdAt": "2024-05-02T07:01:20.000Z","updatedAt": "2024-05-02T07:01:20.000Z","item": {"name": "Test User","description": null,"imageUrl": "[]","unitCost": "6000.00"},"currencies": {"name": "USD","currencyCode": "USD"},"uom": {"name": "KG","description": "KG"}}]}],"totalDocs": 0,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": null,"hasPrevPage": false,"hasNextPage": false,"prevPage": null,"nextPage": null}}
This endpoint retrieves all rfqs.
HTTP Request
GET {{BASE_URL}}/request-for-quotation
Query Parameters
Parameter | Description |
---|---|
id | If value is given, it'll give the specific rfq . |
documentDate | A date range to give rfqs of the specific date range (MM/DD/YYYYtoMM/DD/YYYY). |
status | If value is given, it'll give the rfqs of that given status (ENUM:[draft,sent,rejected,approved]) . |
Create RFQ
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/request-for-quotation/1000"payload = json.dumps({vendorIdList: [1001, 1002],vendorGroupId: 2001,itemGroupId: 3001,description: "Annual office supplies procurement",document_url: "https://example.com/docs/rfq123.pdf",documentDate: "2025-04-20",lastSubmissionDate: "2025-05-01",deliveryDate: "2025-05-15",status: "DRAFT",paymentTerms: 1,paymentMethod: 2,currency: 840,vendorQuoteLine: [{lineAmount: 150,itemId: 1059,quantity: 565,uomId: 1003,currency: 1008,},],})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("PATCH", url, headers=headers, data=payload)print(response.text)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/purchaseOrderHeader"payload = json.dumps({"vendorId": 1001,"name": "Office Supplies Order","itemGroupId": 200,"description": "Monthly office supplies","vendorDocumentNum": "VEND-2023-001","taxAmount": 150,"discountAmount": 50,"discountPercentage": 5,"taxPercentage": 10,"totalExclTax": 1000,"totalAmount": 1100,"status": "OPEN","orderDate": "2023-05-15","expectedDeliveryDate": "2023-05-30","quoteNum": "Q-2023-001","paymentTermId": 1,"paymentMethodId": 2,"vendorQuoteId": 300,"currencyId": 1,"siteId": 10,"warehouseId": 5,"purchaseOrderLine": [{"itemId": "ITM-001","quantity": 100,"quantityInvoiced": 0,"skuNumber": "SKU-001","unitId": "EA","unitCost": 10.50,"currencyId": 1,"siteId": 10,"warehouseId": 5,"taxAmount": 105}]})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"id": 1000,"vendorIdList": [1001, 1002],"vendorGroupId": 2001,"itemGroupId": 3001,"description": "Annual office supplies procurement","document_url": "https://example.com/docs/rfq123.pdf","documentDate": "2025-04-20","lastSubmissionDate": "2025-05-01","deliveryDate": "2025-05-15","status": "DRAFT","paymentTerms": 1,"paymentMethod": 2,"currency": 840,"vendorQuoteLine": [{"lineAmount": 150,"itemId": 1059,"quantity": 565,"uomId": 1003,"currency": 1008}]}
This endpoint creates a RFQ.
HTTP Request
POST {{BASE_URL}}/request-for-quotation
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
vendorIdList | Array<string | number> | Yes | Must be array | List of vendor IDs |
vendorGroupId | number | No | N/A | Vendor group identifier |
itemGroupId | number | No | N/A | Item group identifier |
description | string | No | Max 60 chars | Description of request |
document_url | string | No | N/A | Document URL |
documentDate | Date | No | N/A | Document date |
lastSubmissionDate | Date | No | N/A | Last submission date |
deliveryDate | Date | No | N/A | Expected delivery date |
status | RequestForQuoteHeaderStatus | No | Must be valid enum value | RFQ status |
paymentTerms | number | No | N/A | Payment terms ID |
paymentMethod | number | No | N/A | Payment method ID |
currency | number | No | N/A | Currency ID |
vendorQuoteLine | any | No | N/A | Vendor quote line items |
totalAmount | number | No | Min 0 | Total amount |
rfoNumber | string | No | N/A | RFQ number |
siteId | number | No | N/A | Site ID |
departmentId | number | No | N/A | Department ID |
requesterId | number | Yes | N/A | Requester user ID |
plantNumber | string | No | N/A | Plant number |
Update RFQ
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/purchaseOrderHeader/1000"payload = json.dumps({"vendorId": 1001,"name": "Office Supplies Order","itemGroupId": 200,"description": "Monthly office supplies","vendorDocumentNum": "VEND-2023-001","taxAmount": 150,"discountAmount": 50,"discountPercentage": 5,"taxPercentage": 10,"totalExclTax": 1000,"totalAmount": 1100,"status": "OPEN","orderDate": "2023-05-15","expectedDeliveryDate": "2023-05-30","quoteNum": "Q-2023-001","paymentTermId": 1,"paymentMethodId": 2,"vendorQuoteId": 300,"currencyId": 1,"siteId": 10,"warehouseId": 5,"purchaseOrderLine": [{"itemId": "ITM-001","quantity": 100,"quantityInvoiced": 0,"skuNumber": "SKU-001","unitId": "EA","unitCost": 10.50,"currencyId": 1,"siteId": 10,"warehouseId": 5,"taxAmount": 105}]})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("PATCH", url, headers=headers, data=payload)print(response.text)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/items"payload = json.dumps({"name": "Product name","unitCost": "50","uomId": 1000,"imageUrl": [{"filename": "01ce402e-5c30-42f1-b71a-044d3cc85326.jpg","url": "https://blobvp.blob.core.windows.net/item-images/1708600468963-0.5385316980702044-01ce402e-5c30-42f1-b71a-044d3cc85326.jpg"}],"skuNumber": "10254785","itemGroupId": 1000})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"id": 1000,"vendorIdList": [1001, 1002],"vendorGroupId": 2001,"itemGroupId": 3001,"description": "Annual office supplies procurement","document_url": "https://example.com/docs/rfq123.pdf","documentDate": "2025-04-20","lastSubmissionDate": "2025-05-01","deliveryDate": "2025-05-15","status": "DRAFT","paymentTerms": 1,"paymentMethod": 2,"currency": 840,"vendorQuoteLine": [{"lineAmount": 150,"itemId": 1059,"quantity": 565,"uomId": 1003,"currency": 1008}]}
This endpoint updates a RFQ.
HTTP Request
PATCH {{BASE_URL}}/request-for-quotation/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
vendorIdList | Array<string | number> | Yes | Must be array | List of vendor IDs |
vendorGroupId | number | No | N/A | Vendor group identifier |
itemGroupId | number | No | N/A | Item group identifier |
description | string | No | Max 60 chars | Description of request |
document_url | string | No | N/A | Document URL |
documentDate | Date | No | N/A | Document date |
lastSubmissionDate | Date | No | N/A | Last submission date |
deliveryDate | Date | No | N/A | Expected delivery date |
status | RequestForQuoteHeaderStatus | No | Must be valid enum value | RFQ status |
paymentTerms | number | No | N/A | Payment terms ID |
paymentMethod | number | No | N/A | Payment method ID |
currency | number | No | N/A | Currency ID |
vendorQuoteLine | any | No | N/A | Vendor quote line items |
totalAmount | number | No | Min 0 | Total amount |
rfoNumber | string | No | N/A | RFQ number |
siteId | number | No | N/A | Site ID |
departmentId | number | No | N/A | Department ID |
requesterId | number | Yes | N/A | Requester user ID |
plantNumber | string | No | N/A | Plant number |
Delete RFQ
import requestsurl = "{{BASE_URL}}/api/v1/invoice-header"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
import requestsurl = "{{BASE_URL}}/api/v1/items"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
Successfully deleted
This endpoint deletes rfq.
HTTP Request
DELETE {{BASE_URL}}/request-for-quotation/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Purchase Order
Get All POs
import requestsurl = "{{BASE_URL}}/api/v1/items/1000"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("DELETE", url, headers=headers, data=payload)print(response.text)
import requestsurl = "{{BASE_URL}}/api/v1/sites?perPage=10&page=1"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"status": 200,"data": {"docs": [{"orderDate": "2024-04-30","expectedDeliveryDate": "2024-05-24","id": 1031,"vendorId": 1083,"name": "Vendor Test","description": "test description","vendorDocumentNum": "21121","taxAmount": "0.00","discountAmount": "0.00","discountPercentage": "0.00","taxPercentage": "0.00","totalExclTax": "41703.00","totalAmount": "41703.00","status": "open","quoteNum": null,"paymentTermId": 1000,"vendorQuoteId": 1009,"paymentMethodId": 1000,"currencyId": 1000,"contractHeaderId": null,"deletedAt": null,"createdAt": "2024-05-02T06:36:37.000Z","updatedAt": "2024-05-02T06:36:37.000Z","vendor": {"id": 1083,"name": "Vendor Test","email": "neradaqa@pelagius.net","currencyCode": null,"paymentTerms": null,"paymentMethod": null,"companyName": "Ziptrick"},"paymentTerm": {"id": 1000,"name": "Test User","description": "test description"},"paymentMethod": {"id": 1000,"name": "8998","description": "testing purpose"},"currency": {"id": 1000,"name": "Pakistan Rupee","currencyCode": "PKR","exchangeRate": "4"},"purchaseOrderLine": [{"lineAmount": 9,"taxAmount": 0,"id": 1039,"itemId": 1013,"quantity": 3,"quantityReceived": 0,"quantityInvoiced": 0,"unitId": 1000,"unitCost": "3.00","currencyId": 1000,"purchaseOrderNum": 1031,"siteId": 1000,"warehouseId": 1000,"deletedAt": null,"createdAt": "2024-05-02T06:36:39.000Z","updatedAt": "2024-05-02T06:36:39.000Z","item": {"name": "string","description": "string","imageUrl": null,"unitCost": "3.00"},"currency": {"name": "Pakistan Rupee","currencyCode": "PKR"},"unit": {"name": "KG","description": "KG"},"site": {"id": 1000,"name": "a","company": 1003},"warehouse": {"id": 1000,"name": "b","site": 1000}},{"lineAmount": 23634,"taxAmount": 32,"id": 1040,"itemId": 1010,"quantity": 3,"quantityReceived": 0,"quantityInvoiced": 0,"unitId": 1000,"unitCost": "7878.00","currencyId": 1000,"purchaseOrderNum": 1031,"siteId": 1000,"warehouseId": 1000,"deletedAt": null,"createdAt": "2024-05-02T06:36:39.000Z","updatedAt": "2024-05-02T06:36:39.000Z","item": {"name": "PRODUCT 1","description": null,"imageUrl": "[{\"filename\":\"sara-cervera-ORltc33fQXw-unsplash.jpg\",\"url\":\"https://blobvp.blob.core.windows.net/item-images/1713510703437-0.19467728118649474-sara-cervera-ORltc33fQXw-unsplash.jpg\"},{\"filename\":\"kirsten-frank-SigW_qGiSEI-unsplash.jpg\",\"url\":\"https://blobvp.blob.core.windows.net/item-images/1713510727032-0.24609094207327997-kirsten-frank-SigW_qGiSEI-unsplash.jpg\"},{\"filename\":\"pexels-souvenirpixels-417074.jpg\",\"url\":\"https://blobvp.blob.core.windows.net/item-images/1713510738818-0.17526652103661844-pexels-souvenirpixels-417074.jpg\"}]","unitCost": "7878.00"},"currency": {"name": "Pakistan Rupee","currencyCode": "PKR"},"unit": {"name": "KG","description": "KG"},"site": {"id": 1000,"name": "a","company": 1003},"warehouse": {"id": 1000,"name": "b","site": 1000}},{"lineAmount": 18000,"taxAmount": 32,"id": 1041,"itemId": 1007,"quantity": 3,"quantityReceived": 0,"quantityInvoiced": 0,"unitId": 1000,"unitCost": "6000.00","currencyId": 1000,"purchaseOrderNum": 1031,"siteId": 1000,"warehouseId": 1000,"deletedAt": null,"createdAt": "2024-05-02T06:36:39.000Z","updatedAt": "2024-05-02T06:36:39.000Z","item": {"name": "Pablo","description": null,"imageUrl": "[]","unitCost": "6000.00"},"currency": {"name": "Pakistan Rupee","currencyCode": "PKR"},"unit": {"name": "KG","description": "KG"},"site": {"id": 1000,"name": "a","company": 1003},"warehouse": {"id": 1000,"name": "b","site": 1000}},{"lineAmount": 60,"taxAmount": 0,"id": 1042,"itemId": 1003,"quantity": 3,"quantityReceived": 0,"quantityInvoiced": 0,"unitId": 1000,"unitCost": "20.00","currencyId": 1000,"purchaseOrderNum": 1031,"siteId": 1000,"warehouseId": 1000,"deletedAt": null,"createdAt": "2024-05-02T06:36:39.000Z","updatedAt": "2024-05-02T06:36:39.000Z","item": {"name": "LCD3","description": null,"imageUrl": "[{\"filename\":\"01ce402e-5c30-42f1-b71a-044d3cc85326.jpg\",\"url\":\"https://blobvp.blob.core.windows.net/item-images/1708600468963-0.5385316980702044-01ce402e-5c30-42f1-b71a-044d3cc85326.jpg\"}]","unitCost": "20.00"},"currency": {"name": "Pakistan Rupee","currencyCode": "PKR"},"unit": {"name": "KG","description": "KG"},"site": {"id": 1000,"name": "a","company": 1003},"warehouse": {"id": 1000,"name": "b","site": 1000}}]}],"totalDocs": 0,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": null,"hasPrevPage": false,"hasNextPage": false,"prevPage": null,"nextPage": null}}
This endpoint retrieves all POs.
HTTP Request
GET {{BASE_URL}}/purchaseOrderHeader
Query Parameters
Parameter | Description |
---|---|
id | If value is given, it'll give the specific po . |
orderDate | A date range to give POs of the specific date range (MM/DD/YYYYtoMM/DD/YYYY). |
status | If value is given, it'll give the POs of that given status (ENUM:[open,received,invoiced,cancelled]) . |
Create PO
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/items/1000"payload = json.dumps({"name": "LCD4","unitCost": "20","uomId": 1000,"imageUrl": [{"filename": "01ce402e-5c30-42f1-b71a-044d3cc85326.jpg","url": "https://blobvp.blob.core.windows.net/item-images/1708600468963-0.5385316980702044-01ce402e-5c30-42f1-b71a-044d3cc85326.jpg"}],"itemGroupId": 1001})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("PATCH", url, headers=headers, data=payload)print(response.text)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/sites"payload = json.dumps({"company": 1003,"name": "Site name"})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"id": 1000,"vendorId": 1001,"name": "Office Supplies Order","itemGroupId": 200,"description": "Monthly office supplies","vendorDocumentNum": "VEND-2023-001","taxAmount": 150,"discountAmount": 50,"discountPercentage": 5,"taxPercentage": 10,"totalExclTax": 1000,"totalAmount": 1100,"status": "OPEN","orderDate": "2023-05-15","expectedDeliveryDate": "2023-05-30","quoteNum": "Q-2023-001","paymentTermId": 1,"paymentMethodId": 2,"vendorQuoteId": 300,"currencyId": 1,"siteId": 10,"warehouseId": 5,"purchaseOrderLine": [{"itemId": "ITM-001","quantity": 100,"quantityInvoiced": 0,"skuNumber": "SKU-001","unitId": "EA","unitCost": 10.50,"currencyId": 1,"siteId": 10,"warehouseId": 5,"taxAmount": 105}]}
This endpoint creates a PO.
HTTP Request
POST {{BASE_URL}}/purchaseOrderHeader
Body Parameters
Parameter | Type | Required | Constraints | Description |
---|---|---|---|---|
vendorId | number | No | - | Vendor identifier |
name | string | No | Max 60 chars | Purchase order name |
itemGroupId | number | No | - | Item group identifier |
description | string | No | Max 60 chars | Order description |
vendorDocumentNum | string | No | Max 20 chars | Vendor document number |
taxAmount | number | No | Min: 0 | Tax amount |
discountAmount | number | No | Min: 0 | Discount amount |
discountPercentage | number | No | 0-100 | Discount percentage |
taxPercentage | number | No | 0-100 | Tax percentage |
totalExclTax | number | No | Min: 0 | Total before tax |
totalAmount | number | No | Min: 0 | Final total amount |
status | PurchaseOrderHeaderStatus | No | Enum: OPEN , RECEIVED , INVOICED , CANCELLED | Order status |
orderDate | Date | No | - | Date of order |
expectedDeliveryDate | Date | Yes | - | Expected delivery date |
quoteNum | string | No | Max 10 chars | Quote number |
paymentTermId | number | No | - | Payment terms ID |
paymentMethodId | number | No | - | Payment method ID |
vendorQuoteId | number | No | - | Vendor quote ID |
currencyId | number | Yes | - | Currency identifier |
siteId | number | Yes | - | Site identifier |
warehouseId | number | Yes | - | Warehouse identifier |
purchaseOrderLine | CreatePurchaseOrderLineDto[] | Yes | - | Array of line items |
Purchase Order Line Item DTO
Parameter | Type | Required | Description |
---|---|---|---|
itemId | string | Yes | Item identifier |
quantity | number | No | Ordered quantity |
quantityInvoiced | number | No | Quantity already invoiced |
skuNumber | string | No | Stock keeping unit number |
unitId | string | No | Unit of measure ID |
unitCost | number | No | Cost per unit |
currencyId | string | No | Currency identifier |
siteId | string | Yes | Site identifier |
warehouseId | string | Yes | Warehouse identifier |
taxAmount | number | No | Tax amount for line item |
Update PO
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/sites/1000"payload = json.dumps({"company": 1003,"name": "Site name"})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("PATCH", url, headers=headers, data=payload)print(response.text)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/warehouses"payload = json.dumps({"site": 1008,"name": "first warehouse"})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"id": 1000,"vendorId": 1001,"name": "Office Supplies Order","itemGroupId": 200,"description": "Monthly office supplies","vendorDocumentNum": "VEND-2023-001","taxAmount": 150,"discountAmount": 50,"discountPercentage": 5,"taxPercentage": 10,"totalExclTax": 1000,"totalAmount": 1100,"status": "OPEN","orderDate": "2023-05-15","expectedDeliveryDate": "2023-05-30","quoteNum": "Q-2023-001","paymentTermId": 1,"paymentMethodId": 2,"vendorQuoteId": 300,"currencyId": 1,"siteId": 10,"warehouseId": 5,"purchaseOrderLine": [{"itemId": "ITM-001","quantity": 100,"quantityInvoiced": 0,"skuNumber": "SKU-001","unitId": "EA","unitCost": 10.50,"currencyId": 1,"siteId": 10,"warehouseId": 5,"taxAmount": 105}]}
This endpoint updates a PO.
HTTP Request
PATCH {{BASE_URL}}/purchaseOrderHeader/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Body Parameters
Parameter | Type | Required | Constraints | Description |
---|---|---|---|---|
vendorId | number | No | - | Vendor identifier |
name | string | No | Max 60 chars | Purchase order name |
itemGroupId | number | No | - | Item group identifier |
description | string | No | Max 60 chars | Order description |
vendorDocumentNum | string | No | Max 20 chars | Vendor document number |
taxAmount | number | No | Min: 0 | Tax amount |
discountAmount | number | No | Min: 0 | Discount amount |
discountPercentage | number | No | 0-100 | Discount percentage |
taxPercentage | number | No | 0-100 | Tax percentage |
totalExclTax | number | No | Min: 0 | Total before tax |
totalAmount | number | No | Min: 0 | Final total amount |
status | PurchaseOrderHeaderStatus | No | Enum: OPEN , RECEIVED , INVOICED , CANCELLED | Order status |
orderDate | Date | No | - | Date of order |
expectedDeliveryDate | Date | Yes | - | Expected delivery date |
quoteNum | string | No | Max 10 chars | Quote number |
paymentTermId | number | No | - | Payment terms ID |
paymentMethodId | number | No | - | Payment method ID |
vendorQuoteId | number | No | - | Vendor quote ID |
currencyId | number | Yes | - | Currency identifier |
siteId | number | Yes | - | Site identifier |
warehouseId | number | Yes | - | Warehouse identifier |
purchaseOrderLine | CreatePurchaseOrderLineDto[] | Yes | - | Array of line items |
Purchase Order Line Item DTO
Parameter | Type | Required | Description |
---|---|---|---|
itemId | string | Yes | Item identifier |
quantity | number | No | Ordered quantity |
quantityInvoiced | number | No | Quantity already invoiced |
skuNumber | string | No | Stock keeping unit number |
unitId | string | No | Unit of measure ID |
unitCost | number | No | Cost per unit |
currencyId | string | No | Currency identifier |
siteId | string | Yes | Site identifier |
warehouseId | string | Yes | Warehouse identifier |
taxAmount | number | No | Tax amount for line item |
Delete PO
import requestsurl = "{{BASE_URL}}/api/v1/sites/1000"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("DELETE", url, headers=headers, data=payload)print(response.text)
import requestsurl = "{{BASE_URL}}/api/v1/warehouses"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
Successfully deleted
This endpoint deletes PO.
HTTP Request
DELETE {{BASE_URL}}/purchaseOrderHeader/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Invoices
Get All Invoices
import requestsurl = "{{BASE_URL}}/api/v1/warehouses/1000"payload = {}headers = {'Authorization': 'Bearer token'}response = requests.request("DELETE", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"status": 200,"data": {"docs": [{"id": 1001,"invoiceDate": "2024-04-29T10:03:38.000Z","dueDate": "2024-04-30T00:00:00.000Z","vendorId": 1083,"deliveryChallanHeaderId": 1007,"taxType": "334","taxRate": "3.00","taxAmount": "2.00","discountPercentage": "2.00","totalAmount": "0.00","shippingAddress": null,"paymentInstruction": "23","currencyId": 1000,"paymentTermId": 1000,"paymentMethodId": 1000,"paymentStatus": "unpaid","invoiceStatus": null,"comment": "32","attachments": null,"saveAsDraft": false,"invoiceJournalId": null,"deletedAt": null,"createdAt": "2024-04-29T10:03:38.000Z","updatedAt": "2024-04-29T10:03:38.000Z","vendor": {"name": "Vendor Test","email": "neradaqa@pelagius.net","currencyCode": null,"paymentTerms": null,"paymentMethod": null,"companyName": "Ziptrick"},"currency": {"currencyCode": "PKR","name": "Pakistan Rupee","ISOCode": "2121","exchangeRate": "4"},"paymentTerm": {"name": "Test User","description": "test description"},"paymentMethod": {"name": "8998","description": "testing purpose"},"invoiceLine": [{"lineAmount": 540000,"id": 1002,"itemId": 1008,"quantity": "90.00","unitCost": "6000.00","uomId": 1000,"currencyId": 1000,"invoiceHeaderId": 1001,"purchaseOrderLineId": null,"invoiceStatus": null,"deletedAt": null,"createdAt": "2024-04-29T10:03:39.000Z","updatedAt": "2024-04-29T10:03:39.000Z","item": {"name": "Test User","unitCost": "6000.00"},"uom": {"name": "KG","description": "KG"},"currency": {"currencyCode": "PKR","name": "Pakistan Rupee","ISOCode": "2121","exchangeRate": "4"}}]}],"totalDocs": 1,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": 1,"hasPrevPage": false,"hasNextPage": false,"prevPage": null,"nextPage": null}}
This endpoint retrieves all Invoices.
HTTP Request
GET {{BASE_URL}}/invoice-header
Products
Get All Products
The above command returns JSON structured like this:
{"status": 200,"data": {"docs": [{"discountedunitCost": null,"id": 1000,"name": "Product name","uomId": 1000,"unitCost": "50.00","imageUrl": [],"skuNumber": "10254785","itemGroupId": 1000,"authorized": false,"rating": null,"discountItemId": null,"taxGroupId": null,"uom": {"name": "kg","description": "kg"},"discountItem": null,"itemGroup": {"id": 1000,"groupName": "group"},"taxGroup": null}],"totalDocs": 1,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": 1,"hasPrevPage": false,"hasNextPage": false,"prevPage": null,"nextPage": null}}
This endpoint retrieves all POs.
HTTP Request
GET {{BASE_URL}}/items
Query Parameters
Parameter | Description |
---|---|
name | Name of product. |
priceRange | A price range to give products of the specific range (00to00). |
id | Id of product. |
Create Product
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/warehouses/1000"payload = json.dumps({"site": 1008,"name": "first warehouse"})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("PATCH", url, headers=headers, data=payload)print(response.text)
The above command returns JSON structured like this:
{"discountedunitCost": null,"authorized": false,"id": 1000,"name": "Product name","unitCost": "50","uomId": 1000,"imageUrl": [],"skuNumber": "10254785","itemGroupId": 1000,"updatedAt": "2025-04-18T06:07:36.033Z","createdAt": "2025-04-18T06:07:36.033Z"}
This endpoint creates a Product.
HTTP Request
POST {{BASE_URL}}/items
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
name | String | Yes | N/A | Name of the item |
unitCost | String | Yes | N/A | Cost per unit of the item |
uomId | Int | Yes | N/A | Unit of measure ID |
imageUrl | Array of Objects | Yes | N/A | Array of objects containing image details |
- filename | String | Yes | N/A | Filename of the image |
- url | String | Yes | N/A | URL of the image |
itemGroupId | Int | Yes | N/A | Item group ID |
Update Product
The above command returns JSON structured like this:
{"id": 1000,"name": "LCD4","unitCost": "20","uomId": 1000,"imageUrl": [{"filename": "01ce402e-5c30-42f1-b71a-044d3cc85326.jpg","url": "https://blobvp.blob.core.windows.net/item-images/1708600468963-0.5385316980702044-01ce402e-5c30-42f1-b71a-044d3cc85326.jpg"}],"itemGroupId": 1001}
This endpoint updates a Product.
HTTP Request
PATCH {{BASE_URL}}/items/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
name | String | Yes | N/A | Name of the item |
unitCost | String | Yes | N/A | Cost per unit of the item |
uomId | Int | Yes | N/A | Unit of measure ID |
imageUrl | Array of Objects | Yes | N/A | Array of objects containing image details |
- filename | String | Yes | N/A | Filename of the image |
- url | String | Yes | N/A | URL of the image |
itemGroupId | Int | Yes | N/A | Item group ID |
Delete Product
The above command returns JSON structured like this:
Successfully deleted
This endpoint deletes Product.
HTTP Request
DELETE {{BASE_URL}}/items/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Sites
Get All Sites
The above command returns JSON structured like this:
{"status": 200,"data": {"docs": [{"id": 1000,"name": "site","company": 1000,"deletedAt": null,"createdAt": "2025-04-17T13:33:35.000Z","updatedAt": "2025-04-17T13:33:35.000Z","companyId": {"name": "vpstg","address": null,"email": "muhammad.huzaifa@kaispe.com","phone": null}}],"totalDocs": 1,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": 1,"hasPrevPage": false,"hasNextPage": false,"prevPage": null,"nextPage": null}}
This endpoint retrieves all Sites.
HTTP Request
GET {{BASE_URL}}/sites
Create Site
The above command returns JSON structured like this:
{"id": 1000,"company": 1003,"name": "Site name"}
This endpoint creates a Site.
HTTP Request
POST {{BASE_URL}}/sites
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
company | Int | Yes | N/A | Id of the company (foreign key) |
name | String | Yes | N/A | Name of the site |
Update Site
The above command returns JSON structured like this:
{"id": 1000,"company": 1003,"name": "Site name"}
This endpoint updates a Site.
HTTP Request
PATCH {{BASE_URL}}/sites/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
company | Int | Yes | N/A | Id of the company (foreign key) |
name | String | Yes | N/A | Name of the site |
Delete Site
The above command returns JSON structured like this:
Successfully deleted
This endpoint deletes Site.
HTTP Request
DELETE {{BASE_URL}}/sites/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Warehouses
Get All Warehouses
The above command returns JSON structured like this:
{"status": 200,"data": {"docs": [{"id": 1000,"name": "b","site": 1000,"deletedAt": null,"createdAt": "2024-03-19T10:52:03.000Z","updatedAt": "2024-03-19T10:52:03.000Z","siteId": {"name": "a"}}],"totalDocs": 1,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": 1,"hasPrevPage": false,"hasNextPage": false,"prevPage": null,"nextPage": null}}
This endpoint retrieves all Warehouses.
HTTP Request
GET {{BASE_URL}}/warehouses
Create Warehouse
The above command returns JSON structured like this:
{"id": 1000,"site": 1008,"name": "first warehouse"}
This endpoint creates a Warehouse.
HTTP Request
POST {{BASE_URL}}/warehouses
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
site | Int | Yes | N/A | Id of the site (foreign key) |
name | String | Yes | N/A | Name of the warehouse |
Update Site
The above command returns JSON structured like this:
{"id": 1000,"site": 1008,"name": "first warehouse"}
This endpoint updates a Warehouse.
HTTP Request
PATCH {{BASE_URL}}/warehouses/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
site | Int | Yes | N/A | Id of the site (foreign key) |
name | String | Yes | N/A | Name of the warehouse |
Delete Warehouse
The above command returns JSON structured like this:
Successfully deleted
This endpoint deletes Warehouse.
HTTP Request
DELETE {{BASE_URL}}/warehouses/<id>
URL Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | Yes | N/A | Id of the document |