- When creating a customer: with the lists in the
POST /customersbody, in the same operation as the customer. If any record is invalid, the customer is not created either. - Afterwards: with each sub-record’s own endpoints (
/customers/{customerId}/addressesand so on). They support list, get, create, update and delete.
Update customer does not change sub-records; use their own endpoints. If the customer is not visible to the user, all sub-record endpoints return 404.
Addresses
/customers/{customerId}/addresses
FullAddress in responses is the address combined with district, city and country, and is read-only.
Invoice address rules
A customer always has exactly one invoice address.- When creating a customer with a single address, that address becomes the invoice address. With several addresses, exactly one must have
IsInvoiceAddress: true. - When adding an address, the customer’s first address always becomes the invoice address. A new address added with
IsInvoiceAddress: truebecomes the invoice address and the previous one loses the flag. - The flag of the invoice address cannot be removed by an update, and the invoice address cannot be deleted. Mark another address as the invoice address first.
Telephones
/customers/{customerId}/telephones
Links
/customers/{customerId}/links
Representatives
/customers/{customerId}/representatives
Bank accounts
/customers/{customerId}/bank-accounts
Send either
Iban, or Branch together with AccountNumber.
Group memberships
/customers/{customerId}/group-members
- A customer can be a member of the same group detail only once.
- Some groups may be defined as mandatory. When creating a customer, at least one detail from every mandatory group must be sent. This is checked only on create, not when a membership is deleted.
Parameters
/customers/{customerId}/parameters
In responses,
ParameterType is the definition type and Value is the value in that type’s format.
E-invoice labels
E-invoice labels (GİB mailbox aliases) cannot be sent through the API; they are read-only. SendQueryEInvoiceLabels: true when creating a customer to query the labels from the e-invoice integrator by TaxNumber after the customer is saved:
- Labels found are saved, and the first one is marked as default.
- If the query fails, the customer is still created; labels stay empty.
EInvoiceLabels of Get customer.