curl --request POST \
--url https://service.incaseof.law/openapi/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Firma ABC GmbH",
"email": "[email protected]",
"phone": "+43 1 234 5678",
"partner_id": "a1b2c3d4-0000-0000-0000-000000000000",
"address": {
"street": "Hauptstraße 1",
"city": "Wien",
"zip": "1010",
"country": "AT"
}
}
'{
"success": true,
"reused": true,
"data": {
"id": "5f0c2c1e-0000-0000-0000-000000000000",
"organization_id": "9b7d1a44-0000-0000-0000-000000000000",
"partner_id": "a1b2c3d4-0000-0000-0000-000000000000",
"name": "Rauchfangkehrer Huber e.U.",
"email": "[email protected]",
"uid": "ATU12345678",
"partner_client_reference": "WIN-10457"
}
}Create customer (or reuse the existing one)
Create a new customer linked to a partner. Requires a valid partner_id. The organization is determined from your API token. The partner must belong to the same organization as the API token.
Reusing an existing client. Send your own ID for the business as
partner_client_reference and/or its VAT ID as uid on every call. Before creating,
the API looks for a customer of your partner account — first by
partner_client_reference, then by uid:
- match → the existing customer is returned with HTTP 200 and
reused: true(sameidandorganization_id; stored name, email and address are not changed — use PATCH for that). A key the existing customer does not have yet is added to it. - no match → a new customer is created, HTTP 201,
reused: false. partner_client_referencematches one customer anduidanother → HTTP 409, nothing is created.
Both keys are unique per partner account; another partner sending the same UID gets its own customer. Without either key every call creates a new customer. The client’s onboarding invitation is sent once, with the first claim of that customer.
curl --request POST \
--url https://service.incaseof.law/openapi/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Firma ABC GmbH",
"email": "[email protected]",
"phone": "+43 1 234 5678",
"partner_id": "a1b2c3d4-0000-0000-0000-000000000000",
"address": {
"street": "Hauptstraße 1",
"city": "Wien",
"zip": "1010",
"country": "AT"
}
}
'{
"success": true,
"reused": true,
"data": {
"id": "5f0c2c1e-0000-0000-0000-000000000000",
"organization_id": "9b7d1a44-0000-0000-0000-000000000000",
"partner_id": "a1b2c3d4-0000-0000-0000-000000000000",
"name": "Rauchfangkehrer Huber e.U.",
"email": "[email protected]",
"uid": "ATU12345678",
"partner_client_reference": "WIN-10457"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Customer name
255Customer email
UUID of the referring partner (must belong to the same organization)
Phone number (optional)
50Address object (optional)
Show child attributes
Show child attributes
Arbitrary metadata (optional)
EU VAT ID (UID) of the business, e.g. ATU12345678. Spaces and the separators - . / are removed and letters uppercased; after that it must be a 2-letter country prefix plus 2–12 characters (otherwise 400). Unique per partner account. null is treated as not given.
40"ATU12345678"
Your own ID for this business. Trimmed, matched exactly (case-sensitive). Unique per partner account; checked before uid. null is treated as not given.
255"WIN-10457"
Response
Existing customer reused — your partner account already has a customer with this partner_client_reference or uid. Nothing was created.