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 Vendor
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/user"payload = json.dumps({"name": "Hamza","email": "s@vendor.com","password": "pass123","gender": "male","roleId": 1001,"vendor": {"name": "hamza vendor","creditLimit": 1500,"taxRegistrationNumber": "HAM-116","billingAddress": "Model colony","shippingAddress": "Malir","email": "s@vendor.com","phoneNo": "+92 314 2589633","currencyCode": 1005,"paymentTerms": 1005,"paymentMethod": 1001,"companyName": "ABC Corp","tradeLicenseNo": "12345","businessAddress": "123 Main St","businessName": "Tech Solutions","businessDirectPhone": "123-456-7890","businessEmail": "info@example.com","businessCellPhone": "987-654-3210","bankDetails": [{"bank": "My Bank","accountTitle": "John Doe","accountNumber": 1234567890,"iban": "GB12345678901234567890","swiftCode": "ABCDEF","bankBranchCode": "12345","bankBranchAddress": "456 Main St","nationalTaxNumber": 987654321}],"authorizedName": "John Doe","authorizedTitle": "CEO","authorizedEmail": "john@example.com","authorizedDirectPhone": "123-456-7890","authorizedCellPhone": "987-654-3210","billingPOBox": "45678","billingZipCode": "12345","billingCity": "Cityville","billingCountry": "Countryland","billingName": "Jane Smith","billingTitle": "CFO","billingEmail": "jane@example.com","billingDirectPhone": "111-222-3333","billingCellPhone": "444-555-6666","legalStatusOfCompany": "LLC","auth": "Authorization Code"}})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/vendor/1000"payload = json.dumps({"name": "","rating": 0,"creditLimit": "2.00","taxRegistrationNumber": "8778","shippingAddress": "78","email": "admi78878n@kaispe.com","phoneNumber": "03311301868","paymentTermsId": null,"paymentMethod": 1000,"defaultContact": 1132,"currencyCode": 1000,"companyName": "7878","tradeLicenseNo": "7887","businessAddress": "","businessName": "","businessDirectPhone": "","businessEmail": "","businessCellPhone": "","authorizedName": "","authorizedTitle": "","authorizedEmail": "","authorizedDirectPhone": "","authorizedCellPhone": "","billingAddress": "7878","billingPOBox": "","billingZipCode": "","billingCity": "","billingCountry": "","billingName": "","billingTitle": "","billingEmail": "","billingDirectPhone": "","billingCellPhone": "","legalStatusOfCompany": "","auth": "","vendorGroupId": 1001,"vendorStatus": "active","createdAt": "2024-05-02T12:12:55.000Z","updatedAt": "2024-05-02T12:20:04.000Z","paymentTerms": 1000})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:
{"id": 1000,"name": "Hamza","email": "s@vendor.com","password": "pass123","gender": "male","roleId": 1001,"vendor": {"name": "hamza vendor","creditLimit": 1500,"taxRegistrationNumber": "HAM-116","billingAddress": "Model colony","shippingAddress": "Malir","email": "s@vendor.com","phoneNo": "+92 314 2589633","currencyCode": 1005,"paymentTerms": 1005,"paymentMethod": 1001,"companyName": "ABC Corp","tradeLicenseNo": "12345","businessAddress": "123 Main St","businessName": "Tech Solutions","businessDirectPhone": "123-456-7890","businessEmail": "info@example.com","businessCellPhone": "987-654-3210","bankDetails": [{"bank": "My Bank","accountTitle": "John Doe","accountNumber": 1234567890,"iban": "GB12345678901234567890","swiftCode": "ABCDEF","bankBranchCode": "12345","bankBranchAddress": "456 Main St","nationalTaxNumber": 987654321}],"authorizedName": "John Doe","authorizedTitle": "CEO","authorizedEmail": "john@example.com","authorizedDirectPhone": "123-456-7890","authorizedCellPhone": "987-654-3210","billingPOBox": "45678","billingZipCode": "12345","billingCity": "Cityville","billingCountry": "Countryland","billingName": "Jane Smith","billingTitle": "CFO","billingEmail": "jane@example.com","billingDirectPhone": "111-222-3333","billingCellPhone": "444-555-6666","legalStatusOfCompany": "LLC","auth": "Authorization Code"}}
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 |
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 |
- bankDetails | Array of Objects | Yes | N/A | Array of objects containing bank details of the vendor |
- bank | String | Yes | N/A | Bank name |
- accountTitle | String | Yes | N/A | Account title |
- accountNumber | Int | Yes | N/A | Account number |
- iban | String | Yes | N/A | International Bank Account Number (IBAN) |
- swiftCode | String | Yes | N/A | SWIFT code |
- bankBranchCode | String | Yes | N/A | Bank branch code |
- bankBranchAddress | String | Yes | N/A | Bank branch address |
- nationalTaxNumber | Int | Yes | N/A | National tax number |
- 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 |
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": 1094,"name": "","rating": 0,"creditLimit": "2.00","taxRegistrationNumber": "8778","shippingAddress": "78","email": "admi78878n@kaispe.com","phoneNumber": "03311301868","paymentTermsId": null,"paymentMethod": 1000,"defaultContact": 1132,"currencyCode": 1000,"companyName": "7878","tradeLicenseNo": "7887","businessAddress": "","businessName": "","businessDirectPhone": "","businessEmail": "","businessCellPhone": "","authorizedName": "","authorizedTitle": "","authorizedEmail": "","authorizedDirectPhone": "","authorizedCellPhone": "","billingAddress": "7878","billingPOBox": "","billingZipCode": "","billingCity": "","billingCountry": "","billingName": "","billingTitle": "","billingEmail": "","billingDirectPhone": "","billingCellPhone": "","legalStatusOfCompany": "","auth": "","vendorGroupId": 1001,"vendorStatus": "active","createdAt": "2024-05-02T12:12:55.000Z","updatedAt": "2024-05-02T12:20:04.000Z","paymentTerms": 1000,"bankDetails": [{"id": 1005,"bank": "787878","accountTitle": "87788","accountNumber": "8778","iban": "87887","swiftCode": "","bankBranchCode": "","bankBranchAddress": "","vendorId": 1094,"deletedAt": null,"createdAt": "2024-05-02T12:13:10.000Z","updatedAt": "2024-05-02T12:13:10.000Z"}],"user": {"id": 1132,"name": "76","email": "SAAA@fsdsd.com","password": "$2b$10$ZpHMZTG3D4DHya2KBC0CQeI3GYFKYvpiuj.isRIpnA.Dj.khBQy4G","image": null,"gender": "male","roleId": 1009,"tenantId": 1003,"activeStatus": "active","vendorId": null,"otp": null,"deletedAt": null,"createdAt": "2024-05-02T12:12:02.000Z","updatedAt": "2024-05-02T12:12:02.000Z"}}],"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/request-for-quotation"payload = json.dumps({"vendorIdList": [1005],"description": "one","documentDate": "09/28/2023","status": "draft","paymentTerms": 1006,"paymentMethod": 1004,"currency": 1008,"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)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/request-for-quotation/1000"payload = json.dumps({"description": "one","documentDate": "09/28/2023","status": "draft","paymentTerms": 1006,"paymentMethod": 1004,"currency": 1008,"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)
The above command returns JSON structured like this:
{"id": 1000,"name": "","rating": 0,"creditLimit": "2.00","taxRegistrationNumber": "8778","shippingAddress": "78","email": "admi78878n@kaispe.com","phoneNumber": "03311301868","paymentTermsId": null,"paymentMethod": 1000,"defaultContact": 1132,"currencyCode": 1000,"companyName": "7878","tradeLicenseNo": "7887","businessAddress": "","businessName": "","businessDirectPhone": "","businessEmail": "","businessCellPhone": "","authorizedName": "","authorizedTitle": "","authorizedEmail": "","authorizedDirectPhone": "","authorizedCellPhone": "","billingAddress": "7878","billingPOBox": "","billingZipCode": "","billingCity": "","billingCountry": "","billingName": "","billingTitle": "","billingEmail": "","billingDirectPhone": "","billingCellPhone": "","legalStatusOfCompany": "","auth": "","vendorGroupId": 1001,"vendorStatus": "active","createdAt": "2024-05-02T12:12:55.000Z","updatedAt": "2024-05-02T12:20:04.000Z","paymentTerms": 1000}
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/purchaseOrderHeader"payload = json.dumps({"vendorId": 1046,"name": "","vendorDocumentNum": "1231","orderDate": "2023-12-05","description": "453","status": "open","taxAmount": 0,"discountAmount": 43010,"discountPercentage": 10,"taxPercentage": 0,"totalExclTax": 387090,"totalAmount": 387090,"paymentTermId": 1003,"paymentMethodId": 1001,"currencyId": 1007,"vendorQuoteId": 1033,"purchaseOrderLine": [{"itemId": 1060,"quantity": "100","quantityReceived": 0,"unitId": 1003,"unitCost": "15.00","quantityInvoiced": 0,"currencyId": 1007,"lineAmount": 1500,"siteId": 1009,"warehouseId": 1007}],"totalLinesAmount": "430100.00"})headers = {'Content-Type': 'application/json','Authorization': 'Bearer token'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/purchaseOrderHeader/1000"payload = json.dumps({"vendorId": 1046,"name": "","vendorDocumentNum": "1231","orderDate": "2023-12-05","description": "453","status": "open","taxAmount": 0,"discountAmount": 43010,"discountPercentage": 10,"taxPercentage": 0,"totalExclTax": 387090,"totalAmount": 387090,"paymentTermId": 1003,"paymentMethodId": 1001,"currencyId": 1007,"vendorQuoteId": 1033,"purchaseOrderLine": [{"itemId": 1060,"quantity": "100","quantityReceived": 0,"unitId": 1003,"unitCost": "15.00","quantityInvoiced": 0,"currencyId": 1007,"lineAmount": 1500,"siteId": 1009,"warehouseId": 1007}],"totalLinesAmount": "430100.00"})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:
{"id": 1000,"vendorIdList": [1005],"description": "one","documentDate": "09/28/2023","status": "draft","paymentTerms": 1006,"paymentMethod": 1004,"currency": 1008,"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 of Int | Yes | N/A | List of vendor IDs |
description | String | Yes | N/A | Description of the document |
documentDate | Date (String) | Yes | N/A | Date of the document |
status | String | Yes | N/A | Status of the document |
paymentTerms | Int | Yes | N/A | Payment terms ID |
paymentMethod | Int | Yes | N/A | Payment method ID |
currency | Int | Yes | N/A | Currency ID |
vendorQuoteLine | Array of Objects | Yes | N/A | Array of objects containing vendor quote line details |
- lineAmount | Int | Yes | N/A | Amount of the line |
- itemId | Int | Yes | N/A | Item ID |
- quantity | Int | Yes | N/A | Quantity of the item |
- uomId | Int | Yes | N/A | Unit of measure ID |
- currency | Int | Yes | N/A | Currency ID |
Update RFQ
import requestsimport jsonurl = "{{BASE_URL}}/api/v1/items"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("POST", url, headers=headers, data=payload)print(response.text)
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)
The above command returns JSON structured like this:
{"id": 1000,"vendorIdList": [1005],"description": "one","documentDate": "09/28/2023","status": "draft","paymentTerms": 1006,"paymentMethod": 1004,"currency": 1008,"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 |
---|---|---|---|---|
description | String | Yes | N/A | Description of the document |
documentDate | Date (String) | Yes | N/A | Date of the document |
status | String | Yes | N/A | Status of the document |
paymentTerms | Int | Yes | N/A | Payment terms ID |
paymentMethod | Int | Yes | N/A | Payment method ID |
currency | Int | Yes | N/A | Currency ID |
vendorQuoteLine | Array of Objects | Yes | N/A | Array of objects containing vendor quote line details |
- lineAmount | Int | Yes | N/A | Amount of the line |
- itemId | Int | Yes | N/A | Item ID |
- quantity | Int | Yes | N/A | Quantity of the item |
- uomId | Int | Yes | N/A | Unit of measure ID |
- currency | Int | Yes | N/A | Currency ID |
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"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/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)
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)
The above command returns JSON structured like this:
{"id": 1000,"vendorId": 1046,"name": "","vendorDocumentNum": "1231","orderDate": "2023-12-05","description": "453","status": "open","taxAmount": 0,"discountAmount": 43010,"discountPercentage": 10,"taxPercentage": 0,"totalExclTax": 387090,"totalAmount": 387090,"paymentTermId": 1003,"paymentMethodId": 1001,"currencyId": 1007,"vendorQuoteId": 1033,"purchaseOrderLine": [{"itemId": 1060,"quantity": "100","quantityReceived": 0,"unitId": 1003,"unitCost": "15.00","quantityInvoiced": 0,"currencyId": 1007,"lineAmount": 1500,"siteId": 1009,"warehouseId": 1007}],"totalLinesAmount": "430100.00"}
This endpoint creates a PO.
HTTP Request
POST {{BASE_URL}}/purchaseOrderHeader
Body Parameters
Parameter | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
vendorId | Int | Yes | N/A | Vendor ID |
name | String | No | N/A | Name of the document |
vendorDocumentNum | String | Yes | N/A | Vendor document number |
orderDate | Date (String) | Yes | N/A | Date of the order |
description | String | Yes | N/A | Description of the document |
status | String | Yes | N/A | Status of the document |
taxAmount | Int | Yes | N/A | Tax amount |
discountAmount | Int | Yes | N/A | Discount amount |
discountPercentage | Int | Yes | N/A | Discount percentage |
taxPercentage | Int | Yes | N/A | Tax percentage |
totalExclTax | Int | Yes | N/A | Total amount excluding tax |
totalAmount | Int | Yes | N/A | Total amount including tax |
paymentTermId | Int | Yes | N/A | Payment term ID |
paymentMethodId | Int | Yes | N/A | Payment method ID |
currencyId | Int | Yes | N/A | Currency ID |
vendorQuoteId | Int | Yes | N/A | Vendor quote ID |
purchaseOrderLine | Array of Objects | Yes | N/A | Array of objects containing purchase order line details |
- itemId | Int | Yes | N/A | Item ID |
- quantity | String | Yes | N/A | Quantity of the item |
- quantityReceived | Int | Yes | N/A | Quantity received |
- unitId | Int | Yes | N/A | Unit ID |
- unitCost | String | Yes | N/A | Unit cost |
- quantityInvoiced | Int | Yes | N/A | Quantity invoiced |
- currencyId | Int | Yes | N/A | Currency ID |
- lineAmount | Int | Yes | N/A | Amount of the line |
- siteId | Int | Yes | N/A | Site ID |
- warehouseId | Int | Yes | N/A | Warehouse ID |
totalLinesAmount | String | Yes | N/A | Total amount of all lines |
Update PO
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)
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:
{"id": 1000,"vendorId": 1046,"name": "","vendorDocumentNum": "1231","orderDate": "2023-12-05","description": "453","status": "open","taxAmount": 0,"discountAmount": 43010,"discountPercentage": 10,"taxPercentage": 0,"totalExclTax": 387090,"totalAmount": 387090,"paymentTermId": 1003,"paymentMethodId": 1001,"currencyId": 1007,"vendorQuoteId": 1033,"purchaseOrderLine": [{"itemId": 1060,"quantity": "100","quantityReceived": 0,"unitId": 1003,"unitCost": "15.00","quantityInvoiced": 0,"currencyId": 1007,"lineAmount": 1500,"siteId": 1009,"warehouseId": 1007}],"totalLinesAmount": "430100.00"}
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 | Data Type | Required | Restrictions | Description |
---|---|---|---|---|
vendorId | Int | Yes | N/A | Vendor ID |
name | String | No | N/A | Name of the document |
vendorDocumentNum | String | Yes | N/A | Vendor document number |
orderDate | Date (String) | Yes | N/A | Date of the order |
description | String | Yes | N/A | Description of the document |
status | String | Yes | N/A | Status of the document |
taxAmount | Int | Yes | N/A | Tax amount |
discountAmount | Int | Yes | N/A | Discount amount |
discountPercentage | Int | Yes | N/A | Discount percentage |
taxPercentage | Int | Yes | N/A | Tax percentage |
totalExclTax | Int | Yes | N/A | Total amount excluding tax |
totalAmount | Int | Yes | N/A | Total amount including tax |
paymentTermId | Int | Yes | N/A | Payment term ID |
paymentMethodId | Int | Yes | N/A | Payment method ID |
currencyId | Int | Yes | N/A | Currency ID |
vendorQuoteId | Int | Yes | N/A | Vendor quote ID |
purchaseOrderLine | Array of Objects | Yes | N/A | Array of objects containing purchase order line details |
- itemId | Int | Yes | N/A | Item ID |
- quantity | String | Yes | N/A | Quantity of the item |
- quantityReceived | Int | Yes | N/A | Quantity received |
- unitId | Int | Yes | N/A | Unit ID |
- unitCost | String | Yes | N/A | Unit cost |
- quantityInvoiced | Int | Yes | N/A | Quantity invoiced |
- currencyId | Int | Yes | N/A | Currency ID |
- lineAmount | Int | Yes | N/A | Amount of the line |
- siteId | Int | Yes | N/A | Site ID |
- warehouseId | Int | Yes | N/A | Warehouse ID |
totalLinesAmount | String | Yes | N/A | Total amount of all lines |
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": 1015,"name": "76776","uomId": 1000,"unitCost": "777.00","imageUrl": "[]","authorized": false,"rating": null,"discountItemId": null,"taxGroupId": 1002,"itemGroupId": 1000,"uom": {"name": "KG","description": "KG"},"discountItem": null,"itemGroup": {"id": 1000,"groupName": "Electronics"},"taxGroup": {"id": 1002,"groupName": "Tax on PO","categoryName": "Real Tax","groupLines": [{"amount": 10,"id": 1009,"taxType": "percentage","depends_on": "bv","taxId": 1000,"taxGroupId": 1002,"tax": {"id": 1000,"code": "IT","description": "Income Tax"}},{"amount": 2000,"id": 1010,"taxType": "fixed","depends_on": "IT","taxId": 1004,"taxGroupId": 1002,"tax": {"id": 1004,"code": "FED","description": "Federal Exerice Duty."}},{"amount": 8,"id": 1011,"taxType": "percentage","depends_on": "FED","taxId": 1001,"taxGroupId": 1002,"tax": {"id": 1001,"code": "ITs","description": "Income Tax"}}]}}],"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}}/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
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 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": "a","company": 1003,"deletedAt": null,"createdAt": "2024-03-19T10:51:54.000Z","updatedAt": "2024-03-19T10:51:54.000Z","companyId": {"name": "bilal","address": "bilal","email": "bilal@email.com","phone": "123456"}}],"totalDocs": 0,"limit": 10,"page": 1,"totalPages": 1,"pagingCounter": null,"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 |