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>] |
|
Optional |
|
sort |
|
Optional |
Filters:
Filter Name |
Type |
Allow Blank |
Allow Array |
Filters by: |
|---|---|---|---|---|
id |
|
No |
Yes |
Order |
status |
|
Yes |
Yes |
Order
status field.Possible values:
PendingCanceledCompleted |
created_at_gteq |
|
No |
No |
The |
created_at_lteq |
|
No |
No |
The |
reference |
|
No |
Yes |
Order |
Sorting:
Value |
Sorts by: |
|---|---|
status |
The
status field.Possible values:
PendingCanceledCompleted |
amount |
The |
created_at |
The |
description |
The |
Example#
http
1GET /v3/orders HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
curl
1curl -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
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": [
6 {
7 "id": "af76f42d-2a5c-424e-b908-3b14215b5b15",
8 "type": "orders",
9 "attributes": {
10 "amount": "16.0",
11 "status": "Canceled",
12 "created_at": "2018-10-17T13:32:28.424Z",
13 "description": "DID",
14 "reference": "NGH-098920",
15 "items": [
16 {
17 "type": "did_order_items",
18 "attributes": {
19 "qty": 2,
20 "nrc": "4.0",
21 "mrc": "4.0",
22 "prorated_mrc": false,
23 "billed_from": null,
24 "billed_to": null,
25 "setup_price": "4.0",
26 "monthly_price": "4.0",
27 "did_group_id": "3bdc6002-4859-46b0-9cf7-ae95d1af66e2"
28 }
29 }
30 ]
31 }
32 },
33 {
34 "id": "1c2d1229-acb4-4b41-b64b-3c3b2d68d985",
35 "type": "orders",
36 "attributes": {
37 "amount": "8.0",
38 "status": "Completed",
39 "created_at": "2018-10-17T13:37:55.980Z",
40 "description": "DID",
41 "reference": "XIH-422617",
42 "items": [
43 {
44 "type": "did_order_items",
45 "attributes": {
46 "qty": 1,
47 "nrc": "4.0",
48 "mrc": "4.0",
49 "prorated_mrc": false,
50 "billed_from": "2018-10-17",
51 "billed_to": "2018-11-16",
52 "setup_price": "4.0",
53 "monthly_price": "4.0",
54 "did_group_id": "939b0c3a-7a07-4699-9e73-9ef77d816c38"
55 }
56 }
57 ]
58 }
59 }
60 ],
61 "meta": {
62 "total_records": 2,
63 "api_version": "2017-09-18"
64 }
65}
Other Responses#
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
401 |
No |