What are the requirements for APIs used on Haptik?
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Here we highlight the requirements for APIs that are used on the Haptik for the development of bots. We will be consuming API endpoints in scenarios where data needs to be fetched from the database and presented to the end-user on the bot screen.
In order to call the APIs for development purposes, there are certain prerequisites that are listed below -
- All APIs should preferably be Restful APIs that use HTTPS requests to GET, PUT, POST, and DELETE data.
- Request and Response must be JSON preferably.
- API endpoints must be publicly accessible. In case they are not publicly accessible, Haptik’s IPs must be whitelisted to be able to be accessed.
- Each endpoint should contain the following details:
- Endpoint URL.
- The path to call each endpoint.
- Which HTTP methods can be used with each endpoint.
- Authentication and other headers are required with each request.
- Explanation of what request data is mandatory and what is optional.
- Example Request Body.
- Example Response Body.
- Possible Error Scenarios and Status Codes.
- If there is authentication, please provide authentication steps in detail.
- APIs should have a stable Staging/Test environment that can be used during development.
- Test accounts/IDs that can be used for testing (as applicable). For eg. dummy mobile numbers, sample user IDs, sample tracking IDs, etc.
Technical SPOC who is equipped to answer any queries/clarifications regarding the APIs.
Required API Details for Testing (SAMPLE FORMAT)
Sr. No. |
Data |
Example |
1 |
API name |
API to generate OTP |
2 |
Method |
POST |
3 |
Endpoint URL |
|
4 |
Headers |
|
5 |
Request body |
Request: { "mobileNo":"9928056506", "Attempt id" : "1" } |
6 |
Success Response |
{ status:"success", status_code:"SUCC001", message:"Request Successful" } |
7 |
Error Response |
{ "status": "error", "status_code": "ERR002", "message": "Request Failed" } |
8 |
Partner Code |
"{partnercode}" |
9 |
Consumer Key, Consumer Secret, User ID and Call back URL |
If we are using these or similar, the key name should be properly mentioned. Eg: consumer_key |
10 |
HTTP Status Codes |
Code Message SUCC001 Request Successful ERR001 Request Failed |