Retrieve Order List - Venddor API Documentation

Retrieve Order List

This endpoint allows you to retrieve a list of orders from the e-commerce platform. You can filter orders by status, apply pagination, and control the sorting order.

Endpoint URL: /api/orders
GET /api/orders

Retrieves a list of orders based on the specified filters and pagination parameters.

Authentication

Use Basic Authentication with your vendor credentials:

Authorization: Basic {base64_encoded_credentials}

Query Parameters

Parameter Type Required Description
status string No Filter orders by status. Available options:
P - In preparation
H - Dispatched
G - Cancellation requested
E - Sent to vendor
A - Pending customer acceptance
Y - Payment overdue
I - Canceled
B - Awaiting stock
D - Payment denied
F - Error
O - Open
C - Completed
J - Cancellation denied

Note: Additional status codes may be available depending on the e-commerce configuration.
items_per_page integer No Number of orders to return per page. Default: 20
page integer No Page number to retrieve. Default: 1
sort_order string No Order of results:
asc - Ascending (oldest orders first)
desc - Descending (newest orders first)

Default: desc
Tip: For regular order monitoring, we recommend filtering by specific status values to focus on orders that need your attention, such as new orders (E) or orders awaiting stock (B).

Example Requests

Get all canceled orders (status "I"), page 1
GET /api/orders?status=I&page=1
Get all dispatched orders (status "H") with custom pagination
GET /api/orders?status=H&items_per_page=10&page=2&sort_order=asc

Response Examples

Success Response (200)
Empty Results (200)
{
    "orders": [
        {
            "order_id": "5138",
            "issuer_id": "78",
            "user_id": "4031",
            "is_parent_order": "N",
            "parent_order_id": "0",
            "company_id": "32",
            "company": "",
            "timestamp": "1660336595",
            "firstname": "Próximo Supermercado",
            "lastname": "",
            "email": "encarregado@proximosupermercado.com.br",
            "phone": "(11)98888-7654",
            "status": "I",
            "total": "9790.00",
            "issuer_name": "João da Silva ",
            "invoice_id": null,
            "credit_memo_id": null,
            "cp_em_ip": "2db423c5",
            "pos_order_id": null
        },
        {
            "order_id": "5136",
            "issuer_id": "78",
            "user_id": "4031",
            "is_parent_order": "N",
            "parent_order_id": "0",
            "company_id": "32",
            "company": "",
            "timestamp": "1660335242",
            "firstname": "Próximo Supermercado",
            "lastname": "",
            "email": "encarregado@proximosupermercado.com.br",
            "phone": "(11)98888-7654",
            "status": "I",
            "total": "1353.50",
            "issuer_name": "João da Silva ",
            "invoice_id": null,
            "credit_memo_id": null,
            "cp_em_ip": "2db423c5",
            "pos_order_id": null
        },
        {
            "order_id": "5131",
            "issuer_id": "217",
            "user_id": "4031",
            "is_parent_order": "N",
            "parent_order_id": "0",
            "company_id": "32",
            "company": "",
            "timestamp": "1660246473",
            "firstname": "Próximo Supermercado",
            "lastname": "",
            "email": "encarregado@proximosupermercado.com.br",
            "phone": "(11)98888-7654",
            "status": "I",
            "total": "8147.67",
            "issuer_name": "Hélder Ltda ",
            "invoice_id": null,
            "credit_memo_id": null,
            "cp_em_ip": "bb3c5eaa",
            "pos_order_id": null
        }
    ]
}
{
    "orders": [],
    "params": {
        "page": 1,
        "items_per_page": 20,
        "extra": [
            "issuers",
            "invoice_docs",
            "memo_docs"
        ],
        "status": "X",
        "include_incompleted": false,
        "sort_order": "desc",
        "sort_by": "date",
        "sort_order_rev": "asc",
        "total_items": "0"
    }
}

Response Status Codes

Status Code Description
200 OK Request successful (even when no orders match the criteria)
400 Bad Request Invalid request parameters
401 Unauthorized Missing or invalid authentication credentials

Response Fields

Field Type Description
orders array List of order objects matching the query parameters
params object Query parameters used for the request (only present when no orders are found)

Order Object Fields

Field Type Description
order_id string Unique identifier for the order
issuer_id string ID of the user who placed the order
user_id string ID of the customer account
company_id string ID of the vendor company
timestamp string Order creation timestamp (Unix format)
firstname string Customer's first name or company name
email string Customer's email address
phone string Customer's phone number
status string Current order status
total string Total order value
issuer_name string Name of the person who placed the order
Note: For detailed information about a specific order, including line items, billing and shipping addresses, and payment information, use the Retrieve Order Details endpoint.