Filter orders
- http
- shell
- python
- php
- C#
GET /orders?parameter-lookup=value HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?parameter-lookup=value" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'my-param-term': 'value'
})
<?php
use Aplazame\Api\Client as AplazameClient;
$aplazameClient = new AplazameClient("https://api.aplazame.com", AplazameClient::ENVIRONMENT_PRODUCTION, " api_private_key");
$result = $aplazameClient->get("/orders", [
"my-param-term" => "value",
]);
using Aplazame.Api;
Client client = new Client("https://api.aplazame.com", Client.EnvironmentProduction, " api_private_key");
dynamic result = client.Get("/orders?my-param-term=value");
info
You may want to check general API filters documentation.
Filters lookups are listed HERE (string, choices, range, isnull y date).
Exact total amount
- http
- shell
- python
- php
- C#
GET /orders?total_amount=462000 HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?total_amount=462000" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'total_amount': 462000
})
$result = $aplazameClient->get("/orders", [
"total_amount" => Aplazame\Serializer\Decimal::fromFloat(4620)->value,
]);
dynamic result = client.Get($"/orders?total_amount=462000");
Confirmed after
- http
- shell
- python
- php
- C#
GET /orders?confirmed-gte=2015-12-22T15:09:30.537951Z HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?confirmed-gte=2015-12-22T15:09:30.537951Z" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'verified-isnull': True,
'confirmed-isnull': False
})
$result = $aplazameClient->get("/orders", [
"verified-isnull" => "yes",
"confirmed-isnull" => "no",
]);
dynamic result = client.Get($"/orders?confirmed-gte=2015-12-22T15:09:30.537951Z");
Verified but not confirmed
- http
- shell
- python
- php
- C#
GET /orders?verified-isnull=yes&confirmed-isnull=no HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?verified-isnull=yes&confirmed-isnull=no" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'verified-isnull': True,
'confirmed-isnull': False
})
$result = $aplazameClient->get("/orders", [
"verified-isnull" => "yes",
"confirmed-isnull" => "no",
]);
dynamic result = client.Get($"/orders?verified-isnull=yes&confirmed-isnull=no");
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | hash | string | Your order ID in aplazame. |
| mid | string | string | Your order ID. |
| total_amount | decimal | range | Order amount. |
| discount | decimal | isnull, range | Order discount amount. |
| discount_rate | decimal | isnull, range | Discount rate on the price of the order. |
| created | ISO 8601 | date, range | Date designating when the order was created. |
| verified | ISO 8601 | isnull, date, range | Date designating when the order was verified. |
| confirmed | ISO 8601 | isnull, date, range | Date designating when the order was confirmed. |
| cancelled | ISO 8601 | isnull, date, range | Date designating when the order was cancelled. |
Downpayment
- http
- shell
- python
- php
- C#
GET /orders?instalment_plan-downpayment-state=failed HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?instalment_plan-downpayment-state=failed" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'instalment_plan-downpayment-state': ['failed']
})
$result = $aplazameClient->get("/orders", [
"instalment_plan-downpayment-state" => ["failed"],
]);
dynamic result = client.Get($"/orders?instalment_plan-downpayment-state=failed");
| Parameter | Type | Required | Description |
|---|---|---|---|
| instalment_plan-downpayment-state | string | choices | Downpayment status. |
| instalment_plan-downpayment-amount | decimal | isnull, range | Downpayment amount. |
By phone
Customer phone number exact
- http
- shell
- python
- php
- C#
GET /orders?customer-phone-number=612345678 HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?customer-phone-number=612345678" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'customer-phone-number': '612345678'
})
$result = $aplazameClient->get("/orders", [
"customer-phone-number" => "612345678",
]);
dynamic result = client.Get($"/orders?customer-phone-number=612345678");
| Parameter | Type | Required | Description |
|---|---|---|---|
| customer-id | hash | string | Customer ID. |
| customer-phone-number | string | string | Customer mobile phone number. |
| customer-phone-country | ISO 3166-1 | string | Customer phone country. |
| customer-created | ISO 8601 | date, range | Date designating when the customer was created. |
By customer document ID
Document ID type; choices are nif or nie
- http
- shell
- python
- php
- C#
GET /orders?customer-document_id-type=nif&customer-document_id-type=nie HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?customer-document_id-type=nif&customer-document_id-type=nie" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'customer-document_id-type': ['nif', 'nie']
})
$result = $aplazameClient->get("/orders", [
"customer-phone-number" => ["nif", "nie"],
]);
dynamic result = client.Get($"/orders?customer-document_id-type=nif&customer-document_id-type=nie");
| Parameter | Type | Required | Description |
|---|---|---|---|
| customer-document_id-number | string | string | Customer document ID number. |
| customer-document_id-country | ISO 3166-1 | string | Customer document ID country. |
| customer-document_id-type | string | choices | Customer document ID type; the choices are nif, nie, cif, passport, others. |
By account
Gender exact
- http
- shell
- python
- php
- C#
GET /orders?account-type=existing&account-gender=0 HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?account-type=existing&account-gender=0" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'account-type': 'existing',
'account-gender': 0
})
$result = $aplazameClient->get("/orders", [
"account-type" => "existing",
"account-gender" => 0,
]);
dynamic result = client.Get($"/orders?account-type=existing&account-gender=0");
Last login is not null.
- http
- shell
- python
- php
- C#
GET /orders?account-last_login-isnull=no HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
$ curl "https://api.aplazame.com/orders?account-last_login-isnull=no" \
-H "Accept: application/vnd.aplazame.v1+json" \
-H "Authorization: Bearer api_private_key"
response = client.orders({
'account-last_login-isnull': False
})
$result = $aplazameClient->get("/orders", [
"account-last_login-isnull" => "no",
]);
dynamic result = client.Get($"/orders?account-last_login-isnull=no");
| Parameter | Type | Required | Description |
|---|---|---|---|
| account-id | hash | string | Customer ID. |
| account-type | string | choices | Customer type; the choices are g guest, n new, e existing. |
| account-gender | integer | choices | Gender; the choices are 0 not known, 1 male, 2 female, 3 not applicable. |
| account-last_login | ISO 8601 | isnull, date, range | Date of the customer's last login. |
| account-date_joined | ISO 8601 | isnull, date, range | Date designating when the customer account was created. |