patch https://{shopdomain}.myshoplaza.com/openapi/2022-01/procurement//receive
Requires
write_product
access scope. More access scope
The Receive Procurement API processes the receipt of procurement items by updating their quantities (received and rejected) and recording any rejection reasons. This API is used for managing procurement workflows and tracking item status upon receipt.This API is especially useful for:
- Recording quantities of items received and rejected during the procurement process.
- Providing reasons for rejected items to ensure transparency in procurement workflows.
- Tracking and updating the state of procurement items for better inventory management.
Request Parameters
Public Request Parameters
Path Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
id | string | Yes | "382451985837728044" | The unique identifier of the procurement record. |
Body Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
items | array | Yes | See below | The array of items to update with received and rejected quantities. |
items. procurement_item_id | string | Yes | "382453603 865993516" | The unique identifier of the procurement item. |
items. received_quantity | integer | Yes | 5 | The quantity of the item that was successfully received. |
items. rejected_quantity | integer | Yes | 2 | The quantity of the item that was rejected. |
items. rejected_reason | string | No | "Damaged during shipping" | The reason for rejecting the item. |
Response Explanation
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
errors | Array | ["Supplier not found"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | Array | "error": "store is not active" | Indicates an error encountered during the process. |
Error Details
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | invalid |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
422 | Invalid Input | One or more of the following conditions apply: - procurement_item_id is invalid, missing or not found.- received_quantity is negative or exceeds pending quantity.- rejected_quantity is negative or exceeds pending quantity. | |
Duplicated procurement item id | API request contains multiple entries with the same procurement_item_id |