Skip to content

Import

Submit a migration (dry run)

invoices:write

Writes NOTHING. Validates every row and returns a report; POST /commit is what writes. Idempotent on the file’s content — submitting the same file twice is the same run, not 5.000 duplicates. Amounts are OPEN items (what is outstanding), not original invoice totals. Invoice numbers must be numeric: our series continues from yours.

Request body fields 20
FieldTypeRequiredDescription
customersobject[]YesField in the request payload.
customers[].externalIdstringYesField in the request payload.
customers[].typestringYesResource-specific type.
customers[].namestringYesHuman-readable name.
customers[].cvrstringNoDanish CVR number for a company.
customers[].vatNumberstringNoForeign VAT number for a non-Danish company.
customers[].emailstringNoE-mail used for delivery and contact.
customers[].addressobjectNoPostal address used on documents.
customers[].address.streetstringNoStreet and house number.
customers[].address.postalCodestringNoPostal code.
customers[].address.citystringNoCity.
customers[].address.countrystringNoISO country code or country name.
invoicesobject[]YesField in the request payload.
invoices[].externalIdstringYesField in the request payload.
invoices[].customerExternalIdstringYesField in the request payload.
invoices[].numberintegerYesField in the request payload.
invoices[].issuedDatestringYesField in the request payload.
invoices[].dueDatestringYesDue date in YYYY-MM-DD format.
invoices[].openAmountOereintegerYesField in the request payload.
invoices[].vatOereintegerYesField in the request payload.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/imports \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"customers": [
{
"externalId": "9b2f1c1e-…",
"type": "company",
"name": "Acme ApS",
"cvr": "12345678",
"email": "ap@acme.example"
}
],
"invoices": [
{
"externalId": "9b2f1c1e-…",
"customerExternalId": "9b2f1c1e-…",
"number": "…",
"issuedDate": "2026-08-15",
"dueDate": "2026-08-15",
"openAmountOere": 125000,
"vatOere": 125000
}
]
}'
201 Success envelopeapplication/json
Response fields 3
FieldTypeDescription
data.statusreceived | ready | failed | committedMigration state.
data.reportobject | nullDry-run totals and row-level validation errors.
data.committedAtdate-time | nullSet once the validated migration is written.
Possible errors 9
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
400invalid_requestThe request body or parameter failed validation.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
413payload_too_largeThe JSON or uploaded file exceeds this endpoint’s size limit.
429rate_limitedThe organisation’s rate budget is exhausted.
Request body — fuldt JSON Schema
{
"type": "object",
"properties": {
"customers": {
"maxItems": 5000,
"type": "array",
"items": {
"type": "object",
"properties": {
"externalId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"type": {
"type": "string",
"enum": [
"person",
"company"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"cvr": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{8}$"
},
{
"type": "null"
}
]
},
"vatNumber": {
"anyOf": [
{
"type": "string",
"maxLength": 20
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 254
},
{
"type": "null"
}
]
},
"address": {
"anyOf": [
{
"type": "object",
"properties": {
"street": {
"type": "string",
"maxLength": 200
},
"postalCode": {
"type": "string",
"maxLength": 10
},
"city": {
"type": "string",
"maxLength": 100
},
"country": {
"type": "string",
"maxLength": 100
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"externalId",
"type",
"name"
],
"additionalProperties": false
}
},
"invoices": {
"maxItems": 20000,
"type": "array",
"items": {
"type": "object",
"properties": {
"externalId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"customerExternalId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"number": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "string",
"minLength": 1,
"maxLength": 40
}
]
},
"issuedDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"dueDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"openAmountOere": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"vatOere": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"externalId",
"customerExternalId",
"number",
"issuedDate",
"dueDate",
"openAmountOere",
"vatOere"
],
"additionalProperties": false
}
}
},
"required": [
"customers",
"invoices"
],
"additionalProperties": false
}

Import run and dry-run report

invoices:read
ParameterInTypeRequiredDescription
importIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/imports/9b2f1c1e-… \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 3
FieldTypeDescription
data.statusreceived | ready | failed | committedMigration state.
data.reportobject | nullDry-run totals and row-level validation errors.
data.committedAtdate-time | nullSet once the validated migration is written.
Possible errors 5
HTTPCodeMeaning
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404import_not_foundThe import run does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

Commit the migration

invoices:write

All or nothing, in one transaction, on the SAVED payload — a commit can never hit data other than what you had approved. Imported items are exempted from the reminder engine (they are past due by definition) and nothing is sent: no mails, no reminders. Committing twice is a no-op.

ParameterInTypeRequiredDescription
importIdpathstringYes
Request exampleNo request body
curl -X POST https://api.rieckflow.com/v1/imports/9b2f1c1e-…/commit \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041"
200 Success envelopeapplication/json
Response fields 3
FieldTypeDescription
data.statusreceived | ready | failed | committedMigration state.
data.reportobject | nullDry-run totals and row-level validation errors.
data.committedAtdate-time | nullSet once the validated migration is written.
Possible errors 8
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is missing or malformed.
401invalid_api_keyThe API key is missing, invalid, expired or revoked.
403api_not_includedThe organisation’s plan does not include API access.
403insufficient_scopeThe key does not have the required scope.
404import_not_foundThe import run does not exist or belongs to another organisation.
409idempotency_conflictThe same key was used with a different request.
409idempotency_in_progressThe same operation is currently being processed. Retry later.
429rate_limitedThe organisation’s rate budget is exhausted.