Clients
CREATE clients in batch
This method allows you to create one or more clients at the same time.
Method
POST
/api.hesh.app/api/v1/public/clients/batch
Method Returns
The method returns a list of created clients with their unique identifiers (id).
Permissions required
Requires x-tenant-id (UUID v4) in the request header to identify the tenant.
Request
Headers:
x-tenant-id
(string, UUID v4) - Tenant ID Example:40dd0c53-2fa7-4193-82ae-14d4e62c20fb
Body (application/json):
{
"clients": [
{
"name": "client name",
"external_client_id": "123456",
"phone": "937-99-92",
"email": "[email protected]",
"company": "client company"
}
]
}
Field clients: a list of clients to create
name
(string) - The name of the clientexternal_client_id
(string) - External client identifierphone
(string) - Client's phone numberemail
(string) - Email of the clientcompany
(string) - The name of the client's company
Path parameters
This method does not require any additional path parameters.
Response
200 OK: Successfully created clients. A list of client objects is returned.
Response body (application/json):
[
{
"name": "client name",
"external_client_id": "123456",
"phone": "937-99-92",
"email": "[email protected]",
"company": "client company",
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e"
}
]
Response fields:
name
(string) - Client nameexternal_client_id
(string) - External client identifierphone
(string) - Client's phone numberemail
(string) - Customer emailcompany
(string) - Client's company nameid
(string, UUID) - Unique identifier of the created client
Error Codes:
400
Bad Request
— Invalid data in the request401
Unauthorized
— Missing or incorrectx-tenant-id
500
Internal Server Error
— Internal server error
Last updated