latestOpenAPI 3.1.02026-08-1828105315.1 KB

cc009fec5cdd

Orders

v2-listOrderDocuments - List documents

<div class="extension-title">Description</div>

Use this API to retrieve documents across orders with pagination support.

Each document in the response includes its associated order_id along with metadata such as name, type, size, and last update date.

Documents are returned as a flat list sorted by updated_at in descending order (most recent first).

<div class="api-description-extension"> <div class="extension-title">Call Frequency</div> <div class="recommended-call-frequency">Recommended usage: When you need to retrieve documents for orders</div> <div class="max-call-frequency">Maximum usage: When you need to retrieve documents for orders</div> <div class="extension-title">Pagination</div> <p>This resource supports seek pagination (<a href="#section/Seek-pagination-and-sort">see documentation</a>)</p> <div class="extension-title">Sort fields</div>

<code>sort</code> field can have the following values:<ul><li><b>updated_at</b> (Default) - Sort by document last update time (desc by default)</li></ul>

</div>
get/v2/orders/documents

Query parameters

order_idsstring[]

Optional list of order identifiers in Mirakl Connect to filter documents

typesstring[]

Filter by Connect document types

channel_typesstring[]

Filter by channel-specific document types.

Only applicable when one of the types is <code>CHANNEL_SPECIFIC</code>.

updated_fromstring date-time
Example:2024-01-15T10:30:00Z

Select documents that were last updated in Mirakl Connect from the specified date time.

page_tokenstring

Token to access a specific page of results

limitinteger

Maximum number of documents to return per page

Response

List of documents sorted by updated_at in descending order

next_page_tokenstring

Token to access the next page. Absent if the current page is the last one.

previous_page_tokenstring

Token to access the previous page. Absent if the current page is the first one.

Example response

{
  "documents": [
    {
      "file_format": "application/pdf",
      "id": "doc-uuid-1234-5678-90ab-cdef",
      "name": "invoice_2024.pdf",
      "size_in_bytes": 245680,
      "type": "CUSTOMER_INVOICE",
      "updated_at": "2024-10-15T14:30:00Z",
      "order_id": "0024_COMMERCIAL_ID-A"
    }
  ]
}