Create Client
URL: /api/v1/create-client/
Method: POST
Auth required: YES
Headers
| Parameter Name | Type | Description |
|---|---|---|
| Content-Type | application/json | Request and Response Format |
Payload
| Key | Type | Description |
|---|---|---|
| string | email of the person | |
| group_token | string | created group token id |
| link_reference_id (optional) | string | parent client link reference ID |
| customer_id (optional) | string | unique Identity of the Client |
Payload:
{
"email": "abc@gmail.com",
"group_token": "7af4fb7b-c7dd-4c78-b881-3dc6a83e1b8a",
"link_reference_id": "123456789-1234",
"customer_id": "xb-1290v5"
}Success Response
The response will contain a JSON object with the following fields:
{
"status_code": 200,
"message": "Client created successfully",
"data": {
"reference_id": "1729142752266-1557"
}
}If email already exists
{
"status_code": 200,
"message": "Client already exists, retrieving the Rereference ID",
"data": {
"reference_id": "1729142752266-1557"
}
}Error Response
- Token not provided
{
"detail": "Authentication credentials were not provided."
}- If payload is (empty dictionary)
{
"status_code": 400,
"message": "Please Provide Email/Group Token"
"data": []
}- If Group Token is invalid
{
"status_code": 400,
"message": "Group Token invalid"
"data": []
}- If Link Reference ID is invalid
{
"status_code": 400,
"message": "Link Reference ID invalid"
"data": []
}Status Code list
| status_code | error_message | reason |
|---|---|---|
| 200 | Success | All the provided data are consistent |
| 400 | Bad Request | data inconsistency |
| 401 | UnAuthorized | Auth Token Not Provided |