CorebanqCorebanq Developer Docs
Customersv1Customers

Create customer

Handler: CreateNewCustomer → CreateNewCustomerSrv. On success, createCustomerRecord also: (1) creates a root counterparty (createCustomerRootCounterparty) with customer_id/owner_id linkage; (2) persists counterparty_id on the customer row; (3) grants creator CRUD on the root counterparty (grantCustomerRootCounterpartyAccess); (4) after customer roles bootstrap, grants role-scoped counterparty permissions from app_config (grantCustomerRootCounterpartyRoleAccessAfterRoles — see cust_root_counterparty_access_test.go). Response includes counterparty_id when provisioning succeeds.

POST
/v1/customers

Authorization

bearerAuth
AuthorizationBearer <token>

JWT token obtained from /v1/authenticate endpoint

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/customers" \  -H "Content-Type: application/json" \  -d '{    "uid": "string",    "legal_form": "Corporation",    "seat": "string",    "status": "Active",    "name": "string"  }'
{
  "abbr": "string",
  "logo": "string",
  "documents": {
    "corp_struct": "string",
    "share_reg": "string"
  },
  "uid": "string",
  "date_of_registration": "2019-08-24",
  "legal_form": "string",
  "seat": "string",
  "status": "string",
  "principal_id": "b0fe3bdd-8201-445a-aab3-a018692d6aca",
  "counterparty_id": "fd38dae9-b300-4017-a630-101c4279eafd",
  "signing_room_id": "28729801-1bf1-402c-b869-2a7f0d1564b5",
  "chatroom_id": "bf93f1ad-9523-425d-b492-784fe0a4c2be",
  "tariff_id": "d82b8db6-f412-4b9c-8c5e-6a0221035c86",
  "fx_tariff_id": "f12d958c-c80c-4752-862c-9e0c09506488",
  "name": "string",
  "description": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  "modified_at": "2019-08-24T14:15:22Z",
  "modified_by": "e8d4374d-93a1-4e98-a6c6-fdcf00c5059f",
  "active": true,
  "metadata": {},
  "addresses": [
    {
      "street": "string",
      "city": "string",
      "postal_code": "string",
      "country": "string"
    }
  ],
  "type": "string"
}
{
  "status": 400,
  "message": "Bad request"
}
{
  "status": 401,
  "message": "Unauthorized"
}
{
  "status": 403,
  "message": "Forbidden"
}
{
  "status": 404,
  "message": "Not found"
}
{
  "status": 409,
  "message": "Conflict"
}
{
  "status": 500,
  "message": "Internal server error"
}