0% found this document useful (0 votes)
396 views18 pages

Beatroute - Distributor Api: Developer'S Guide

The document provides guidelines for using the BeatRoute Distributor API, including details on authentication, endpoints, request methods, parameters, and payloads. Key points include: The API uses HTTPS and token-based authentication. It has endpoints for user login/refresh and invoice creation/updates. Login requests require a username/password, and returns an authentication token. Invoice endpoints require a token and accept JSON payloads with order and item details. Responses indicate success/failure and return status codes.

Uploaded by

tafashuttle 3D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
396 views18 pages

Beatroute - Distributor Api: Developer'S Guide

The document provides guidelines for using the BeatRoute Distributor API, including details on authentication, endpoints, request methods, parameters, and payloads. Key points include: The API uses HTTPS and token-based authentication. It has endpoints for user login/refresh and invoice creation/updates. Login requests require a username/password, and returns an authentication token. Invoice endpoints require a token and accept JSON payloads with order and item details. Responses indicate success/failure and return status codes.

Uploaded by

tafashuttle 3D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

BeatRoute - Distributor API

Developer’s Guide

May 2022
BeatRoute – Distributor API

API

Restful API (Web API)


- REQUEST METHOD POST
- PAYLOAD JSON Data
- AUTHENTICATION Token-based

Protocol
- HTTPS HTTP + SSL
- PORT 443
BeatRoute – Distributor API

User Credentials

Production URL  https://api.vwbeatroute.com


Sandbox URL  https://sandbox.beatroute.io

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)

200 = Successful 400 = Invalid Parameter 500 = Invalid Request


BeatRoute – Distributor API (Refresh)
USER LOGIN https://sandbox.beatroute.io/distributor/user/refresh
REQUEST METHOD POST
PARAMETERS
HEADER Content-Type = application/json
Authorization = Bearer <token>
BODY {
"username": "<email_address>“
}
RETURN {
"success": true|false,
"data": {
"token": "<authentication_token>"
},
"status": <status_code>
}
FREQUENCY Daily
BeatRoute – Distributor API (Refresh, Status Code)

200 = Successful 401 = Invalid Parameter


BeatRoute – Distributor API (Invoice/Create)
USER LOGIN https://sandbox.beatroute.io/distributor/secondary-invoice/create
REQUEST METHOD POST

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

quantity number <= 11 characters


(Required) Quantity of the SKU

sku_uom string <= 15 characters


(Required) UOM of SKU

price_per_item decimal <= 14,4 characters


(Required) Price Per Item of the SKU

discount_value decimal <= 14,4 characters


Discount value of the SKU

gross_value decimal <= 14 characters


(Required) Gross value of the SKU

tax_code string <= 32 characters


Tax code as defined in BeatRoute for reference purpose

tax decimal <= 14 characters


Tax Value of the SKU
BeatRoute – Distributor API (Invoice Payload)
“customFields” Array Object
Custom Fields Type Format Remarks
DSP Name Custom Freetext Mandatory
Return Indicator Custom Picklist Required for return invoice (negative
- Outright / Devuelto Good value)
- Outright / Devuelto Bad
- Trade Return Good
- Trade Return Bad
Return Invoice Reference Custom Freetext Required for return invoice (negative
value)
Remarks Standard Picklist Required for return invoice (negative
- Cancelled by Outlet value)
- Cancelled by Salesperson
- Expired PO
- Late Delivery
- No Freezer Space
- Over Booking
- Overstock
- Poor quality
- Product age by MAA

You might also like