Reference
Project types
GET/api/v1/project-typesList project types
The project types a quote can carry. The type decides the layout of the quote's documents.scope quotes:read
Response 200
| key | string |
| name | string |
| description | string | null |
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
}
},
"required": [
"key",
"name",
"description"
],
"additionalProperties": false
}
}Refusals are problems with a code — see Errors.
POST/api/v1/project-typesSave project type
Creates a project type (omit project_type; name is required, and the key is made from key or, without one, from the name) or edits one: only the fields given change. The key is set once, when the type is created. Project type ids and keys come from list_all_project_types. catalog.manage only.scope catalog
Body (JSON)
| project_type | stringThe type's id or key, from list_all_project_types. Omit to create one. |
| name | string |
| key | stringOnly for a new type; lower-cased, umlauts spelt out, anything else becomes _. |
| description | string | nullA note; null or an empty string clears it. |
| sort_order | integerDefault for a new one: 0. |
| active | booleanDefault for a new one: true. |
Response 200
| created | boolean |
| noteoptional | string |
| project_type | object |
| project_type.id | string |
| project_type.key | string |
| project_type.name | string |
| project_type.description | string | null |
| project_type.sort_order | integer |
| project_type.active | boolean |
| project_type.quotes | integer |
| project_type.orders | integer |
| project_type.url | string |
Schema
{
"type": "object",
"properties": {
"created": {
"type": "boolean"
},
"note": {
"type": "string"
},
"project_type": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"sort_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"active": {
"type": "boolean"
},
"quotes": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"orders": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"url": {
"type": "string"
}
},
"required": [
"id",
"key",
"name",
"description",
"sort_order",
"active",
"quotes",
"orders",
"url"
],
"additionalProperties": false
}
},
"required": [
"created",
"project_type"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/project-types/{id}/activeSet project type active
Deactivates a project type -- new quotes can no longer pick it -- or activates it again. Nothing is deleted: quotes and orders that carry it keep it, and their documents stay as they were. catalog.manage only.scope catalog
Path
| idrequired | stringThe type's id or key, from list_all_project_types. |
Body (JSON)
| activerequired | boolean |
Response 200
| project_type | object |
| project_type.id | string |
| project_type.key | string |
| project_type.name | string |
| project_type.description | string | null |
| project_type.sort_order | integer |
| project_type.active | boolean |
| project_type.quotes | integer |
| project_type.orders | integer |
| project_type.url | string |
Schema
{
"type": "object",
"properties": {
"project_type": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"sort_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"active": {
"type": "boolean"
},
"quotes": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"orders": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"url": {
"type": "string"
}
},
"required": [
"id",
"key",
"name",
"description",
"sort_order",
"active",
"quotes",
"orders",
"url"
],
"additionalProperties": false
}
},
"required": [
"project_type"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/project-types/allList all project types
Every project type, inactive ones too, with its id and how many quotes and orders carry it. The type decides the layout of a quote's documents. To pick one for a quote use list_project_types, which shows only active ones. catalog.manage only.scope catalog
Response 200
| id | string |
| key | string |
| name | string |
| description | string | null |
| sort_order | integer |
| active | boolean |
| quotes | integer |
| orders | integer |
| url | string |
Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"sort_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"active": {
"type": "boolean"
},
"quotes": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"orders": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"url": {
"type": "string"
}
},
"required": [
"id",
"key",
"name",
"description",
"sort_order",
"active",
"quotes",
"orders",
"url"
],
"additionalProperties": false
}
}Refusals are problems with a code — see Errors.