openapi: 3.0.3
info:
  title: Telecom Product API
  version: 1.0.0-beta
  description: >-
    API for B2B partners to handle telecom products, including availability
    checks, cart validation and order submission.
servers:
  - description: Production environment
    url: https://partner.tkw.services/api/v1
  - description: Development environment
    url: https://partner.tkw-dev.de/api/v1
security:
  - oauth2: []
tags:
  - name: AvailabilityCheck
    description: >-
      Endpoint group for checking availability of telecom products at specific
      addresses.
  - name: Cart
    description: >-
      Operations for handling product carts including validation and contract
      summary creation.
  - name: Order
    description: Endpoints for validating and submitting orders.
  - name: Reference
    description: Provides reference data such as supported countries and telecom providers.
paths:
  /p/{project}/availability/products:
    get:
      summary: Get available products for a specific provider and address
      description: >-
        Returns a list of available telecom products at a given postal address
        for the specified provider. Not all provider can provide all
        capabilities. For exampel Telekom do not provide upload speed for Fiber
        capabilities. <p> Status code concept&#58; a valid address without
        available products is a success (200) with an empty tariffs list and
        <code>checkResult.status = "no-products"</code>. Address problems are
        422 with a machine-readable <code>errors.type</code>
        (<code>ambiguous-address</code>, <code>non-bookable-address</code>,
        <code>invalid-address</code>, <code>address-not-found</code>). Invalid
        request input (schema/mandatory fields) is 400. Provider (network
        operator) problems map to the gateway family&#58; 503 (unavailable /
        rejecting), 504 (timeout), 502 (broken response) - they are never
        reported as 500, which is reserved for internal errors. </p> <p> Whether
        an unknown address is reported depends on what the provider answers.
        Only when its address data clearly says the address does not exist the
        response is 422 <code>address-not-found</code>. Otherwise the response
        is 200 with an empty tariffs list and <code>checkResult.status =
        "no-products"</code> - the provider then does not distinguish between an
        unknown address and an address without products. Measured behaviour
        (11/2026)&#58; </p> <table> <thead> <tr> <th>Project</th> <th>Street or
        postal code/city unknown</th> <th>House number unknown</th> </tr>
        </thead> <tbody> <tr> <td>telekom-ebiz-tho, telefonica</td> <td>422
        address-not-found</td> <td>422 address-not-found</td> </tr> <tr>
        <td>vf-digitalpartner</td> <td>422 address-not-found</td> <td>200, empty
        tariffs list</td> </tr> <tr> <td>1und1, telekom-ebiz-tho-gk</td>
        <td>200, empty tariffs list</td> <td>200, empty tariffs list</td> </tr>
        </tbody> </table> <p> An address that matches several addresses of the
        provider is 422 <code>ambiguous-address</code> or
        <code>invalid-address</code> with the candidates in
        <code>errors.alternatives</code>; small spelling mistakes are corrected
        and reported in <code>meta.messages</code>. </p>
      tags:
        - AvailabilityCheck
      operationId: checkAvailabilityByProvider
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: Unique identifier of the telecom provider.
        - name: postalCode
          in: query
          required: true
          schema:
            type: string
            example: '33102'
          description: Postal code of the address to check.
        - name: city
          in: query
          required: true
          schema:
            type: string
            example: Paderborn
          description: City name of the address to check.
        - name: district
          in: query
          required: false
          schema:
            type: string
          description: Optional district name for the address.
        - name: street
          in: query
          required: true
          schema:
            type: string
            example: Schubertweg
          description: Street name of the address to check.
        - name: houseNumber
          in: query
          required: true
          schema:
            type: string
            example: '8'
          description: House number of the address to check.
        - name: houseNumberAddition
          in: query
          required: false
          schema:
            type: string
          description: >-
            Optional additional house number information (e.g., suffix or
            building unit).
        - name: prices
          in: query
          required: false
          schema:
            type: boolean
            default: true
          description: >-
            Whether prices are calculated and returned (the `priceInfo` object
            on each tariff and option). Defaults to `true`. Pass `prices=0` when
            prices are not needed - the price calculation is skipped entirely,
            which shortens the response time (see `meta.internal_time`).
      responses:
        '200':
          description: A list of available products
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailabilityResponse'
        '400':
          description: >-
            Invalid request input (schema violation, missing mandatory fields),
            `errors.type = "bad-request"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Request not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Request forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Not Found (partner, project or client - deliberately not used for
            addresses, see 422)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Address problem - `errors.type` distinguishes `ambiguous-address`
            (alternatives are returned if available), `non-bookable-address`,
            `invalid-address` and `address-not-found`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntity'
        '500':
          description: >-
            Internal server error (our side; provider problems are reported as
            502/503/504)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            The network operator returned a broken/uninterpretable response,
            `errors.type = "provider-bad-response"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The network operator's availability check is unavailable or rejects
            the request, `errors.type = "provider-unavailable"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '504':
          description: >-
            The network operator did not answer in time, `errors.type =
            "provider-timeout"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --url 'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/availability/products?postalCode=33102&city=Paderborn&district=SOME_STRING_VALUE&street=Schubertweg&houseNumber=8&houseNumberAddition=SOME_STRING_VALUE&prices=SOME_BOOLEAN_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/availability/products?postalCode=33102&city=Paderborn&district=SOME_STRING_VALUE&street=Schubertweg&houseNumber=8&houseNumberAddition=SOME_STRING_VALUE&prices=SOME_BOOLEAN_VALUE';


            let options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/availability/products"


            querystring =
            {"postalCode":"33102","city":"Paderborn","district":"SOME_STRING_VALUE","street":"Schubertweg","houseNumber":"8","houseNumberAddition":"SOME_STRING_VALUE","prices":"SOME_BOOLEAN_VALUE"}


            headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}


            response = requests.request("GET", url, headers=headers,
            params=querystring)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/availability/products?postalCode=33102&city=Paderborn&district=SOME_STRING_VALUE&street=Schubertweg&houseNumber=8&houseNumberAddition=SOME_STRING_VALUE&prices=SOME_BOOLEAN_VALUE",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /p/{project}/cart/validate:
    post:
      summary: Validate product cart for a specific provider
      description: Enriches and validates the given cart.
      tags:
        - Cart
      operationId: validateCart
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: Unique identifier of the telecom provider.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CartValidateRequest'
            example:
              businessProcess: new_customer_new_contract
              lineAddress:
                street: Schubertweg
                houseNumber: '8'
                postalCode: '33102'
                city: Paderborn
              cart:
                cartEntries:
                  - pos: 1
                    count: 1
                    groupId: 5704
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CartValidateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --url https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/validate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"orderId":"string","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","lineAddress":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"options":{}}'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/validate';


            let options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"orderId":"string","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","lineAddress":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"options":{}}'
            };


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/validate"


            payload = {
                "orderId": "string",
                "businessProcess": "new_customer_new_contract",
                "preferredDate": "2019-08-24",
                "lineAddress": {
                    "street": "string",
                    "houseNumber": "string",
                    "houseNumberAddition": "string",
                    "postalCode": "string",
                    "city": "string",
                    "district": "string",
                    "country": "string"
                },
                "cart": {"cartEntries": [
                        {
                            "pos": 0,
                            "count": 1,
                            "groupId": 0,
                            "entryType": "string",
                            "name": "string",
                            "properties": [
                                {
                                    "id": 0,
                                    "value": "string"
                                }
                            ]
                        }
                    ]},
                "options": {}
            }

            headers = {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
            }


            response = requests.request("POST", url, json=payload,
            headers=headers)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/validate",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"orderId\":\"string\",\"businessProcess\":\"new_customer_new_contract\",\"preferredDate\":\"2019-08-24\",\"lineAddress\":{\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"cart\":{\"cartEntries\":[{\"pos\":0,\"count\":1,\"groupId\":0,\"entryType\":\"string\",\"name\":\"string\",\"properties\":[{\"id\":0,\"value\":\"string\"}]}]},\"options\":{}}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /p/{project}/cart/contractSummary:
    post:
      summary: >-
        Check product availability for a specific provider and create a contract
        summary.
      description: >-
        Enriches and validates the given cart before creating the document.
        Constents, context and data is optional.
      tags:
        - Cart
      operationId: createContractSummary
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: The telecommunication provider to check availability for
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractSummaryResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            The partner account lacks master data the provider requires (e.g.
            the 1&1 P-number), `errors.type` is `partner-not-configured`.
            Contact TK-World to complete the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --url https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"orderId":"string","partnerReference":"string","order":{"orderType":"LandlineOrder","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","data":{"customer":{"dateOfBirth":"string","nationality":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"identityDocument":{"documentType":"identity_card","documentNumber":"string","issuingAuthority":"string","validUntil":"2019-08-24","countryOfIssue":"string"},"shippingAddress":{"companyName":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"billingAddress":{"salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"bankAccount":{"regulatorType":"customer","accountHolder":"string","email":"string","address":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"iban":"string"},"contact":{"email":"string","phoneNumber":{"areaCode":"string","subscriberNumber":"string"}}},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"consents":{"mandatory":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"optional":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"documents":[{"name":"string","url":"string"}]},"documents":[{"type":"string","contentType":"string","documentId":"string","content":"string"}],"references":[{"name":"string","value":"string"}],"context":{"pricingDate":"2019-08-24T14:15:22Z","log":{"timestamp":"2019-08-24T14:15:22Z","bytes":0,"ip":"string","browserAgent":"string","url":"string","method":"string"}}},"options":{"skipConsentCheck":true}}'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary';


            let options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"orderId":"string","partnerReference":"string","order":{"orderType":"LandlineOrder","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","data":{"customer":{"dateOfBirth":"string","nationality":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"identityDocument":{"documentType":"identity_card","documentNumber":"string","issuingAuthority":"string","validUntil":"2019-08-24","countryOfIssue":"string"},"shippingAddress":{"companyName":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"billingAddress":{"salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"bankAccount":{"regulatorType":"customer","accountHolder":"string","email":"string","address":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"iban":"string"},"contact":{"email":"string","phoneNumber":{"areaCode":"string","subscriberNumber":"string"}}},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"consents":{"mandatory":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"optional":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"documents":[{"name":"string","url":"string"}]},"documents":[{"type":"string","contentType":"string","documentId":"string","content":"string"}],"references":[{"name":"string","value":"string"}],"context":{"pricingDate":"2019-08-24T14:15:22Z","log":{"timestamp":"2019-08-24T14:15:22Z","bytes":0,"ip":"string","browserAgent":"string","url":"string","method":"string"}}},"options":{"skipConsentCheck":true}}'
            };


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary"


            payload = {
                "orderId": "string",
                "partnerReference": "string",
                "order": {
                    "orderType": "LandlineOrder",
                    "businessProcess": "new_customer_new_contract",
                    "preferredDate": "2019-08-24",
                    "data": {
                        "customer": {
                            "dateOfBirth": "string",
                            "nationality": "string",
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "identityDocument": {
                            "documentType": "identity_card",
                            "documentNumber": "string",
                            "issuingAuthority": "string",
                            "validUntil": "2019-08-24",
                            "countryOfIssue": "string"
                        },
                        "shippingAddress": {
                            "companyName": "string",
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "billingAddress": {
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "bankAccount": {
                            "regulatorType": "customer",
                            "accountHolder": "string",
                            "email": "string",
                            "address": {
                                "street": "string",
                                "houseNumber": "string",
                                "houseNumberAddition": "string",
                                "postalCode": "string",
                                "city": "string",
                                "district": "string",
                                "country": "string"
                            },
                            "iban": "string"
                        },
                        "contact": {
                            "email": "string",
                            "phoneNumber": {
                                "areaCode": "string",
                                "subscriberNumber": "string"
                            }
                        }
                    },
                    "cart": {"cartEntries": [
                            {
                                "pos": 0,
                                "count": 1,
                                "groupId": 0,
                                "entryType": "string",
                                "name": "string",
                                "properties": [
                                    {
                                        "id": 0,
                                        "value": "string"
                                    }
                                ]
                            }
                        ]},
                    "consents": {
                        "mandatory": [
                            {
                                "id": 0,
                                "text": "string",
                                "acceptedAt": "2019-08-24T14:15:22Z"
                            }
                        ],
                        "optional": [
                            {
                                "id": 0,
                                "text": "string",
                                "acceptedAt": "2019-08-24T14:15:22Z"
                            }
                        ],
                        "documents": [
                            {
                                "name": "string",
                                "url": "string"
                            }
                        ]
                    },
                    "documents": [
                        {
                            "type": "string",
                            "contentType": "string",
                            "documentId": "string",
                            "content": "string"
                        }
                    ],
                    "references": [
                        {
                            "name": "string",
                            "value": "string"
                        }
                    ],
                    "context": {
                        "pricingDate": "2019-08-24T14:15:22Z",
                        "log": {
                            "timestamp": "2019-08-24T14:15:22Z",
                            "bytes": 0,
                            "ip": "string",
                            "browserAgent": "string",
                            "url": "string",
                            "method": "string"
                        }
                    }
                },
                "options": {"skipConsentCheck": True}
            }

            headers = {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
            }


            response = requests.request("POST", url, json=payload,
            headers=headers)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"orderId\":\"string\",\"partnerReference\":\"string\",\"order\":{\"orderType\":\"LandlineOrder\",\"businessProcess\":\"new_customer_new_contract\",\"preferredDate\":\"2019-08-24\",\"data\":{\"customer\":{\"dateOfBirth\":\"string\",\"nationality\":\"string\",\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"identityDocument\":{\"documentType\":\"identity_card\",\"documentNumber\":\"string\",\"issuingAuthority\":\"string\",\"validUntil\":\"2019-08-24\",\"countryOfIssue\":\"string\"},\"shippingAddress\":{\"companyName\":\"string\",\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"billingAddress\":{\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"bankAccount\":{\"regulatorType\":\"customer\",\"accountHolder\":\"string\",\"email\":\"string\",\"address\":{\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"iban\":\"string\"},\"contact\":{\"email\":\"string\",\"phoneNumber\":{\"areaCode\":\"string\",\"subscriberNumber\":\"string\"}}},\"cart\":{\"cartEntries\":[{\"pos\":0,\"count\":1,\"groupId\":0,\"entryType\":\"string\",\"name\":\"string\",\"properties\":[{\"id\":0,\"value\":\"string\"}]}]},\"consents\":{\"mandatory\":[{\"id\":0,\"text\":\"string\",\"acceptedAt\":\"2019-08-24T14:15:22Z\"}],\"optional\":[{\"id\":0,\"text\":\"string\",\"acceptedAt\":\"2019-08-24T14:15:22Z\"}],\"documents\":[{\"name\":\"string\",\"url\":\"string\"}]},\"documents\":[{\"type\":\"string\",\"contentType\":\"string\",\"documentId\":\"string\",\"content\":\"string\"}],\"references\":[{\"name\":\"string\",\"value\":\"string\"}],\"context\":{\"pricingDate\":\"2019-08-24T14:15:22Z\",\"log\":{\"timestamp\":\"2019-08-24T14:15:22Z\",\"bytes\":0,\"ip\":\"string\",\"browserAgent\":\"string\",\"url\":\"string\",\"method\":\"string\"}}},\"options\":{\"skipConsentCheck\":true}}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /p/{project}/cart/contractSummary/upload:
    post:
      summary: Upload an existing contract summary document for a specific provider.
      description: >-
        Uploads a partner-provided contract summary document encoded as Base64
        and links it to an orderId.
      tags:
        - Cart
      operationId: uploadContractSummary
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: The telecommunication provider.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractSummaryUploadRequest'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractSummaryResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Payload Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --url https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary/upload \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"orderId":"string","document":{"type":"string","contentType":"string","documentId":"string","content":"string"}}'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary/upload';


            let options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"orderId":"string","document":{"type":"string","contentType":"string","documentId":"string","content":"string"}}'
            };


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary/upload"


            payload = {
                "orderId": "string",
                "document": {
                    "type": "string",
                    "contentType": "string",
                    "documentId": "string",
                    "content": "string"
                }
            }

            headers = {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
            }


            response = requests.request("POST", url, json=payload,
            headers=headers)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/cart/contractSummary/upload",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"orderId\":\"string\",\"document\":{\"type\":\"string\",\"contentType\":\"string\",\"documentId\":\"string\",\"content\":\"string\"}}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /p/{project}/directOrder/validate:
    post:
      summary: validate an order.
      description: >-
        Enriches and validates the given cart before creating the order. If no
        contract summary is available for this order some fallback processes
        will be started.
      tags:
        - Order
      operationId: validateOrder
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: The telecommunication provider to check availability for
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
            examples:
              landline:
                summary: Landline order with number porting (project telekom-ebiz-tho)
                value:
                  order:
                    orderType: LandlineOrder
                    businessProcess: new_customer_provider_change
                    lineAddress:
                      street: Schubertweg
                      houseNumber: '8'
                      postalCode: '33102'
                      postcode: '33102'
                      city: Paderborn
                    data:
                      portingInfos:
                        carrierCode: ANB0097
                        contractTerminated: false
                        callNumbersProvided: single
                        terminateRemainingNumbers: true
                        numbers:
                          - areaCode: '05251'
                            subscriberNumber: '1234567'
                      customer:
                        salutation: Herr
                        firstName: Max
                        lastName: Mustermann
                        dateOfBirth: 20.05.1980
                        street: Musterweg
                        houseNumber: '61'
                        postalCode: '33102'
                        postcode: '33102'
                        city: Paderborn
                      bankAccount:
                        accountHolder: Max Mustermann
                        iban: DE02120300000000202051
                        email: max.mustermann@example.org
                      contact:
                        email: max.mustermann@example.org
                        phoneNumber:
                          areaCode: '0170'
                          subscriberNumber: '1234567'
                      propertyOwner:
                        residentialStatus: owner
                    cart:
                      cartEntries:
                        - pos: 1
                          count: 1
                          groupId: 14787
              mobile:
                summary: Mobile order with number porting (project telekom-ebiz-tmd)
                value:
                  order:
                    orderType: MobileOrder
                    businessProcess: new_customer_provider_change
                    data:
                      portingInfos:
                        carrierCode: MOB0163
                        number:
                          areaCode: '0151'
                          subscriberNumber: '12345678'
                        portingDateType: contract_end
                        contractEndDate: '2027-03-31'
                        customerNumber: '47110815'
                      customer:
                        salutation: Frau
                        firstName: Erika
                        lastName: Musterfrau
                        dateOfBirth: 12.03.1985
                        street: Musterweg
                        houseNumber: '61'
                        postalCode: '33102'
                        postcode: '33102'
                        city: Paderborn
                      bankAccount:
                        accountHolder: Erika Musterfrau
                        iban: DE02120300000000202051
                        email: erika.musterfrau@example.org
                      contact:
                        email: erika.musterfrau@example.org
                        phoneNumber:
                          areaCode: '05251'
                          subscriberNumber: '7654321'
                    cart:
                      cartEntries:
                        - pos: 1
                          count: 1
                          groupId: 14787
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateOrderResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            The request cannot be processed as given. `errors.type` is
            `product-not-available` when a product of the cart (e.g. the tariff)
            is not offered for the line address - use a product from the
            availability result for that address; `unprocessable-entity` for
            other invalid cart content (unknown group ids, duplicate entries,
            too high counts). Retrying the same request fails the same way.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The product configuration could not be read, so the order could not
            be built reliably. `errors.type = "service-unavailable"`. No order
            was created; retry the same request later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --url https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/validate \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"orderId":"string","partnerReference":"string","order":{"orderType":"LandlineOrder","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","data":{"customer":{"dateOfBirth":"string","nationality":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"identityDocument":{"documentType":"identity_card","documentNumber":"string","issuingAuthority":"string","validUntil":"2019-08-24","countryOfIssue":"string"},"shippingAddress":{"companyName":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"billingAddress":{"salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"bankAccount":{"regulatorType":"customer","accountHolder":"string","email":"string","address":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"iban":"string"},"contact":{"email":"string","phoneNumber":{"areaCode":"string","subscriberNumber":"string"}}},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"consents":{"mandatory":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"optional":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"documents":[{"name":"string","url":"string"}]},"documents":[{"type":"string","contentType":"string","documentId":"string","content":"string"}],"references":[{"name":"string","value":"string"}],"context":{"pricingDate":"2019-08-24T14:15:22Z","log":{"timestamp":"2019-08-24T14:15:22Z","bytes":0,"ip":"string","browserAgent":"string","url":"string","method":"string"}}},"options":{"skipConsentCheck":true}}'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/validate';


            let options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"orderId":"string","partnerReference":"string","order":{"orderType":"LandlineOrder","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","data":{"customer":{"dateOfBirth":"string","nationality":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"identityDocument":{"documentType":"identity_card","documentNumber":"string","issuingAuthority":"string","validUntil":"2019-08-24","countryOfIssue":"string"},"shippingAddress":{"companyName":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"billingAddress":{"salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"bankAccount":{"regulatorType":"customer","accountHolder":"string","email":"string","address":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"iban":"string"},"contact":{"email":"string","phoneNumber":{"areaCode":"string","subscriberNumber":"string"}}},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"consents":{"mandatory":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"optional":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"documents":[{"name":"string","url":"string"}]},"documents":[{"type":"string","contentType":"string","documentId":"string","content":"string"}],"references":[{"name":"string","value":"string"}],"context":{"pricingDate":"2019-08-24T14:15:22Z","log":{"timestamp":"2019-08-24T14:15:22Z","bytes":0,"ip":"string","browserAgent":"string","url":"string","method":"string"}}},"options":{"skipConsentCheck":true}}'
            };


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/validate"


            payload = {
                "orderId": "string",
                "partnerReference": "string",
                "order": {
                    "orderType": "LandlineOrder",
                    "businessProcess": "new_customer_new_contract",
                    "preferredDate": "2019-08-24",
                    "data": {
                        "customer": {
                            "dateOfBirth": "string",
                            "nationality": "string",
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "identityDocument": {
                            "documentType": "identity_card",
                            "documentNumber": "string",
                            "issuingAuthority": "string",
                            "validUntil": "2019-08-24",
                            "countryOfIssue": "string"
                        },
                        "shippingAddress": {
                            "companyName": "string",
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "billingAddress": {
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "bankAccount": {
                            "regulatorType": "customer",
                            "accountHolder": "string",
                            "email": "string",
                            "address": {
                                "street": "string",
                                "houseNumber": "string",
                                "houseNumberAddition": "string",
                                "postalCode": "string",
                                "city": "string",
                                "district": "string",
                                "country": "string"
                            },
                            "iban": "string"
                        },
                        "contact": {
                            "email": "string",
                            "phoneNumber": {
                                "areaCode": "string",
                                "subscriberNumber": "string"
                            }
                        }
                    },
                    "cart": {"cartEntries": [
                            {
                                "pos": 0,
                                "count": 1,
                                "groupId": 0,
                                "entryType": "string",
                                "name": "string",
                                "properties": [
                                    {
                                        "id": 0,
                                        "value": "string"
                                    }
                                ]
                            }
                        ]},
                    "consents": {
                        "mandatory": [
                            {
                                "id": 0,
                                "text": "string",
                                "acceptedAt": "2019-08-24T14:15:22Z"
                            }
                        ],
                        "optional": [
                            {
                                "id": 0,
                                "text": "string",
                                "acceptedAt": "2019-08-24T14:15:22Z"
                            }
                        ],
                        "documents": [
                            {
                                "name": "string",
                                "url": "string"
                            }
                        ]
                    },
                    "documents": [
                        {
                            "type": "string",
                            "contentType": "string",
                            "documentId": "string",
                            "content": "string"
                        }
                    ],
                    "references": [
                        {
                            "name": "string",
                            "value": "string"
                        }
                    ],
                    "context": {
                        "pricingDate": "2019-08-24T14:15:22Z",
                        "log": {
                            "timestamp": "2019-08-24T14:15:22Z",
                            "bytes": 0,
                            "ip": "string",
                            "browserAgent": "string",
                            "url": "string",
                            "method": "string"
                        }
                    }
                },
                "options": {"skipConsentCheck": True}
            }

            headers = {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
            }


            response = requests.request("POST", url, json=payload,
            headers=headers)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/validate",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"orderId\":\"string\",\"partnerReference\":\"string\",\"order\":{\"orderType\":\"LandlineOrder\",\"businessProcess\":\"new_customer_new_contract\",\"preferredDate\":\"2019-08-24\",\"data\":{\"customer\":{\"dateOfBirth\":\"string\",\"nationality\":\"string\",\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"identityDocument\":{\"documentType\":\"identity_card\",\"documentNumber\":\"string\",\"issuingAuthority\":\"string\",\"validUntil\":\"2019-08-24\",\"countryOfIssue\":\"string\"},\"shippingAddress\":{\"companyName\":\"string\",\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"billingAddress\":{\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"bankAccount\":{\"regulatorType\":\"customer\",\"accountHolder\":\"string\",\"email\":\"string\",\"address\":{\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"iban\":\"string\"},\"contact\":{\"email\":\"string\",\"phoneNumber\":{\"areaCode\":\"string\",\"subscriberNumber\":\"string\"}}},\"cart\":{\"cartEntries\":[{\"pos\":0,\"count\":1,\"groupId\":0,\"entryType\":\"string\",\"name\":\"string\",\"properties\":[{\"id\":0,\"value\":\"string\"}]}]},\"consents\":{\"mandatory\":[{\"id\":0,\"text\":\"string\",\"acceptedAt\":\"2019-08-24T14:15:22Z\"}],\"optional\":[{\"id\":0,\"text\":\"string\",\"acceptedAt\":\"2019-08-24T14:15:22Z\"}],\"documents\":[{\"name\":\"string\",\"url\":\"string\"}]},\"documents\":[{\"type\":\"string\",\"contentType\":\"string\",\"documentId\":\"string\",\"content\":\"string\"}],\"references\":[{\"name\":\"string\",\"value\":\"string\"}],\"context\":{\"pricingDate\":\"2019-08-24T14:15:22Z\",\"log\":{\"timestamp\":\"2019-08-24T14:15:22Z\",\"bytes\":0,\"ip\":\"string\",\"browserAgent\":\"string\",\"url\":\"string\",\"method\":\"string\"}}},\"options\":{\"skipConsentCheck\":true}}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /p/{project}/directOrder/submit:
    post:
      summary: Submit new order to TK-World.
      description: >-
        Enriches and validates the given cart before creating the order. If no
        contract summary is available for this order some fallback processes
        will be startet.
      tags:
        - Order
      operationId: createOrder
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: The telecommunication provider to check availability for
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitOrderResponse'
        '202':
          description: >-
            The order was created, but forwarding it to the provider failed; our
            back office takes care of it. `errors.type` is `accepted`,
            `data.tkwId` is the order number. Do not submit the order again,
            track it with the `tkwId`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Not Found, e.g. the `orderId` is unknown or has expired. Start again
            with a new `orderId`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            An order with this `partnerReference` already exists. `errors.type`
            is `conflict`, `errors.title` names the existing `tkwId`. Do not
            submit the order again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            The request cannot be processed as given. `errors.type` is
            `product-not-available` when a product of the cart (e.g. the tariff)
            is not offered for the line address - use a product from the
            availability result for that address; `unprocessable-entity` for
            other invalid cart content (unknown group ids, duplicate entries,
            too high counts). Retrying the same request fails the same way.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The product configuration could not be read, so the order could not
            be built reliably. `errors.type = "service-unavailable"`. No order
            was created; retry the same request later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request POST \
              --url https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/submit \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"orderId":"string","partnerReference":"string","order":{"orderType":"LandlineOrder","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","data":{"customer":{"dateOfBirth":"string","nationality":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"identityDocument":{"documentType":"identity_card","documentNumber":"string","issuingAuthority":"string","validUntil":"2019-08-24","countryOfIssue":"string"},"shippingAddress":{"companyName":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"billingAddress":{"salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"bankAccount":{"regulatorType":"customer","accountHolder":"string","email":"string","address":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"iban":"string"},"contact":{"email":"string","phoneNumber":{"areaCode":"string","subscriberNumber":"string"}}},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"consents":{"mandatory":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"optional":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"documents":[{"name":"string","url":"string"}]},"documents":[{"type":"string","contentType":"string","documentId":"string","content":"string"}],"references":[{"name":"string","value":"string"}],"context":{"pricingDate":"2019-08-24T14:15:22Z","log":{"timestamp":"2019-08-24T14:15:22Z","bytes":0,"ip":"string","browserAgent":"string","url":"string","method":"string"}}},"options":{"skipConsentCheck":true}}'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/submit';


            let options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"orderId":"string","partnerReference":"string","order":{"orderType":"LandlineOrder","businessProcess":"new_customer_new_contract","preferredDate":"2019-08-24","data":{"customer":{"dateOfBirth":"string","nationality":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"identityDocument":{"documentType":"identity_card","documentNumber":"string","issuingAuthority":"string","validUntil":"2019-08-24","countryOfIssue":"string"},"shippingAddress":{"companyName":"string","salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"billingAddress":{"salutation":"Herr","firstName":"string","lastName":"string","street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"bankAccount":{"regulatorType":"customer","accountHolder":"string","email":"string","address":{"street":"string","houseNumber":"string","houseNumberAddition":"string","postalCode":"string","city":"string","district":"string","country":"string"},"iban":"string"},"contact":{"email":"string","phoneNumber":{"areaCode":"string","subscriberNumber":"string"}}},"cart":{"cartEntries":[{"pos":0,"count":1,"groupId":0,"entryType":"string","name":"string","properties":[{"id":0,"value":"string"}]}]},"consents":{"mandatory":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"optional":[{"id":0,"text":"string","acceptedAt":"2019-08-24T14:15:22Z"}],"documents":[{"name":"string","url":"string"}]},"documents":[{"type":"string","contentType":"string","documentId":"string","content":"string"}],"references":[{"name":"string","value":"string"}],"context":{"pricingDate":"2019-08-24T14:15:22Z","log":{"timestamp":"2019-08-24T14:15:22Z","bytes":0,"ip":"string","browserAgent":"string","url":"string","method":"string"}}},"options":{"skipConsentCheck":true}}'
            };


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/submit"


            payload = {
                "orderId": "string",
                "partnerReference": "string",
                "order": {
                    "orderType": "LandlineOrder",
                    "businessProcess": "new_customer_new_contract",
                    "preferredDate": "2019-08-24",
                    "data": {
                        "customer": {
                            "dateOfBirth": "string",
                            "nationality": "string",
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "identityDocument": {
                            "documentType": "identity_card",
                            "documentNumber": "string",
                            "issuingAuthority": "string",
                            "validUntil": "2019-08-24",
                            "countryOfIssue": "string"
                        },
                        "shippingAddress": {
                            "companyName": "string",
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "billingAddress": {
                            "salutation": "Herr",
                            "firstName": "string",
                            "lastName": "string",
                            "street": "string",
                            "houseNumber": "string",
                            "houseNumberAddition": "string",
                            "postalCode": "string",
                            "city": "string",
                            "district": "string",
                            "country": "string"
                        },
                        "bankAccount": {
                            "regulatorType": "customer",
                            "accountHolder": "string",
                            "email": "string",
                            "address": {
                                "street": "string",
                                "houseNumber": "string",
                                "houseNumberAddition": "string",
                                "postalCode": "string",
                                "city": "string",
                                "district": "string",
                                "country": "string"
                            },
                            "iban": "string"
                        },
                        "contact": {
                            "email": "string",
                            "phoneNumber": {
                                "areaCode": "string",
                                "subscriberNumber": "string"
                            }
                        }
                    },
                    "cart": {"cartEntries": [
                            {
                                "pos": 0,
                                "count": 1,
                                "groupId": 0,
                                "entryType": "string",
                                "name": "string",
                                "properties": [
                                    {
                                        "id": 0,
                                        "value": "string"
                                    }
                                ]
                            }
                        ]},
                    "consents": {
                        "mandatory": [
                            {
                                "id": 0,
                                "text": "string",
                                "acceptedAt": "2019-08-24T14:15:22Z"
                            }
                        ],
                        "optional": [
                            {
                                "id": 0,
                                "text": "string",
                                "acceptedAt": "2019-08-24T14:15:22Z"
                            }
                        ],
                        "documents": [
                            {
                                "name": "string",
                                "url": "string"
                            }
                        ]
                    },
                    "documents": [
                        {
                            "type": "string",
                            "contentType": "string",
                            "documentId": "string",
                            "content": "string"
                        }
                    ],
                    "references": [
                        {
                            "name": "string",
                            "value": "string"
                        }
                    ],
                    "context": {
                        "pricingDate": "2019-08-24T14:15:22Z",
                        "log": {
                            "timestamp": "2019-08-24T14:15:22Z",
                            "bytes": 0,
                            "ip": "string",
                            "browserAgent": "string",
                            "url": "string",
                            "method": "string"
                        }
                    }
                },
                "options": {"skipConsentCheck": True}
            }

            headers = {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
            }


            response = requests.request("POST", url, json=payload,
            headers=headers)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/directOrder/submit",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\"orderId\":\"string\",\"partnerReference\":\"string\",\"order\":{\"orderType\":\"LandlineOrder\",\"businessProcess\":\"new_customer_new_contract\",\"preferredDate\":\"2019-08-24\",\"data\":{\"customer\":{\"dateOfBirth\":\"string\",\"nationality\":\"string\",\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"identityDocument\":{\"documentType\":\"identity_card\",\"documentNumber\":\"string\",\"issuingAuthority\":\"string\",\"validUntil\":\"2019-08-24\",\"countryOfIssue\":\"string\"},\"shippingAddress\":{\"companyName\":\"string\",\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"billingAddress\":{\"salutation\":\"Herr\",\"firstName\":\"string\",\"lastName\":\"string\",\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"bankAccount\":{\"regulatorType\":\"customer\",\"accountHolder\":\"string\",\"email\":\"string\",\"address\":{\"street\":\"string\",\"houseNumber\":\"string\",\"houseNumberAddition\":\"string\",\"postalCode\":\"string\",\"city\":\"string\",\"district\":\"string\",\"country\":\"string\"},\"iban\":\"string\"},\"contact\":{\"email\":\"string\",\"phoneNumber\":{\"areaCode\":\"string\",\"subscriberNumber\":\"string\"}}},\"cart\":{\"cartEntries\":[{\"pos\":0,\"count\":1,\"groupId\":0,\"entryType\":\"string\",\"name\":\"string\",\"properties\":[{\"id\":0,\"value\":\"string\"}]}]},\"consents\":{\"mandatory\":[{\"id\":0,\"text\":\"string\",\"acceptedAt\":\"2019-08-24T14:15:22Z\"}],\"optional\":[{\"id\":0,\"text\":\"string\",\"acceptedAt\":\"2019-08-24T14:15:22Z\"}],\"documents\":[{\"name\":\"string\",\"url\":\"string\"}]},\"documents\":[{\"type\":\"string\",\"contentType\":\"string\",\"documentId\":\"string\",\"content\":\"string\"}],\"references\":[{\"name\":\"string\",\"value\":\"string\"}],\"context\":{\"pricingDate\":\"2019-08-24T14:15:22Z\",\"log\":{\"timestamp\":\"2019-08-24T14:15:22Z\",\"bytes\":0,\"ip\":\"string\",\"browserAgent\":\"string\",\"url\":\"string\",\"method\":\"string\"}}},\"options\":{\"skipConsentCheck\":true}}",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /p/{project}/reference/countries:
    get:
      summary: List all supported countries
      tags:
        - Reference
      operationId: countries
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: The telecommunication provider to check availability for
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferenceCountriesResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --url https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/countries \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/countries';


            let options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/countries"


            headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}


            response = requests.request("GET", url, headers=headers)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/countries",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /p/{project}/reference/provider:
    get:
      summary: List all accepted provider
      tags:
        - Reference
      operationId: provider
      security:
        - oauth2: []
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
            example: telekom-ebiz-tho
          description: The telecommunication provider to check availability for
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferenceTelcoProviderResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --url https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/provider \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/provider';


            let options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url =
            "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/provider"


            headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}


            response = requests.request("GET", url, headers=headers)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/p/telekom-ebiz-tho/reference/provider",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /o/{tkwId}/status:
    get:
      summary: Get Order Status
      tags:
        - Status
      operationId: orderStatus
      security:
        - oauth2:
            - manage-order
      parameters:
        - name: tkwId
          in: path
          required: true
          schema:
            type: string
            example: '1679506'
          description: The order id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderStatusResponse'
        '401':
          description: Request not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Request forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            The order does not exist or does not belong to this partner,
            `errors.type = "not-found"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Internal server error (our side; provider problems are reported as
            502/503/504)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            The network operator returned a broken/uninterpretable response,
            `errors.type = "provider-bad-response"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The network operator's status service is unavailable or rejects the
            request (outage, rate limit), `errors.type = "provider-unavailable"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '504':
          description: >-
            The network operator did not answer in time, `errors.type =
            "provider-timeout"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --url https://partner.tkw.services/api/v1/o/1679506/status \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url = 'https://partner.tkw.services/api/v1/o/1679506/status';


            let options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: |-
            import requests

            url = "https://partner.tkw.services/api/v1/o/1679506/status"

            headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}

            response = requests.request("GET", url, headers=headers)

            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/o/1679506/status",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /o/{tkwId}/providerStatus:
    get:
      summary: Get Provider Status
      tags:
        - Status
      operationId: providerStatus
      description: >-
        Returns the network operator's processing status for an order. An order
        the operator has no status for yet - because it was never submitted, is
        still too young to be queried, or is simply unknown to the operator's
        status service - is a valid intermediate state, not an error: it is
        answered with 200 and `status = "pending"`, the reason in
        `statusDescription` (#3202).

        Vodafone is not asked on every call: its answer, pending included, is
        served from cache. Vodafone cable orders are cached for a few hours
        (currently 2) after the lookup, since their status changes during the
        day as well; all other Vodafone orders until the next daily refresh
        (currently 07:00 Europe/Berlin). Polling an order more often than its
        `meta.cache_expires_at` yields no newer data. Requests are rate limited
        per client, and uncached lookups at the operator are capped as well;
        both answer with 429 and a `Retry-After` header (#3487). Once the
        operator cap is reached, an order that has an older cached answer gets
        that answer with `meta.stale = true` instead of a 429; only orders
        without any cached answer get the 429. A 429 is never final: retry the
        order after `Retry-After`. Whether an answer came from cache, when the
        operator was asked and until when the answer is kept is reported in
        `meta.cached`, `meta.stale`, `meta.cached_at` and
        `meta.cache_expires_at`.
      security:
        - oauth2:
            - manage-order
      parameters:
        - name: tkwId
          in: path
          required: true
          schema:
            type: string
            example: '1679506'
          description: The order id
      responses:
        '200':
          description: Successful response, including the pending state described above
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderStatusResponse'
        '401':
          description: Request not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Request forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            The order does not exist or does not belong to this partner,
            `errors.type = "not-found"`. Or the order's provider offers no
            provider status at all (e.g. congstar), `errors.type =
            "provider-status-unsupported"`; asking again does not change that.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit exceeded, `errors.type = "too-many-requests"`; retry
            after the number of seconds given in the `Retry-After` header
          headers:
            Retry-After:
              description: Seconds until the next request is accepted
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Internal server error (our side; provider problems are reported as
            502/503/504)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            The network operator returned a broken/uninterpretable response,
            `errors.type = "provider-bad-response"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The network operator's status service is unavailable or rejects the
            request (outage, rate limit), `errors.type = "provider-unavailable"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '504':
          description: >-
            The network operator did not answer in time, `errors.type =
            "provider-timeout"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --url https://partner.tkw.services/api/v1/o/1679506/providerStatus \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/o/1679506/providerStatus';


            let options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: |-
            import requests

            url = "https://partner.tkw.services/api/v1/o/1679506/providerStatus"

            headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}

            response = requests.request("GET", url, headers=headers)

            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/o/1679506/providerStatus",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
  /o/list:
    get:
      summary: List Orders
      tags:
        - Status
      operationId: orders
      description: >-
        Orders of the partner submitted in the period from `start` to `end`,
        both days included. The period is at most 100 days.
      security:
        - oauth2:
            - manage-order
      parameters:
        - name: start
          in: query
          required: false
          schema:
            type: string
            format: date
            example: '2026-07-01'
          description: First day of the period, default today
        - name: end
          in: query
          required: false
          schema:
            type: string
            format: date
            example: '2026-08-30'
          description: Last day of the period, default today
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersListResponse'
        '400':
          description: >-
            `start` or `end` is no valid date, or the period exceeds 100 days,
            `errors.type = "bad-request"`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --url 'https://partner.tkw.services/api/v1/o/list?start=2026-07-01&end=2026-08-30' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node.js
          source: >-
            const fetch = require('node-fetch');


            let url =
            'https://partner.tkw.services/api/v1/o/list?start=2026-07-01&end=2026-08-30';


            let options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            fetch(url, options)
              .then(res => res.json())
              .then(json => console.log(json))
              .catch(err => console.error('error:' + err));
        - lang: Python
          source: >-
            import requests


            url = "https://partner.tkw.services/api/v1/o/list"


            querystring = {"start":"2026-07-01","end":"2026-08-30"}


            headers = {"Authorization": "Bearer REPLACE_BEARER_TOKEN"}


            response = requests.request("GET", url, headers=headers,
            params=querystring)


            print(response.text)
        - lang: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://partner.tkw.services/api/v1/o/list?start=2026-07-01&end=2026-08-30",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer REPLACE_BEARER_TOKEN"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://partner.tkw.services/oauth/token
          scopes:
            manage-order: Administrative Access
  schemas:
    OrdersListResponse:
      type: object
      description: '`data` is the list of orders itself; `meta.total` gives their number.'
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OrderSummary'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    OrderSummary:
      type: object
      properties:
        tkwId:
          type: integer
          example: 1679506
        provider:
          type: string
          description: Name of the provider (vendor) of the order
        baseproduct:
          type: string
          nullable: true
          description: Base product of the order, as recorded at submission
        submissionDate:
          type: string
          example: '2026-07-01 02:25:13'
          description: >-
            Submission time as `YYYY-MM-DD hh:mm:ss` in local time
            Europe/Berlin, not RFC 3339 date-time.
    OrderStatusResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/OrderStatus'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    OrderStatus:
      type: object
      properties:
        tkwId:
          type: integer
          example: 1679506
        cart:
          $ref: '#/components/schemas/Cart'
        commissions:
          type: array
          items:
            $ref: '#/components/schemas/Commission'
    ProviderStatusResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ProviderStatus'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    ProviderStatus:
      type: object
      properties:
        providerOrderId:
          type: string
          nullable: true
        tkwId:
          type: integer
          nullable: true
        status:
          type: string
          nullable: true
        statusName:
          type: string
          nullable: true
        statusDescription:
          type: string
          nullable: true
        final:
          type: boolean
          nullable: true
        handling:
          type: string
          nullable: true
        date:
          type: string
          format: date-time
          nullable: true
        additionalData:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AdditionalData'
    AdditionalData:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
    Commission:
      type: object
      properties:
        commissionProduct:
          $ref: '#/components/schemas/CommissionProduct'
        provider:
          type: string
        partner:
          $ref: '#/components/schemas/Partner'
        cartPos:
          type: integer
        billing:
          $ref: '#/components/schemas/CommissionBilling'
    Partner:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    CommissionBilling:
      type: object
      properties:
        referenceDate:
          type: string
          example: '2026-07-01 02:25:13'
          description: >-
            Reference time as `YYYY-MM-DD hh:mm:ss` in local time Europe/Berlin,
            not RFC 3339 date-time.
        commissionStatus:
          $ref: '#/components/schemas/CommissionStatus'
        targetCommission:
          type: number
        actualCommission:
          type: number
    CommissionProduct:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    CommissionStatus:
      type: string
      enum:
        - order_transmission
        - commission_paid
        - order_processing_failed
    ReferenceCountriesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Country'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    Country:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
    ReferenceTelcoProviderResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Provider'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    Provider:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
    OrderRequest:
      type: object
      properties:
        orderId:
          type: string
          description: >-
            Order of an earlier request. Without it order.businessProcess is
            required and, for projects with an availability check,
            order.lineAddress; with it both come from that order.
        partnerReference:
          type: string
        order:
          $ref: '#/components/schemas/Order'
        options:
          $ref: '#/components/schemas/OrderRequestOptions'
    OrderRequestOptions:
      type: object
      properties:
        skipConsentCheck:
          type: boolean
      additionalProperties: true
    SubmitOrderResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SubmitOrderData'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    SubmitOrderData:
      type: object
      properties:
        tkwId:
          type: string
    ValidateOrderResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ValidateOrderData'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    ValidateOrderData:
      type: object
      properties:
        valid:
          type: boolean
        consents:
          $ref: '#/components/schemas/Consents'
    Consents:
      type: object
      properties:
        mandatory:
          type: array
          items:
            $ref: '#/components/schemas/Consent'
        optional:
          type: array
          items:
            $ref: '#/components/schemas/Consent'
        documents:
          type: array
          items:
            $ref: '#/components/schemas/ConsentDocument'
    Consent:
      type: object
      properties:
        id:
          type: integer
        text:
          type: string
        acceptedAt:
          type: string
          format: date-time
    ConsentDocument:
      type: object
      properties:
        name:
          type: string
        url:
          type: string
    ContractSummaryResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ContractSummaryData'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    ContractSummaryUploadRequest:
      type: object
      properties:
        orderId:
          type: string
          description: OrderId the uploaded contract summary belongs to.
        document:
          $ref: '#/components/schemas/Document'
      required:
        - orderId
        - document
    ContractSummaryData:
      type: object
      properties:
        document:
          $ref: '#/components/schemas/Document'
      allOf:
        - $ref: '#/components/schemas/CartValidateData'
    Document:
      type: object
      properties:
        type:
          type: string
        contentType:
          type: string
          description: >-
            MIME type of `content`, detected from the document itself. Contract
            summaries are `application/pdf`; check the value anyway before
            handing the document out. Uploads only accept `application/pdf`.
        documentId:
          type: string
        content:
          type: string
    Cart:
      type: object
      required:
        - cartEntries
      properties:
        cartEntries:
          type: array
          items:
            $ref: '#/components/schemas/CartEntry'
    Contact:
      type: object
      properties:
        email:
          type: string
        phoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
    PhoneNumber:
      type: object
      properties:
        areaCode:
          type: string
        subscriberNumber:
          type: string
    Customer:
      type: object
      properties:
        dateOfBirth:
          type: string
        nationality:
          type: string
      allOf:
        - $ref: '#/components/schemas/Person'
    IdentityDocument:
      type: object
      properties:
        documentType:
          type: string
          enum:
            - identity_card
            - passport
            - resident_permit_type4
            - resident_permit_type5
            - tolerance
            - arrival_certificate
            - traveler_id
        documentNumber:
          type: string
        issuingAuthority:
          type: string
        validUntil:
          type: string
          format: date
        countryOfIssue:
          type: string
    Salutation:
      type: string
      description: >-
        Salutation of a person: `Herr`, `Frau` or `Firma` (the person is a
        company). Leave the field out for a person without a salutation. Other
        values are accepted for the time being: `Herr`, `Frau` and `Firma` in
        other cases (e.g. `HERR`) are taken as these values, everything else
        (e.g. `keine Angabe`) as no salutation; each such value is reported in
        `meta.conversions`.
      enum:
        - Herr
        - Frau
        - Firma
      example: Herr
    Person:
      type: object
      properties:
        salutation:
          $ref: '#/components/schemas/Salutation'
        firstName:
          type: string
        lastName:
          type: string
      allOf:
        - $ref: '#/components/schemas/Address'
    PersonWithCompany:
      type: object
      properties:
        companyName:
          type: string
      allOf:
        - $ref: '#/components/schemas/Person'
    BankAccount:
      type: object
      description: email only for Telekom.
      properties:
        regulatorType:
          type: string
          enum:
            - customer
            - invoice_recipient
            - regulator
        accountHolder:
          type: string
        email:
          type: string
        address:
          $ref: '#/components/schemas/Address'
        iban:
          type: string
    LandlineOrder:
      type: object
      properties:
        lineAddress:
          $ref: '#/components/schemas/LineAddress'
        homeId:
          type: string
          minLength: 7
          maxLength: 7
          example: 123VBCP
          description: >-
            Identifies the individual home at the line address and is printed on
            the fiber socket. Fiber tariffs only, and optional -- without it the
            provider contacts the customer to obtain it. The exact format
            differs per provider; Vodafone rejects vowels.
        data:
          $ref: '#/components/schemas/LandlineOrderData'
      allOf:
        - $ref: '#/components/schemas/Order'
    MobileOrder:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MobileOrderData'
      allOf:
        - $ref: '#/components/schemas/Order'
    BusinessProcess:
      type: string
      description: >-
        Business process of the order. Not every project supports every value;
        an unsupported value is rejected with 422 (unprocessable-entity) naming
        the allowed values. Supported values per project: <table>
          <thead><tr><th>Project</th><th>Supported business processes</th></tr></thead>
          <tbody>
            <tr><td>telekom-ebiz-tmd</td><td>new_customer_new_contract, new_customer_provider_change,
              existing_customer_tariff_change, existing_customer_new_contract</td></tr>
            <tr><td>all other projects</td><td>new_customer_new_contract, new_customer_provider_change</td></tr>
          </tbody>
        </table>
      enum:
        - new_customer_new_contract
        - new_customer_provider_change
        - existing_customer_provider_change
        - existing_customer_tariff_change
        - existing_customer_new_contract
    Order:
      type: object
      discriminator:
        propertyName: orderType
      properties:
        orderType:
          type: string
          enum:
            - LandlineOrder
            - MobileOrder
        businessProcess:
          $ref: '#/components/schemas/BusinessProcess'
        preferredDate:
          type: string
          format: date
          description: >-
            Date the customer wants the service from. It may also be sent later
            with orderId (cart contract summary, directOrder validate or
            submit), e.g. after the contract summary was created: the order and
            its documents stay, the date replaces the earlier one and the
            provider is asked again. The provider may move the date to the
            earliest possible business day; the directOrder responses carry the
            date the order uses. Not possible once the order was submitted.
        data:
          $ref: '#/components/schemas/OrderData'
        cart:
          $ref: '#/components/schemas/Cart'
        consents:
          $ref: '#/components/schemas/Consents'
        documents:
          type: array
          items:
            $ref: '#/components/schemas/Document'
        references:
          type: array
          items:
            $ref: '#/components/schemas/ExternalReference'
        context:
          $ref: '#/components/schemas/Context'
      required:
        - orderType
    ExternalReference:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
    Context:
      type: object
      properties:
        pricingDate:
          type: string
          format: date-time
        log:
          $ref: '#/components/schemas/Log'
    Log:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        bytes:
          type: integer
        ip:
          type: string
        browserAgent:
          type: string
        url:
          type: string
        method:
          type: string
    OrderData:
      type: object
      description: >-
        Order data shared by all order types. The fields that only apply to one
        order type are in `LandlineOrderData` and `MobileOrderData`; which one
        applies follows from `orderType`.
      properties:
        customer:
          $ref: '#/components/schemas/Customer'
        identityDocument:
          $ref: '#/components/schemas/IdentityDocument'
        shippingAddress:
          $ref: '#/components/schemas/PersonWithCompany'
        billingAddress:
          $ref: '#/components/schemas/Person'
        bankAccount:
          $ref: '#/components/schemas/BankAccount'
        contact:
          $ref: '#/components/schemas/Contact'
    LandlineOrderData:
      type: object
      description: Order data of a `LandlineOrder`.
      properties:
        portingInfos:
          $ref: '#/components/schemas/PortingInfos'
        propertyOwner:
          $ref: '#/components/schemas/PropertyOwner'
      allOf:
        - $ref: '#/components/schemas/OrderData'
    MobileOrderData:
      type: object
      description: Order data of a `MobileOrder`.
      properties:
        portingInfos:
          $ref: '#/components/schemas/MobilePortingInfos'
      allOf:
        - $ref: '#/components/schemas/OrderData'
    MobilePortingInfos:
      type: object
      description: >-
        Mobile number portability: the customer takes an existing mobile number
        from the releasing provider to the new contract. Only sent when a number
        is ported; without it the order gets a new number.
      properties:
        carrierCode:
          type: string
          example: MOB0163
          description: >-
            Releasing provider, a `code` from `GET
            /p/{project}/reference/provider` of the same project.
        number:
          $ref: '#/components/schemas/PhoneNumber'
        portingDateType:
          type: string
          default: asap
          enum:
            - asap
            - contract_end
            - desired_date
          description: >-
            When the number is ported: as soon as possible, at the end of the
            contract with the releasing provider (`contractEndDate`), or on a
            desired date (`desiredPortingDate`).
        desiredPortingDate:
          type: string
          format: date
          description: Required for `portingDateType` = `desired_date`.
        contractEndDate:
          type: string
          format: date
          description: >-
            End of the contract with the releasing provider. Required for
            `portingDateType` = `contract_end`.
        cancellationDate:
          type: string
          format: date
          description: >-
            Date the customer sent the termination of the contract to the
            releasing provider. Only used by providers that ask for it.
        customerNumber:
          type: string
          description: >-
            Customer number at the releasing provider, if known. Telekom only
            uses it for a `contractHolder` that is a company (`salutation` =
            `Firma`).
        contractHolder:
          $ref: '#/components/schemas/MobileContractHolder'
      required:
        - carrierCode
        - number
    MobileContractHolder:
      type: object
      description: >-
        Holder of the contract with the releasing provider. Only needed when it
        is not the customer of this order.
      properties:
        salutation:
          $ref: '#/components/schemas/Salutation'
        companyName:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        dateOfBirth:
          type: string
          format: date
    PropertyOwner:
      type: object
      description: >-
        Residential status and details of the property owner. Required when the
        cart contains a fiber pre-marketing product. `person` and `contact`
        describe the owner of the property and are only needed for `co_owner`
        and `tenant`, unless `ownerDataPending` is set. If it is required but
        not sent, the order is accepted as `{"residentialStatus": "tenant",
        "ownerDataPending": true}`; the validate response shows this default.
      properties:
        residentialStatus:
          type: string
          enum:
            - owner
            - co_owner
            - tenant
        ownerDataPending:
          type: boolean
          default: false
          description: >-
            The owner's details will be provided later. Only relevant for
            `co_owner` and `tenant`; `person` and `contact` may then be omitted.
            The order is accepted, but it requires manual follow-up with the
            provider, so send the details right away whenever they are known.
        person:
          $ref: '#/components/schemas/PersonWithCompany'
        contact:
          $ref: '#/components/schemas/Contact'
      required:
        - residentialStatus
    PortingInfos:
      type: object
      properties:
        carrierCode:
          type: string
        callNumbersProvided:
          type: string
          enum:
            - single
            - multiple
          deprecated: true
          description: >-
            Deprecated, no longer needs to be sent. Derived from `numbers` when
            numbers are given (one number = single, more than one = multiple); a
            value sent here is overwritten by that count.
        numbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneNumber'
        terminateRemainingNumbers:
          type: boolean
        desiredActivationDate:
          type: string
          format: date
        contractTerminationDate:
          type: string
          format: date
        contractTerminated:
          type: boolean
        digitalLetterOfIntent:
          type: boolean
    CartValidateResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CartValidateData'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    CartValidateData:
      type: object
      properties:
        valid:
          type: boolean
        orderId:
          type: string
        cart:
          $ref: '#/components/schemas/Cart'
        changes:
          type: array
          description: >-
            What the API changed in the requested cart. Empty when the cart
            comes back as requested. Positions sent back unchanged (also the
            ones the API added in an earlier response) are no change.
          items:
            $ref: '#/components/schemas/CartChange'
    CartChange:
      type: object
      properties:
        action:
          type: string
          enum:
            - added
            - replaced
            - removed
          description: >-
            `added` - the API added the position (e.g. a mandatory option);
            `replaced` - a requested product was replaced by another one (e.g.
            an alternative product, also reported in `meta.messages`); `removed`
            - a requested position is not part of the cart any more.
        pos:
          type: integer
          description: >-
            Position in the returned cart; for `removed` the position as
            requested.
        reference:
          type: integer
          description: Requested groupId that was replaced or removed; not set for `added`.
    CartValidateRequest:
      type: object
      required:
        - cart
      properties:
        orderId:
          type: string
          description: >-
            Order of an earlier request. Without it businessProcess is required
            and, for projects with an availability check, lineAddress; with it
            both come from that order and are ignored here.
        businessProcess:
          $ref: '#/components/schemas/BusinessProcess'
        preferredDate:
          type: string
          format: date
          description: >-
            Date the customer wants the service from. With orderId it replaces
            the date of that order and the provider is asked again; the order
            and its documents stay. Not possible once the order was submitted.
        lineAddress:
          $ref: '#/components/schemas/LineAddress'
        cart:
          $ref: '#/components/schemas/Cart'
        options:
          type: object
          additionalProperties: true
    CartEntry:
      type: object
      required:
        - groupId
      properties:
        pos:
          type: integer
        count:
          type: integer
          minimum: 1
          default: 1
          description: >-
            Quantity of the position. Omitted means 1. A quantity above what the
            product allows is rejected with 422.
        groupId:
          type: integer
        entryType:
          type: string
        name:
          type: string
        properties:
          type: array
          items:
            $ref: '#/components/schemas/Property'
    Property:
      type: object
      properties:
        id:
          type: integer
        value:
          type: string
    ValueConversion:
      type: object
      description: A request value in a deprecated format and what it was converted to
      required:
        - field
        - value
        - converted
      properties:
        field:
          type: string
          description: Path of the field in the request body, e.g. `order.preferredDate`
          example: order.preferredDate
        value:
          description: The value as sent, a string or an integer
          example: 15-11-2026
        converted:
          description: >-
            The value as processed: a date string (YYYY-MM-DD) for date fields,
            a JSON boolean for boolean fields, an integer for integer fields, a
            string for string fields, null for an empty date and a `Salutation`
            value or null (no salutation) for a salutation
          example: '2026-11-15'
    Meta:
      type: object
      properties:
        status_code:
          type: integer
        success:
          type: boolean
        request_id:
          type: string
        calls:
          type: array
          description: The calls to operator APIs made while handling the request
          items:
            $ref: '#/components/schemas/ExternalCall'
        external_time:
          type: number
          description: >-
            Seconds spent waiting for operator APIs. Calls running in parallel
            are counted once, so this is the time in which at least one call was
            running, not the sum of the call durations
        internal_time:
          type: number
          description: >-
            Seconds spent on our side, i.e. the request time minus
            `external_time`
        messages:
          type: array
          items:
            type: string
        conversions:
          type: array
          description: >-
            Only when the request contained values in a deprecated format that
            were converted instead of rejected: day-first dates (DD-MM-YYYY,
            DD.MM.YYYY) and dates with a time (the time is dropped) for date
            fields, empty strings for date fields (taken as not set), the
            strings "true"/"false" for boolean fields, digit strings ("2") for
            integer fields, integers for string fields and salutations other
            than `Herr`, `Frau` and `Firma`. This tolerance is transitional;
            send YYYY-MM-DD dates and JSON booleans, integers and strings as the
            field types require
          items:
            $ref: '#/components/schemas/ValueConversion'
        cached:
          type: boolean
          description: >-
            Only on responses the operator's answer is cached for
            (providerStatus, #3487): true when served from cache, false when the
            operator was asked just now
        stale:
          type: boolean
          description: >-
            Only on responses the operator's answer is cached for
            (providerStatus): true when the answer is past `cache_expires_at`
            and served because uncached lookups at the operator are capped right
            now; ask again later for a fresh one
        cached_at:
          type: string
          format: date-time
          description: Time of the operator lookup the cached answer is based on (#3487)
        cache_expires_at:
          type: string
          format: date-time
          description: >-
            The cached answer is kept until then; asking again earlier returns
            the same data (#3487)
        total:
          type: integer
          description: Only on the order list (`/o/list`), number of orders in `data`
      required:
        - status_code
        - success
    ExternalCall:
      type: object
      properties:
        requestType:
          type: string
          description: Path of the called operator API endpoint
        duration:
          type: number
          description: Transfer time of the call in seconds, as measured by the HTTP client
        offset:
          type: number
          description: >-
            Seconds from the start of the request until the call started. Calls
            whose intervals overlap ran in parallel
      required:
        - requestType
        - duration
    DefaultResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - data
        - meta
    AvailabilityResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AvailabilityData'
      allOf:
        - $ref: '#/components/schemas/DefaultResponse'
    AvailabilityData:
      type: object
      properties:
        tariffs:
          type: array
          items:
            $ref: '#/components/schemas/Product'
        checkResult:
          $ref: '#/components/schemas/CheckResult'
        orderId:
          type: string
      required:
        - tariffs
    CheckResult:
      type: object
      properties:
        checker:
          type: string
          description: Provider-API requested for availabilitycheck
        status:
          type: string
          enum:
            - products-available
            - no-products
          description: >-
            Overall check status. `no-products` marks a valid address without
            any available products (still HTTP 200). A per-technology status for
            partial results (206) will follow.
        capabilities:
          type: array
          items:
            $ref: '#/components/schemas/Capability'
        expansion:
          type: array
          items:
            $ref: '#/components/schemas/Expansion'
        addons:
          type: array
          items:
            $ref: '#/components/schemas/Addon'
        address:
          $ref: '#/components/schemas/Address'
        promotions:
          type: array
          items:
            type: string
          description: >-
            Offer-level markers signalling that customer-individual prices /
            price actions (KIP/MDU) apply at this address; a non-empty list
            answers "are there special prices here?". Collected uniquely across
            all tariffs from the POP price-action fields (monthly, one-time,
            credit, purchase) and the leading underscore-delimited word of the
            condition long texts (e.g. `MDU_6 Mon 9,95 Euro...` -> `MDU`). Empty
            when no price action applies.
          example:
            - Glasfaser Vollausbau
            - MDU
            - Glasfaser Megadeals 3
    Addon:
      type: object
      description: >-
        Cost-relevant, bookable add-on resolved during the availability check
        (e.g. Vodafone Kabel TV-Connect). Every configured add-on is always
        reported so that `available = false` (not checked against any product)
        can be told apart from an add-on that was simply omitted.
      properties:
        name:
          type: string
          description: Stable add-on identifier, e.g. `tv-connect`
        available:
          type: boolean
          description: Whether the add-on is bookable for the checked address/products
        costs:
          type: integer
          nullable: true
          description: Resolved monthly gross price; `null` if not priced or unavailable
      required:
        - name
        - available
    Expansion:
      type: object
      description: >-
        A planned technology at the address (network rollout in progress).
        Carries the same fields as `Capability` plus the rollout dates.
      properties:
        date:
          type: string
          nullable: true
          example: '2026-11-01 00:00:00'
          description: >-
            Planned availability date. Serialized as `YYYY-MM-DD hh:mm:ss` (JMS
            Carbon default), not RFC3339 date-time.
        developmentStartDate:
          type: string
          nullable: true
          example: '2026-08-15 00:00:00'
          description: >-
            Start of the network rollout at this address (e.g. Telekom POP
            `developmentStartDate`). Same `YYYY-MM-DD hh:mm:ss` format as
            `date`.
      allOf:
        - $ref: '#/components/schemas/Capability'
    Capability:
      type: object
      description: >-
        An available technology at the address with its bandwidths and, where
        the provider delivers them, the unified enrichment fields.
      properties:
        type:
          type: string
          enum:
            - landline
            - mobile
        technology:
          type: string
          description: Coarse technology family, e.g. DSL, FIBER, COAX, RADIO
        technologySubType:
          type: string
          description: Fine-grained technology, e.g. VDSL, SVDSL, GPON, XGSPON, FTTH
        down:
          $ref: '#/components/schemas/Bandwidth'
        up:
          $ref: '#/components/schemas/Bandwidth'
        network:
          $ref: '#/components/schemas/Network'
        buildstatus:
          $ref: '#/components/schemas/Buildstatus'
        providerDetails:
          type: object
          additionalProperties: true
          description: >-
            Provider-specific fields that are not unified across providers; only
            present when the provider delivers them. For Telekom (POP):
            `isClarifiedWithLandlord`, `homeIdInput`, `availabilityDate`
            (capabilities only, same format as `date`), `isWholebuy`,
            `isTelekomCoupled`, and for fiber additionally `fiberProfiles`,
            `marketingPhase`, `expansionApprovalStatus`, `isGiga`. Telekom can
            report several lines of one technology from different operators
            (e.g. DTAG and an EWE wholebuy line); each is its own entry, the
            operator's own line first. For Vodafone (USP): `expansionStatus`,
            `availabilityIndicator`, `productSalesPhase`.
      required:
        - type
        - technology
        - down
    Bandwidth:
      type: object
      description: >-
        Bandwidths in kbit/s, as whole numbers (e.g. 16 Mbit/s is `16000`). A
        value the provider does not deliver is left out, never estimated. `max`
        is the highest bandwidth of the tariffs sold on this line; where the
        provider names no tariff for the line (Telekom), it is the line value.
        `line` is what the line at the address can carry, independent of the
        tariffs (Telekom only). `min` and `typical` are the minimum and normally
        available bandwidth of the fastest tariff (Vodafone only).
      properties:
        min:
          type: integer
          description: Minimum bandwidth of the fastest tariff, in kbit/s
          example: 9500
        max:
          type: integer
          description: Highest tariff bandwidth on this line, in kbit/s
          example: 50000
        typical:
          type: integer
          description: Normally available bandwidth of the fastest tariff, in kbit/s
          example: 14200
        line:
          type: integer
          description: Bandwidth the line at the address can carry, in kbit/s
          example: 27968
    Network:
      type: object
      description: >-
        Network operator. `code` is the canonical value, `raw` keeps the
        untouched provider value so no information is lost. An operator that has
        no canonical value yet is reported as `UNKNOWN`, `raw` still names it.
      properties:
        code:
          type: string
          enum:
            - TELEKOM
            - VODAFONE
            - TELEFONICA
            - KDG
            - UM
            - DEUTSCHE_GLASFASER
            - OXG
            - VITROCONNECT
            - TELECOLUMBUS
            - EUROFIBER
            - EWE
            - GLASFASER_NORDWEST
            - GLASFASERPLUS
            - UNKNOWN
        raw:
          type: string
          nullable: true
      required:
        - code
    Buildstatus:
      type: object
      description: >-
        Normalized build/rollout status. `code` is the canonical value, `raw`
        keeps the untouched provider value.
      properties:
        code:
          type: string
          enum:
            - notPlanned
            - areaPlanned
            - planned
            - preMarketing
            - underConstruction
            - homesPassed
            - homesPassedPlus
            - prepared
            - ready
            - connected
            - unknown
        raw:
          type: string
          nullable: true
      required:
        - code
    Address:
      type: object
      properties:
        street:
          type: string
        houseNumber:
          type: string
        houseNumberAddition:
          type: string
          nullable: true
        postalCode:
          type: string
        city:
          type: string
        district:
          type: string
        country:
          type: string
    LineAddress:
      type: object
      description: >-
        Address of the line. Like Address, but street, house number, postal code
        and city are required.
      required:
        - street
        - houseNumber
        - postalCode
        - city
      properties:
        street:
          type: string
        houseNumber:
          type: string
        houseNumberAddition:
          type: string
          nullable: true
        postalCode:
          type: string
        city:
          type: string
        district:
          type: string
        country:
          type: string
    Product:
      type: object
      properties:
        id:
          type: integer
          example: 44165
        name:
          type: string
        technologies:
          type: array
          description: >-
            Which technologies this tariff runs on, as
            `<technology>:<technologySubType>` (the sub type is omitted where
            the provider has none). Always a list, because a bonded tariff runs
            on several at once — a Hybrid tariff combines a DSL line with a
            mobile one.

            Each entry matches the `technology` + `technologySubType` of an
            entry in `checkResult.capabilities` or `checkResult.expansion`; look
            it up there for bandwidths, network and buildstatus, which are not
            repeated here. An address can have several lines of one technology
            from different operators (e.g. a DTAG and an EWE wholebuy VDSL
            line), each its own entry there.

            Announced extension: a third segment names the line's operator,
            `<technology>:<technologySubType>:<network>` with `network.code`
            (`network.raw` if there is no code), all segments always present and
            empty where unknown (e.g. `FIBER::TELEKOM`). Where the provider does
            not tell which of several lines a tariff is sold on, all of them are
            listed. Enabled per environment; not yet active in production.

            An entry found under `expansion` rather than `capabilities` means
            the tariff is sold on a planned rollout (pre-marketing), not on a
            line usable today.

            Omitted when the provider cannot resolve the tariff to a technology
            — e.g. TV-only tariffs, which do not run on a line technology at
            all.
          items:
            type: string
          example:
            - DSL:SVDSL
            - RADIO:RADIO_5G
        priceInfo:
          allOf:
            - $ref: '#/components/schemas/PriceInfo'
          description: >-
            Omitted when the tariff has no derivable price ("price on demand")
            or when the request switched prices off (`prices=0`).
        options:
          type: array
          description: >-
            Options that hang on this tariff, e.g. the Telekom "Zuhause Sofort"
            transition product available while the fibre is not yet connected
            (#2455). Generic container: the association source is
            provider-specific (the POP `transitionalProduct` per tariff for the
            transition case), the output shape is not. Each option is our own
            content group (resolved from the provider's external/material
            number), never the raw external number. Empty when the tariff has no
            options.
          items:
            $ref: '#/components/schemas/Option'
    Option:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          description: Id of our content group for this option.
          example: 39444
        name:
          type: string
        priceInfo:
          allOf:
            - $ref: '#/components/schemas/PriceInfo'
          description: >-
            Price positions of the option itself, derived the same way as for a
            tariff. Omitted when the option has no derivable price or when the
            request switched prices off (`prices=0`).
    PriceInfo:
      type: object
      description: Price information, derived from the normalized ConditionSet.
      required:
        - prices
      properties:
        prices:
          type: array
          items:
            $ref: '#/components/schemas/Price'
    Price:
      type: object
      description: >-
        A single price position, derived from the normalized ConditionSet.
        Amounts in the smallest currency unit (cents).
      required:
        - type
        - gross
      properties:
        type:
          type: string
          description: Kind of price position.
          enum:
            - oneTimeFee
            - monthlyFee
            - oneTimeCredit
            - monthlyCredit
        name:
          type: string
          nullable: true
          description: >-
            Optional display name of the position (e.g. a promotion name), where
            set.
        gross:
          type: integer
          description: Gross amount in cents.
          example: 2999
        validFromMonth:
          type: integer
          nullable: true
          description: >-
            Monthly types only: the first contract month (1-based) this price
            applies from. null = from the start of the contract. Used for
            staggered prices; the end follows from the validFromMonth of the
            next monthly position.
          example: 1
    ErrorInfo:
      type: object
      description: >-
        Machine-readable error information. The `type` slug is stable and
        intended for automated evaluation, independent of the HTTP status code.
      properties:
        title:
          type: string
          description: Short human-readable summary of the error
        type:
          type: string
          description: Machine-readable error type slug
          enum:
            - unknown-error
            - accepted
            - bad-request
            - unauthorized
            - forbidden
            - not-found
            - conflict
            - unprocessable-entity
            - internal-server-error
            - not-implemented
            - bad-gateway
            - service-unavailable
            - gateway-timeout
            - network-authentication-required
            - provider-unavailable
            - provider-timeout
            - provider-bad-response
            - address-not-found
            - ambiguous-address
            - non-bookable-address
            - invalid-address
            - order-already-submitted
            - too-many-requests
            - partner-not-configured
            - product-not-available
            - provider-status-unsupported
        details:
          type: string
          nullable: true
          description: >-
            For developers. Describes the error of the given `type`, e.g. the
            product that is not available or the number of invalid fields. For
            `unknown-error` the internal cause is not exposed; `details` then
            only refers to `meta.request_id`, which TK-World support can use to
            look up the cause.
        messages:
          type: array
          items:
            type: string
          description: >-
            List of single messages the calling system may take into account,
            e.g. one entry per invalid field with its path and the problem.
            Always present, but often empty; it does not repeat `details`.
      required:
        - title
        - type
    AddressErrorInfo:
      allOf:
        - $ref: '#/components/schemas/ErrorInfo'
        - type: object
          properties:
            originalAddress:
              $ref: '#/components/schemas/Address'
            alternatives:
              $ref: '#/components/schemas/Alternatives'
    Error:
      type: object
      properties:
        data:
          type: object
          nullable: true
          description: Always `null` in error responses
        meta:
          $ref: '#/components/schemas/Meta'
        errors:
          $ref: '#/components/schemas/ErrorInfo'
      required:
        - meta
        - errors
    UnprocessableEntity:
      type: object
      properties:
        data:
          type: object
          nullable: true
        meta:
          $ref: '#/components/schemas/Meta'
        errors:
          $ref: '#/components/schemas/AddressErrorInfo'
      required:
        - meta
        - errors
    Alternatives:
      type: object
      properties:
        street:
          type: array
          items:
            type: string
        houseNumber:
          type: array
          items:
            type: string
        houseNumberAddition:
          type: array
          items:
            type: string
        building:
          type: array
          items:
            type: string
        postalCode:
          type: array
          items:
            type: string
        city:
          type: array
          items:
            type: string
