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 requests
import json
url = "{{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 portal
api = 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 requests
import json
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
nameStringYesN/AName of the user
emailStringYesN/AEmail address of the user
passwordStringYesN/APassword for the user account
genderStringYesN/AGender of the user
roleIdIntYesN/ARole ID of the user
tenantIdIntYesN/ATenant ID of the user

Create Vendor

import requests
import json
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
creditLimitNumberYesN/AVendor's credit limit
taxRegistrationNumberStringYesN/ATax registration number
billingAddressStringYesN/ABilling address
shippingAddressStringYesN/AShipping address
emailStringYesN/AVendor contact email
vendorGroupIdIntegerYesN/AVendor group identifier
phoneNumberStringYesN/APrimary contact number
currencyCodeIntegerYesN/ACurrency code for transactions
paymentTermsInteger/NullNoN/APayment terms ID
paymentMethodInteger/NullNoN/APayment method ID
companyNameStringYesN/ALegal company name
tradeLicenseNoStringNoN/ATrade license number
businessAddressStringNoN/ABusiness physical address
businessNameStringNoN/ABusiness trading name
businessDirectPhoneStringNoN/ABusiness direct line
businessEmailStringNoN/ABusiness email address
businessCellPhoneStringNoN/ABusiness mobile number
authorizedNameStringNoN/AAuthorized person's name
authorizedTitleStringNoN/AAuthorized person's title
authorizedEmailStringNoN/AAuthorized person's email
authorizedDirectPhoneStringNoN/AAuthorized person's direct line
authorizedCellPhoneStringNoN/AAuthorized person's mobile
billingPOBoxStringNoN/ABilling PO Box number
billingZipCodeStringNoN/ABilling zip/postal code
billingCityStringNoN/ABilling city
billingCountryStringNoN/ABilling country
billingNameStringNoN/ABilling contact name
billingTitleStringNoN/ABilling contact title
billingEmailStringNoN/ABilling contact email
billingDirectPhoneStringNoN/ABilling contact direct line
billingCellPhoneStringNoN/ABilling contact mobile
legalStatusOfCompanyStringNoN/ACompany legal structure
authStringNoN/AAuthorization code
vendorTypeStringYesMust be "supplier" or "customer"Vendor classification
vendorUniqueIdStringYesN/AUnique vendor identifier
defaultContactIntegerYesN/ADefault contact person ID

Get all vendors

import requests
url = "{{BASE_URL}}/api/v1/vendor"
payload = {}
headers = {
'Authorization': 'Bearer token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
import requests
url = "{{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 requests
import json
url = "{{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 requests
import json
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Body Parameters

ParameterData TypeRequiredRestrictionsDescription
nameStringYesN/AName of the user
emailStringYesN/AEmail address of the user
passwordStringYesN/APassword for the user account
genderStringYesN/AGender of the user
roleIdIntYesN/ARole ID of the user
vendorObjectYesN/AVendor details
- nameStringYesN/AName of the vendor
- creditLimitIntYesN/ACredit limit of the vendor
- taxRegistrationNumberStringYesN/ATax registration number of the vendor
- billingAddressStringYesN/ABilling address of the vendor
- shippingAddressStringYesN/AShipping address of the vendor
- emailStringYesN/AEmail address of the vendor
- phoneNoStringYesN/APhone number of the vendor
- currencyCodeIntYesN/ACurrency code of the vendor
- paymentTermsIntYesN/APayment terms of the vendor
- paymentMethodIntYesN/APayment method of the vendor
- companyNameStringYesN/ACompany name of the vendor
- tradeLicenseNoStringYesN/ATrade license number of the vendor
- businessAddressStringYesN/ABusiness address of the vendor
- businessNameStringYesN/ABusiness name of the vendor
- businessDirectPhoneStringYesN/ABusiness direct phone number of the vendor
- businessEmailStringYesN/ABusiness email address of the vendor
- businessCellPhoneStringYesN/ABusiness cell phone number of the vendor
- authorizedNameStringYesN/AAuthorized person's name
- authorizedTitleStringYesN/AAuthorized person's title
- authorizedEmailStringYesN/AAuthorized person's email address
- authorizedDirectPhoneStringYesN/AAuthorized person's direct phone number
- authorizedCellPhoneStringYesN/AAuthorized person's cell phone number
- billingPOBoxStringYesN/ABilling PO Box
- billingZipCodeStringYesN/ABilling zip code
- billingCityStringYesN/ABilling city
- billingCountryStringYesN/ABilling country
- billingNameStringYesN/ABilling name
- billingTitleStringYesN/ABilling title
- billingEmailStringYesN/ABilling email address
- billingDirectPhoneStringYesN/ABilling direct phone number
- billingCellPhoneStringYesN/ABilling cell phone number
- legalStatusOfCompanyStringYesN/ALegal status of the company
- authStringYesN/AAuthorization code

Delete Vendor

import requests
url = "{{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 requests
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Request For Quotation

Get All RFQs

import requests
url = "{{BASE_URL}}/api/v1/purchaseOrderHeader"
payload = {}
headers = {
'Authorization': 'Bearer token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
import requests
url = "{{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

ParameterDescription
idIf value is given, it'll give the specific rfq .
documentDateA date range to give rfqs of the specific date range (MM/DD/YYYYtoMM/DD/YYYY).
statusIf value is given, it'll give the rfqs of that given status (ENUM:[draft,sent,rejected,approved]) .

Create RFQ

import requests
import json
url = "{{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 requests
import json
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
vendorIdListArray<string | number>YesMust be arrayList of vendor IDs
vendorGroupIdnumberNoN/AVendor group identifier
itemGroupIdnumberNoN/AItem group identifier
descriptionstringNoMax 60 charsDescription of request
document_urlstringNoN/ADocument URL
documentDateDateNoN/ADocument date
lastSubmissionDateDateNoN/ALast submission date
deliveryDateDateNoN/AExpected delivery date
statusRequestForQuoteHeaderStatusNoMust be valid enum valueRFQ status
paymentTermsnumberNoN/APayment terms ID
paymentMethodnumberNoN/APayment method ID
currencynumberNoN/ACurrency ID
vendorQuoteLineanyNoN/AVendor quote line items
totalAmountnumberNoMin 0Total amount
rfoNumberstringNoN/ARFQ number
siteIdnumberNoN/ASite ID
departmentIdnumberNoN/ADepartment ID
requesterIdnumberYesN/ARequester user ID
plantNumberstringNoN/APlant number

Update RFQ

import requests
import json
url = "{{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 requests
import json
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Body Parameters

ParameterData TypeRequiredRestrictionsDescription
vendorIdListArray<string | number>YesMust be arrayList of vendor IDs
vendorGroupIdnumberNoN/AVendor group identifier
itemGroupIdnumberNoN/AItem group identifier
descriptionstringNoMax 60 charsDescription of request
document_urlstringNoN/ADocument URL
documentDateDateNoN/ADocument date
lastSubmissionDateDateNoN/ALast submission date
deliveryDateDateNoN/AExpected delivery date
statusRequestForQuoteHeaderStatusNoMust be valid enum valueRFQ status
paymentTermsnumberNoN/APayment terms ID
paymentMethodnumberNoN/APayment method ID
currencynumberNoN/ACurrency ID
vendorQuoteLineanyNoN/AVendor quote line items
totalAmountnumberNoMin 0Total amount
rfoNumberstringNoN/ARFQ number
siteIdnumberNoN/ASite ID
departmentIdnumberNoN/ADepartment ID
requesterIdnumberYesN/ARequester user ID
plantNumberstringNoN/APlant number

Delete RFQ

import requests
url = "{{BASE_URL}}/api/v1/invoice-header"
payload = {}
headers = {
'Authorization': 'Bearer token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
import requests
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Purchase Order

Get All POs

import requests
url = "{{BASE_URL}}/api/v1/items/1000"
payload = {}
headers = {
'Authorization': 'Bearer token'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
import requests
url = "{{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

ParameterDescription
idIf value is given, it'll give the specific po .
orderDateA date range to give POs of the specific date range (MM/DD/YYYYtoMM/DD/YYYY).
statusIf value is given, it'll give the POs of that given status (ENUM:[open,received,invoiced,cancelled]) .

Create PO

import requests
import json
url = "{{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 requests
import json
url = "{{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

ParameterTypeRequiredConstraintsDescription
vendorIdnumberNo-Vendor identifier
namestringNoMax 60 charsPurchase order name
itemGroupIdnumberNo-Item group identifier
descriptionstringNoMax 60 charsOrder description
vendorDocumentNumstringNoMax 20 charsVendor document number
taxAmountnumberNoMin: 0Tax amount
discountAmountnumberNoMin: 0Discount amount
discountPercentagenumberNo0-100Discount percentage
taxPercentagenumberNo0-100Tax percentage
totalExclTaxnumberNoMin: 0Total before tax
totalAmountnumberNoMin: 0Final total amount
statusPurchaseOrderHeaderStatusNoEnum: OPEN, RECEIVED, INVOICED, CANCELLEDOrder status
orderDateDateNo-Date of order
expectedDeliveryDateDateYes-Expected delivery date
quoteNumstringNoMax 10 charsQuote number
paymentTermIdnumberNo-Payment terms ID
paymentMethodIdnumberNo-Payment method ID
vendorQuoteIdnumberNo-Vendor quote ID
currencyIdnumberYes-Currency identifier
siteIdnumberYes-Site identifier
warehouseIdnumberYes-Warehouse identifier
purchaseOrderLineCreatePurchaseOrderLineDto[]Yes-Array of line items

Purchase Order Line Item DTO

ParameterTypeRequiredDescription
itemIdstringYesItem identifier
quantitynumberNoOrdered quantity
quantityInvoicednumberNoQuantity already invoiced
skuNumberstringNoStock keeping unit number
unitIdstringNoUnit of measure ID
unitCostnumberNoCost per unit
currencyIdstringNoCurrency identifier
siteIdstringYesSite identifier
warehouseIdstringYesWarehouse identifier
taxAmountnumberNoTax amount for line item

Update PO

import requests
import json
url = "{{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 requests
import json
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Body Parameters

ParameterTypeRequiredConstraintsDescription
vendorIdnumberNo-Vendor identifier
namestringNoMax 60 charsPurchase order name
itemGroupIdnumberNo-Item group identifier
descriptionstringNoMax 60 charsOrder description
vendorDocumentNumstringNoMax 20 charsVendor document number
taxAmountnumberNoMin: 0Tax amount
discountAmountnumberNoMin: 0Discount amount
discountPercentagenumberNo0-100Discount percentage
taxPercentagenumberNo0-100Tax percentage
totalExclTaxnumberNoMin: 0Total before tax
totalAmountnumberNoMin: 0Final total amount
statusPurchaseOrderHeaderStatusNoEnum: OPEN, RECEIVED, INVOICED, CANCELLEDOrder status
orderDateDateNo-Date of order
expectedDeliveryDateDateYes-Expected delivery date
quoteNumstringNoMax 10 charsQuote number
paymentTermIdnumberNo-Payment terms ID
paymentMethodIdnumberNo-Payment method ID
vendorQuoteIdnumberNo-Vendor quote ID
currencyIdnumberYes-Currency identifier
siteIdnumberYes-Site identifier
warehouseIdnumberYes-Warehouse identifier
purchaseOrderLineCreatePurchaseOrderLineDto[]Yes-Array of line items

Purchase Order Line Item DTO

ParameterTypeRequiredDescription
itemIdstringYesItem identifier
quantitynumberNoOrdered quantity
quantityInvoicednumberNoQuantity already invoiced
skuNumberstringNoStock keeping unit number
unitIdstringNoUnit of measure ID
unitCostnumberNoCost per unit
currencyIdstringNoCurrency identifier
siteIdstringYesSite identifier
warehouseIdstringYesWarehouse identifier
taxAmountnumberNoTax amount for line item

Delete PO

import requests
url = "{{BASE_URL}}/api/v1/sites/1000"
payload = {}
headers = {
'Authorization': 'Bearer token'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
import requests
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Invoices

Get All Invoices

import requests
url = "{{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

ParameterDescription
nameName of product.
priceRangeA price range to give products of the specific range (00to00).
idId of product.

Create Product

import requests
import json
url = "{{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

ParameterData TypeRequiredRestrictionsDescription
nameStringYesN/AName of the item
unitCostStringYesN/ACost per unit of the item
uomIdIntYesN/AUnit of measure ID
imageUrlArray of ObjectsYesN/AArray of objects containing image details
- filenameStringYesN/AFilename of the image
- urlStringYesN/AURL of the image
itemGroupIdIntYesN/AItem 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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Body Parameters

ParameterData TypeRequiredRestrictionsDescription
nameStringYesN/AName of the item
unitCostStringYesN/ACost per unit of the item
uomIdIntYesN/AUnit of measure ID
imageUrlArray of ObjectsYesN/AArray of objects containing image details
- filenameStringYesN/AFilename of the image
- urlStringYesN/AURL of the image
itemGroupIdIntYesN/AItem 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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId 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

ParameterData TypeRequiredRestrictionsDescription
companyIntYesN/AId of the company (foreign key)
nameStringYesN/AName 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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Body Parameters

ParameterData TypeRequiredRestrictionsDescription
companyIntYesN/AId of the company (foreign key)
nameStringYesN/AName 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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId 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

ParameterData TypeRequiredRestrictionsDescription
siteIntYesN/AId of the site (foreign key)
nameStringYesN/AName 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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document

Body Parameters

ParameterData TypeRequiredRestrictionsDescription
siteIntYesN/AId of the site (foreign key)
nameStringYesN/AName 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

ParameterData TypeRequiredRestrictionsDescription
idnumberYesN/AId of the document