Creation of lost order¶
The “Lost orders” tool is available only to the owners of cashback services and loyalty programs. Accept the User Agreement in the section of the “Lost orders” tool to receive access.
Parameters¶
HTTP method |
Access rights |
URL | Parameters |
Note |
---|---|---|---|---|
POST | manage_lost_orders | https://api.admitad.com/lost_orders/create/ |
List of request parameters | Returns the created order.* |
* Returns the result in the JSON format.
List of request parameters¶
Name |
Type |
Required |
Settings restrictions |
Allowed values |
---|---|---|---|---|
advcampaign | integer | ✔ | List of affiliate programs | |
website | integer | ✔ | The list of publisher’s ad spaces | |
order_id | string | ✔ | Max length 100 characters |
|
order_date | date | ✔ | %d.%m.%Y | |
order_price | float | ✔ | ||
comment | string | ✔ | 512 characters maximum |
|
appeal_id | string | Max length 100 characters |
||
estimated_reward | float | ✔ | ||
receipt | file | ✔ | JPEG/JPG/PNG/PDF |
Example of use¶
Example of a request with utility ``curl``:
curl -H 'Authorization: Bearer access_token' -X POST https://api.admitad.com/lost_orders/create/ \
-F 'website=1' \
-F 'advcampaign=1' \
-F 'order_id=YH123D' \
-F 'order_date=11.11.2016' \
-F 'order_price=1200' \
-F 'appeal_id=788aq' \
-F 'estimated_reward=7' \
-F 'receipt=@/example/DM89YVjMZY.jpg'
Example of the response from the API server in the JSON format:
{
"status": "processing",
"website": {
"id": 1,
"name": "TestWebsite"
},
"currency": "USD",
"order_id": "YH123D",
"advcampaign": {
"id": 1,
"name": "TestAdvCampaign"
},
"order_price": 1200,
"order_date": "2016-11-11T00:00:00",
"date_created": "2016-06-02T19:31:36",
"id": 6,
"comment": "",
"appeal_id": "788aq",
"appeal_status": "processing",
"estimated_reward": 7
}
Description of API server response fields¶
Name |
Description |
---|---|
id | Identifier |
website | Ad space |
campaign | Affiliate program |
status | Lost order status |
order_id | Order number |
order_date | Order date |
order_price | Order amount |
currency | Currency |
comment | Comment |
date_created | Date of creation |
appeal_id | Appeal ID |
appeal_status | Appeal status |
estimated_reward | Estimated reward |