Success Message
Knit API's response will always have success
body parameter set. success
boolean can be used for evaluating whether an API call was successful. A successful API call will also contain data
object. The API response will be present within data
object. Below is an example for successful Employee Location API response
{
"success": true,
"data": {
"employeeId": "123qww",
"addressLine1": "12/8 block 4",
"addressLine2": "MG Marg",
"city": "Guntur",
"state": "Andhra Pradesh",
"country": "IN",
"zipCode": "522601",
"addressType": "HOME_PRESENT"
}
}
Error Message
For error responses, success
flag will be set to false
and the error description will be present within the error
object in msg
key. Below is a sample API error message.
{
"success": false,
"error": {
"msg": "No such employee exists"
}
}
Response Headers
Below are a set of Knit headers you can expect in API Response
Knit Header | Type | Description |
---|---|---|
X-Knit-Execution-Id | Mandatory | Unique Id for each API call/Webhook dispatch. Use it for debugging a particular execution. |
X-Knit-Signature | Optional | Only passed with Webhook dispatches for checking integrity of the Webhook message. |
X-Knit-Integration-Id | Optional | Only passed with Webhook dispatches. |