Retrieve Order Details - Venddor API Documentation

Retrieve Order Details

This endpoint allows you to retrieve detailed information about a specific order, including products, customer data, shipping information, and payment details.

Endpoint URL: /api/orders/{order_id}
GET /api/orders/{order_id}

Retrieves comprehensive details for a specific order.

Authentication

Use Basic Authentication with your vendor credentials:

Authorization: Basic {base64_encoded_credentials}

Path Parameters

Parameter Type Required Description
order_id* integer Yes The unique identifier of the order you want to retrieve
Tip: You can obtain the order_id from the list of orders returned by the Retrieve Order List endpoint.

Example Request

Get details for order #5138
GET /api/orders/5138

Response Examples

Success Response (200)
Order Not Found (200)

The success response returns a comprehensive JSON object with all details about the order. For brevity, we're showing a simplified version of the response below. The actual response will contain additional nested objects for products, payment methods, shipping information, etc.

{
    "order_id": "5138",
    "is_parent_order": "N",
    "parent_order_id": "0",
    "company_id": "32",
    "issuer_id": "78",
    "user_id": "4031",
    "total": "9790.00",
    "subtotal": 9495,
    "discount": 0,
    "payment_surcharge": 290,
    "shipping_cost": "5.00",
    "timestamp": "1660336595",
    "status": "I",
    "firstname": "Próximo Supermercado",
    "lastname": "",
    "company": "Próximo Supermercado Ltda",
    "email": "encarregado@proximosupermercado.com.br",
    "phone": "(11)98888-7654",
    "products": {
        "1890077599": {
            "item_id": "1890077599",
            "order_id": "5138",
            "product_id": "693013",
            "product_code": "7898953436099",
            "price": "1956.97",
            "amount": "5",
            "product": "Pao De Queijo Assador 1kg Lanche",
            "base_price": 1899
        }
    },
    "shipping": [
        {
            "shipping_id": "17",
            "shipping": "Transportadora Velocidade",
            "delivery_time": "10 dias",
            "rate": 5
        }
    ],
    "payment_method": {
        "payment_id": "39",
        "payment": "Boleto a faturar (7 dias)"
    }
}
{
    "pos_order_id": "",
    "email": null
}

Response Status Codes

Status Code Description
200 OK Request successful. Note that this code is returned even when the order is not found.
400 Bad Request Invalid request format
401 Unauthorized Missing or invalid authentication credentials

Key Response Objects

Order Basic Information

Field Type Description
order_id string Unique identifier for the order
timestamp string Order creation timestamp (Unix format)
status string Current order status code
total string Total order amount
subtotal number Subtotal of all products before shipping and fees
discount number Discount amount applied to the order
payment_surcharge number Additional fee based on payment method
shipping_cost string Shipping cost

Customer Information

Field Type Description
firstname string Customer's first name or company name
lastname string Customer's last name (if applicable)
company string Customer's company name
email string Customer's email address
phone string Customer's phone number

Billing Address Fields

Field Type Description
b_firstname string Billing contact first name
b_lastname string Billing contact last name
b_address string Billing address street and number
b_city string Billing address city
b_state string Billing address state
b_country string Billing address country code
b_zipcode string Billing address ZIP code
b_phone string Billing contact phone number

Shipping Address Fields

Field Type Description
s_firstname string Shipping contact first name
s_lastname string Shipping contact last name
s_address string Shipping address street and number
s_city string Shipping address city
s_district string Shipping address district/neighborhood
s_state string Shipping address state
s_country string Shipping address country code
s_zipcode string Shipping address ZIP code
s_phone string Shipping contact phone number

Product Information

Field Type Description
products object Object containing product details keyed by item_id
product_id string Internal product ID
product_code string Product barcode or universal product code
product string Product name
price string Unit price charged in the order
amount string Quantity ordered
base_price number Base price before discounts
Important: If the order is not found, the response will return a 200 OK status with minimal data. Check for the presence of essential fields like order_id to determine if the order was found.
Note: The complete response contains much more information than shown here, including detailed payment method information, shipping method details, product variations, and more. This documentation highlights the most commonly used fields.