Assign supplier to company codes
Erforderliche Berechtigungen: suppliers:write
Ersetzt die vollständige Buchungskreis-Zuordnung eines Lieferanten. Der API-Schlüssel muss mit einem Kunden verknüpft sein, der Lieferant und alle Buchungskreise müssen zu diesem Kunden gehören.
Senden Sie legalEntityNumbers: [], um alle Zuordnungen zu entfernen.
Overview
Use this endpoint to assign a supplier to one or more company codes. The request always replaces the supplier’s full assignment list.Permissions
| Scope | Tenant type |
|---|---|
suppliers:write | Customer API key |
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | API key with scope suppliers:write |
Content-Type | Yes | application/json |
Path parameters
| Parameter | Description |
|---|---|
id | UUID of the supplier whose company-code assignments will be replaced |
Request body
| Field | Required | Description |
|---|---|---|
legalEntityNumbers | Yes | Complete list of company-code numbers for this supplier |
Example
Remove all assignments
Behavior
- The submitted list replaces all existing company-code assignments for the supplier.
- Duplicate numbers are not allowed.
- The supplier must belong to the customer linked to the API key.
- All company codes must belong to the same customer.
Response codes
| Code | Description |
|---|---|
200 | Assignment list replaced successfully |
400 | Invalid request, duplicate numbers, or company code does not belong to the customer |
401 | Unauthorized — API key is not linked to a customer |
403 | Forbidden — missing suppliers:write scope |
404 | Supplier was not found in the current tenant |
500 | Internal server error |
Authorizations
API-Schlüssel zur Authentifizierung. Kontaktieren Sie Ihren Customer Success Manager, um einen API-Schlüssel zu erhalten.
Jeder Endpunkt erfordert spezifische Berechtigungen (Scopes); die erforderlichen Scopes werden pro Endpunkt angezeigt.
Path Parameters
UUID des Lieferanten
Body
Vollständige Liste der Buchungskreisnummern für diesen Lieferanten. Ein leeres Array entfernt alle Zuordnungen.
["LE-001", "LE-002"]