create_routing_code
Create a routing code for a SIRET to route incoming invoices to specific departments. Requires active establishment and unique code value.
Instructions
Create a new routing code for a SIRET in the PPF directory.
Routing codes let a recipient company route incoming invoices to specific departments or services. Once created, the code can be referenced in a directory line (create_directory_line) and communicated to senders to use in invoice addressing.
BEHAVIOR:
Returns the created routing code object including its instanceId.
Fails if the SIRET is not registered or not Active in the PPF directory.
Fails if a routing code with the same value already exists for this SIRET (duplicate check).
The routing_code value is case-sensitive and must be unique per SIRET.
RESPONSE: includes instanceId (required for update/delete), siret, siren, routingCode, label, createdAt.
USAGE GUIDELINES:
Call get_establishment_by_siret first to verify the SIRET is Active before creating a routing code.
After creating, call create_directory_line with routing_code set to register the receiving address.
If a routing code already exists (duplicate error), use search_routing_code to retrieve its instanceId, then update it with update_routing_code if needed.
Routing codes are optional; omit them if the company routes all invoices to a single SIRET address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siret | Yes | Establishment SIRET to associate this routing code with (14 digits). The SIRET must already be registered and Active in the PPF directory. | |
| routing_code | Yes | Routing code value to create (free-form string, e.g. 'PURCHASING-DEPT', 'PARIS-OFFICE'). This exact value will appear in invoicing addresses and must be communicated to senders. | |
| label | No | Human-readable label for the routing code (e.g. 'Purchasing department - HQ'). Optional but recommended for clarity when multiple codes exist. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||