Beatroute - Distributor Api: Developer'S Guide
Beatroute - Distributor Api: Developer'S Guide
Developer’s Guide
May 2022
BeatRoute – Distributor API
API
Protocol
- HTTPS HTTP + SSL
- PORT 443
BeatRoute – Distributor API
User Credentials
Login
- USERNAME [email protected]
- PASSWORD Pass@4321
BeatRoute – Distributor API (Login)
USER LOGIN https://sandbox.beatroute.io/distributor/user/login
REQUEST METHOD POST
PARAMETERS
HEADER Content-Type = application/json
BODY {
"username": "<email_address>",
"password": "<password>",
"device": "<operating_system>"
}
RETURN {
"success": true|false,
"data": {
"token": "<authentication_token>"
},
"status": <status_code>
}
TOKEN_EXPIRATION 7 Days
BeatRoute – Distributor API (Login, Status Code)
BEHAVIOR
CREATE/UPDATE Create/Update a customer Dispatches/Invoice with given details, if system
identifies erp_invoice_number and invoice_date as existing invoice, it will
update the information.
Send field as status = 0 to Cancel or Archive an Invoice
ARCHIVE
BeatRoute – Distributor API (Invoice/Create)
PARAMETERS
HEADER Content-Type = application/json
Authorization = Bearer <token>
BODY [{
"retailer_br_id": "",
"retailer_external_id": "<customer_code>",
"erp_invoice_number": "<invoice_number>",
"invoice_date": "<invoice_date>",
"status": 1,
"order_id": null,
"external_order_id": null,
"ship_to_external_id": "",
"order_status": "<status_name>",
"total_tax": <tax>, "total_value": <amount>,
"remarks": null,
"payment_due_date": "<payment_date>",
"invoice_level_discount": <discount>,
…
BeatRoute – Distributor API (Invoice/Create)
PARAMETERS
HEADER Content-Type = application/json
Authorization = Bearer <token>
BODY (cont.) …
"details":
[{
"sku_external_id": “<sku_code>",
"quantity": <quantity>,
"sku_uom": “<unit>",
"price_per_item": <price>,
"discount_value": <discount>,
"gross_value": <gross>,
"tax_code": “<tax_code>",
"tax": <tax>
}]
…
BeatRoute – Distributor API (Invoice/Create)
PARAMETERS
HEADER Content-Type = application/json
Authorization = Bearer <token>
BODY (cont.) …
"customFields":
[{
"id": “<id_from_matrix>",
"value": “<string_or_picklist>"
}]
}]
BeatRoute – Distributor API (Invoice/Create)
RETURN {
"success": true|false,
"data": [{
"success": true|false,
"br_id": <number_from_br>,
"message": <status_message>
},
{
"success": true|false,
"br_id": <number_from_br>,
"message": <status_message>
}],
"status": <status_code>
}
BeatRoute – Distributor API (Invoice/Create)
BeatRoute – Distributor API (Invoice Payload)
retailer_br_id number <= 11 characters
BR ID of Retailer/Customer
retailer_external_id string <= 50 characters
(Required) External ID of Retailer/Customer
erp_invoice_number string <= 32 characters
(Required) Invoice number or Reference number of Dispatch
invoice_date date
(Required) Date of Original Dispatch
status number, Default Value - 1 <= 1 characters
Status of Invoice, 0 - Cancelled, 1 - Confirmed
order_id number <= 11 characters
BR Order ID to link Invoice with Order ***
external_order_id string <= 32 characters
BR Order ID to link Invoice with Order ***
ship_to_external_id string <= 50 characters
External ID of Ship to Party if different from retailer_external_id ***
order_status string <= 20 characters
BeatRoute – Distributor API (Invoice Payload)
total_tax decimal <= 14,4 characters
(Required) Total Tax value of Dispatch
total_value decimal <= 14,4 characters
(Required) Total value of dispatch
remarks string <= 256 characters
Remarks of the dispatch
payment_due_date date
Payment due date of Invoice ***
invoice_level_discount decimal <= 14,4 characters
Invoice level discount
details Array of objects[ items ]
customFields Array of objects[ items ]
BeatRoute – Distributor API (Invoice Payload)
“details” Array Object
sku_external_id string <= 30 characters
(Required) External ID of SKU