Skip to navigation

Create PO API

View as Markdown

Create Po API

This API endpoint is used to create a purchase order externally. The request should be sent as an HTTP POST to the specified URL. The request body should be in raw format and include data related to the owner, currency, billTo, shipTo, category, delivery date, list of items, vendor, attributes, forms, end date, contract ID, type, logo, posting details, and purchase order number.

Request Body

ParamRequiredTypeDescription
dataMandatoryObjectMain container for purchase order data.
ownerMandatoryObjectDetails about the owner of the purchase order.
ownerNameMandatoryStringName of the owner.
ownerEmailMandatoryStringEmail address of the owner.
currencyMandatoryStringThe currency code for the purchase order (e.g., “INR”).
superIdOptionalIntegerSuper ID associated with the purchase order.
billToMandatoryObjectBilling information.
nameMandatoryStringName for billing.
valueMandatoryIntegerBilling value.
shipToMandatoryObjectShipping information.
nameMandatoryStringName for shipping.
valueMandatoryIntegerShipping value.
categoryMandatoryObjectCategory information.
idMandatoryIntegerCategory ID.
labelMandatoryStringCategory label.
deliveryDateMandatoryIntegerDelivery date associated with the purchase order.
listMandatoryArrayArray of items in the purchase order.
baseMandatoryNumberBase amount for the item.
productMandatoryObjectProduct details.
labelMandatoryStringLabel of the product.
valueMandatoryIntegerValue of the product.
itemReferenceNoMandatoryStringItem reference number.
isMasterMandatoryBooleanIndicates if it’s a master product.
productIdMandatoryStringID of the product.
glOptionalStringGeneral ledger code.
imageOptionalStringURL or base64-encoded representation of the image.
titleOptionalStringTitle of the product.
descOptionalStringDescription of the product.
currencyMandatoryStringCurrency of the product.
hsnOptionalStringHarmonized System Nomenclature code.
skuOptionalStringStock Keeping Unit code.
typeOptionalStringType of the product.
serviceOptionalStringIndicates if it’s a service.
unitsOptionalStringUnits of the product.
saleMandatoryBooleanIndicates if the product is for sale.
amountMandatoryNumberAmount of the product.
buyMandatoryBooleanIndicates if the product is for purchase.
taxCodeOptionalStringTax code for the product.
qttyMandatoryNumberQuantity of the item.
notesOptionalStringAdditional notes for the item.
contractItemIdMandatoryStringContract item ID.
titleMandatoryStringTitle of the purchase order.
vendorMandatoryObjectVendor information.
idMandatoryIntegerVendor ID.
registeredIdMandatoryStringRegistered ID of the vendor.
attrsOptionalObjectAdditional attributes.
formsOptionalObjectForms associated with the purchase order.
endDateOptionalIntegerEnd date of the purchase order.
contractIdOptionalIntegerContract ID.
typeOptionalStringType of purchase order.
logoOptionalStringURL or base64-encoded representation of the logo.
postingTriggeredAtOptionalIntegerTimestamp when posting was triggered.
postingErrorsOptionalStringErrors encountered during posting.
postingDocNoOptionalStringDocument number generated during posting.
postingTriggeredOptionalBooleanIndicates if posting was triggered.
postingFailedOptionalBooleanIndicates if posting failed.
po_noOptionalStringPurchase order number.

Response

ParamTypeDescription
vouchersArrayContains the list of vouchers with various details such as ID, employee information, currency, amounts, status, and other attributes.
totalIntegerRepresents the total number of vouchers available.
currentPageIntegerIndicates the current page number.
totalPagesIntegerSpecifies the total number of pages based on the pageSize.

Example Response:

{
"orderId": "PO-INDIAN-00412",
"success": true,
"message": "PO created successfully"
}

Headers

DICE-APP-IDstringOptional
X-CLIENT-IDstringOptional
X-CLIENT-SECRETstringOptional

Request

This endpoint expects an object.
dataobjectRequired

Response

OK
orderIdstring
successboolean
messagestring