Fetch Orders


Get the orders available on the sales channel listing.

Basic Information

  • Method: GET
  • URI: /orders
  • Response Format: JSON

Headers

The following headers should be sent along with the request

  • Accept: application/json
  • Authorization: Your API Key

Request

Below table list the request parameters which can be sent to Fetch Orders API to filter records.

{info} The request parameters should be sent as query parameters in the URL.

Parameter Type Required Description
per_page Number No How many records you want at a time
page Number No Page number used for pagination
status String No Must be a valid Order status as specified in the status list
include String No Allowed value: "order_items". When this value is provided, the response will also include the order items (SKUs) along with each order. They are not included by default
order_id String No Order ID to fetch. Only the matched order will be returned in the response if you use this filter


List Of Order Statuses:

  1. new_order
  2. pending
  3. on_hold
  4. hub_assigned
  5. in_picking
  6. picked
  7. consolidated
  8. ready_to_pack
  9. in_packing
  10. ready_to_ship
  11. shipped
  12. packed
  13. cancelled
  14. delivered


Sample Request

https://dev-fc-api.aymakan.net/api/v1/orders?page=1&per_page=1&status=in_packing&include=order_items&order_id=order-190

Response

Sample response is added here:

{
    "success": true,
    "message": "",
    "data": [
        {
            "order_id": "order-190",
            "order_status": "on_hold",
            "customer": {
                "id": "",
                "first_name": "",
                "last_name": "",
                "mobile": "",
                "mobile_code": "",
                "email": "",
                "avatar": "",
                "gender": ""
            },
            "order_items": [
                {
                    "id": "",
                    "seller_sku_code": "",
                    "display_price": 0,
                    "selling_price": 699,
                    "is_substituted": false,
                    "substitute_seller_sku_codes": null,
                    "serialised_sku_codes": null,
                    "item_barcodes": null,
                    "quantity": 1,
                    "tax_percent": 10,
                    "tax": 69.9,
                    "reason": "",
                    "picked_quantity": 0,
                    "packed_quantity": 0,
                    "unit_price": 699,
                    "total": 768.9,
                    "tax_inclusive": true,
                    "discount": 100
                }
            ],
            "total": 1,
            "billing_address": {
                "address1": "123 Main Street",
                "address2": "",
                "city": "New York",
                "country": "United States",
                "first_name": "John",
                "last_name": "Doe",
                "phone": "123-456-7890",
                "state": "NY",
                "zip": "10001",
                "state_code": "NY",
                "country_code": "US",
                "latitude": 40.7128,
                "longitude": -74.006
            },
            "shipping_address": {
                "address1": "456 Elm Street",
                "address2": "",
                "city": "Los Angeles",
                "country": "United States",
                "first_name": "Jane",
                "last_name": "Smith",
                "phone": "987-654-3210",
                "state": "CA",
                "zip": "90001",
                "state_code": "CA",
                "country_code": "US",
                "latitude": 34.0522,
                "longitude": -118.2437
            },
            "transactions": [
                {
                    "created_at": "2023-12-06T12:58:23.527Z",
                    "amount": 699,
                    "type": 0,
                    "card_number": "",
                    "source_account": "",
                    "destination_account": "",
                    "status": 0,
                    "description": ""
                }
            ],
            "slot": {
                "delivery_date": "",
                "start_time": 0,
                "end_time": 0
            },
            "order_created_at": "2023-12-01T09:00:00Z",
            "invoice": {
                "currency": "USD",
                "subtotal": 699,
                "shipping_tax": 0,
                "sub_total_tax_inclusive": true,
                "sub_total_discount_inclusive": true,
                "shipping_tax_inclusive": false,
                "shipping_discount_inclusive": false,
                "shipping_price": 0,
                "shipping_refund": 0,
                "tax": 69.9,
                "tax_percent": 10,
                "discount": 100,
                "total": 768.9,
                "total_paid": 768.9,
                "payment_mode": "Credit Card"
            },
            "shipment": {
                "shipment_created_at": "0001-01-01T00:00:00Z",
                "order_delivered_at": "0001-01-01T00:00:00Z",
                "order_shipped_at": "0001-01-01T00:00:00Z"
            },
            "payment_method": "Prepaid",
            "meta_data": {
                "is_update_order_allowed": false
            }
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 1,
        "total": 1
    }
}