Get orders
[ GET ] order
Fetch all orders associated with your account.
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'YOUR-BASEURL/order',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-Api-Key: YOUR-API-KEY'
],
]);
$response = curl_exec($ch);
curl_close($ch);
Query parameters
All filters are optional. Combine them as query string parameters.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
car |
string | No | Filter by car brand. | Audi |
model |
string | No | Filter by car model. | A4 |
status |
string | No | Filter by order status. One of error_car, unconfirmed, accepted, in_vein, cancelled, picked_up, delivered. |
accepted |
is_delivered |
bool | No | true for physically delivered orders, false for orders not yet delivered. |
false |
Example request
Get order
[ GET ] order/:car_id
Fetch the current order and use it for your desired purpose.
Currently avaliable statuses are
- error_car
- unconfirmed
- accepted
- in_vein
- cancelled
- picked_up
- delivered
{
"data": {
"car": string,
"model": string,
"car_number": string,
"pickup_date": date (d-m-Y),
"price": string,
"external_ref": string,
"reg_no": string,
"booking_id": string,
"status": string,
"latest_expected_delivery_date": date (d-m-Y),
"track_and_trace": string,
"is_delivered": null|date (d-m-Y H:i)
}
}
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'YOUR-BASEURL/order/:car_id',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-Api-Key: YOUR-API-KEY'
],
]);
$response = curl_exec($ch);
curl_close($ch);
| Parameter | Required | Description |
|---|---|---|
car_id |
car_id response from the POST order which is the id that you use to keep track of your order |