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 Contracting Entity 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 **Contracting Entity** is the legal entity on your side that commissions contracts, holding company and commercial-register details. Names are unique per account, and entities can be created and updated through the API. name: Contracting Entity paths: /contracting_entities/: get: operationId: get_contracting_entities_contracting_entities__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 * `in`: Expects one or multiple values * `not_in`: Expects one or multiple values The following attributes support filtering: | **Attribute** | `exact` | `contains` | `in` | `not_in` | | :--- | :---: | :---: | :---: | :---: | | `id` | | | x | x | | `name` | x | x | | | | `address` | x | x | | | | `city` | x | x | | | | `zip_code` | x | x | | | | `tax_authority` | | | x | x | | `tax_id` | 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 * `in`: Expects one or multiple values * `not_in`: Expects one or multiple values The following attributes support filtering: | **Attribute** | `exact` | `contains` | `in` | `not_in` | | :--- | :---: | :---: | :---: | :---: | | `id` | | | x | x | | `name` | x | x | | | | `address` | x | x | | | | `city` | x | x | | | | `zip_code` | x | x | | | | `tax_authority` | | | x | x | | `tax_id` | x | x | | | ' title: Filter[Attribute.Operation] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ListResponse_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' description: Successful Response '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error security: - API Key: [] - API Token: [] summary: Get Contracting Entities tags: - Contracting Entity post: operationId: create_contracting_entity_contracting_entities__post requestBody: content: application/json: schema: $ref: '#/components/schemas/Request_ContractingEntityCreateAttributes_Literal_CONTRACTING_ENTITY__' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/Response_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' description: Successful Response '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error security: - API Key: [] - API Token: [] summary: Create Contracting Entity tags: - Contracting Entity /contracting_entities/{id}/: get: operationId: get_contracting_entity_details_contracting_entities__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_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' description: Successful Response '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error security: - API Key: [] - API Token: [] summary: Get Contracting Entity Details tags: - Contracting Entity patch: operationId: update_contracting_entity_contracting_entities__id___patch parameters: - in: path name: id required: true schema: format: uuid title: Id type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/Request_ContractingEntityUpdateAttributes_Literal_CONTRACTING_ENTITY__' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/Response_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' description: Successful Response '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error security: - API Key: [] - API Token: [] summary: Update Contracting Entity tags: - Contracting Entity components: schemas: ContractingEntityCreateAttributes: properties: address: anyOf: - maxLength: 255 type: string - type: 'null' description: '**Address** · **Adresse**' title: Address city: anyOf: - maxLength: 255 type: string - type: 'null' description: '**City** · **Stadt**' title: City commercial_register_number: default: '' description: '**Commercial register number** · **Handelsregisternummer**' maxLength: 250 title: Commercial Register Number type: string commercial_register_type: default: '' description: '**Commercial register type** · **Handelsregistertyp**' maxLength: 250 title: Commercial Register Type type: string email: default: '' description: '**Email address** · **E-Mail-Adresse**' maxLength: 250 title: Email type: string managing_directors: default: '' description: '**Managing directors** · **Geschäftsführung**' maxLength: 250 title: Managing Directors type: string name: description: '**Name** · **Name**' maxLength: 250 minLength: 1 title: Name type: string register_court: default: '' description: '**Register court** · **Amtsgericht**' maxLength: 250 title: Register Court type: string tax_authority: anyOf: - $ref: '#/components/schemas/TaxAuthority' - type: 'null' description: '**Tax authority** · **Finanzamt** Available values / Verfügbare Werte: | Value | English | Deutsch | | --- | --- | --- | | `BADEN_WUERTTEMBERG` | Baden-Wuerttemberg | Baden-Württemberg | | `BAVARIA` | Bavaria | Bayern | | `BERLIN` | Berlin | Berlin | | `BRANDENBURG` | Brandenburg | Brandenburg | | `BREMEN` | Bremen | Bremen | | `HAMBURG` | Hamburg | Hamburg | | `HESSE` | Hesse | Hessen | | `MECKLENBURG_VORPOMMERN` | Mecklenburg-Vorpommern | Mecklenburg-Vorpommern | | `LOWER_SAXONY` | Lower Saxony | Niedersachsen | | `NORTH_RHINE_WESTPHALIA` | North Rhine-Westphalia | Nordrhein-Westfalen | | `RHEINLAND_PALATINATE` | Rhineland-Palatinate | Rheinland-Pfalz | | `SAARLAND` | Saarland | Saarland | | `SAXONY` | Saxony | Sachsen | | `SACHSEN_ANHALT` | Saxony-Anhalt | Sachsen-Anhalt | | `SCHLESWIG_HOLSTEIN` | Schleswig-Holstein | Schleswig-Holstein | | `THURINGIA` | Thuringia | Thüringen |' tax_id: anyOf: - maxLength: 250 type: string - type: 'null' description: '**Tax ID** · **Steuernummer**' title: Tax Id vat_id: default: '' description: '**VAT ID** · **USt.-IdNr.**' maxLength: 250 title: Vat Id type: string website: default: '' description: '**Website URL** · **Webadresse**' maxLength: 250 title: Website type: string zip_code: anyOf: - maxLength: 12 type: string - type: 'null' description: '**Zip code** · **Postleitzahl**' title: Zip Code required: - name title: ContractingEntityCreateAttributes type: object HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' title: Detail type: array title: HTTPValidationError type: object Data_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__: properties: attributes: $ref: '#/components/schemas/ContractingEntityAttributes' 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: CONTRACTING_ENTITY title: Type type: string required: - id - type - attributes title: 'Data[ContractingEntityAttributes, Literal[]]' type: object TaxAuthority: enum: - BADEN_WUERTTEMBERG - BAVARIA - BERLIN - BRANDENBURG - BREMEN - HAMBURG - HESSE - MECKLENBURG_VORPOMMERN - LOWER_SAXONY - NORTH_RHINE_WESTPHALIA - RHEINLAND_PALATINATE - SAARLAND - SAXONY - SACHSEN_ANHALT - SCHLESWIG_HOLSTEIN - THURINGIA title: TaxAuthority type: string ListResponse_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__: properties: data: items: $ref: '#/components/schemas/Data_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' title: Data type: array errors: anyOf: - items: $ref: '#/components/schemas/Error' type: array - type: 'null' title: Errors included: anyOf: - items: $ref: '#/components/schemas/Data_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' 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[ContractingEntityAttributes, Literal[]]' type: object Response_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__: properties: data: anyOf: - $ref: '#/components/schemas/Data_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' - type: 'null' errors: anyOf: - items: $ref: '#/components/schemas/Error' type: array - type: 'null' title: Errors included: anyOf: - items: $ref: '#/components/schemas/Data_ContractingEntityAttributes_Literal_CONTRACTING_ENTITY__' type: array - type: 'null' title: Included links: anyOf: - additionalProperties: anyOf: - type: string - type: 'null' type: object - type: 'null' title: Links title: 'Response[ContractingEntityAttributes, Literal[]]' type: object Request_ContractingEntityCreateAttributes_Literal_CONTRACTING_ENTITY__: properties: data: $ref: '#/components/schemas/Payload_ContractingEntityCreateAttributes_Literal_CONTRACTING_ENTITY__' required: - data title: 'Request[ContractingEntityCreateAttributes, Literal[]]' type: object Payload_ContractingEntityUpdateAttributes_Literal_CONTRACTING_ENTITY__: properties: attributes: $ref: '#/components/schemas/ContractingEntityUpdateAttributes' type: const: CONTRACTING_ENTITY title: Type type: string required: - type - attributes title: 'Payload[ContractingEntityUpdateAttributes, 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 Payload_ContractingEntityCreateAttributes_Literal_CONTRACTING_ENTITY__: properties: attributes: $ref: '#/components/schemas/ContractingEntityCreateAttributes' type: const: CONTRACTING_ENTITY title: Type type: string required: - type - attributes title: 'Payload[ContractingEntityCreateAttributes, Literal[]]' type: object 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 Request_ContractingEntityUpdateAttributes_Literal_CONTRACTING_ENTITY__: properties: data: $ref: '#/components/schemas/Payload_ContractingEntityUpdateAttributes_Literal_CONTRACTING_ENTITY__' required: - data title: 'Request[ContractingEntityUpdateAttributes, Literal[]]' type: object ContractingEntityUpdateAttributes: properties: address: anyOf: - maxLength: 255 type: string - type: 'null' description: '**Address** · **Adresse**' title: Address city: anyOf: - maxLength: 255 type: string - type: 'null' description: '**City** · **Stadt**' title: City commercial_register_number: default: '' description: '**Commercial register number** · **Handelsregisternummer**' maxLength: 250 title: Commercial Register Number type: string commercial_register_type: default: '' description: '**Commercial register type** · **Handelsregistertyp**' maxLength: 250 title: Commercial Register Type type: string email: default: '' description: '**Email address** · **E-Mail-Adresse**' maxLength: 250 title: Email type: string managing_directors: default: '' description: '**Managing directors** · **Geschäftsführung**' maxLength: 250 title: Managing Directors type: string name: anyOf: - maxLength: 250 minLength: 1 type: string - type: 'null' description: '**Name** · **Name**' title: Name register_court: default: '' description: '**Register court** · **Amtsgericht**' maxLength: 250 title: Register Court type: string tax_authority: anyOf: - $ref: '#/components/schemas/TaxAuthority' - type: 'null' description: '**Tax authority** · **Finanzamt** Available values / Verfügbare Werte: | Value | English | Deutsch | | --- | --- | --- | | `BADEN_WUERTTEMBERG` | Baden-Wuerttemberg | Baden-Württemberg | | `BAVARIA` | Bavaria | Bayern | | `BERLIN` | Berlin | Berlin | | `BRANDENBURG` | Brandenburg | Brandenburg | | `BREMEN` | Bremen | Bremen | | `HAMBURG` | Hamburg | Hamburg | | `HESSE` | Hesse | Hessen | | `MECKLENBURG_VORPOMMERN` | Mecklenburg-Vorpommern | Mecklenburg-Vorpommern | | `LOWER_SAXONY` | Lower Saxony | Niedersachsen | | `NORTH_RHINE_WESTPHALIA` | North Rhine-Westphalia | Nordrhein-Westfalen | | `RHEINLAND_PALATINATE` | Rhineland-Palatinate | Rheinland-Pfalz | | `SAARLAND` | Saarland | Saarland | | `SAXONY` | Saxony | Sachsen | | `SACHSEN_ANHALT` | Saxony-Anhalt | Sachsen-Anhalt | | `SCHLESWIG_HOLSTEIN` | Schleswig-Holstein | Schleswig-Holstein | | `THURINGIA` | Thuringia | Thüringen |' tax_id: anyOf: - maxLength: 250 type: string - type: 'null' description: '**Tax ID** · **Steuernummer**' title: Tax Id vat_id: default: '' description: '**VAT ID** · **USt.-IdNr.**' maxLength: 250 title: Vat Id type: string website: default: '' description: '**Website URL** · **Webadresse**' maxLength: 250 title: Website type: string zip_code: anyOf: - maxLength: 12 type: string - type: 'null' description: '**Zip code** · **Postleitzahl**' title: Zip Code title: ContractingEntityUpdateAttributes type: object ContractingEntityAttributes: properties: address: description: '**Address** · **Adresse**' maxLength: 255 title: Address type: string city: description: '**City** · **Stadt**' maxLength: 255 title: City type: string commercial_register_number: description: '**Commercial register number** · **Handelsregisternummer**' maxLength: 250 title: Commercial Register Number type: string commercial_register_type: description: '**Commercial register type** · **Handelsregistertyp**' maxLength: 250 title: Commercial Register Type type: string email: description: '**Email address** · **E-Mail-Adresse**' maxLength: 250 title: Email type: string managing_directors: description: '**Managing directors** · **Geschäftsführung**' maxLength: 250 title: Managing Directors type: string name: description: '**Name** · **Name**' maxLength: 250 minLength: 1 title: Name type: string register_court: description: '**Register court** · **Amtsgericht**' maxLength: 250 title: Register Court type: string tax_authority: anyOf: - $ref: '#/components/schemas/TaxAuthority' - type: 'null' description: '**Tax authority** · **Finanzamt** Available values / Verfügbare Werte: | Value | English | Deutsch | | --- | --- | --- | | `BADEN_WUERTTEMBERG` | Baden-Wuerttemberg | Baden-Württemberg | | `BAVARIA` | Bavaria | Bayern | | `BERLIN` | Berlin | Berlin | | `BRANDENBURG` | Brandenburg | Brandenburg | | `BREMEN` | Bremen | Bremen | | `HAMBURG` | Hamburg | Hamburg | | `HESSE` | Hesse | Hessen | | `MECKLENBURG_VORPOMMERN` | Mecklenburg-Vorpommern | Mecklenburg-Vorpommern | | `LOWER_SAXONY` | Lower Saxony | Niedersachsen | | `NORTH_RHINE_WESTPHALIA` | North Rhine-Westphalia | Nordrhein-Westfalen | | `RHEINLAND_PALATINATE` | Rhineland-Palatinate | Rheinland-Pfalz | | `SAARLAND` | Saarland | Saarland | | `SAXONY` | Saxony | Sachsen | | `SACHSEN_ANHALT` | Saxony-Anhalt | Sachsen-Anhalt | | `SCHLESWIG_HOLSTEIN` | Schleswig-Holstein | Schleswig-Holstein | | `THURINGIA` | Thuringia | Thüringen |' tax_id: description: '**Tax ID** · **Steuernummer**' maxLength: 250 title: Tax Id type: string vat_id: description: '**VAT ID** · **USt.-IdNr.**' maxLength: 250 title: Vat Id type: string website: description: '**Website URL** · **Webadresse**' maxLength: 250 title: Website type: string zip_code: description: '**Zip code** · **Postleitzahl**' maxLength: 12 title: Zip Code type: string required: - name - address - zip_code - city - tax_id - managing_directors - commercial_register_type - commercial_register_number - register_court - vat_id - email - website title: ContractingEntityAttributes 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