Steps to enable notifications on your WhatsApp Bot via APIs.
- Contact support@businessonbot.com to get your guest API key and URL.
Once you’ve received the guest API key and URL, follow the steps below:
Introduction:
The API documentation is intended to be used as a reference to communicate with BusinessOnBot. BusinessOnBot will be calling the customer’s APIs with the request specified in the documentation and expects responses as mentioned.
API’s :
For all the APIs, BusinessOnBot will be passing the API KEY with the custom http header ‘x-guest-id’.
Order Confirmation
Method: POST
URL: {{businessonbot_domain_name}}/orders-create
Body (Format - JSON):
Success Response:
{
"status": "success",
"statusCode": 200
}Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}Order Cancellation
Method: POST
URL: {{businessonbot_domain_name}}/orders-cancelled
Body (Format - JSON):
Success Response:
{
"status": "success",
"statusCode": 200
}Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Fulfillments Create
Method: POST
URL: {{businessonbot_domain_name}}/fulfillments-create
Body (Format - JSON):
Success Response:
{
"status": "success",
"statusCode": 200
}Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Order Delivery
Method: POST
URL: {{businessonbot_domain_name}}/fulfillments-events-create
Body (Format - JSON):
{
"delivery_id": "String",
"id": "String" (order id),
"id_alias": "String" (optional),
"fulfillment_id": "String",
"status": "Delivered" | "In-transit" | "Returned" | "Dispatched",
"delivered_at": "Timestamp"
}Success Response:
{
"status": "success",
"statusCode": 200
}Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Abandoned Cart
Method: POST
URL: {{businessonbot_domain_name}}/abandoned-cart
Body (Format - JSON):
Success Response:
{
"status": "success",
"statusCode": 200
}Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Some APIs for Internal Usage
Get Order Details By Order ID
Method: GET
URL: {{brand_domain_name}}/order/{{orderId}}
Success Response:
Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad Request!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Get Customer Details By Phone Number
Method: GET
URL: {{brand_domain_name}}/personal-details/{{phone_number}}
Success Response:
Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad request!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Get Customer Details By Email ID
Method: GET
URL: {{brand_domain_name}}/personal-details?email={{email_id}}
Success Response:
Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad request!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Get Last 3 Orders of a Customer
Method: GET
URL: {{brand_domain_name}}/get-orders/{{phone_number}}
Success Response:
Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad Request!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}Cancel An Order
Method: POST
URL: {{brand_domain_name}}/cancel-order
Body (Format - JSON):
{
"id": "jvs" (order id),
"cancellationReason": "string",
"cancelledBy": "bot"
}Success Response:
Error Responses:
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}