Skip to content

Customers

List customers

customers:read
ParameterInTypeRequiredDescription
cvrquerystringNoExact CVR match
emailquerystringNoExact e-mail match (blind index — no free-text search)
externalReferencequerystringNoExact match on your own reference
pastDuequerystringNotrue = only customers currently past due (threshold-evaluated)
limitqueryintegerNoPage size, 1-200 (default 50)
cursorquerystringNoOpaque cursor from meta.nextCursor
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 9
FieldTypeDescription
data[].iduuidStable Rieck customer id.
data[].typecompany | personCustomer type.
data[].namestringCustomer name.
data[].addressobject | nullPostal address used on documents.
data[].hasCprbooleanWhether Rieck has a CPR number. The number is never returned.
data[].externalReferencestring | nullYour customer reference.
data[].metadataobject | nullYour own string key/value data.
data[].createdAtdate-timeUTC creation timestamp.
meta.nextCursor`stringnull`
Possible errors 5
HTTPCodeMeaning
400invalid_cursorThe cursor is malformed, expired or belongs to another list shape.
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.
429rate_limitedThe organisation’s rate budget is exhausted.

Create customer

customers:write
Request body fields 15
FieldTypeRequiredDescription
typestringYesResource-specific type.
namestringYesHuman-readable name.
cvrstringNoDanish CVR number for a company.
vatNumberstringNoForeign VAT number for a non-Danish company.
addressobjectNoPostal address used on documents.
address.streetstringNoStreet and house number.
address.postalCodestringNoPostal code.
address.citystringNoCity.
address.countrystringNoISO country code or country name.
emailstringNoE-mail used for delivery and contact.
phonestringNoCustomer or contact phone number.
contactPersonstringNoNamed contact at the customer.
languagestringNoLanguage used for customer-facing documents.
externalReferencestringNoYour stable reference for reconciliation and idempotent imports.
metadataobjectNoYour own string key/value data. Never used for Rieck business logic.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/customers \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"type": "company",
"name": "Acme ApS",
"cvr": "12345678",
"email": "ap@acme.example"
}'
201 Success envelopeapplication/json
Response fields 8
FieldTypeDescription
data.iduuidStable Rieck customer id.
data.typecompany | personCustomer type.
data.namestringCustomer name.
data.addressobject | nullPostal address used on documents.
data.hasCprbooleanWhether Rieck has a CPR number. The number is never returned.
data.externalReferencestring | nullYour customer reference.
data.metadataobject | nullYour own string key/value data.
data.createdAtdate-timeUTC creation timestamp.
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": {
"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"
}
]
},
"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"
}
]
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 254
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string",
"maxLength": 30
},
{
"type": "null"
}
]
},
"contactPerson": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string",
"enum": [
"da",
"en"
]
},
{
"type": "null"
}
]
},
"externalReference": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"name"
],
"additionalProperties": false
}

Get customer

customers:read
ParameterInTypeRequiredDescription
customerIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-… \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
Response fields 8
FieldTypeDescription
data.iduuidStable Rieck customer id.
data.typecompany | personCustomer type.
data.namestringCustomer name.
data.addressobject | nullPostal address used on documents.
data.hasCprbooleanWhether Rieck has a CPR number. The number is never returned.
data.externalReferencestring | nullYour customer reference.
data.metadataobject | nullYour own string key/value data.
data.createdAtdate-timeUTC creation timestamp.
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.
404customer_not_foundThe customer does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

Update customer

customers:write

Partial: omitted fields kept, null clears.

ParameterInTypeRequiredDescription
customerIdpathstringYes
Request body fields 15
FieldTypeRequiredDescription
typestringNoResource-specific type.
namestringNoHuman-readable name.
cvrstringNoDanish CVR number for a company.
vatNumberstringNoForeign VAT number for a non-Danish company.
addressobjectNoPostal address used on documents.
address.streetstringNoStreet and house number.
address.postalCodestringNoPostal code.
address.citystringNoCity.
address.countrystringNoISO country code or country name.
emailstringNoE-mail used for delivery and contact.
phonestringNoCustomer or contact phone number.
contactPersonstringNoNamed contact at the customer.
languagestringNoLanguage used for customer-facing documents.
externalReferencestringNoYour stable reference for reconciliation and idempotent imports.
metadataobjectNoYour own string key/value data. Never used for Rieck business logic.
Request exampleapplication/json
curl -X PATCH https://api.rieckflow.com/v1/customers/9b2f1c1e-… \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"type": "company",
"name": "Acme ApS",
"cvr": "12345678"
}'
200 Success envelopeapplication/json
Response fields 8
FieldTypeDescription
data.iduuidStable Rieck customer id.
data.typecompany | personCustomer type.
data.namestringCustomer name.
data.addressobject | nullPostal address used on documents.
data.hasCprbooleanWhether Rieck has a CPR number. The number is never returned.
data.externalReferencestring | nullYour customer reference.
data.metadataobject | nullYour own string key/value data.
data.createdAtdate-timeUTC creation timestamp.
Possible errors 10
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.
404customer_not_foundThe customer 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.
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": {
"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"
}
]
},
"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"
}
]
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 254
},
{
"type": "null"
}
]
},
"phone": {
"anyOf": [
{
"type": "string",
"maxLength": 30
},
{
"type": "null"
}
]
},
"contactPerson": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string",
"enum": [
"da",
"en"
]
},
{
"type": "null"
}
]
},
"externalReference": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"additionalProperties": {
"type": "string",
"maxLength": 500
}
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}

Customer balance

customers:read
ParameterInTypeRequiredDescription
customerIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/balance \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Canonically computed outstanding/overdue amounts and pastDue state — use this to gate services, never the invoice status field.application/json
Response fields 5
FieldTypeDescription
data.outstandingOereintegerTotal amount still owed.
data.overdueOereintegerAmount currently overdue.
data.oldestDueDatedate | nullOldest unpaid due date.
data.daysOverdueintegerDays since the oldest unpaid due date.
data.pastDuebooleanCanonical service-gating signal.
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.
404customer_not_foundThe customer does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

Statement of account

customers:read

Ledger of invoices, credit notes, payments and reminder fees. Defaults to the last 12 months; max 1830 days.

ParameterInTypeRequiredDescription
customerIdpathstringYes
fromquerystringNoYYYY-MM-DD (default: 12 months before to)
toquerystringNoYYYY-MM-DD (default: today, Europe/Copenhagen)
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/statement \
-H "Authorization: Bearer $RIECK_API_KEY"
200 closingBalanceOere may be NEGATIVE when the customer has overpaid — unlike /balance, which never reports less than zero owed.application/json
Response fields 3
FieldTypeDescription
data.openingBalanceOereintegerBalance carried into the selected period.
data.closingBalanceOereintegerBalance at the end; a negative value means customer credit.
data.linesobject[]Signed ledger movements in chronological order.
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.
404customer_not_foundThe customer does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

GET /v1/customers/{customerId}/statement/pdf

Section titled “GET /v1/customers/{customerId}/statement/pdf”

Statement of account (PDF)

customers:read

Rendered in the customer’s own language. Generated per request — not a WORM-stored document like an invoice.

ParameterInTypeRequiredDescription
customerIdpathstringYes
fromquerystringNoYYYY-MM-DD
toquerystringNoYYYY-MM-DD
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/statement/pdf \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/pdf
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.
404customer_not_foundThe customer does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

GET /v1/customers/{customerId}/departments

Section titled “GET /v1/customers/{customerId}/departments”

List departments

customers:read
ParameterInTypeRequiredDescription
customerIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/departments \
-H "Authorization: Bearer $RIECK_API_KEY"
200 Success envelopeapplication/json
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.
404customer_not_foundThe customer does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

POST /v1/customers/{customerId}/departments

Section titled “POST /v1/customers/{customerId}/departments”

Create department

customers:write
ParameterInTypeRequiredDescription
customerIdpathstringYes
Request body fields 5
FieldTypeRequiredDescription
namestringYesHuman-readable name.
contactPersonstringNoNamed contact at the customer.
referencestringNoField in the request payload.
emailstringNoE-mail used for delivery and contact.
sortOrderintegerNoField in the request payload.
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/customers/9b2f1c1e-…/departments \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme ApS",
"reference": "crm-9001",
"email": "ap@acme.example",
"sortOrder": 1
}'
201 Success envelopeapplication/json
Possible errors 10
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.
404customer_not_foundThe customer 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.
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": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"contactPerson": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"reference": {
"anyOf": [
{
"type": "string",
"maxLength": 140
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 254
},
{
"type": "null"
}
]
},
"sortOrder": {
"type": "integer",
"minimum": 0,
"maximum": 9999
}
},
"required": [
"name"
],
"additionalProperties": false
}

DELETE /v1/customers/{customerId}/departments/{departmentId}

Section titled “DELETE /v1/customers/{customerId}/departments/{departmentId}”

Delete department

customers:write
ParameterInTypeRequiredDescription
customerIdpathstringYes
departmentIdpathstringYes
Request exampleNo request body
curl -X DELETE https://api.rieckflow.com/v1/customers/9b2f1c1e-…/departments/9b2f1c1e-… \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041"
204 No contentNo response body
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.
404customer_not_foundThe customer 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.

E-invoicing endpoint

customers:read
ParameterInTypeRequiredDescription
customerIdpathstringYes
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/einvoicing \
-H "Authorization: Bearer $RIECK_API_KEY"
200 endpoint (null = this customer cannot be sent an e-invoice), the Peppol scheme derived from the number’s own form (0088 GLN, 0184 CVR, 0096 P-number) and its schemeName, plus the customer’s departments with THEIR endpoints. ⚠️ A department’s endpoint WINS over the customer’s when we send — a public authority often routes per department, and invoicing the head office is how an invoice disappears.application/json
Response fields 8
FieldTypeDescription
data.iduuidStable Rieck customer id.
data.typecompany | personCustomer type.
data.namestringCustomer name.
data.addressobject | nullPostal address used on documents.
data.hasCprbooleanWhether Rieck has a CPR number. The number is never returned.
data.externalReferencestring | nullYour customer reference.
data.metadataobject | nullYour own string key/value data.
data.createdAtdate-timeUTC creation timestamp.
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.
404customer_not_foundThe customer does not exist or belongs to another organisation.
429rate_limitedThe organisation’s rate budget is exhausted.

Set or clear the endpoint

customers:write

One field. Send endpoint: null to clear it. ⚠️ The check digit is validated SERVER-SIDE: a 13-digit number without a valid GS1 check digit is not “maybe another type” — no Danish endpoint type is 13 digits except GLN — so a typo is rejected with 422 invalid_endpoint rather than reaching the network and coming back two days later as a rejection.

ParameterInTypeRequiredDescription
customerIdpathstringYes
Request body fields 1
FieldTypeRequiredDescription
endpointstringYesField in the request payload.
Request exampleapplication/json
curl -X PUT https://api.rieckflow.com/v1/customers/9b2f1c1e-…/einvoicing \
-H "Authorization: Bearer $RIECK_API_KEY" \
-H "Idempotency-Key: order-2041" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "…"
}'
200 Success envelopeapplication/json
Response fields 8
FieldTypeDescription
data.iduuidStable Rieck customer id.
data.typecompany | personCustomer type.
data.namestringCustomer name.
data.addressobject | nullPostal address used on documents.
data.hasCprbooleanWhether Rieck has a CPR number. The number is never returned.
data.externalReferencestring | nullYour customer reference.
data.metadataobject | nullYour own string key/value data.
data.createdAtdate-timeUTC creation timestamp.
Possible errors 10
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.
404customer_not_foundThe customer 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.
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": {
"endpoint": {
"anyOf": [
{
"type": "string",
"maxLength": 20
},
{
"type": "null"
}
]
}
},
"required": [
"endpoint"
],
"additionalProperties": false
}