MEFS API Reference Help

Get list of Orders

This API allows clients to retrieve a list of orders per Brand with various filtering options. It supports pagination and sorting, making it easy to manage and navigate through large sets of order data. The API is designed to be flexible, providing multiple parameters to refine the search results based on specific criteria.

Paging

The API supports pagination. Default pagination values are:

  • Page size: 10

  • Page number: 1

If a request is made for a page number greater than the total number of pages, or if any other invalid values are provided for page size and page number, the API will return a 400 Bad Request error.

The successful response contains the total number of items that match the filtering parameters. The client can calculate the page count using the formula:

Filtering

The API provides robust filtering options to help users refine their search results and retrieve only the most relevant orders. Users can apply multiple filters simultaneously to narrow down the list of orders based on specific criteria. The available filtering parameters include:

  • Order Code: Filter orders by the order code mask. Minimum length of the search term is 3 symbols, maximum - 11 symbols. Only letters and digits are allowed.

  • External Id: Filter orders by the identifier from the partner`s ordering system. Minimum length of the search term is 3 symbols, maximum - 20 symbols. Certain special symbols are forbidden.

  • Shop Id: Filter orders by the list of specific shop identifiers. Multiple values can be provided.

  • External Shop Id: Filter orders by the external shop identifier. Minimum length of the search term is 3 symbols, maximum - 11 symbols. Only letters and digits are allowed.

  • Status: Filter orders based on their current statuses. Please refer to that article for specific statuses. Multiple values can be provided.

  • From: Retrieve orders placed from a specific start date

  • To: Retrieve orders placed up to a specific end date

  • ShippedFrom: Retrieve orders shipped from a specific start date

  • ShippedTo: Retrieve orders shipped up to a specific end date

These filtering options allow for precise and efficient data retrieval, making it easier to manage and analyze order information.

Sorting

The API supports sorting. Clients can specify the sorting criteria using the following parameters:

  • Sort By: The field by which to sort the orders

  • Sort Direction: The direction of the sort, either ascending "1" or descending "0"

By default, the orders are sorted by orderId in descending order, meaning the latest orders appear first. Clients can request sorting by the next parameters:

  • Order Code

  • Creation Date

  • Due Date

  • Shipped Date

API Reference

/api/v1/orders

Request parameters

Responses

{ "orders": [ { "id": 12703, "orderCode": "EYE25ORDCDE", "creationDate": "2025-01-07T12:08:16.413Z", "dueDate": "2025-01-17T12:08:16.413Z", "status": "InProduction", "externalId": "EXTERNAl-REFERENCE-35", "trackingNumber": null, "shippedDate": null, "shopId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "shop": { "id": "EyewearShop2", "externalId": null }, "creatorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "creatorEmail": "optician@eyewear.shop", "customer": { "firstName": "John", "lastName": "Doe", "reference": "Customer-JD-2025" }, "product": { "id": 1, "code": "Style01", "name": "In Style 01" } } ], "total": 1, "page": 1, "pageSize": 10 }
{ "type": "example", "title": "example", "status": 96, "detail": "example", "instance": "example" }
{ "type": "example", "title": "example", "status": 96, "detail": "example", "instance": "example" }
Last modified: 30 квітня 2025