Developer documentation

Business policies

get https://app.iteras.dk/api/policies/

The /api/policies/ endpoint enables you to retrieve information about business policies. A business policy in Iteras contains settings and rules regarding how subscriptions progress, invoicing and dunning, etc.

Parameters

All parameters are optional. If policy_id or external_id is not given to filter the results, all policies are returned.

  • policy_id string
    ID of a specific policy, e.g. ?policy_id=654.
  • external_id string
    External ID of a specific policy, e.g. ?external_id=no_pause.
  • include_archived bool
    Include archived policies, e.g. ?include_archived=1.

Return value

The data returned is an object with an array of business policy information, possibly empty, like this {"policies": [{"id": "654", ...}]}. Each policy object may contain the following attributes:

  • id string
    Iteras ID of the policy, e.g. 654.
  • name string
    Policy name shown inside Iteras, e.g. No pause.
  • data object
    Extra fields set on the policy. The possible fields are the policy fields set up for your account, listed below.
  • external_id string
    External ID of the policy, e.g. no_pause. Included if the policy has an external ID.
  • lines array
    Invoice lines the policy adds, in the invoice line format, e.g. [{"text": "Special discount", "percentage": -0.10}]. Included if the policy has invoice lines.

You can set any custom policy field, using its field id (the field name with a colon prepended, or its external identifier).

Log in, or send your API key as a bearer token, to see the custom policy fields set up for your account.

A yes/no field (type bool) is true or false, and has no value when it isn't set. Set it with true or false, and clear it with null.

{
  "policies": [
    {
      "id": "654",
      "name": "No pause",
      "data": {
        ":Custom policy field": "Example text"
      },
      "external_id": "no_pause", // if the policy has an external ID
      "lines": [                          // if the policy has invoice lines
        {
          "text": "Special discount",
          "percentage": -0.10
        }
      ]
    }
  ]
}