Addresses
Full CRUD on company addresses. This API is the first place a scoped API key can manage addresses at all.
type accepts company, billing, shipping and office. The two per-user types, personal and manual, are rejected with 400 on create and update (a machine caller cannot own one), but existing rows of those types stay readable, and are listed regardless of their feature flags.
Setting defaultDelivery or defaultInvoice to true moves the default: the previous holder is cleared and the call succeeds. Unsetting the last one is a 400, and deleting a company's last address is refused.
Operations
Reads need master-data:read, writes master-data:write.
- GET
/api/v2/{companyId}/addresses/: Paginated by name,personalandmanualrows included. - POST
/api/v2/{companyId}/addresses/:street,houseNumber,postalCodeandcityare required;typemust be one of the four writable ones. Setting a default here moves it and still returns201. - GET
/api/v2/{companyId}/addresses/{id}/: One address. Soft-deleted rows are returned here too. - PUT
/api/v2/{companyId}/addresses/{id}/: Replaces the writable fields. Unsetting the company's last default delivery or default invoice address is a400. - PATCH
/api/v2/{companyId}/addresses/{id}/: Changes only what you send;{"defaultDelivery": true}moves the default here too. - DELETE
/api/v2/{companyId}/addresses/{id}/: Soft delete, and the address is unlinked from every legal entity. The company's last address cannot be deleted, and a default it held is handed to a remaining address.
Endpoints
/api/v2/{companyId}/addresses/?page=1&pageSize=25&ordering=name&fields=&omit=
/api/v2/{companyId}/addresses/
/api/v2/{companyId}/addresses/{id}/?fields=&omit=
/api/v2/{companyId}/addresses/{id}/
/api/v2/{companyId}/addresses/{id}/
/api/v2/{companyId}/addresses/{id}/