Embat Attributes API
`Attribute` represents a custom field that you can define once and then use to tag records across Embat, such as an ERP dimension, a cost center or any other analytic field you want available as a filter in tables, charts and reports. `customId` is the unique identifier of an attribute: set your own value to use as your ERP dimension ID, or let Embat auto-generate one. An attribute has a `type` — `list` (a fixed set of `values` to choose from), `string` or `number` (free-form value) — and can optionally be nested under a parent attribute via `parentCustomId` to model hierarchies (e.g. a "City" attribute whose values are nested under a "Country" attribute's values). Attribute values are attached to other entities — `Payments`, `Contacts`, `Operations`, `Transactions` and `AccountingEntries` — by sending the attribute's `customId` together with the chosen `value`/`valueCustomId` in that entity's `attributes` field. **Typical flow:** 1. **Create the attribute** with `POST /attributes/{companyId}`, defining its `type` and, for `list` attributes, its `values`: ```json POST /attributes/{companyId} { "customId": "cost-center", "source": "erp", "name": "Cost Center", "type": "list", "values": [ { "customId": "marketing", "name": "Marketing" }, { "customId": "sales", "name": "Sales" } ] } ``` 2. **Tag other entities with the attribute.** When creating or updating a payment, contact, operation, transaction or accounting entry, reference the attribute in its `attributes` field: ```json { "customId": "marketing", "value": "Marketing" } ``` 3. **Maintain the value list** with `POST /attributes/{companyId}/{customId}/values/bulk` to add values without touching the rest of the attribute, or update the attribute directly to replace its full value list.