Access to the API is provided over HTTPS. The endpoint is — https://api.apm.group/
All requests must be sent using the POST method.
The API supports two data formats:
The response format matches the request format. JSON is used by default.
The number of invalid-password attempts is limited (the IP address is blocked for 3 hours once the limit is reached).
To use the API, you must have a verified account on https://apm.group and a valid Token.
The Token is valid only for the IP address from which it was generated. It has no expiration date (it is refreshed upon regeneration together with the IP address used). If you need to use multiple accounts from the same IP address, you must notify the site administration.
The parameters token and name are required for using the API (the generation process is described below).
POST https://api.apm.group/token
JSON Request
{
"username":"user1@mail.com",
"password":"myrealpassword"
}
JSON Response
{
"name":"user1",
"password":"ZtAZABfaQ78-EXT44M_HKvxyefVj8JM7"
}
POST https://api.apm.group/product/search
JSON Request
{
"name": "user1",
"token": "ZzcM5gWnNLizvVRxFcrTfK7PKlDbCa0W",
"code": "263202F100",
"analogs": true
}
JSON Response
{
"263202F100_code": {
"mainProducts": [
{
"id": "1714422",
"code": "263202F100",
"name": " Oil filter MOBIS ",
"price": 7.05,
"currency_id": "1",
"available": "7",
"min_lot": "1",
"make": "MOBIS",
"weight": "0.114",
"delivery": null,
"priceName": "USD",
"supplier_id": "3",
"price_info": 7.05,
"currency": "USD"
},
{
"price": 10.08,
"id": "1",
"code": "263202F100",
"name": "mpu020",
"currency_id": "1",
"available": "5",
"min_lot": "1",
"make": "mpu020 manufacturer",
"weight": "0.200",
"delivery": "15",
"supplier_id": "7",
"priceName": "DC1072",
"price_info": 10.08,
"currency": "USD"
},
. . .
{
"available": "5",
"make": "Hyundai / KIA",
"code": "263202F100",
"price": 13.18,
"name": "OIL FILTER",
"weight": "0.128",
"min_lot": "1",
"delivery": "16/50",
"priceName": "US6",
"currency_id": "1",
"supplier_id": "1",
"id": "0",
"price_info": 13.18,
"currency": "USD"
}
],
"analogProducts": [
{
"available": "10",
"make": "ASHIKA",
"code": "10ECO096",
"price": 1.93,
"name": "OIL FILTER",
"weight": "0",
"min_lot": "1",
"delivery": "5/0",
"priceName": "TRD",
"currency_id": "1",
"supplier_id": "8",
"id": "0",
"price_info": 1.93,
"currency": "USD"
},
. . .
{
"available": "5",
"make": "Hyundai / KIA",
"code": "263202F010",
"price": 5.97,
"name": "FUEL FILTER",
"weight": "0.495",
"min_lot": "1",
"delivery": "19/45",
"priceName": "JA2",
"currency_id": "1",
"supplier_id": "1",
"id": "0",
"price_info": 5.97,
"currency": "USD"
}
]
}
}
1 – USD
4 – AED
Full example of the response is provided at the end of the description. P.2
POST https://api.apm.group/order/create
JSON Request
{
"name": "test_name",
"token": "ZzcM5gWnNLizvVRxFcrTfK7PKlDbCa0W",
"order": [
{
"id": "1714422",
"code": "263202F100",
"name": "Oil filter MOBIS",
"price": 7.00,
"currency_id": "3",
"make": "MOBIS",
"delivery": 2,
"priceName": "USD",
"supplier_id": "3",
"quantity": 2,
"CoeffMaxAgree": 0.01
},
{
"id": "1714428",
"code": "252822G000",
"name": "Pulley",
"price_info": 407.99,
"currency_id": "3",
"make": "MOBIS",
"delivery": 1,
"priceName": "USD",
"supplier_id": "3",
"quantity": 1,
"api_reference": "1000925328"
},
{
"id": "1",
"code": "263202F100",
"name": "Pulley",
"price_info": 276.1,
"currency_id": "1",
"make": "MOBIS",
"delivery": 1,
"priceName": "DC1072",
"supplier_id": "7",
"quantity": 1,
"api_reference": "contractor"
},
{
"id": "0",
"code": "263202F100",
"name": "Pulley",
"price": 5.91,
"currency_id": "1",
"make": "HYUNDAI/KIA",
"delivery": 1,
"priceName": "TRD",
"supplier_id": "8",
"quantity": 1,
"api_reference": "TRD"
},
{
"id": "0",
"code": "263202F100",
"name": "Pulley",
"price": 5.999,
"currency_id": "1",
"make": "Hyundai / KIA",
"delivery": 2,
"priceName": "JA2",
"supplier_id": "1",
"quantity": 1,
"api_reference": "api_ref"
},
{
"id": "0",
"code": "wrong_code",
"name": "Pulley",
"price": 5.91,
"currency_id": "1",
"make": "HYUNDAI/KIA",
"delivery": 1,
"priceName": "TRD",
"supplier_id": "8",
"quantity": 1,
"api_reference": "TRD"
}
],
"delivery": {
"fio": "test",
"city": "test",
"address": "Tank st.",
"phone": "+38099665544",
"reference": "4ty",
"notes": "for tests",
"delivery_type": 1,
"delivery_city": "delivery_city",
"delivery_street": "delivery_street",
"delivery_house": "13",
"delivery_apartment": "9"
}
}
The info field in the response may contain details related to order creation, such as insufficient stock (item unavailable) or adjusted item quantity (if the requested quantity exceeds available stock, the system automatically adjusts it and describes the change in this field).
When creating an order, not all order items are guaranteed to be placed into a single order in our system. Order items are grouped by delivery type and by warehouse, and therefore may be assigned to different orders with different order numbers in our system.
POST https://api.apm.group/order/search
JSON Request
{
"name": "test_name",
"token": "ZzcM5gWnNLizvVRxFcrTfK7PKlDbCa0W",
"order_id": 7893
}
JSON Response
[
{
"id": 7893,
"user_id": 733,
"created_at": 1545658177,
"updated_at": 1545658178,
"fio": "test",
"city": "test",
"address": "test",
"phone": "+380933898555",
"notes": "From API. for tests",
"admin_notes": null,
"payment_type": 2,
"delivery_type": 1,
"delivery_city": "delivery_city",
"delivery_street": "test",
"delivery_house": "+380933898555",
"delivery_apartment": null,
"status": "WAIT_PAY",
"currency_id": 1,
"first_payment_percent": null
}
]
POST https://api.apm.group/order/searchitems
Order items may be split depending on stock availability, price changes, and similar factors. For example: an order item was created with a quantity of 6 units of part MPU020. The product may be shipped in parts — first 4 units, then 2 units (or the remaining 2 units may be unavailable, and only 4 units are in stock). In such a case, the order item can be split into two items. The quantities in the original and the new item will be adjusted accordingly to 4 units and 2 units. These two items will belong to the same order (order_id) and will have the same api_reference value, as well as the same manufacturer, warehouse, part number (MPU020), etc.
JSON Request
{
"name": "test_name",
"token": "ZzcM5gWnNLizvVRxFcrTfK7PKlDbCa0W",
"api_reference": "123#321||123#322"
}
JSON Response
[
{
"id": 22088,
"order_id": 7910,
"price": "5.9100",
"quantity": 1,
"status": "EMPTY",
"currency_price": "5.9100",
"delivery_status": 1,
"original_quantity": null,
"status_date": 1545666564,
"api_reference": "123#322",
"supplier_detail_id": null
},
{
"id": 22087,
"order_id": 7909,
"price": "10.0800",
"quantity": 1,
"status": "EMPTY",
"currency_price": "10.0800",
"delivery_status": 1,
"original_quantity": null,
"status_date": 1545666563,
"api_reference": "123#321",
"supplier_detail_id": null
}
]
POST https://api.apm.group/order/searchorderitems
The `status` value is the current status of the order item. Possible values with descriptions are presented in section 5.
JSON Request
{
"name": "test_name",
"token": "ZzcM5gWnNLizvVRxFcrTfK7PKlDbCa0W",
"order_id": 7908
}
JSON Response
[
{
"id": 22086,
"order_id": 7908,
"price": "5.9700",
"quantity": 1,
"status": "EMPTY",
"currency_price": "5.9700",
"delivery_status": 1,
"original_quantity": null,
"status_date": 1545666561,
"api_reference": "api_ref"
}
]
JSON Request
{
"name":"test_name",
"token":"ZzcM5gWnNLizvVRxFcrTfK7PKlDbCa0W",
"code":"263202F100||mpu020",
"analogs":true
}
JSON Response
{
"263202F100_code": {
"mainProducts": [
{
"id": "1714422",
"code": "263202F100",
"name": "Oil filter MOBIS",
"price": 7.05,
"currency_id": "1",
"available": "3",
"min_lot": "1",
"make": "MOBIS",
"weight": "0.114",
"delivery": null,
"priceName": "USD",
"supplier_id": "3",
"price_info": 7.05,
"currency": "USD"
},
{
"price": 10.08,
"id": "1",
"code": "263202F100",
"name": "mpu020",
"currency_id": "1",
"available": "5",
"min_lot": "1",
"make": "mpu020manufacturer",
"weight": "0.200",
"delivery": "15",
"supplier_id": "7",
"priceName": "DC1072",
"price_info": 10.08,
"currency": "USD"
},
{
"available": "15",
"make": "HYUNDAI/KIA",
"code": "263202F100",
"price": 5.91,
"name": "Oil filter",
"weight": "0.14",
"min_lot": "1",
"delivery": "2/0",
"priceName": "TRD",
"currency_id": "1",
"supplier_id": "8",
"id": "0",
"price_info": 5.91,
"currency": "USD"
},
{
"available": "5",
"make": "Hyundai / KIA",
"code": "263202F100",
"price": 5.97,
"name": "Oil filter",
"weight": "0.128",
"min_lot": "1",
"delivery": "17/45",
"priceName": "JA2",
"currency_id": "1",
"supplier_id": "1",
"id": "0",
"price_info": 5.97,
"currency": "USD"
},
]
}
}
$data='{"username":"test@ok.com","password":"000000000"}';
$ch = curl_init('https://api.apm.group/token');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
var_dump(curl_exec($ch));
curl_close($ch);
$data='<root>
<password>000000000</password>
<username>test@ok.com</username>
</root>'
$ch = curl_init('https://api.apm.group/token');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
var_dump(curl_exec($ch));
curl_close($ch);
$data='{"name":"test@ok.com.ua","token":"GuqnhVObR16LvDiZb_lsoyrBGKPtaEGv","code":"252822G000","analogs":true}';
$ch = curl_init('https://api.apm.group/product/search');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
var_dump(curl_exec($ch));
curl_close($ch);
curl_close($ch);
POST https://api.apm.group/tracking/items
JSON Request
{
"name": "<EMAIL>",
"token": "<TOKEN>",
"limit": 10,
"page": 1,
"code": "K1245",
"reference": "ref_2_0",
"order_id": 144601,
"status": "BOUGHT",
"stock": "WD1"
}
JSON Response
{
"items": [
{
"item_id": 1147738,
"order_id": 144601,
"order_status": "NOT_AVAILABLE",
"order_reference": null,
"brand": "FILTRON",
"code": "K1245",
"reference": "ref_2_0 pos 2",
"name": "",
"weight": 0.111,
"delivery": "40/60",
"warehouse": "EX1",
"price_usd": 5.56,
"price_info": 5.56,
"currency": "USD",
"quantity": 2,
"add_packing": false,
"status": "FACT_NOT_AVAILABLE",
"order_date": "2023-10-12 10:10:09",
"updated": "2023-10-12 10:10:10",
"delivery_status": "1"
},
{
"item_id": 1147737,
"order_id": 144601,
"order_status": "NOT_AVAILABLE",
"order_reference": null,
"brand": "FILTRON",
"code": "K1245",
"reference": "ref_2_0 pos 1",
"name": "",
"weight": 0.111,
"delivery": "40/60",
"warehouse": "EX1",
"price_usd": 5.56,
"price_info": 5.56,
"currency": "USD",
"quantity": 2,
"add_packing": false,
"status": "FACT_NOT_AVAILABLE",
"order_date": "2023-10-12 10:10:09",
"updated": "2023-10-12 10:10:10",
"delivery_status": "1"
}
],
"total_count": 188,
"page_count": 94,
"current_page": 1,
"per_page": 2
}
Note: The response example data is taken from a test user, so all statuses are in rejection.