Developer documentation

Delete customer

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

The /api/customers/deletecustomer/ endpoint deletes a customer.

Parameters

  • id string required
    ID of the customer to delete.

Before allowing the delete, Iteras checks whether the customer is associated with financial transactions that must be kept, or has an ongoing subscription. If that's the case, an error is returned and the customer is not deleted. You can always just stop active subscriptions, but there's no way around the financial checks.

Examples

POST /api/customers/deletecustomer/ HTTP/1.1
Content-Type: application/json{
  "id": "12345"
}

The endpoint returns the ID of the deleted customer:

{ "id": "12345" }

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. Errors that are not specific to a field are returned with the empty string as key, e.g. an unknown customer, or a customer the fail-safe checks refuse to delete because of financial transactions or an ongoing subscription:

{
  "": ["Could not delete customer: ..."]
}