Get Orders

Description

Returns a collection of Orders.

Request

HTTP Method: GET

URI Path: /v3/orders

URI Query Parameters:

Name

Type

Is Required?

Description

filter[<filter_name>]

string, DateTime

Optional

Filtering

sort

string

Optional

Sorting

Filters:

Filter Name

Type

Allow Blank

Allow Array

Filters by:

id

string

No

Yes

Order id field.

status

Array[String]

Yes

Yes

Order status field.
Possible values:
Pending
Canceled
Completed

created_at_gteq

DateTime

No

No

The created_at_gteq field.

created_at_lteq

DateTime

No

No

The created_at_lteq field.

reference

Array[String]

No

Yes

Order reference field.

Sorting:

Value

Sorts by:

status

The status field.
Possible values:
Pending
Canceled
Completed

amount

The amount field.

created_at

The created_at field.

description

The description field.

Example

http

GET /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

curl

curl -i -X GET https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"

response

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
    "data": [
        {
            "id": "af76f42d-2a5c-424e-b908-3b14215b5b15",
            "type": "orders",
            "attributes": {
                "amount": "16.0",
                "status": "Canceled",
                "created_at": "2018-10-17T13:32:28.424Z",
                "description": "DID",
                "reference": "NGH-098920",
                "items": [
                    {
                        "type": "did_order_items",
                        "attributes": {
                            "qty": 2,
                            "nrc": "4.0",
                            "mrc": "4.0",
                            "prorated_mrc": false,
                            "billed_from": null,
                            "billed_to": null,
                            "setup_price": "4.0",
                            "monthly_price": "4.0",
                            "did_group_id": "3bdc6002-4859-46b0-9cf7-ae95d1af66e2"
                        }
                    }
                ]
            }
        },
        {
            "id": "1c2d1229-acb4-4b41-b64b-3c3b2d68d985",
            "type": "orders",
            "attributes": {
                "amount": "8.0",
                "status": "Completed",
                "created_at": "2018-10-17T13:37:55.980Z",
                "description": "DID",
                "reference": "XIH-422617",
                "items": [
                    {
                        "type": "did_order_items",
                        "attributes": {
                            "qty": 1,
                            "nrc": "4.0",
                            "mrc": "4.0",
                            "prorated_mrc": false,
                            "billed_from": "2018-10-17",
                            "billed_to": "2018-11-16",
                            "setup_price": "4.0",
                            "monthly_price": "4.0",
                            "did_group_id": "939b0c3a-7a07-4699-9e73-9ef77d816c38"
                        }
                    }
                ]
            }
        }
    ],
    "meta": {
        "total_records": 2,
        "api_version": "2017-09-18"
    }
}

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized