[POST] .../v1/docinvoice/setexternaldata
Sets invoice external EDI identifiers. Use this method from integration workflows to persist the provider identifiers that connect a REGOS invoice with an external EDI document. The request body must contain document_id, external_id and either connected_integration_id or the deprecated integration_key; connected_integration_id takes priority and roaming_id is optional. The invoice must exist and be locked by the current request user; when connected_integration_id is provided it must resolve to a configured connected integration before the external data is stored. The current request user must have invoice edit permission; missing body, invalid document_id, missing integration identifier, missing external_id, denied access, unresolved connected integration, unlocked document, database or transaction failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| connected_integration_id | String | Optional | Connected integration ID. Takes priority over integration_key. |
| document_id | Int64 | Required | Invoice ID. |
| external_id | String | Required | External invoice ID in the EDI provider. Required by the controller. Maximum length is 100 characters. |
| roaming_id | String | Optional | Optional roaming/GNK document ID. Maximum length is 100 characters. |
Request Example
{
"document_id": 9101,
"connected_integration_id": "edo-main",
"external_id": "EDI-123456",
"roaming_id": "ROAM-7890"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
Response Example
{
"ok": true
}