List Orders

Show all orders the requesting manager has access permissions to.

  • Method: GET

  • URL: /api/v1/orders/

Examples

Response 200
{
    "count": 5,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1593781720493279,
            "customer": {
                "id": 620,
                "total_orders": 14,
                "total_licenses": 45,
                "labels": [
                    {
                        "id": 3,
                        "label_id": 8,
                        "label": "Customer",
                        "color": "#ff9f43"
                    },
                    {
                        "id": 53,
                        "label_id": 34,
                        "label": "Loyal",
                        "color": "#3a0cd4"
                    }
                ],
                "email": "[email protected]",
                "first_name": "",
                "last_name": "",
                "company_name": "",
                "phone": "",
                "reference": "",
                "address": "",
                "postcode": "",
                "city": "",
                "country": "",
                "state": "",
                "clabels_all": "customerloyal",
                "cognito_user_pool_id": "",
                "metadata": {},
                "company": 277,
                "license_user": null,
                "clabels": [
                    8,
                    34
                ]
            },
            "customer_account": null,
            "has_active_licenses": false,
            "created_at": "2020-07-03T13:08:40Z",
            "updated_at": "2020-07-03T13:08:40Z",
            "store_id": "d2d2dce02c844d4492c9d48758aa143a",
            "type": "normal",
            "customer_email": null,
            "is_test": false,
            "customer_reference": null,
            "is_trial": false,
            "download_id": null,
            "language": null,
            "campaign_params": null,
            "customer_first_name": null,
            "customer_last_name": null,
            "customer_company": null,
            "customer_phone": null,
            "metadata": {},
            "company": 277
        },
        ...
    ]
}

Query Parameters

Ordering

  • order_by — Which attribute to order the list by.

    • Default ordering is ascending; prefix the attribute name with - to make it descending.

    • Examples:

      • order_by=created_at

      • order_by=-created_at

Pagination

Default pagination is 20 results per page.

  • limit — Number of results to return per page.

    • Example: limit=20

  • offset — The initial index from which to return the results.

    • Example: offset=21

Filtering

The results can be filtered by various attributes on the order or related to the order.

If available, additional suffixes can be appended to attributes which further define the filter:

1

startswith

  • __startswith — string value is a starting substring of the attribute

2

icontains

  • __icontains — string value is a substring of the attribute (case insensitive)

Possible filters:

  • store_id__icontains

  • customer__email

  • customer__email__startswith

  • customer__email__icontains

  • company

  • customer_id

  • customer_email

  • customer_company_name

  • customer_company_name__icontains

  • customer_reference__icontains

  • customer_name__icontains

  • customer_label__in

  • customer__account

  • customer__account__name

  • customer__account__name__icontains

  • customer__account__code

  • customer__account__code__icontains

  • customer__account__description

  • customer__account__description__icontains

  • customer__account__phone

  • customer__account__phone__icontains

  • customer__account__address

  • customer__account__address__icontains

  • customer__account__email

  • customer__account__email__icontains

  • customer__account__reference

  • customer__account__reference__icontains

  • customer__account__not

  • metadata

Was this helpful?