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.

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.

amount

The amount field.

created_at

The created_at field.

description

The description field.

Fielding:

Value

Returns:

status

The status attribute.

amount

The amount attribute.

created_at

The created_at attribute.

description

The description attribute.

reference

The reference attribute.

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": "889b91ce-93be-4913-a32e-8415d5914f0f",
            "type": "orders",
            "attributes": {
                "amount": "0.7",
                "status": "Completed",
                "created_at": "2020-09-14T07:35:07.038Z",
                "description": "DID",
                "reference": "BUV-544694",
                "items": [
                    {
                        "type": "did_order_items",
                        "attributes": {
                            "qty": 1,
                            "nrc": "0.35",
                            "mrc": "0.35",
                            "prorated_mrc": false,
                            "billed_from": "2020-09-14",
                            "billed_to": "2020-10-14",
                            "setup_price": "0.35",
                            "monthly_price": "0.35",
                            "did_group_id": "0a265a8c-50fc-4ab3-ae16-9811bc17c241"
                        }
                    }
                ],
                "callback_method": null,
                "callback_url": null
            }
        },
        {
            "id": "cd1e48e8-94e8-4ba5-9ba6-7f87e4aa61c5",
            "type": "orders",
            "attributes": {
                "amount": "0.7",
                "status": "Completed",
                "created_at": "2020-09-14T07:49:40.747Z",
                "description": "DID",
                "reference": "VSB-352655",
                "items": [
                    {
                        "type": "did_order_items",
                        "attributes": {
                            "qty": 1,
                            "nrc": "0.35",
                            "mrc": "0.35",
                            "prorated_mrc": false,
                            "billed_from": "2020-09-14",
                            "billed_to": "2020-10-14",
                            "setup_price": "0.35",
                            "monthly_price": "0.35",
                            "did_group_id": "0a265a8c-50fc-4ab3-ae16-9811bc17c241"
                        }
                    }
                ],
                "callback_method": null,
                "callback_url": null
            }
        },
        {
            "id": "fac8671b-9515-46c1-bcdb-ce8115557b0b",
            "type": "orders",
            "attributes": {
                "amount": "0.7",
                "status": "Completed",
                "created_at": "2020-09-14T07:50:23.443Z",
                "description": "DID",
                "reference": "TDE-247766",
                "items": [
                    {
                        "type": "did_order_items",
                        "attributes": {
                            "qty": 1,
                            "nrc": "0.35",
                            "mrc": "0.35",
                            "prorated_mrc": false,
                            "billed_from": "2020-09-14",
                            "billed_to": "2020-10-14",
                            "setup_price": "0.35",
                            "monthly_price": "0.35",
                            "did_group_id": "d6c199be-dba8-4f87-ae58-29e7a8263e7a"
                        }
                    }
                ],
                "callback_method": null,
                "callback_url": null
            }
        }
    ],
    "meta": {
        "total_records": 54,
        "api_version": "2021-04-19"
    },
    "links": {
        "first": "https://api.didww.com/v3/orders?page%5Bnumber%5D=1&page%5Bsize%5D=50",
        "next": "https://api.didww.com/v3/orders?page%5Bnumber%5D=2&page%5Bsize%5D=50",
        "last": "https://api.didww.com/v3/orders?page%5Bnumber%5D=2&page%5Bsize%5D=50"
    }
}

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized