update_routing_code
Partially update a routing code's value or label in the PPF directory. Only explicit fields change; omit fields to keep current values. Use to rename or relabel without recreation.
Instructions
Partially update an existing routing code in the PPF directory (PATCH semantics).
Only the fields explicitly provided are modified; omitted fields keep their current values. Use to rename a routing code value or update its label without recreating it.
BEHAVIOR:
Returns the updated routing code object on success.
Fails with 404 if the instanceId does not exist.
Fails if the new routing_code value is already used by another routing code on the same SIRET (duplicate).
Updating routing_code renames it in-place; existing directory lines referencing it are updated automatically.
Providing neither routing_code nor label is a no-op (returns the unchanged object).
RESPONSE: the full updated routing code object — instanceId, siret, siren, routingCode, label, updatedAt.
USAGE GUIDELINES:
Retrieve the instanceId first via search_routing_code if you only know the routing code value.
Prefer updating the label for cosmetic changes; only change routing_code if the identifier itself must change (e.g. department renamed), since senders may have cached the old value.
To delete and replace a routing code entirely, use delete on the old instanceId and create_routing_code for the new one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance_id | Yes | Instance identifier of the routing code to update. Obtained from create_routing_code or search_routing_code response. Required — there is no lookup by routing_code value directly. | |
| routing_code | No | New routing code value (replaces the existing one). Must be unique for the associated SIRET. Omit to leave the current value unchanged. | |
| label | No | New descriptive label for the routing code. Omit to leave the current label unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||