Introduction
Flamix: Bitrix24 Inventory API
Documentation on the API of the plugin "Flamix Bitrix24 Inventory". Have questions - contact us.
Base URL
https://inventory-pay.app.flamix.solutions
Authenticating requests
Authenticate requests to this API's endpoints by sending a query parameter DOMAIN and api_token
in the request.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
DOMAIN - It's your Bitrix24 portal (ex, flamix.bitrix24.eu). Api token you can find in your APP. Read FAQ: Where you can get API token.
Inventory
Recalculate
requires authentication
Start recalculating. The process can take a very long time. The more income and sales - the longer it will be processed.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://inventory-pay.app.flamix.solutions/api/v1/recalculate',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'DOMAIN and api_token'=> '{YOUR_AUTH_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"status": "success"
}
Received response:
Request failed with error:
Product rests
requires authentication
Return general product quantity and warehouse quantity. If you need fresh inventory data, you must first run a forced recalculation.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://inventory-pay.app.flamix.solutions/api/v1/product/100/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'DOMAIN and api_token'=> '{YOUR_AUTH_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"quantity": 3.0,
"warehouse": ["1": 200.0, "6": 99.9]
}
Received response:
Request failed with error: