Skip to content

Notifications API

NOTIFICATIONS API, order notifications API, abandoned cart API, webhook

Use these endpoints to enable WhatsApp notifications on your bot through APIs. Send BusinessOnBot an event when an order is created, cancelled, fulfilled or delivered, or when a cart is abandoned, and the matching notification goes to your customer.

Method Endpoint What it does
POST {{businessonbot_domain_name}}/orders-create Order confirmation
POST {{businessonbot_domain_name}}/orders-cancelled Order cancellation
POST {{businessonbot_domain_name}}/fulfillments-create Order fulfilment (shipped)
POST {{businessonbot_domain_name}}/fulfillments-events-create Order delivery status
POST {{businessonbot_domain_name}}/abandoned-cart Abandoned cart

Endpoints for internal usage, on your domain:

Method Endpoint What it does
GET {{brand_domain_name}}/order/{{orderId}} Get order details by order ID
GET {{brand_domain_name}}/personal-details/{{phone_number}} Get customer details by phone number
GET {{brand_domain_name}}/personal-details?email={{email_id}} Get customer details by email ID
GET {{brand_domain_name}}/get-orders/{{phone_number}} Get the last 3 orders of a customer
POST {{brand_domain_name}}/cancel-order Cancel an order

Contact support@businessonbot.com to get your guest API key and URL.

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.

For all the APIs, BusinessOnBot will be passing the API KEY with the custom http header ‘x-guest-id’.

Every endpoint returns JSON with a status and a statusCode:

status statusCode Meaning
success 200 The request worked
failure 400 Bad payload or bad request. The error field says what went wrong.
failure 500 Internal server error

Endpoints that return data (for example customer or product details) return that data instead of the success object. The exact response for each endpoint is shown below.

Method: POST

URL: {{businessonbot_domain_name}}/orders-create

{
"id": "4331283087516",
"name": "#1581",
"email": "test@gmail.com",
"createdAt": "2021-10-23T15:40:19Z",
"fullyPaid": false,
"cancelReason": null,
"cancelledAt": null,
"note": "Order drafted by businessonbot",
"channel": "shopify" | "amazon" (name of the channel from which order was made),
"shippingAddress": {
"name": "",
"phone": "",
"address1": "",
"address2": "",
"city": "",
"province": "",
"country": null,
"zip": null
},
"total_amount": "180.0",
"currencyCode": "INR", //valid currency codes
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
],
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
}
}
{
"status": "success",
"statusCode": 200
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}

Method: POST

URL: {{businessonbot_domain_name}}/orders-cancelled

{
"id": "4331283087516",
"name": "#1581",
"email": "test@gmail.com",
"createdAt": "2021-10-23T15:40:19Z",
"fullyPaid": false,
"cancelReason": "user cancellation request",
"cancelledAt": "time in UTC",
"note": "Order drafted by businessonbot",
"channel": "shopify" | "amazon" (name of the channel from which
order was made),
"shippingAddress": {
"name": "",
"phone": "",
"address1": "",
"address2": "",
"city": "",
"province": "",
"country": null,
"zip": null
},
"total_amount": "180.0",
"currencyCode": "INR", //valid currency codes
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
],
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
}
}
{
"status": "success",
"statusCode": 200
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Method: POST

URL: {{businessonbot_domain_name}}/fulfillments-create

{
"fulfillment_id": "String",
"id": "String",
"id_alias": "String" (optional),
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
],
"customer": {
"email": "String",
"first_name": "String",
"last_name": "String",
"orders_count": "Number" (optional),
"total_spent": "Number" (optional),
"last_order_id": "String" (optional),
"phone": "String"
},
"order_details": {
"total_price": "Number",
"total_tax": "Number",
"total_discount": "Number",
"currency": "String"
},
"tracking_info": {
"tracking_number": "String",
"tracking_url": "String",
"tracking_company_name": "String",
"shipping_status": "String"
},
"fulfilled_at": "Timestamp"
}
{
"status": "success",
"statusCode": 200
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Method: POST

URL: {{businessonbot_domain_name}}/fulfillments-events-create

{
"delivery_id": "String",
"id": "String" (order id),
"id_alias": "String" (optional),
"fulfillment_id": "String",
"status": "Delivered" | "In-transit" | "Returned" | "Dispatched",
"delivered_at": "Timestamp"
}
{
"status": "success",
"statusCode": 200
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Method: POST

URL: {{businessonbot_domain_name}}/abandoned-cart

{
"checkout_id": "String",
"cart_recovery_url": "String",
"line_items": [
{
"id": "String",
"name": "String",
"image": {
"originalSrc": "string" "(image url)
},
"quantity": "Number",
"price": "Number"
}
],
"customer": {
"email": "String",
"first_name": "String",
"last_name": "String",
"orders_count": "Number" (optional),
"total_spent": "Number" (optional),
"last_order_id": "String" (optional),
"phone": "String"
},
"order_details": {
"total_price": "Number",
"total_tax": "Number",
"total_discount": "Number",
"currency": "String"
},
"address": {
"billing_address": {
"address": "String",
"city": "String",
"province": "String",
"country": "String",
"zip": "String"
},
"shipping_address": {
"address": "String",
"city": "String",
"province": "String",
"country": "String",
"zip": "String"
}
},
"phone": "String",
"created_at": "Timestamp"
}
{
"status": "success",
"statusCode": 200
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

These endpoints are on your domain ({{brand_domain_name}}).

Method: GET

URL: {{brand_domain_name}}/order/{{orderId}}

{
"id": "4331283087516",
"name": "#1581",
"email": "test@gmail.com",
"createdAt": "2021-10-23T15:40:19Z",
"fullyPaid": false,
"cancelReason": null,
"cancelledAt": null,
"note": "Order drafted by businessonbot",
"channel": "shopify" | "amazon" (name of the channel from
which order was made),
"shippingAddress": {
"name": "",
"phone": "",
"address1": "",
"address2": "",
"city": "",
"province": "",
"country": null,
"zip": null
},
"total_amount": "180.0",
"currencyCode": "INR" //valid currency codes,
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
],
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
}
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad Request!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Method: GET

URL: {{brand_domain_name}}/personal-details/{{phone_number}}

{
"id": 5617639587996,
"displayName": "Customer Name",
"firstName": "Customer First Name",
"lastName": "Customer Last Name",
"ordersCount": 27, (total orders palced by the customer till
now)
"totalSpent": "6694.60",
"currencyCode": "INR", //valid currency codes
"defaultAddress": {
"id": 6973421224092,
"customer_id": 5617639587996,
"first_name": "Customer First Name",
"last_name": "Customer Last Name",
"address1": "Address testing 01",
"address2": "Address testing 02",
"city": "City testing 01",
"province": "Jharkhand",
"country": "India",
"zip": "831019",
"phone": "phone Number",
"name": "Customer Name",
"province_code": "JH",
"country_code": "IN",
"country_name": "India"
},
"email": "customer email",
"lastOrder": {
"cancelReason": null,
"cancelledAt": null,
"fullyPaid": false,
"id": "4337222058140",
"name": "#1589",
"createdAt": "2021-10-26T09:40:28Z",
"total_amount": "1.00",
"currencyCode": "INR", //valid currency codes
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
},
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
]
}
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad request!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Method: GET

URL: {{brand_domain_name}}/personal-details?email={{email_id}}

{
"id": 5526366453916,
"displayName": "Customer Name",
"firstName": "Customer First Name",
"lastName": "Customer Last Name",
"ordersCount": 16,
"totalSpent": "5229.00",
"currencyCode": "INR", //valid currency codes
"defaultAddress": {
"id": 6697715433628,
"customer_id": 5526366453916,
"first_name": "Customer First Name",
"last_name": "Customer Last Name",
"address1": "Qw",
"address2": "erty,uiop, asdf",
"city": "",
"province": "",
"country": null,
"zip": "987654",
"phone": "phone number",
"name": "Customer Name",
"province_code": null,
"country_code": null,
"country_name": null,
"default": false
},
"email": "test@test.com",
"lastOrder": {
"cancelReason": "OTHER",
"cancelledAt": "2021-10-09T11:57:15Z",
"fullyPaid": false,
"id": "4260628988060",
"name": "#1385",
"createdAt": "2021-09-29T16:43:22Z",
"total_amount": "80.0",
"currencyCode": "INR", //valid currency codes
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
},
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "title": "Honey Chocolate" },
"variant": {
"id": "40470700359836",
"title": "450gm",
"price": "80.00",
"weight": "1 kg"
},
"quantity": 1
}
]
}
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad request!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Method: GET

URL: {{brand_domain_name}}/get-orders/{{phone_number}}

[
{
"id": "4331283087516",
"name": "#1581",
"email": "test@gmail.com",
"createdAt": "2021-10-23T15:40:19Z",
"fullyPaid": false,
"cancelReason": null,
"cancelledAt": null,
"shippingAddress": {
"name": "",
"phone": "",
"address1": "",
"address2": "",
"city": "",
"province": "",
"country": null,
"zip": null
},
"total_amount": "180.0",
"currencyCode": "INR", //valid currency codes
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
],
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
}
},
{
"id": "4331283087516",
"name": "#1581",
"email": "test@gmail.com",
"createdAt": "2021-10-23T15:40:19Z",
"fullyPaid": false,
"cancelReason": null,
"cancelledAt": null,
"shippingAddress": {
"name": "",
"phone": "",
"address1": "",
"address2": "",
"city": "",
"province": "",
"country": null,
"zip": null
},
"total_amount": "180.0",
"currencyCode": "INR", //valid currency codes
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
],
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
}
},
{
"id": "4331283087516",
"name": "#1581",
"email": "test@gmail.com",
"createdAt": "2021-10-23T15:40:19Z",
"fullyPaid": false,
"cancelReason": null,
"cancelledAt": null,
"shippingAddress": {
"name": "",
"phone": "",
"address1": "",
"address2": "",
"city": "",
"province": "",
"country": null,
"zip": null
},
"total_amount": "180.0",
"currencyCode": "INR", //valid currency codes
"lineItems": [
{
"image": { "originalSrc": "Expecting ImageURL" },
"product": { "id": "96054", "title": "Rum Chocolate" },
"variant": {
"id": "40344786960540",
"title": "Default Title",
"price": "100.00",
"weight": "1 kg",
"sku": ""
},
"variantTitle": "",
"quantity": 2
}
],
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
}
}
]
{
"status": "failure",
"statusCode": 400,
"error": "Bad Request!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Method: POST

URL: {{brand_domain_name}}/cancel-order

{
"id": "jvs" (order id),
"cancellationReason": "string",
"cancelledBy": "bot"
}
{
"id": 5526366453916,
"displayName": "Customer Name",
"firstName": "Customer First Name",
"lastName": "Customer Last Name",
"ordersCount": 16,
"totalSpent": "5229.00",
"currencyCode": "INR", //valid currency codes,
"defaultAddress": {
"id": 6697715433628,
"customer_id": 5526366453916,
"first_name": "Customer First Name",
"last_name": "Customer Last Name",
"company": null,
"address1": "Qw",
"address2": "erty,uiop, asdf",
"city": "",
"province": "",
"country": null,
"zip": "987654",
"phone": "phone number",
"name": "Customer Name",
"province_code": null,
"country_code": null,
"country_name": null,
"default": false
},
"email": "test@test.com",
"lastOrder": {
"cancelReason": "OTHER",
"cancelledAt": "2021-10-09T11:57:15Z",
"fullyPaid": false,
"id": "4260628988060",
"name": "#1385",
"createdAt": "2021-09-29T16:43:22Z",
"total_amount": "80.0",
"shipment_details": {
"status": "delivered",
"tracking_info": "Tracking URL if present"
},
"lineItems": [
{
"image": {
"originalSrc": "Expecting ImageURL"
},
"product": {
"title": "Honey Chocolate"
},
"variant": {
"id": "40470700359836",
"title": "450gm",
"price": "80.00",
"weight": "1 kg"
},
"quantity": 1
}
]
}
}
{
"status": "failure",
"statusCode": 400,
"error": "Bad payload!!"
}
{
"status": "failure",
"statusCode": 500,
"error": "Internal Server Error!!"
}

Was this page helpful?

Still stuck? Email support@businessonbot.com