Customers
GET /v1/customers
Section titled “GET /v1/customers”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
cvr | query | string | No | Exact CVR match |
email | query | string | No | Exact e-mail match (blind index — no free-text search) |
externalReference | query | string | No | Exact match on your own reference |
pastDue | query | string | No | true = only customers currently past due (threshold-evaluated) |
limit | query | integer | No | Page size, 1-200 (default 50) |
cursor | query | string | No | Opaque cursor from meta.nextCursor |
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers");{ "data": [ { "id": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "type": "company", "name": "Acme ApS", "cvr": "12345678", "vatNumber": null, "address": { "street": "Hovedgaden 1", "postalCode": "8000", "city": "Aarhus", "country": "DK" }, "email": "ap@acme.example", "phone": "+45 70 12 34 56", "contactPerson": "Alex Jensen", "language": "da", "hasCpr": false, "externalReference": "crm-9001", "metadata": { "segment": "b2b" }, "createdAt": "2026-08-04T09:32:11Z" } ], "meta": { "nextCursor": null }}200 Success envelopeapplication/json
Response fields 9
| Field | Type | Description |
|---|---|---|
data[].id | uuid | Stable Rieck customer id. |
data[].type | company | person | Customer type. |
data[].name | string | Customer name. |
data[].address | object | null | Postal address used on documents. |
data[].hasCpr | boolean | Whether Rieck has a CPR number. The number is never returned. |
data[].externalReference | string | null | Your customer reference. |
data[].metadata | object | null | Your own string key/value data. |
data[].createdAt | date-time | UTC creation timestamp. |
meta.nextCursor | `string | null` |
Possible errors 5
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_cursor | The cursor is malformed, expired or belongs to another list shape. |
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
POST /v1/customers
Section titled “POST /v1/customers”Request body fields 15
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Resource-specific type. |
name | string | Yes | Human-readable name. |
cvr | string | No | Danish CVR number for a company. |
vatNumber | string | No | Foreign VAT number for a non-Danish company. |
address | object | No | Postal address used on documents. |
address.street | string | No | Street and house number. |
address.postalCode | string | No | Postal code. |
address.city | string | No | City. |
address.country | string | No | ISO country code or country name. |
email | string | No | E-mail used for delivery and contact. |
phone | string | No | Customer or contact phone number. |
contactPerson | string | No | Named contact at the customer. |
language | string | No | Language used for customer-facing documents. |
externalReference | string | No | Your stable reference for reconciliation and idempotent imports. |
metadata | object | No | Your 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" }'const svar = await rieck.request("POST", "/v1/customers", { body: { "type": "company", "name": "Acme ApS", "cvr": "12345678", "email": "ap@acme.example" },});{ "data": { "id": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "type": "company", "name": "Acme ApS", "cvr": "12345678", "vatNumber": null, "address": { "street": "Hovedgaden 1", "postalCode": "8000", "city": "Aarhus", "country": "DK" }, "email": "ap@acme.example", "phone": "+45 70 12 34 56", "contactPerson": "Alex Jensen", "language": "da", "hasCpr": false, "externalReference": "crm-9001", "metadata": { "segment": "b2b" }, "createdAt": "2026-08-04T09:32:11Z" }}201 Success envelopeapplication/json
Response fields 8
| Field | Type | Description |
|---|---|---|
data.id | uuid | Stable Rieck customer id. |
data.type | company | person | Customer type. |
data.name | string | Customer name. |
data.address | object | null | Postal address used on documents. |
data.hasCpr | boolean | Whether Rieck has a CPR number. The number is never returned. |
data.externalReference | string | null | Your customer reference. |
data.metadata | object | null | Your own string key/value data. |
data.createdAt | date-time | UTC creation timestamp. |
Possible errors 9
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_idempotency_key | Idempotency-Key is missing or malformed. |
| 400 | invalid_request | The request body or parameter failed validation. |
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 409 | idempotency_conflict | The same key was used with a different request. |
| 409 | idempotency_in_progress | The same operation is currently being processed. Retry later. |
| 413 | payload_too_large | The JSON or uploaded file exceeds this endpoint’s size limit. |
| 429 | rate_limited | The 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 /v1/customers/{customerId}
Section titled “GET /v1/customers/{customerId}”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes |
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-… \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…");{ "data": { "id": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "type": "company", "name": "Acme ApS", "cvr": "12345678", "vatNumber": null, "address": { "street": "Hovedgaden 1", "postalCode": "8000", "city": "Aarhus", "country": "DK" }, "email": "ap@acme.example", "phone": "+45 70 12 34 56", "contactPerson": "Alex Jensen", "language": "da", "hasCpr": false, "externalReference": "crm-9001", "metadata": { "segment": "b2b" }, "createdAt": "2026-08-04T09:32:11Z" }}200 Success envelopeapplication/json
Response fields 8
| Field | Type | Description |
|---|---|---|
data.id | uuid | Stable Rieck customer id. |
data.type | company | person | Customer type. |
data.name | string | Customer name. |
data.address | object | null | Postal address used on documents. |
data.hasCpr | boolean | Whether Rieck has a CPR number. The number is never returned. |
data.externalReference | string | null | Your customer reference. |
data.metadata | object | null | Your own string key/value data. |
data.createdAt | date-time | UTC creation timestamp. |
Possible errors 5
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
PATCH /v1/customers/{customerId}
Section titled “PATCH /v1/customers/{customerId}”Partial: omitted fields kept, null clears.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes |
Request body fields 15
| Field | Type | Required | Description |
|---|---|---|---|
type | string | No | Resource-specific type. |
name | string | No | Human-readable name. |
cvr | string | No | Danish CVR number for a company. |
vatNumber | string | No | Foreign VAT number for a non-Danish company. |
address | object | No | Postal address used on documents. |
address.street | string | No | Street and house number. |
address.postalCode | string | No | Postal code. |
address.city | string | No | City. |
address.country | string | No | ISO country code or country name. |
email | string | No | E-mail used for delivery and contact. |
phone | string | No | Customer or contact phone number. |
contactPerson | string | No | Named contact at the customer. |
language | string | No | Language used for customer-facing documents. |
externalReference | string | No | Your stable reference for reconciliation and idempotent imports. |
metadata | object | No | Your 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" }'const svar = await rieck.request("PATCH", "/v1/customers/9b2f1c1e-…", { body: { "type": "company", "name": "Acme ApS", "cvr": "12345678" },});{ "data": { "id": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "type": "company", "name": "Acme ApS", "cvr": "12345678", "vatNumber": null, "address": { "street": "Hovedgaden 1", "postalCode": "8000", "city": "Aarhus", "country": "DK" }, "email": "ap@acme.example", "phone": "+45 70 12 34 56", "contactPerson": "Alex Jensen", "language": "da", "hasCpr": false, "externalReference": "crm-9001", "metadata": { "segment": "b2b" }, "createdAt": "2026-08-04T09:32:11Z" }}200 Success envelopeapplication/json
Response fields 8
| Field | Type | Description |
|---|---|---|
data.id | uuid | Stable Rieck customer id. |
data.type | company | person | Customer type. |
data.name | string | Customer name. |
data.address | object | null | Postal address used on documents. |
data.hasCpr | boolean | Whether Rieck has a CPR number. The number is never returned. |
data.externalReference | string | null | Your customer reference. |
data.metadata | object | null | Your own string key/value data. |
data.createdAt | date-time | UTC creation timestamp. |
Possible errors 10
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_idempotency_key | Idempotency-Key is missing or malformed. |
| 400 | invalid_request | The request body or parameter failed validation. |
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 409 | idempotency_conflict | The same key was used with a different request. |
| 409 | idempotency_in_progress | The same operation is currently being processed. Retry later. |
| 413 | payload_too_large | The JSON or uploaded file exceeds this endpoint’s size limit. |
| 429 | rate_limited | The 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}GET /v1/customers/{customerId}/balance
Section titled “GET /v1/customers/{customerId}/balance”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes |
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/balance \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…/balance");{ "data": { "outstandingOere": 125000, "overdueOere": 125000, "overdueCount": 1, "oldestDueDate": "2026-07-15", "daysOverdue": 20, "collectionsOere": 0, "pastDue": true }}200 Canonically computed outstanding/overdue amounts and pastDue state — use this to gate services, never the invoice status field.application/json
Response fields 5
| Field | Type | Description |
|---|---|---|
data.outstandingOere | integer | Total amount still owed. |
data.overdueOere | integer | Amount currently overdue. |
data.oldestDueDate | date | null | Oldest unpaid due date. |
data.daysOverdue | integer | Days since the oldest unpaid due date. |
data.pastDue | boolean | Canonical service-gating signal. |
Possible errors 5
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
GET /v1/customers/{customerId}/statement
Section titled “GET /v1/customers/{customerId}/statement”Ledger of invoices, credit notes, payments and reminder fees. Defaults to the last 12 months; max 1830 days.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes | |
from | query | string | No | YYYY-MM-DD (default: 12 months before to) |
to | query | string | No | YYYY-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"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…/statement");{ "data": { "from": "2026-07-01", "to": "2026-08-04", "openingBalanceOere": 0, "closingBalanceOere": 156250, "lines": [ { "date": "2026-08-04", "type": "invoice", "documentNumber": 1042, "reference": null, "amountOere": 156250, "balanceOere": 156250, "invoiceId": "9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440" } ] }}200 closingBalanceOere may be NEGATIVE when the customer has overpaid — unlike /balance, which never reports less than zero owed.application/json
Response fields 3
| Field | Type | Description |
|---|---|---|
data.openingBalanceOere | integer | Balance carried into the selected period. |
data.closingBalanceOere | integer | Balance at the end; a negative value means customer credit. |
data.lines | object[] | Signed ledger movements in chronological order. |
Possible errors 5
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
GET /v1/customers/{customerId}/statement/pdf
Section titled “GET /v1/customers/{customerId}/statement/pdf”Rendered in the customer’s own language. Generated per request — not a WORM-stored document like an invoice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes | |
from | query | string | No | YYYY-MM-DD |
to | query | string | No | YYYY-MM-DD |
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/statement/pdf \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…/statement/pdf");200 Success envelopeapplication/pdf
Possible errors 5
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
GET /v1/customers/{customerId}/departments
Section titled “GET /v1/customers/{customerId}/departments”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes |
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/departments \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…/departments");{ "data": [ { "id": "9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440", "customerId": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "name": "Aarhus office", "contactPerson": "Alex Jensen", "reference": "dept-17", "email": "aarhus@acme.example", "sortOrder": 10 } ]}200 Success envelopeapplication/json
Possible errors 5
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
POST /v1/customers/{customerId}/departments
Section titled “POST /v1/customers/{customerId}/departments”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes |
Request body fields 5
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable name. |
contactPerson | string | No | Named contact at the customer. |
reference | string | No | Field in the request payload. |
email | string | No | E-mail used for delivery and contact. |
sortOrder | integer | No | Field 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 }'const svar = await rieck.request("POST", "/v1/customers/9b2f1c1e-…/departments", { body: { "name": "Acme ApS", "reference": "crm-9001", "email": "ap@acme.example", "sortOrder": 1 },});{ "data": { "id": "9b2f1c1e-6b87-4d9b-91a0-47c8d72b8440", "customerId": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "name": "Aarhus office", "contactPerson": "Alex Jensen", "reference": "dept-17", "email": "aarhus@acme.example", "sortOrder": 10 }}201 Success envelopeapplication/json
Possible errors 10
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_idempotency_key | Idempotency-Key is missing or malformed. |
| 400 | invalid_request | The request body or parameter failed validation. |
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 409 | idempotency_conflict | The same key was used with a different request. |
| 409 | idempotency_in_progress | The same operation is currently being processed. Retry later. |
| 413 | payload_too_large | The JSON or uploaded file exceeds this endpoint’s size limit. |
| 429 | rate_limited | The 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}”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes | |
departmentId | path | string | Yes |
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"const svar = await rieck.request("DELETE", "/v1/customers/9b2f1c1e-…/departments/9b2f1c1e-…");204 No contentNo response body
Possible errors 8
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_idempotency_key | Idempotency-Key is missing or malformed. |
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 409 | idempotency_conflict | The same key was used with a different request. |
| 409 | idempotency_in_progress | The same operation is currently being processed. Retry later. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
GET /v1/customers/{customerId}/einvoicing
Section titled “GET /v1/customers/{customerId}/einvoicing”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes |
Request exampleNo request body
curl https://api.rieckflow.com/v1/customers/9b2f1c1e-…/einvoicing \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…/einvoicing");{ "data": { "id": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "type": "company", "name": "Acme ApS", "cvr": "12345678", "vatNumber": null, "address": { "street": "Hovedgaden 1", "postalCode": "8000", "city": "Aarhus", "country": "DK" }, "email": "ap@acme.example", "phone": "+45 70 12 34 56", "contactPerson": "Alex Jensen", "language": "da", "hasCpr": false, "externalReference": "crm-9001", "metadata": { "segment": "b2b" }, "createdAt": "2026-08-04T09:32:11Z" }}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/jsonResponse fields 8
| Field | Type | Description |
|---|---|---|
data.id | uuid | Stable Rieck customer id. |
data.type | company | person | Customer type. |
data.name | string | Customer name. |
data.address | object | null | Postal address used on documents. |
data.hasCpr | boolean | Whether Rieck has a CPR number. The number is never returned. |
data.externalReference | string | null | Your customer reference. |
data.metadata | object | null | Your own string key/value data. |
data.createdAt | date-time | UTC creation timestamp. |
Possible errors 5
| HTTP | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
PUT /v1/customers/{customerId}/einvoicing
Section titled “PUT /v1/customers/{customerId}/einvoicing”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.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes |
Request body fields 1
| Field | Type | Required | Description |
|---|---|---|---|
endpoint | string | Yes | Field 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": "…" }'const svar = await rieck.request("PUT", "/v1/customers/9b2f1c1e-…/einvoicing", { body: { "endpoint": "…" },});{ "data": { "id": "467a0d8d-b9b2-4df3-bf7b-17d649442890", "type": "company", "name": "Acme ApS", "cvr": "12345678", "vatNumber": null, "address": { "street": "Hovedgaden 1", "postalCode": "8000", "city": "Aarhus", "country": "DK" }, "email": "ap@acme.example", "phone": "+45 70 12 34 56", "contactPerson": "Alex Jensen", "language": "da", "hasCpr": false, "externalReference": "crm-9001", "metadata": { "segment": "b2b" }, "createdAt": "2026-08-04T09:32:11Z" }}200 Success envelopeapplication/json
Response fields 8
| Field | Type | Description |
|---|---|---|
data.id | uuid | Stable Rieck customer id. |
data.type | company | person | Customer type. |
data.name | string | Customer name. |
data.address | object | null | Postal address used on documents. |
data.hasCpr | boolean | Whether Rieck has a CPR number. The number is never returned. |
data.externalReference | string | null | Your customer reference. |
data.metadata | object | null | Your own string key/value data. |
data.createdAt | date-time | UTC creation timestamp. |
Possible errors 10
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_idempotency_key | Idempotency-Key is missing or malformed. |
| 400 | invalid_request | The request body or parameter failed validation. |
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 403 | insufficient_scope | The key does not have the required scope. |
| 404 | customer_not_found | The customer does not exist or belongs to another organisation. |
| 409 | idempotency_conflict | The same key was used with a different request. |
| 409 | idempotency_in_progress | The same operation is currently being processed. Retry later. |
| 413 | payload_too_large | The JSON or uploaded file exceeds this endpoint’s size limit. |
| 429 | rate_limited | The 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}