Customers
GET /v1/customers
Section titled “GET /v1/customers”List customers
Scope: customers:read
| Query | |
|---|---|
cvr | Exact CVR match |
email | Exact e-mail match (blind index — no free-text search) |
externalReference | Exact match on your own reference |
pastDue | true = only customers currently past due (threshold-evaluated) |
limit | Page size, 1-200 (default 50) |
cursor | Opaque cursor from meta.nextCursor |
curl https://app.rieck.nu/api/v1/customers \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers");POST /v1/customers
Section titled “POST /v1/customers”Create customer
Scope: customers:write
curl -X POST https://app.rieck.nu/api/v1/customers \ -H "Authorization: Bearer $RIECK_API_KEY" \ -H "Idempotency-Key: order-2041" \ -d '{ "type": "person", "name": "Acme ApS", "cvr": "12345678", "email": "ap@acme.example", "phone": "+45 70 12 34 56" }'const svar = await rieck.request("POST", "/v1/customers", { body: { "type": "person", "name": "Acme ApS", "cvr": "12345678", "email": "ap@acme.example", "phone": "+45 70 12 34 56" },});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" } ] }, "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}”Get customer
Scope: customers:read
curl https://app.rieck.nu/api/v1/customers/9b2f1c1e-… \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…");PATCH /v1/customers/{customerId}
Section titled “PATCH /v1/customers/{customerId}”Update customer
Partial: omitted fields kept, null clears.
Scope: customers:write
curl -X PATCH https://app.rieck.nu/api/v1/customers/9b2f1c1e-… \ -H "Authorization: Bearer $RIECK_API_KEY" \ -H "Idempotency-Key: order-2041" \ -d '{ "type": "person", "name": "Acme ApS", "cvr": "12345678" }'const svar = await rieck.request("PATCH", "/v1/customers/9b2f1c1e-…", { body: { "type": "person", "name": "Acme ApS", "cvr": "12345678" },});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" } ] }, "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”Customer balance
Scope: customers:read
curl https://app.rieck.nu/api/v1/customers/9b2f1c1e-…/balance \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…/balance");GET /v1/customers/{customerId}/departments
Section titled “GET /v1/customers/{customerId}/departments”List departments
Scope: customers:read
curl https://app.rieck.nu/api/v1/customers/9b2f1c1e-…/departments \ -H "Authorization: Bearer $RIECK_API_KEY"const svar = await rieck.request("GET", "/v1/customers/9b2f1c1e-…/departments");POST /v1/customers/{customerId}/departments
Section titled “POST /v1/customers/{customerId}/departments”Create department
Scope: customers:write
curl -X POST https://app.rieck.nu/api/v1/customers/9b2f1c1e-…/departments \ -H "Authorization: Bearer $RIECK_API_KEY" \ -H "Idempotency-Key: order-2041" \ -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 },});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
Scope: customers:write
curl -X DELETE https://app.rieck.nu/api/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-…");