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
| id | string |
| key | string |
| name | string |
| list_rate_cents | integer |
| position | integer |
| active | boolean |
| url | string |
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)
| role | stringThe role's id or key, from list_billing_roles. Omit to create one. |
| key | string |
| name | string |
| list_rate_cents | integerHourly list rate, net, in cents: 14000 is 140,00 €. |
| position | integerOrder in every list. Default for a new one: 0. |
Response 200
| created | boolean |
| role | object |
| role.id | string |
| role.key | string |
| role.name | string |
| role.list_rate_cents | integer |
| role.position | integer |
| role.active | boolean |
| role.url | string |
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
| idrequired | stringThe role's id or key, from list_billing_roles. |
Body (JSON)
| activerequired | boolean |
Response 200
| role | object |
| role.id | string |
| role.key | string |
| role.name | string |
| role.list_rate_cents | integer |
| role.position | integer |
| role.active | boolean |
| role.url | string |
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.