> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.noyax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sub-records

> Rules for addresses, telephones, links, representatives, bank accounts, group memberships and parameters.

Customer sub-records can be managed in two ways:

* **When creating a customer**: with the lists in the `POST /customers` body, 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}/addresses` and so on). They support list, get, create, update and delete.

<Note>
  [Update customer](/en/v1/customers/update) does not change sub-records; use their own endpoints. If the customer is not visible to the user, all sub-record endpoints return **404**.
</Note>

Sub-record updates are **full replaces**: fields you do not send are cleared.

## Addresses

`/customers/{customerId}/addresses`

| Field                        | Rule                                                                                                                     |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `DistrictId`                 | **Required.** An ID from the [district list](/en/v1/definitions/districts/list). City and country come from the district |
| `Address`                    | **Required.** Street address                                                                                             |
| `PostalCode`                 | Postal code                                                                                                              |
| `IsInvoiceAddress`           | Whether this is the invoice address                                                                                      |
| `CoordinateX`, `CoordinateY` | Location coordinates                                                                                                     |

`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: true` becomes 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`

| Field         | Rule                           |
| ------------- | ------------------------------ |
| `Number`      | **Required.** Telephone number |
| `NumberType`  | `1` Landline, `2` Mobile       |
| `Extension`   | Extension number               |
| `Description` | Description                    |

## Links

`/customers/{customerId}/links`

| Field         | Rule                                                                                                                          |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `Value`       | **Required.** E-mail address or URL                                                                                           |
| `LinkType`    | `0` Other, `1` E-mail, `2` Website, `3` LinkedIn, `4` Instagram, `5` X. For type `1` the value must be a valid e-mail address |
| `Description` | Description                                                                                                                   |

## Representatives

`/customers/{customerId}/representatives`

| Field                       | Rule                          |
| --------------------------- | ----------------------------- |
| `FullName`                  | **Required.** Full name       |
| `Position`                  | Position                      |
| `Email`                     | E-mail. Must be valid if sent |
| `Gsm`, `Phone`, `Extension` | Mobile, landline, extension   |
| `Link`                      | Link (e.g. LinkedIn profile)  |
| `Description`               | Description                   |

## Bank accounts

`/customers/{customerId}/bank-accounts`

| Field                     | Rule                                                                             |
| ------------------------- | -------------------------------------------------------------------------------- |
| `BankName`                | **Required.** Bank name                                                          |
| `CurrencyId`              | **Required.** An ID from the [currency list](/en/v1/definitions/currencies/list) |
| `Iban`                    | IBAN                                                                             |
| `Branch`, `AccountNumber` | Branch and account number                                                        |
| `Description`             | Description                                                                      |

Send either `Iban`, or `Branch` together with `AccountNumber`.

## Group memberships

`/customers/{customerId}/group-members`

| Field           | Rule                                                                                     |
| --------------- | ---------------------------------------------------------------------------------------- |
| `GroupDetailId` | **Required.** ID of a detail from [customer groups](/en/v1/customers/definitions/groups) |

* 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`

| Field                   | Rule                                                                                                                                                           |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ParameterDefinitionId` | **Required.** An ID from [customer parameter definitions](/en/v1/customers/definitions/parameter-definitions/list). A definition can be used once per customer |
| `Value`                 | **Required.** Format depends on the definition type                                                                                                            |

| Type | Meaning                 | Example `Value`         |
| ---- | ----------------------- | ----------------------- |
| `0`  | Text                    | `"Priority"`            |
| `1`  | Yes/No                  | `true`                  |
| `2`  | Integer                 | `12`                    |
| `3`  | Decimal (dot separator) | `12.5`                  |
| `4`  | Date                    | `"2026-09-17"`          |
| `5`  | Time                    | `"14:30"`               |
| `6`  | Date and time           | `"2026-09-17T14:30:00"` |

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. Send `QueryEInvoiceLabels: 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.

Labels are returned in `EInvoiceLabels` of [Get customer](/en/v1/customers/get).
