Ordering
- http
- shell
- python
- php
- C#
GET /orders?ordering=param1,-param2,... HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: 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,...");
To retrieve the order queryset ordered.
GET https://api.aplazame.com/orders?ordering=param1,-param2,...
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
- http
- shell
- python
- php
- C#
GET /orders?ordering=-total_amount,created HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: 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
- http
- shell
- python
- php
- C#
GET /orders?ordering=account-last_login,-account-created HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: 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 |