get https://{shopdomain}.myshoplaza.com/openapi/2022-01/procurements
Requires
read_product
access scope. More access scope
The List Procurements API retrieves a list of procurement records with optional filters such as state, creation date, or update date. This API supports pagination to manage large datasets efficiently.This API is especially useful for:
- Fetching procurement records based on specific criteria for management or reporting.
- Filtering procurement records by state or date range.
- Managing large procurement datasets with pagination.
Request Parameters
Public Request Parameters
Query Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
page | int32 | Yes | 1 | Page number for pagination. Must be greater than 0 . Default: 1 . |
limit | int32 | Yes | 10 | Number of records per page. Must be greater than 0 and less than 100 . Default: 10 . |
ids | array | No | ["928374928374982734"] | Array of procurement IDs to filter by. Each ID must be a valid UUID. |
state | int32 | No | 1 | Procurement state filter. Accepted values: 1 (waiting for stock), 2 (partial receipt), 3 (complete receipt), 4 (cancelled). |
created_at_min | string | No | 2023-01-01T00:00:00Z | Filter procurements created at or after this date (ISO-8601 format). |
created_at_max | string | No | 2023-01-31T23:59:59Z | Filter procurements created at or before this date (ISO-8601 format). |
updated_at_min | string | No | 2023-01-01T00:00:00Z | Filter procurements updated at or after this date (ISO-8601 format). |
updated_at_max | string | No | 2023-01-31T23:59:59Z | Filter procurements updated at or before this date (ISO-8601 format). |
Response Explanation
Public Response Parameters
Success Response
Field | Type | Example | Description |
---|---|---|---|
count | int32 | 15 | Total number of procurements matching the criteria. |
procurements | array | List of procurement objects. | |
procurements.id | string | "928374928374982734" | Unique ID of the procurement. |
procurements.state | int32 | 1 | Current state of the procurement. |
procurements.supplier_id | string | "382453603865993516" | ID of the supplier associated with the procurement. |
procurements.note | string | "Procurement of electronics" | Optional note added to the procurement. |
procurements.created_at | string | "2024-05-20T10:00:00Z" | Timestamp when the procurement was created. |
procurements.updated_at | string | "2024-05-21T12:00:00Z" | Timestamp when the procurement was last updated. |
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 |
---|---|---|---|
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). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized |