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 client

    • external_client_id (string) - External client identifier

    • phone (string) - Client's phone number

    • email (string) - Email of the client

    • company (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 name

  • external_client_id (string) - External client identifier

  • phone (string) - Client's phone number

  • email (string) - Customer email

  • company (string) - Client's company name

  • id (string, UUID) - Unique identifier of the created client

Error Codes:

  • 400 Bad Request — Invalid data in the request

  • 401 Unauthorized — Missing or incorrect x-tenant-id

  • 500 Internal Server Error — Internal server error

Last updated