Create Purchase Order Note: /purchase-orders/{id}/notes
Purpose
This API allows users to add a new note to a purchase order. The note can contain plain or rich-text content and may include an attached file such as a document, image, or PDF. It’s commonly used for annotating purchase orders with explanations, approvals, comments, or supporting documentation.
Use Case
- Attach supplier invoices, receipts, or supporting files to a purchase order.
- Allow procurement officers to add approval notes directly linked to a purchase order.
- Maintain an auditable record of purchase order-related discussions and decisions.
Path Parameters
Parameter | Type | Description |
---|---|---|
purchase_order_id |
string | Unique identifier of the purchase order to which the note will be attached. |
Query Parameters
No query parameters required for this endpoint.
Request Body
The request body must be sent as multipart/form-data because it contains text and files.
Attribute | Type | Description |
---|---|---|
note | string | Updated content of the note. Supports HTML formatting. |
file | file | File(s) to attach with the note. Multiple files are allowed. Accepts common document and image formats |
Response
On success, the response confirms that a note has been successfully added to the specified purchase order. The purchase-order object contains a notes object, which provides the unique identifier (uuid) of the newly created note.
Response Body
{
"purchase-order": {
"notes": {
"uuid": "{{NOTE_UUID}}"
}
}
}
Attribute | Type | Description |
---|---|---|
purchase-order |
object | Root object indicating the target purchase order. |
purchase-order.notes |
object | Container for the newly created note details. |
purchase-order.notes.uuid |
string (UUID) | Unique identifier of the newly added note. |
Cancel a Purchase Order : /purchase-orders/{id}/cancel
Purpose
This endpoint is used to cancel an existing purchase order in the system. Once cancelled, the purchase order will no longer be active and cannot be used for further processing (e.g., receiving goods, invoicing).
Use Case
A user (such as a procurement officer or finance manager) may need to cancel a purchase order due to changes in supplier availability, pricing, incorrect information, or order duplication. This API provides a programmatic way to transition a purchase order to the Cancelled state.
Path Parameters
Parameter | Type | Description |
---|---|---|
id |
string | The unique identifier of the purchase order to cancel. |
Query Parameters
No query parameters required for this endpoint.
Request Body
No request body is required for this endpoint.
Response
This endpoint does not return a response body. Upon successful execution, the account is deleted and an HTTP 204 No Content status code is returned.
Reactivate a Purchase Order : /purchase-orders/{id}/reactivate
Purpose
This endpoint is used to reactivate a previously cancelled purchase order. Reactivating a purchase order allows users to resume processing it (e.g., receiving goods or generating invoices) without creating a new purchase order from scratch.
Use Case
A procurement or finance team may cancel a purchase order due to a temporary supplier issue, pricing conflict, or internal approval delays. If the conditions change — for example, the supplier becomes available again or the error is resolved — the same purchase order can be reactivated using this API, thus maintaining order history and continuity.
Path Parameters
Parameter | Type | Description |
---|---|---|
id |
string | Unique identifier of the purchase order to reactivate. |
Query Parameters
No query parameters required for this endpoint.
Request Body
No request body is required for this endpoint.
Response
This endpoint does not return a response body. Upon successful execution, the account is deleted and an HTTP 204 No Content status code is returned.