Create Client

Create Client

URL: /api/v1/create-client/

Method: POST

Auth required: YES

Headers

Parameter NameTypeDescription
Content-Typeapplication/jsonRequest and Response Format

Payload

KeyTypeDescription
emailstringemail of the person
group_tokenstringcreated group token id
link_reference_id (optional)stringparent client link reference ID
customer_id (optional)stringunique 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

  1. Token not provided
{
  "detail": "Authentication credentials were not provided."
}
  1. If payload is (empty dictionary)
{
  "status_code": 400,
  "message": "Please Provide Email/Group Token"
  "data": []
}
  1. If Group Token is invalid
{
  "status_code": 400,
  "message": "Group Token invalid"
  "data": []
}
  1. If Link Reference ID is invalid
{
  "status_code": 400,
  "message": "Link Reference ID invalid"
  "data": []
}

Status Code list

status_codeerror_messagereason
200SuccessAll the provided data are consistent
400Bad Requestdata inconsistency
401UnAuthorizedAuth Token Not Provided