Create or update a customer
Creates the customer you know under {source}/{external_ref}, or replaces its fields. A PUT replaces: a field you leave out is emptied. Answers 201 when it created the customer, 200 when it updated it. Scope partner:customers:write.
apiKey partner:customers:writeAuthorizationBearer <ab_…>An API key from Integrations → Connect AI assistants (MCP) → New access, bound to exactly one company. Each operation names the scope the key must carry.
Scope: partner:customers:write
source*Source^[a-z0-9][a-z0-9_-]{0,49}$external_ref*External Ref^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,254}$AlphaCount-Version?stringThe API version to use. Default: the current one.
application/json- body
PUT /customers/by-ref/{source}/{external_ref}. Replaces every field
listed here; fields the partner API does not own (customer number, tags,
phone, booking defaults) stay as they are.
city*City1 <= length <= 100contact_name?|nullcountry_code*Country Code2 <= length <= 2customer_type?Customer Type"business""business""private"email*Emaillength <= 255house_number?|nullleitweg_id?|nullname*Name1 <= length <= 255street*Street1 <= length <= 255vat_id?|nullzip*Zip1 <= length <= 10OK
application/json- response
city*string|nullcontact_name*string|nullcountry_code*|ISO 3166-1 alpha-2.
customer_type*Customer Type"business""private"email*string|nullexternal_ref*|Your id of the customer.
external_source*|Your system's name, as in the path.
house_number*string|nullid*IdAlphaCount's id of the customer.
kundennummer*|Customer number in the company's books (debtor number).
leitweg_id*|Routing id of a public-sector buyer (XRechnung).
name*Namestreet*string|nullvat_id*string|nullzip*string|nullcurl -X PUT 'https://app.alphacount.ai/api/partner/v1/customers/by-ref/string/string' \ -H 'Authorization: Bearer ab_...' \ -H 'Content-Type: application/json' \ -d '{ "city": "Köln", "country_code": "DE", "email": "buchhaltung@musterschule.example", "name": "Musterschule", "street": "Schulweg", "zip": "50667"}'{ "city": "Köln", "contact_name": null, "country_code": "DE", "customer_type": "business", "email": "buchhaltung@musterschule.example", "external_ref": "org-17", "external_source": "alphalearn", "house_number": null, "id": "00000000-0000-4000-8000-000000000001", "kundennummer": "10001", "leitweg_id": null, "name": "Musterschule", "street": "Schulweg", "vat_id": null, "zip": "50667"}