Zum Inhalt

Reference

Billing roles

GET/api/v1/billing-rolesList billing roles

Every billing role with its hourly list rate (net, in cents), inactive ones too, as /einstellungen/saetze shows them. Rates agreed with one customer are not here; they are the company's. catalog.manage only.scope catalog

Response 200

idstring
keystring
namestring
list_rate_centsinteger
positioninteger
activeboolean
urlstring
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "key": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "list_rate_cents": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "position": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      },
      "active": {
        "type": "boolean"
      },
      "url": {
        "type": "string"
      }
    },
    "required": [
      "id",
      "key",
      "name",
      "list_rate_cents",
      "position",
      "active",
      "url"
    ],
    "additionalProperties": false
  }
}

Refusals are problems with a code — see Errors.

POST/api/v1/billing-rolesSave billing role

Creates a billing role (omit role; key, name and list_rate_cents are required) or edits one: only the fields given change. The list rate is net per hour, in cents. A quote's effort line and an order's rates copy the role's rate when they are saved, so a new list rate never changes a quote or an order that already exists -- only lines and orders made from now on, and only where no customer rate is agreed. Role ids and keys come from list_billing_roles. catalog.manage only.scope catalog

Body (JSON)

rolestringThe role's id or key, from list_billing_roles. Omit to create one.
keystring
namestring
list_rate_centsintegerHourly list rate, net, in cents: 14000 is 140,00 €.
positionintegerOrder in every list. Default for a new one: 0.

Response 200

createdboolean
roleobject
role.idstring
role.keystring
role.namestring
role.list_rate_centsinteger
role.positioninteger
role.activeboolean
role.urlstring
Schema
{
  "type": "object",
  "properties": {
    "created": {
      "type": "boolean"
    },
    "role": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "list_rate_cents": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "position": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "active": {
          "type": "boolean"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "key",
        "name",
        "list_rate_cents",
        "position",
        "active",
        "url"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "created",
    "role"
  ],
  "additionalProperties": false
}

Refusals are problems with a code — see Errors.

POST/api/v1/billing-roles/{id}/activeSet billing role active

Deactivates a billing role -- nobody can pick it for a new effort line or book against it from now on -- or activates it again. Roles are never deleted: orders carry frozen copies that name them. catalog.manage only.scope catalog

Path

idrequiredstringThe role's id or key, from list_billing_roles.

Body (JSON)

activerequiredboolean

Response 200

roleobject
role.idstring
role.keystring
role.namestring
role.list_rate_centsinteger
role.positioninteger
role.activeboolean
role.urlstring
Schema
{
  "type": "object",
  "properties": {
    "role": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "list_rate_cents": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "position": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "active": {
          "type": "boolean"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "key",
        "name",
        "list_rate_cents",
        "position",
        "active",
        "url"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "role"
  ],
  "additionalProperties": false
}

Refusals are problems with a code — see Errors.