List 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:

  1. Fetching procurement records based on specific criteria for management or reporting.
  2. Filtering procurement records by state or date range.
  3. Managing large procurement datasets with pagination.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

ParameterTypeRequiredExampleDescription
pageint32Yes1Page number for pagination. Must be greater than 0. Default: 1.
limitint32Yes10Number of records per page. Must be greater than 0 and less than 100. Default: 10.
idsarrayNo["928374928374982734"]Array of procurement IDs to filter by. Each ID must be a valid UUID.
stateint32No1Procurement state filter. Accepted values: 1 (waiting for stock), 2 (partial receipt), 3 (complete receipt), 4 (cancelled).
created_at_minstringNo2023-01-01T00:00:00ZFilter procurements created at or after this date (ISO-8601 format).
created_at_maxstringNo2023-01-31T23:59:59ZFilter procurements created at or before this date (ISO-8601 format).
updated_at_minstringNo2023-01-01T00:00:00ZFilter procurements updated at or after this date (ISO-8601 format).
updated_at_maxstringNo2023-01-31T23:59:59ZFilter procurements updated at or before this date (ISO-8601 format).

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeExampleDescription
countint3215Total number of procurements matching the criteria.
procurementsarrayList of procurement objects.
procurements.idstring"928374928374982734"Unique ID of the procurement.
procurements.stateint321Current state of the procurement.
procurements.supplier_idstring"382453603865993516"ID of the supplier associated with the procurement.
procurements.notestring"Procurement of electronics"Optional note added to the procurement.
procurements.created_atstring"2024-05-20T10:00:00Z"Timestamp when the procurement was created.
procurements.updated_atstring"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.

FieldTypeExampleDescription
errorArray"error": "store is not active"Indicates an error encountered during the process.

Error Details

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!