Developer documentation

Register complaint

post https://app.iteras.dk/api/customers/registercomplaint/

The /api/customers/registercomplaint/ endpoint registers a delivery complaint for a subscription. In order to register complaints, you need to have a distribution integration set up inside Iteras.

If the complaint is allowed, it is registered and a possible compensation is created. Defaults for the selected reason code are used for compensation.

Possible dates and reason codes for the complaint for the subscription can be found in the customer data using subscriptions.allowed_complaints. A complaint might not be allowed on a given date due to a rule, e.g. too many complaints on that day.

Parameters

  • id string required
    ID of the customer.
  • subscription_id string required
    ID of the subscription to register the complaint for.
  • reason_code string required
    Code for the complaint reason, defined in the distribution integration, e.g. 20.
  • complaint_date string required
    Date of the incident the complaint is about, e.g. 2026-10-08 for yesterday.

Examples

POST /api/customers/registercomplaint/ HTTP/1.1
Content-Type: application/json{
  "id": "12345",
  "subscription_id": "32142532",
  "reason_code": "20",
  "complaint_date": "2026-10-08"
}

The endpoint returns the ID of the registered complaint:

{ "complaint_id": "5512" }

Errors

Invalid requests due to programming error, e.g. invalid JSON, returns 400.

A well-formed operation where a supplied value is invalid is not executed and returns an HTTP 422 error. The response is a JSON object with the errors keyed by the field they concern, e.g. an invalid reason code or a complaint date that isn't a delivery date:

{
  "reason_code": ["Invalid complaint reason code: 20"]
}

Errors that are not specific to a field are returned with the empty string as key, e.g. an unknown subscription or a subscription without a distribution integration:

{
  "": ["Distribution integration does not exist."]
}