Endpoint: PATCH /api/v3/purchase-orders/{id}/information
Purpose
Update specific details of a purchase order, such as supplier invoice ID, issue date, due date, expected completion date, notes, and custom attributes.
Use Case
This endpoint is used to modify the information of an existing purchase order identified by its unique ID. It is typically utilized in procurement systems to ensure the accuracy of purchase order records by updating metadata, timelines, and custom attributes.
Request Data
Field | Type | Description |
---|---|---|
id | string | The unique identifier of the purchase order. |
{
"purchase-order": {
"supplier_invoice_id": "SUPPLIER_INVOICE_ID",
"issue_date": "ISSUE_DATE",
"due_date": "DUE_DATE",
"expected_completion_date": "EXPECTED_COMPLETION_DATE",
"purchase_order_note": "NOTE",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
]
}
}
Response
The response provides the updated details of the specified purchase order, including its unique identifier, status, associated account, supplier invoice ID, issue date, due date, expected completion date, and purchase order note. Additionally, custom attributes are returned with their updated values. The response also includes detailed information about the line items, such as their quantities, pricing snapshots, tax configurations, and metadata.
{
"purchase_order": {
"status": "STATUS",
"id": "PURCHASE_ORDER_ID",
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"supplier_invoice_id": "SUPPLIER_INVOICE_ID",
"issue_date": "ISSUE_DATE",
"due_date": "DUE_DATE",
"expected_completion_date": "EXPECTED_COMPLETION_DATE",
"subtotal": "SUBTOTAL",
"tax": "TAX_AMOUNT",
"total": "TOTAL_AMOUNT",
"price_tax_inclusive": "IS_TAX_INCLUSIVE",
"purchase_order_note": "NOTE",
"account_id": "ACCOUNT_ID",
"created_by": "CREATED_BY",
"created_on": "CREATION_TIMESTAMP",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_TIMESTAMP",
"uuid": "PURCHASE_ORDER_UUID",
"version": "VERSION",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
],
"lines": [
{
"subtotal": "LINE_SUBTOTAL",
"total": "LINE_TOTAL",
"tax": "LINE_TAX",
"item_uuid": "ITEM_UUID",
"item_id": "ITEM_ID",
"item_name": "ITEM_NAME",
"item_quantity": "ITEM_QUANTITY",
"item_price_snapshot": {
"pricing_rule": {
"uuid": "PRICING_RULE_UUID",
"version": "PRICING_VERSION",
"price_type": "PRICE_TYPE",
"price": "ITEM_PRICE",
"uom": "UNIT_OF_MEASURE",
"warehouse": "WAREHOUSE_NAME"
}
},
"item_purchase_tax_configuration": {
"purchase_price_is_tax_inclusive": "IS_TAX_INCLUSIVE",
"tax_code": {
"uuid": "TAX_CODE_UUID",
"code": "TAX_CODE",
"rate": "TAX_RATE",
"link": "TAX_LINK"
}
},
"item_price_tax_exempt": "IS_TAX_EXEMPT",
"item_price_tax": {
"uuid": "ITEM_TAX_UUID",
"code": "TAX_CODE",
"rate": "TAX_RATE",
"link": "TAX_LINK"
},
"uuid": "LINE_UUID",
"version": "LINE_VERSION"
}
]
}
}