Ordering
GET /orders?ordering=param1,-param2,... HTTP/1.1
application/vnd.aplazame.v1+json
Bearer api_private_key
api.aplazame.com
$ curl "https://api.aplazame.com/orders?ordering=param1,-param2,..." \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'ordering': 'param1,-param2,...'
})
$result = $aplazameClient->get("/orders", [
"ordering" => "param1,-param2,...",
]);
dynamic result = client.Get($"/orders?ordering=param1,-param2,...");
GET https://api.aplazame.com/orders?ordering=param1,-param2,...
To retrieve the order queryset ordered.
The ordering parameter is a tuple or list of strings. Each string is a field name with an optional -
prefix, which indicates descending order. Fields without a leading -
will be ordered ascending.
by order
Descending total amount, Ascending created
GET /orders?ordering=-total_amount,created HTTP/1.1
application/vnd.aplazame.v1+json
Bearer api_private_key
api.aplazame.com
$ curl "https://api.aplazame.com/orders?ordering=-total_amount,created" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'ordering': '-total_amount,created'
})
$result = $aplazameClient->get("/orders", [
"ordering" => "-total_amount,created",
]);
dynamic result = client.Get($"/orders?ordering=-total_amount,created");
Parameter |
Type |
Description |
total_amount |
decimal |
Total order amount |
created |
ISO 8601 |
Date designating when the order was created |
verified |
ISO 8601 |
Date designating when the order was verified |
confirmed |
ISO 8601 |
Datetime designating when the order was confirmed |
cancelled |
ISO 8601 |
Date designating when the order was cancelled |
by account
Ascending account last login, Descending account creation date
GET /orders?ordering=account-last_login,-account-created HTTP/1.1
application/vnd.aplazame.v1+json
Bearer api_private_key
api.aplazame.com
$ curl "https://api.aplazame.com/orders?ordering=account-last_login,-account-created" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'ordering': 'account-last_login,-account-created'
})
$result = $aplazameClient->get("/orders", [
"ordering" => "account-last_login,-account-created",
]);
dynamic result = client.Get($"/orders?ordering=account-last_login,-account-created");
Parameter |
Type |
Description |
account-last_login |
ISO 8601 |
Date of the customer's last login. |
account-date_joined |
ISO 8601 |
Date designating when the customer account was created. |
account-created |
ISO 8601 |
Date designating when the customer account was created in Aplazame |