Zum Inhalt

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

keystring
namestring
descriptionstring | 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_typestringThe type's id or key, from list_all_project_types. Omit to create one.
namestring
keystringOnly for a new type; lower-cased, umlauts spelt out, anything else becomes _.
descriptionstring | nullA note; null or an empty string clears it.
sort_orderintegerDefault for a new one: 0.
activebooleanDefault for a new one: true.

Response 200

createdboolean
noteoptionalstring
project_typeobject
project_type.idstring
project_type.keystring
project_type.namestring
project_type.descriptionstring | null
project_type.sort_orderinteger
project_type.activeboolean
project_type.quotesinteger
project_type.ordersinteger
project_type.urlstring
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

idrequiredstringThe type's id or key, from list_all_project_types.

Body (JSON)

activerequiredboolean

Response 200

project_typeobject
project_type.idstring
project_type.keystring
project_type.namestring
project_type.descriptionstring | null
project_type.sort_orderinteger
project_type.activeboolean
project_type.quotesinteger
project_type.ordersinteger
project_type.urlstring
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

idstring
keystring
namestring
descriptionstring | null
sort_orderinteger
activeboolean
quotesinteger
ordersinteger
urlstring
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.