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 Contract 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 **Contract** is an agreement with a **Contractor** to deliver work, tracking the committed amount and reserve. In CapEx a contract belongs to a **Measure**; it accumulates **Invoices** and **Change Orders** and can carry **Documents** and a **Custom Field**. Contracts can be created and updated through the API.
name: Contract
paths:
/contracting_entities/{contracting_entity_id}/contracts/:
get:
operationId: get_contracts_by_contracting_entity_contracting_entities__contracting_entity_id__contracts__get
parameters:
- in: path
name: contracting_entity_id
required: true
schema:
format: uuid
title: Contracting Entity Id
type: string
- 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 get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
in: query
name: include
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: '
You can get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
title: Include
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractListResponseCapex'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Get Contracts By Contracting Entity
tags:
- Contract
/contractors/{contractor_id}/contracts/:
get:
operationId: get_contracts_by_contractor_contractors__contractor_id__contracts__get
parameters:
- in: path
name: contractor_id
required: true
schema:
format: uuid
title: Contractor Id
type: string
- 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 get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
in: query
name: include
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: '
You can get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
title: Include
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractListResponseCapex'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Get Contracts By Contractor
tags:
- Contract
/contracts/:
get:
operationId: get_contracts_contracts__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
* `is`: Expects one value
The following attributes support filtering:
| **Attribute** | `exact` | `contains` | `less_than_equal` | `greater_than_equal` | `range` | `in` | `not_in` | `is` |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| `id` | | | | | | x | x | |
| `name` | x | x | | | | | | |
| `contract_number` | x | x | | | | | | |
| `cost_center` | x | x | | | | | | |
| `status` | | | | | | x | x | |
| `contracting_entity` | | | | | | x | x | |
| `contractor` | | | | | | x | x | |
| `project` | | | | | | x | x | |
| `date_created` | | | x | x | x | | | |
| `date_contract` | | | x | x | x | | | x |
| `contract_type` | | | | | | x | x | |
| `is_reverse_charge` | | | | | | | | x |
| `measure (CapEx only)` | | | | | | x | x | |
| `contract_unit (FinCon only)` | | | | | | x | x | |
| `custom_fields.<uuid> (Operation depends on custom field type)` | x | x | x | x | x | 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
* `is`: Expects one value
The following attributes support filtering:
| **Attribute** | `exact` | `contains` | `less_than_equal` | `greater_than_equal` | `range` | `in` | `not_in` | `is` |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| `id` | | | | | | x | x | |
| `name` | x | x | | | | | | |
| `contract_number` | x | x | | | | | | |
| `cost_center` | x | x | | | | | | |
| `status` | | | | | | x | x | |
| `contracting_entity` | | | | | | x | x | |
| `contractor` | | | | | | x | x | |
| `project` | | | | | | x | x | |
| `date_created` | | | x | x | x | | | |
| `date_contract` | | | x | x | x | | | x |
| `contract_type` | | | | | | x | x | |
| `is_reverse_charge` | | | | | | | | x |
| `measure (CapEx only)` | | | | | | x | x | |
| `contract_unit (FinCon only)` | | | | | | x | x | |
| `custom_fields.<uuid> (Operation depends on custom field type)` | x | x | x | x | x | x | x | x |
'
title: Filter[Attribute.Operation]
- description: '
You can get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
in: query
name: include
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: '
You can get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
title: Include
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractListResponseCapex'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Get Contracts
tags:
- Contract
post:
operationId: create_contract_contracts__post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateContractRequestCapex'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractDetailsResponseCapex'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Create Contract
tags:
- Contract
/contracts/{contract_id}/contract_terms/:
get:
operationId: get_contract_terms_contracts__contract_id__contract_terms__get
parameters:
- in: path
name: contract_id
required: true
schema:
format: uuid
title: Contract Id
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractTermsResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Get Contract Terms
tags:
- Contract
/contracts/{id}/:
get:
operationId: get_contract_details_contracts__id___get
parameters:
- in: path
name: id
required: true
schema:
format: uuid
title: Id
type: string
- description: '
You can get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
in: query
name: include
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: '
You can get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
title: Include
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractDetailsResponseCapex'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Get Contract Details
tags:
- Contract
patch:
operationId: update_contract_contracts__id___patch
parameters:
- in: path
name: id
required: true
schema:
format: uuid
title: Id
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateContractRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractDetailsResponseCapex'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Update Contract
tags:
- Contract
/measures/{id}/contracts/:
get:
operationId: get_contracts_by_measure_measures__id__contracts__get
parameters:
- in: path
name: id
required: true
schema:
format: uuid
title: Id
type: string
- 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: '
Contains links to related objects.
'
in: query
name: include
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: '
Contains links to related objects.
'
title: Include
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractListResponseCapex'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
- API Token: []
summary: Get Contracts By Measure
tags:
- Contract
/contract_units/{contract_unit_id}/contracts/:
get:
operationId: get_contracts_by_contract_unit_contract_units__contract_unit_id__contracts__get
parameters:
- in: path
name: contract_unit_id
required: true
schema:
format: uuid
title: Contract Unit Id
type: string
- 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 get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
in: query
name: include
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: '
You can get related objects by specifying them separated by comma as a GET `include` parameters.
In case of non-direct relation include parameter should be a relationship path - a dot-separated list of
relationship names.
Currently available objects are:
* contractor
* contracting_entity
* contract_unit
* contract_unit.project
* contract_unit.project.property
e.g. `include=contractor,contracting_entity,contract_unit,contract_unit.project,contract_unit.project.property`
'
title: Include
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ContractListResponseFincon'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
security:
- API Key: []
API Token: []
summary: Get Contracts By Contract Unit
tags:
- Contract
components:
schemas:
ContractDetailsResponseCapex:
properties:
data:
anyOf:
- $ref: '#/components/schemas/ContractDataCapex'
- type: 'null'
errors:
anyOf:
- items:
$ref: '#/components/schemas/Error'
type: array
- type: 'null'
title: Errors
included:
anyOf:
- items:
$ref: '#/components/schemas/BaseDataSchema'
type: array
- type: 'null'
title: Included
links:
anyOf:
- additionalProperties:
anyOf:
- type: string
- type: 'null'
type: object
- type: 'null'
title: Links
title: ContractDetailsResponseCapex
type: object
UpdateContractRelationships:
properties:
contracting_entity:
anyOf:
- $ref: '#/components/schemas/ContractRelationshipData'
- type: 'null'
description: '**Contracting entity** · **Auftraggeber**'
contractor:
anyOf:
- $ref: '#/components/schemas/ContractRelationshipData'
- type: 'null'
description: '**Contractor ID** · **Auftragnehmer-ID**'
title: UpdateContractRelationships
type: object
CreateContractDataCapex:
properties:
attributes:
$ref: '#/components/schemas/CreateContractAttributes'
relationships:
$ref: '#/components/schemas/CreateContractRelationshipsCapex'
type:
default: CONTRACT
title: Type
type: string
required:
- attributes
- relationships
title: CreateContractDataCapex
type: object
CreateContractAttributes:
properties:
amount:
anyOf:
- properties:
currency:
description: '**Currency code** · **Währungscode**'
example: EUR
title: Currency code
type: string
net:
description: '**Net amount** · **Nettobetrag**'
example: '123.123456789012'
title: Net amount
type: string
tax:
description: '**Tax amount** · **Steuerbetrag**'
example: '123.123456789012'
title: Tax amount
type: string
type: object
- type: 'null'
description: '**Contract amount** · **Auftragssumme**'
title: Amount
booking_account_number:
anyOf:
- maximum: 999999999.0
minimum: 1.0
type: integer
- type: 'null'
description: '**Booking account number** · **Buchungskontonummer**'
title: Booking Account Number
contract_number:
anyOf:
- maxLength: 250
type: string
- type: 'null'
description: '**Contract number** · **Auftragsnummer**'
title: Contract Number
cost_center:
anyOf:
- maxLength: 100
type: string
- type: 'null'
description: '**Cost center** · **Kostenstelle**'
title: Cost Center
date_contract:
anyOf:
- format: date
type: string
- type: 'null'
description: '**Contract date** · **Auftragsdatum**'
title: Date Contract
description:
anyOf:
- type: string
- type: 'null'
description: '**Description** · **Beschreibung**'
title: Description
is_reverse_charge:
description: '**Is reverse charge?** · **Reverse Charge?**'
title: Is Reverse Charge
type: boolean
name:
description: '**Contract name** · **Name**'
maxLength: 250
title: Name
type: string
required:
- name
- is_reverse_charge
title: CreateContractAttributes
type: object
CreateContractRelationshipsCapex:
properties:
contracting_entity:
$ref: '#/components/schemas/ContractRelationshipData'
description: '**Contracting entity** · **Auftraggeber**'
contractor:
anyOf:
- $ref: '#/components/schemas/ContractRelationshipData'
- type: 'null'
description: '**Contractor ID** · **Auftragnehmer-ID**'
measure:
$ref: '#/components/schemas/ContractRelationshipData'
description: '**Measure ID** · **Maßnahmen-ID**'
required:
- contracting_entity
- measure
title: CreateContractRelationshipsCapex
type: object
UpdateContractRequest:
properties:
data:
$ref: '#/components/schemas/UpdateContractData'
required:
- data
title: UpdateContractRequest
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
ReadContractAttributesCapEx:
properties:
amount:
anyOf:
- properties:
currency:
description: '**Currency code** · **Währungscode**'
example: EUR
title: Currency code
type: string
net:
description: '**Net amount** · **Nettobetrag**'
example: '123.123456789012'
title: Net amount
type: string
tax:
description: '**Tax amount** · **Steuerbetrag**'
example: '123.123456789012'
title: Tax amount
type: string
type: object
- type: 'null'
description: '**Contract amount** · **Auftragssumme**'
title: Amount
booking_account_number:
anyOf:
- maximum: 999999999.0
minimum: 1.0
type: integer
- type: 'null'
description: '**Booking account number** · **Buchungskontonummer**'
title: Booking Account Number
contract_number:
descr
# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/alasco/refs/heads/main/openapi/alasco-contract-api-openapi.yml