Create a branch
Adds a new branch under your business. business_id is taken
from the credential and any value in the body is overwritten.
Mandatory fields the upstream validates: title, address,
phone (E.164), lat / lon, city_id, country_id,
currency_id, day_availability (1–7), subscription_type,
available_times, custom_vat_config.
Read-this-first gotchas
-
country_id+city_idare validated together against the cities table. A pair that doesn’t join surfaces as502 downstream_unavailable. Pull the valid combinations fromCountryIdandCityId(grouped per country). -
The
branchestable has a fewNOT NULLcolumns that the upstream DTO doesn’t mark as required — sending them unspecified surfaces as500 internal_errorwithColumn '<name>' cannot be null. Pass them explicitly (each defaults tofalseif you don’t care about the feature):is_churnedbir_config_enabledis_vat_registeredauthless_webshop_order_details_enabledauthless_add_order_details_enabled
-
currency_idshould match the country’s primary currency (seeCurrencyIdfor the full table).
Authorizations
Authorization: Basic base64(partner_key:secret_key).
Credentials are issued by a klikit operator. The plaintext
secret_key is shown once at issuance and cannot be retrieved
later — store it securely. If lost, ask your operator to rotate
the secret to receive a new one. The old secret stops working
immediately on rotation; there is no overlap window.
Body
Mirrors core's BranchCreateUpdateReq. business_id is
overwritten by the forwarder. phone must be E.164
(+<country><digits>). available_times follows the same
weekday-keyed shape as section availability.
1 - 2555 - 255E.164
Numeric country id used inside BranchCreateRequest.country_id
and a few other resolver calls. Only ids with configured = 1
are listed — anything outside this list is rejected upstream.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 23, 30, 38, 43, 59, 64, 75, 101, 151, 167, 168, 182 Numeric currency id used inside BranchCreateRequest.currency_id.
Each id is paired with the matching ISO 4217 code partners
already use inside PriceMap (the string key under each
provider entry).
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 1 - 7 elements0 <= x <= 6Weekly schedule keyed by weekday number as a string:
"0" = Sunday … "6" = Saturday. Every day must have at least
one slot. To make a section dark for a day, set
disabled: true and pass any placeholder slot (the disabled
flag wins).
Cleanup window in minutes.
Pricing group this branch sells at (see
listPriceGroups). Update
semantics: a PATCH body that omits this field CLEARS an
existing assignment (branch reverts to base prices) — once a
branch is on a group, include price_group_id in every
branch update you send.
Response
Branch created. Payload mirrors core's branch model — data.id is the new branch id.
Canonical response wrapper. Every response — success or error —
carries the request_id so you can quote one id to klikit
support to correlate a request end-to-end.
"req_4d1b7e3f-..."
Endpoint-specific payload on success.
Machine-readable error code + human message. The code is stable
across releases — switch on code in your client code rather
than parsing the message text.
Common codes you will encounter as a partner: