Create a client
Adds a client to the customer register, with the same rules as the Envoi app. type is business (the
default) or consumer. A Norwegian business needs its organisation number (orgNumber); a business in another
country needs that country’s fields.
A client that already exists (a business with the same organisation number, or a consumer with the same email)
is not created twice: the answer is 409 client-exists with the existing client’s id in details.existingId.
Authorizations
OAuth 2.0 client credentials. The token request also needs the audience form field (the Account ID), which OAuth tooling does not always send; see POST /v1/oauth/token.
Headers
Required on every POST, at most 255 characters. Use a new UUID for each logical operation. The first request with a key runs, and its answer (any status below 500) is stored for 7 days. A retry with the same key, method, path and body gets the stored answer again with Idempotency-Replayed: true, and nothing runs twice. The same key with a different body or path is 422 idempotency-key-reused; the same key while the first request is still running is 409 idempotency-key-in-progress. A 5xx answer is not stored, so the same key may be retried. A key belongs to the API client's grant (one environment).
255Body
The client.
A new client.
The client's name. Required.
business (the default) or consumer.
Organisation number. Required for a Norwegian business (9 digits).
A foreign client's VAT number.
ISO 3166-1 alpha-2 country code; NO when left out.
Email address.
Phone number.
Street address.
Postal code.
City.
Contact person.
Response
The new client.
A client in the account's customer register.
The client's id.
The client's name.
business or consumer.
Organisation number; empty when none.
ISO 3166-1 alpha-2 country code, for example NO.
Email address; empty when none.
Phone number; empty when none.
Street address.
Postal code.
City.
Contact person; empty when none.
When it was created (UTC).
When it last changed (UTC).
A foreign client's VAT number, or null.