The Gratify KYB API is designed as a standard RESTful API, providing accessible and reliable endpoints for managing and verifying business data. This architecture adheres to established HTTP conventions, allowing users to interact with the API using common HTTP methods such as GET, POST, PUT, PATCH, and DELETE. Each endpoint is logically structured to perform specific operations related to merchants, inputs, and results, facilitating smooth integration into existing business processes.
Authentication
Security and access management are integral to using the Gratify KYB API. Authentication is handled through Basic Auth over HTTPS. Users must supply their API Key as the username and their API Secret as the password when making requests. This method ensures that only authorized users can access sensitive data and perform operations within the API environment, maintaining data integrity and confidentiality. Make sure to store your credentials securely and follow best practices for API authentication to protect your integration from unauthorized access.
Projecters
To make GETting data easier, Gratify exposes a Project
header which:
- allows users to automatically join many-to-one relationships (equivalent to an SQL Join)
- allows users to control what fields are returned, optimizing performance (equivalent to an SQL Select)
This allows users to retrieve joined information in one call instead of making consecutive calls for each entity
Example
GET /merchant/{merchantID}
with header project: ['merchantId', 'name', 'inputs', 'results']
will return
{
"merchantId": "merchant_222cKam68HrpCVjtGaYFu6",
"name": "Gratify Payments Inc.",
"inputs": [
...array of inputs
],
"results": [
...array of results
]
}
In the above example, only merchantId
and name
are returned for the merchant entity, and the merchant's inputs
and results
are joined to the result.
To return all merchant fields with inputs and results, you can use project: ['*', 'inputs', 'results']