openapi: 3.1.0 info: description: ' ## Introduction The **CAPEX API** enables you to integrate your application with the CAPEX system. The CAPEX API is REST-based and follows JSON:API principles for structuring responses. Starting from version 1.0, the API is stable. We are continuously improving our API, and new endpoints will be added. Any updates or changes within this major version will be backward-compatible and can be found in this documentation. For getting access to the CAPEX API, please reach out to us at: `kontakt@alasco.de`. The base URL for all endpoints is: `https://api.alasco.de/capex/v1` The CAPEX API supports compressed payloads. If you would like to make use of this, you have to specify the `Accept-Encoding` header. Supported encodings are `gzip` and `br`. ### Domain model Objects relate as follows (each `→` is a navigable sub-resource): - **Assets** and **Measures** are the CapEx-specific top-level objects; a **Measure** → **Contracts**, and invoices are submitted against an **Asset**. - **Contractor** and **Contracting Entity** → **Contracts**. - **Contract** → **Change Orders**, **Invoices**, contract terms, **Documents** and **Custom Fields**. - **Invoice** → **Documents** and **Tags** (Change Orders also carry **Documents**). ### CAPEX API Overview The CAPEX API provides endpoints to: - Retrieve and manage invoices, invoice tags, and invoice documents - Retrieve assets, contracts, contractors, and measures The CAPEX API uses pagination. The page size is 100, and additional pages can be accessed using a `next` link. ' title: CAPEX Annual Consumption Cost Element Tree Template API version: '1.0' x-logo: url: https://assets-global.website-files.com/656ef2eb27ad41897248f866/659eebec190ae7aaf4162f09_Logotype_Alasco_white_RGB%202.png servers: - url: https://api.alasco.de/capex/v1 tags: - description: A **Cost Element Tree Template** is a reusable hierarchy of **Cost Elements** that defines a project's cost structure. A template can back many **Projects**, can be created and updated through the API, and can be deleted only when no project uses it. name: Cost Element Tree Template paths: /cost_element_tree_templates/: get: operationId: get_cost_element_tree_templates_cost_element_tree_templates__get parameters: - description: ' List endpoint responses are paginated in the Alasco API. By calling the endpoint without the pagination parameter you will receive the first page. If not all elements fit on one page there will be a `next` link provided in the response''s `links` object. By calling this link you will receive the next page. ' in: query name: cursor[position] required: false schema: anyOf: - type: string - type: 'null' description: ' List endpoint responses are paginated in the Alasco API. By calling the endpoint without the pagination parameter you will receive the first page. If not all elements fit on one page there will be a `next` link provided in the response''s `links` object. By calling this link you will receive the next page. ' title: Cursor[Position] - description: ' You can filter on certain attributes by specifying them as a GET parameter along with an operation, e.g. `filter[name.exact]=abc`. Currently supported operations are: * `exact`: Expects one value * `contains`: Expects one value * `less_than_equal`: Expects one value * `greater_than_equal`: Expects one value * `range`: Expects two values * `in`: Expects one or multiple values * `not_in`: Expects one or multiple values The following attributes support filtering: | **Attribute** | `exact` | `contains` | `less_than_equal` | `greater_than_equal` | `range` | `in` | `not_in` | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | `id` | | | | | | x | x | | `name` | x | x | | | | | | | `description` | x | x | | | | | | | `created_at` | | | x | x | x | | | ' in: query name: filter[attribute.operation] required: false schema: anyOf: - type: string - type: 'null' description: ' You can filter on certain attributes by specifying them as a GET parameter along with an operation, e.g. `filter[name.exact]=abc`. Currently supported operations are: * `exact`: Expects one value * `contains`: Expects one value * `less_than_equal`: Expects one value * `greater_than_equal`: Expects one value * `range`: Expects two values * `in`: Expects one or multiple values * `not_in`: Expects one or multiple values The following attributes support filtering: | **Attribute** | `exact` | `contains` | `less_than_equal` | `greater_than_equal` | `range` | `in` | `not_in` | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | `id` | | | | | | x | x | | `name` | x | x | | | | | | | `description` | x | x | | | | | | | `created_at` | | | x | x | x | | | ' title: Filter[Attribute.Operation] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ListResponse_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__' description: Successful Response '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error security: - API Key: [] API Token: [] summary: Get Cost Element Tree Templates tags: - Cost Element Tree Template /cost_element_tree_templates/{id}/: get: operationId: get_cost_element_tree_template_cost_element_tree_templates__id___get parameters: - in: path name: id required: true schema: format: uuid title: Id type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Response_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__' description: Successful Response '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error security: - API Key: [] API Token: [] summary: Get Cost Element Tree Template tags: - Cost Element Tree Template /cost_element_tree_templates/{id}/cost_elements/: get: operationId: get_cost_elements_by_tree_template_cost_element_tree_templates__id__cost_elements__get parameters: - in: path name: id required: true schema: format: uuid title: Id type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ListResponse_CostElementAttributes_Literal_COST_ELEMENT__' description: Successful Response '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error security: - API Key: [] API Token: [] summary: Get Cost Elements By Tree Template tags: - Cost Element Tree Template components: schemas: ListResponse_CostElementAttributes_Literal_COST_ELEMENT__: properties: data: items: $ref: '#/components/schemas/Data_CostElementAttributes_Literal_COST_ELEMENT__' title: Data type: array errors: anyOf: - items: $ref: '#/components/schemas/Error' type: array - type: 'null' title: Errors included: anyOf: - items: $ref: '#/components/schemas/Data_CostElementAttributes_Literal_COST_ELEMENT__' type: array - type: 'null' title: Included links: anyOf: - additionalProperties: anyOf: - type: string - type: 'null' type: object - type: 'null' description: ' Contains the pagination''s next link if results don''t fit on one page. ' title: Links required: - data title: 'ListResponse[CostElementAttributes, Literal[]]' type: object HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' title: Detail type: array title: HTTPValidationError type: object CostElementAttributes: properties: cost_category: anyOf: - $ref: '#/components/schemas/CostElementCategory' - type: 'null' description: '**Cost category** · **Kostenkategorie** Available values / Verfügbare Werte: | Value | English | Deutsch | | --- | --- | --- | | `SITE` | Site | Grundstück | | `CLEARANCE_AND_DEVELOPMENT` | Clearance and development | Vorbereitende Maßnahmen | | `STRUCTURE_CONSTRUCTION_WORKS` | Structure - Construction works | Bauwerk - Baukonstruktionen | | `STRUCTURE_SERVICES` | Structure - Services | Bauwerk - Technische Anlagen | | `EXTERNAL_WORKS` | External works | Außenanlagen und Freiflächen | | `FURNISHINGS_FURNITURE_AND_ARTISTIC_APPOINTMENTS` | Furnishings/furniture | Ausstattung und Kunstwerke | | `INCIDENTAL_BUILDING_COSTS` | Incidental building costs | Baunebenkosten | | `FINANCING` | Financing | Finanzierung | | `RESERVE` | Reserve | Reserve | | `COMPANY_COSTS` | Company costs | Gesellschaftskosten | | `SALES_MARKETING` | Sales/marketing | Vertrieb/Marketing | | `OTHER` | Other | Sonstiges | | `TENANT_IMPROVEMENT` | Tenant improvement | Pachtmaßnahmen | | `ESG_IMPROVEMENT` | ESG improvement | ESG Maßnahmen | | `MAINTENANCE` | Maintenance | Instandhaltung |' cost_element_tree_template: anyOf: - format: uuid type: string - type: 'null' description: '**Tree template** · **Kostengruppenvorlage**' title: Cost Element Tree Template description: description: '**Description** · **Beschreibung**' title: Description type: string name: description: '**Name** · **Name**' title: Name type: string parent: anyOf: - format: uuid type: string - type: 'null' description: '**Parent** · **Übergeordnete Kostengruppe**' title: Parent required: - name - cost_category - description - parent title: CostElementAttributes type: object Response_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__: properties: data: anyOf: - $ref: '#/components/schemas/Data_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__' - type: 'null' errors: anyOf: - items: $ref: '#/components/schemas/Error' type: array - type: 'null' title: Errors included: anyOf: - items: $ref: '#/components/schemas/Data_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__' type: array - type: 'null' title: Included links: anyOf: - additionalProperties: anyOf: - type: string - type: 'null' type: object - type: 'null' title: Links title: 'Response[CostElementTreeTemplateAttributes, Literal[]]' type: object Data_CostElementAttributes_Literal_COST_ELEMENT__: properties: attributes: $ref: '#/components/schemas/CostElementAttributes' id: format: uuid title: Id type: string relationships: anyOf: - additionalProperties: true type: object - type: 'null' description: ' Contains links to related objects. ' title: Relationships type: const: COST_ELEMENT title: Type type: string required: - id - type - attributes title: 'Data[CostElementAttributes, Literal[]]' type: object Error: properties: detail: anyOf: - type: string - type: 'null' title: Detail source: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Source status: anyOf: - type: string - type: 'null' title: Status title: anyOf: - type: string - type: 'null' title: Title title: Error type: object CostElementTreeTemplateAttributes: properties: created_at: description: '**Date created** · **Erstellt am**' format: date-time title: Created At type: string description: description: '**Description** · **Beschreibung**' title: Description type: string name: description: '**Name** · **Name**' title: Name type: string required: - name - description - created_at title: CostElementTreeTemplateAttributes type: object Data_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__: properties: attributes: $ref: '#/components/schemas/CostElementTreeTemplateAttributes' id: format: uuid title: Id type: string relationships: anyOf: - additionalProperties: true type: object - type: 'null' description: ' Contains links to related objects. ' title: Relationships type: const: COST_ELEMENT_TREE_TEMPLATE title: Type type: string required: - id - type - attributes title: 'Data[CostElementTreeTemplateAttributes, Literal[]]' type: object CostElementCategory: enum: - SITE - CLEARANCE_AND_DEVELOPMENT - STRUCTURE_CONSTRUCTION_WORKS - STRUCTURE_SERVICES - EXTERNAL_WORKS - FURNISHINGS_FURNITURE_AND_ARTISTIC_APPOINTMENTS - INCIDENTAL_BUILDING_COSTS - FINANCING - RESERVE - COMPANY_COSTS - SALES_MARKETING - OTHER - TENANT_IMPROVEMENT - ESG_IMPROVEMENT - MAINTENANCE title: CostElementCategory type: string ValidationError: properties: ctx: title: Context type: object input: title: Input loc: items: anyOf: - type: string - type: integer title: Location type: array msg: title: Message type: string type: title: Error Type type: string required: - loc - msg - type title: ValidationError type: object ListResponse_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__: properties: data: items: $ref: '#/components/schemas/Data_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__' title: Data type: array errors: anyOf: - items: $ref: '#/components/schemas/Error' type: array - type: 'null' title: Errors included: anyOf: - items: $ref: '#/components/schemas/Data_CostElementTreeTemplateAttributes_Literal_COST_ELEMENT_TREE_TEMPLATE__' type: array - type: 'null' title: Included links: anyOf: - additionalProperties: anyOf: - type: string - type: 'null' type: object - type: 'null' description: ' Contains the pagination''s next link if results don''t fit on one page. ' title: Links required: - data title: 'ListResponse[CostElementTreeTemplateAttributes, Literal[]]' type: object securitySchemes: API Key: description: ' The Alasco API uses a combination of API keys and API tokens to authenticate requests. The API key needs to be sent in a header field called `X-API-KEY`. ' in: header name: X-API-KEY type: apiKey API Token: description: ' In addition to an API key, one has to specify an API token. There can be one or more tokens in use for the same API key. The token needs to be sent in a header field called `X-API-TOKEN`. Right now, it''s not possible to create API keys and API tokens from within Alasco. If you are interested in using the Alasco API, please reach out to the [support team](mailto:support@alasco.de). They will assist you in generating a key and token pair. ' in: header name: X-API-TOKEN type: apiKey