Files
thetool/public/docs/preorder-api.yaml
2023-04-27 14:20:14 +02:00

1450 lines
48 KiB
YAML

openapi: 3.0.1
info:
title: thetool Preorder API
description: API Dokumentation für thetool Akquise-Plattform
license:
name: Apache 2.0 License
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: https://thetool-test.xinon.at/api/v1
- url: https://thetool.xinon.at/api/v1
tags:
- name: addressdb
description: Abfrage von GWR-Daten
- name: preorder
description: Abfragen und Operationen zu Vorbestellungen
paths:
/addressdb/getClusters:
get:
tags:
- addressdb
summary: Gibt alle Cluster aus
description: Retourniert Liste aller Cluster mit ID und Name
operationId: getClusters
responses:
'200':
description: Successful operation
content:
"application/json":
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
clusters:
type: array
items:
type: object
properties:
id:
type: string
description: ID des Clusters
example: "JP-TYO-01-4"
name:
type: string
description: Name des Clusters
example: "Tokyo - Akihabara Süd"
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
/addressdb/searchAddress:
get:
tags:
- addressdb
summary: Freitextsuche nach Adressen mit Ausbaustatus
description: Sucht Adressen die den Suchbegriff beinhalten. Retourniert Adressen mit Ausbaustatus und Wohneinheiten
operationId: searchAddresses
parameters:
- name: format
description: "Ausgabeformat: `flat` (Ein Array-Element pro Wohneinheit mit Gebäudedaten; **default**) oder `tree` (Ein Array-Element pro Gebäude mit Wohneinheiten-Array)"
in: query
schema:
type: string
example: flat
- name: search
description: Suchbegriff
in: query
schema:
type: string
required: true
responses:
'200':
description: |
Successful operation
Der Rückgabewert `preorderType` gibt an, welche Vorbestelltypen an dieser Adresse erlaubt sind:
| preorderType | description |
|--------------|-------------|
| interest | Interessensbekundung |
| provision | Vorsorgeanschluss |
| order | Vollanschluss |
| reorder | Nachbestellung (nach Bauabschluss) |
Ein leeres Array bedeutet, dass derzeit kein Ausbau stattfindet/geplant ist.
---
Ist bekannt, dass die Adresse zukünftig ausgebaut wird, steht im Feld `rollout_year` das geplante Ausbaujahr. `rollout_info` kann weitere informationen beinhalten.
content:
"application/json (format: tree)":
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
addresses:
$ref: '#/components/schemas/AddressesTree'
"application/json (format: flat)":
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
addresses:
$ref: '#/components/schemas/Addresses'
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
/addressdb/findAddress:
get:
tags:
- addressdb
summary: Strukturierte Suche nach Adressen mit Ausbaustatus
description: Sucht nach Adressen. Retourniert Adressen mit Ausbaustatus und Wohneinheiten
operationId: findAddresses
parameters:
- name: format
description: "Ausgabeformat: `flat` (Ein Array-Element pro Wohneinheit mit Gebäudedaten; **default**) oder `tree` (Ein Array-Element pro Gebäude mit Wohneinheiten-Array)"
in: query
schema:
type: string
- name: cluster_id
description: Cluster ID
in: query
schema:
type: string
- name: street
description: Straße Suchbegriff
in: query
schema:
type: string
required: true
- name: zip
description: Postleitzahl Suchbegriff
in: query
schema:
type: string
- name: city
description: Stadt Suchbegriff
in: query
schema:
type: string
- name: district
description: Ortsteil Suchbegriff
in: query
schema:
type: string
- name: housenumber
description: Hausnummer Suchbegriff
in: query
schema:
type: string
responses:
'200':
description: |
Successful operation
Der Rückgabewert `preorderType` gibt an, welche Vorbestelltypen an dieser Adresse erlaubt sind:
| preorderType | description |
|--------------|-------------|
| interest | Interessensbekundung |
| provision | Vorsorgeanschluss |
| order | Vollanschluss |
| reorder | Nachbestellung (nach Bauabschluss) |
Ein leeres Array bedeutet, dass derzeit kein Ausbau stattfindet/geplant ist.
---
Ist bekannt, dass die Adresse zukünftig ausgebaut wird, steht im Feld `rollout_year` das geplante Ausbaujahr. `rollout_info` kann weitere informationen beinhalten.
content:
"application/json (format: tree)":
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
addresses:
$ref: '#/components/schemas/AddressesTree'
"application/json (format: flat)":
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
addresses:
$ref: '#/components/schemas/Addresses'
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
/addressdb/findStreet:
get:
tags:
- addressdb
summary: Straßen suchen
description: Sucht nach Straßen
operationId: findStreets
parameters:
- name: cluster_id
description: Cluster ID
in: query
schema:
type: string
- name: street
description: Straße Suchbegriff
in: query
schema:
type: string
- name: zip
description: Postleitzahl Suchbegriff
in: query
schema:
type: string
- name: city
description: Stadt Suchbegriff
in: query
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
streets:
$ref: '#/components/schemas/Streets'
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
/addressdb/findZip:
get:
tags:
- addressdb
summary: Postleitzahlen suchen
description: Sucht nach Postleitzahlen
operationId: findZips
parameters:
- name: cluster_id
description: Cluster ID
in: query
schema:
type: string
- name: zip
description: Postleitzahl Suchbegriff
in: query
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
zips:
$ref: '#/components/schemas/Zips'
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
/addressdb/findCity:
get:
tags:
- addressdb
summary: Gemeinden suchen
description: Sucht nach Gemeinden
operationId: findCity
parameters:
- name: cluster_id
description: Cluster ID
in: query
schema:
type: string
- name: zip
description: Postleitzahl Suchbegriff
in: query
schema:
type: string
- name: city
description: Stadt Suchbegriff
in: query
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
cities:
$ref: '#/components/schemas/Cities'
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
/addressdb/findDistrict:
get:
tags:
- addressdb
summary: Ortsteile suchen
description: Sucht nach Ortsteilen
operationId: findDistrict
parameters:
- name: cluster_id
description: Cluster ID
in: query
schema:
type: string
- name: zip
description: Postleitzahl Suchbegriff
in: query
schema:
type: string
- name: city
description: Gemeinde Suchbegriff
in: query
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
cities:
$ref: '#/components/schemas/CityDistricts'
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
/preorder:
post:
tags:
- preorder
summary: (Vor-)bestellung registrieren
description: |
Registriert eine (Vor-)bestellung. Bestellungsart wird mit `preorderType` definiert.
Handelt es sich um einen zusätzlichen Anschluss in der Wohneinheit muss der Paramerter `isAdditionalOrder` auf `true` gestellt werden, da sonst ein Fehler zurückgegeben wird.
---
Parameter `address`: Anschlussadresse.
Soll Starterkit an Anschlussadresse gesendet werden, muss `address.is_shipping` auf true gestellt werden, bei false wird das Starterkit an Vertragsinhaber (`customer`) gesendet.
Wohneinheitsidentifikation (Block, Stiege, Stock, Tür) kann strukturiert mit jeweils einem eigenen Feld übergeben werden oder alle Wohneinheitsdaten in einem einzigen String (`unit_string`).
---
Parameter `address_info`: **(Optional)** Zusätzliche Informationen zur Anschlusssdresse
Parameter `customer`: Vertragsinhaber
---
Parameter `preorderType` bestimmt Vorbestelltyp:
| preorderType | Description |
|--------------|-------------|
| interest | Interessensbekundung|
| provision | Vorsorgeanschluss|
| order | Vollanschluss|
| reorder | Nachbestellung (nach Bauabschluss) |
---
Parameter `connectionCount`: Anzahl Anschlüsse für Rabatt bei mehreren Anschlüssen in Mehrfamilienhaus
---
Parameter `connectionType` bestimmt den Anschlusstyp:
|connectionType | description |
|---------------|-------------|
| single-dwelling | Einfamilienhaus
| multi-dwelling | Mehrfamilienhaus (bis 3 Wohneinheiten)
| apartment-building | Mehrparteienhaus (ab 4 Wohneinheiten)
| apartment | Wohneinheit in Mehrparteienhaus
| business | Gewerbebetrieb |
---
Parameter `addonServices`: **(Optional)** Array für zusätzlich gebuchte Services. Services müssen nicht vordefiniert sein, es können benutzerdefinierte Services übergeben werden.
Das Array `data` ist optional und kann frei befüllt werden, um weitere Details zum Service zu speichern (z.B. extra Einwilligung zur Datenweitergabe an Dienstleister)
Folgende Services sind vordefiniert:
| Service | description |
|---------|-------------|
| installation_onproperty | Lehrrohrverlegung am Grundstück |
| installation_inhouse | Glasfaserverlegung im Haus |
| ... | ...|
---
Parameter `extref`: Providereigener Identifikationsstring. Wird unverändert gespeichert und kann statt `code` in `GET /preorder` und `DELETE /preorder` angegeben werden. **Darf nicht mit Dateiendung wie z.B. `.json`, `.csv` enden, da diese als Ausgabeformat interpretiert werden können**
---
Parameter `additionalData`: **(Optional)** Object für zusätzliche individuelle Daten, die in der Vorbestellung gespeichert werden. Wird in `GET /preorder` retourniert.
operationId: submitPreorder
requestBody:
description: PreorderRequest object
required: true
content:
'application/json':
schema:
$ref: '#/components/schemas/preorderRequest'
'application/x-www-form-urlencoded':
schema:
$ref: '#/components/schemas/preorderRequest'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
code:
type: string
description: Code für Statusabfrage
example: A1B2C3D4
oaid:
type: string
description: OAID
example: AT-9999-abcdef01
extref:
type: string
description: Providereigener Identifikationsstring. Wird unverändert gespeichert und kann statt `code` in `GET /preorder` und `DELETE /preorder` angegeben werden. **Darf nicht mit Dateiendung wie z.B. `.json`, `.csv` enden, da diese als Ausgabeformat interpretiert werden können**
additionalData:
type: object
description: Benutzerdefiniertes Objekt. Wird unverändert gespeichert und in `GET /preorder` wieder ausgegeben
example:
myData: Hallo
moreData: Welt
lotsMoreData:
- key: name
value: test
- key: another Key
value: more value
created:
type: string
format: date-time
description: Zeitpunkt der Anlage der Bestellung in ISO 8601 Format
example: "2023-02-01T00:00:00+01:00"
created_ts:
type: int
description: Zeitpunkt der Anlage der Bestellung in Sekunden seit der Unix Epoche
example: 1675206000
updated:
type: string
format: date-time
description: Zeitpunkt der letzen Bearbeitung der Bestellung in ISO 8601 Format
example: "2023-02-01T00:00:00+01:00"
updated_ts:
type: int
description: Zeitpunkt der letzten Bearbeitung der Bestellung in Sekunden seit der Unix Epoche
example: 1675206000
'400':
description: |
Bad Request
Parameter missing or malformed
'401':
description: Unauthorized
'403':
description: Vorbestellung für diese Wohneinheit bereits vorhanden
'404':
description: Adresse oder Wohneinheit nicht gefunden
/preorder/open:
get:
tags:
- preorder
summary:
Liste offener Vorbestellungen
description: Gibt Liste aller offener Vorbestellungen aus, Optional gefiltert nach Zeitpunkt der letzten Bearbeitung
parameters:
- name: ts
in: query
description: |
Optional: Timestamp. Wenn gesetzt, werden Nur Bestellungen zurückgeliefert, welche ab diesem Zeitpunkt geändert wurden.
Format: String in ISO 8601 Format oder Integer in Sekunden seit der Unix Epoche
required: false
schema:
oneOf:
- $ref: "#/components/schemas/timestampString"
- $ref: "#/components/schemas/timestampInt"
responses:
'200':
description: |
Successful operation
Mögliche Werte für Rückgabewert `status`:
| code | text | description |
|------|------|-------------|
| 10 | new | Neu |
| 110 | Underground construction planning | Tiefbau in Planung |
| 120 | Underground construction planning finished | Tiefbau Planung abgeschlossen |
| 130 | Underground construction work assigned | Bauauftrag zugeteilt |
| 140 | Conduit at property border | Rohr an Grundstücksgrenze |
| 200 | Conduit in building | Rohr im Gebäude |
| 210 | Fiber planning | Leitungsplan in Arbeit |
| 220 | Fiber planning finished | Leitungsplan abgeschlossen |
| 230 | Fiber installation work assigned | Bauauftrag zugeteilt |
| 235 | Fiber on property line | Faser an Grundstücksgrenze |
| 240 | Fiber in building | Faser im Gebäude |
| 245 | OTO intalled | Anschlussbox installiert |
| 250 | ONT ready | ONT vorbereitet |
| 260 | ONT picked up or shipped | ONT abgeholt oder versandt |
| 300 | ONT installed | ONT in Betrieb |
| 500 | Finished | Fertiggestellt |
| 899 | Cancelled | Storniert/Gekündigt |
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
preorders:
type: array
items:
$ref: '#/components/schemas/preorderStatusDetail'
'401':
description: Unauthorized
/preorder/{code}:
get:
tags:
- preorder
summary: Details und Status zur Vorbestellung
description: Gibt Details zum Status der Vorbestellung/Bestellung zurück
operationId: getPreorderStatus
parameters:
- name: code
in: path
description: Automatisch generierter **code** der Vorbestellung, **OAID** der Wohneinheit oder providereigene ID (**extref**)
required: true
schema:
type: string
responses:
'200':
description: |
Successful operation
Mögliche Werte für Rückgabewert `status`:
| code | text | description |
|------|------|-------------|
| 10 | new | Neu |
| 110 | Underground construction planning | Tiefbau in Planung |
| 120 | Underground construction planning finished | Tiefbau Planung abgeschlossen |
| 130 | Underground construction work assigned | Bauauftrag zugeteilt |
| 140 | Conduit at property border | Rohr an Grundstücksgrenze |
| 200 | Conduit in building | Rohr im Gebäude |
| 210 | Fiber planning | Leitungsplan in Arbeit |
| 220 | Fiber planning finished | Leitungsplan abgeschlossen |
| 230 | Fiber installation work assigned | Bauauftrag zugeteilt |
| 235 | Fiber on property line | Faser an Grundstücksgrenze |
| 240 | Fiber in building | Faser im Gebäude |
| 245 | OTO intalled | Anschlussbox installiert |
| 250 | ONT ready | ONT vorbereitet |
| 260 | ONT picked up or shipped | ONT abgeholt oder versandt |
| 300 | ONT installed | ONT in Betrieb |
| 500 | Finished | Fertiggestellt |
| 899 | Cancelled | Storniert/Gekündigt |
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
$ref: '#/components/schemas/preorderStatusDetail'
'401':
description: Unauthorized
'404':
description: Vorbestellung nicht gefunden
delete:
tags:
- preorder
summary: Bestellung stornieren/kündigen
description: Erstellt einen Storno Request
operationId: cancelPreorder
parameters:
- name: code
in: path
description: Automatisch generierter **code** der Vorbestellung, **OAID** der Wohneinheit oder providereigene ID (**extref**)
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: Status string
example: OK
result:
type: object
properties:
message:
type: string
description: Statustext
example: Cancellation request submited
'401':
description: Unauthorized
'403':
description: Keine Berechtigung oder Storno Request bereits vorhanden
'404':
description: Bestellung nicht gefunden oder bereits storniert
components:
schemas:
timestampString:
type: string
format: date-time
description: ISO 8601 Timestamp
timestampInt:
type: int
description: Timestamp in seconds of the Unix Epoch
Zips:
type: array
items:
type: string
Cities:
type: array
items:
type: string
CityDistricts:
type: object
additionalProperties:
type: array
items:
type: string
example:
Premstätten:
- Hautzendorf
- Laa
- Oberpremstätten
- Unterpremstätten
Streets:
type: array
items:
type: string
AddressesTree:
type: array
items:
$ref: '#/components/schemas/AddressTree'
Addresses:
type: array
items:
$ref: '#/components/schemas/Address'
AddressTree:
type: object
properties:
oaid:
type: string
description: OAID des Gebäudes
example: AT-9999-abcdef01
street:
type: string
description: Strasse
example: Beispielstraße
housenumber:
type: string
description: Hausnummer
example: 13
zip:
type: string
description: PLZ
example: 9999
city:
type: string
description: Ortschaft
example: Ortschaft
municipality:
type: string
description: Gemeinde
example: Gemeinde
district:
type: string
description: Ortsteil
example: Ortsteil
lot_number:
type: string
description: Grundstücksnummer
example: 123/7
building_unit_count:
type: int64
description: Anzahl Wohneinheiten im Gebäude
example: 6
gps_lat:
typee: float
description: Breitengrad der GPS-Koordinate (Dezimal)
example: 48.517560
gps_long:
typee: float
description: Längengrad der GPS-Koordinate (Dezimal)
example: 13.950665
rollout_year:
type: integer
description: Jahr des geplanten Ausbaus
example: 2024
rollout_info:
type: string
description: Infotext begzl. Bauplanung
example: null
preorderTypes:
type: array
example: ["interest", "provision", "order", "reorder"]
description: |
Erlaubte Vorbestelltypen:
| preorderType | description |
|--------------|-------------|
| interest | Interessensbekundung |
| provision | Vorsorgeanschluss |
| order | Vollanschluss |
| reorder | Nachbestellung (nach Bauabschluss) |
items:
type: string
units:
type: array
items:
type: object
properties:
oaid:
type: string
description: OAID der Wohneinheit
example: AT-9999-abcdef01.001
num:
type: int64
description: Fortlaufende Nummer der Wohneinheit
example: 2
block:
type: string
description: Block
example: ""
stock:
type: string
description: Stock
example: 42
stiege:
type: string
description: Stiege
example: ""
tuer:
type: string
description: Tür
example: 1337
zusatz:
type: string
description: Addresszusatz
example: im Carport
required:
- street
Address:
type: object
properties:
oaid:
type: string
description: OAID der Wohneinheit
example: AT-9999-abcdef01.001
building_oaid:
type: string
description: OAID des Gebäudes
example: AT-9999-abcdef01
street:
type: string
description: Strasse
example: Beispielstraße
housenumber:
type: string
description: Hausnummer
example: 13
zip:
type: string
description: PLZ
example: 9999
city:
type: string
description: Ortschaft
example: Ortschaft
municipality:
type: string
description: Gemeinde
example: Gemeinde
district:
type: string
description: Ortsteil
example: Ortsteil
lot_number:
type: string
description: Grundstücksnummer
example: 123/7
building_unit_count:
type: int64
description: Anzahl Wohneinheiten im Gebäude
example: 6
num:
type: int64
description: Fortlaufende Nummer der Wohneinheit
example: 2
block:
type: string
description: Block
example: ""
stock:
type: string
description: Stock
example: 42
stiege:
type: string
description: Stiege
example: ""
tuer:
type: string
description: Tür
example: 1337
zusatz:
type: string
description: Addresszusatz
example: im Carport
gps_lat:
typee: float
description: Breitengrad der GPS-Koordinate (Dezimal)
example: 48.517560
gps_long:
typee: float
description: Längengrad der GPS-Koordinate (Dezimal)
example: 13.950665
rollout_year:
type: integer
description: Jahr des geplanten Ausbaus
example: 2024
rollout_info:
type: string
description: Infotext begzl. Bauplanung
example: Bauplan 2024
preorderTypes:
type: array
example: ["interest", "provision", "order", "reorder"]
description: |
Erlaubte Vorbestelltypen:
| preorderType | description |
|--------------|-------------|
| interest | Interessensbekundung |
| provision | Vorsorgeanschluss |
| order | Vollanschluss |
| reorder | Nachbestellung (nach Bauabschluss) |
items:
type: string
required:
- street
addressResponse:
type: object
properties:
cluster_id:
type: string
description: Cluster ID
street:
type: string
description: Strasse der Anschlussadresse
housenumber:
type: string
description: Hausnummer der Anschlussadresse
zip:
type: string
description: PLZ der Anschlussadresse
city:
type: string
description: Ort der Anschlussadresse
municipality:
type: string
description: Gemeinde der Anschlussadresse
block:
type: string
description: Block der Anschlussadresse
stock:
type: string
description: Stock der Anschlussadresse
stiege:
type: string
description: Stiege der Anschlussadresse
tuer:
type: string
description: Tür der Anschlussadresse
customerResponse:
type: object
properties:
company:
type: string
description: Firmenname Kunde
uid:
type: string
description: UID (wenn Firmenkunde)
firstname:
type: string
description: Vorname Kunde
lastname:
type: string
description: Nachname Kunde
street:
type: string
description: Straße Kunde
housenumber:
type: string
description: Hausnummer Kunde
zip:
type: string
description: PLZ Kunde
city:
type: string
description: Ort Kunde
block:
type: string
description: Adresszusatz
example: null
stiege:
type: string
description: Adresszusatz
example: null
stock:
type: string
description: Adresszusatz
example: null
tuer:
type: string
description: Adresszusatz
example: null
phone:
type: string
description: Telefonnummer Kunde
email:
type: string
description: Emailadresse Kunde
preorderRequest:
type: object
properties:
extref:
type: string
description: Providereigener Identifikationsstring. Wird unverändert gespeichert und kann statt `code` in `GET /preorder` und `DELETE /preorder` angegeben werden. **Darf nicht mit Dateiendung wie z.B. `.json`, `.csv` enden, da diese als Ausgabeformat interpretiert werden können**
preorderType:
type: string
enum: [interest, provision, order]
description: |
Vorbestelltyp
| preorderType | Description |
|--------------|-------------|
| interest | Interessensbekundung |
| provision | Vorsorgeanschluss |
| order | Vollanschluss |
| reorder | Nachbestellung (nach Bauabschluss) |
connectionType:
type: string
enum: [single-dwelling, multi-dwelling, apartment-building, apartment, business]
description: |
|connectionType | description |
|---------------|-------------|
| single-dwelling | Einfamilienhaus
| multi-dwelling | Mehrfamilienhaus (bis 3 Wohneinheiten)
| apartment-building | Mehrparteienhaus (ab 4 Wohneinheiten)
| apartment | Wohneinheit in Mehrparteienhaus
| business | Gewerbebetrieb |
connectionCount:
type: integer
default: 1
description: Anzahl Anschlüsse bei mehreren Anschlüssen in Mehrfamilienhaus
nullable: true
isAdditionalOrder:
type: bolean
default: false
description: wenn es sich um eine Zweitbestellung auf einer Wohneinheit handelt, muss `isAdditonalOrder` auf `true` gestellt werden, damit die Bestellung akzeptiert wird.
nullable: true
technology:
type: string
default: gpon
description: Bei Provider eingesetzte Technologie (optional, falls für Patchpunkt im POP nötig)
example: gpon
nullable: true
patchposition:
type: string
default: null
description: Patchpunkt im POP (optional)
nullable: true
acceptMarketing:
type: boolean
description: Zustimmung Datenspeicherung/-weitergabe
acceptAgb:
type: boolean
description: Zustimmung AGB
acceptDsgvo:
type: boolean
description: Zustimmung DSGVO
acceptWithdrawal:
type: boolean
description: Informationen zu Rücktrittsrecht akzeptiert
acceptDigging:
type: boolean
description: Zustimmung zu Grabungsarbeiten auf Privatgrund/Privatstraße gegeben
address:
type: object
description: Anschlussadresse
properties:
street:
type: string
description: Strasse der Anschlussadresse
example: Beispielstraße
housenumber:
type: string
description: Hausnummer der Anschlussadresse
example: 13
zip:
type: string
description: PLZ der Anschlussadresse
example: 9999
city:
type: string
description: Ort der Anschlussadresse
example: Beispielhausen
block:
type: string
description: Block der Anschlussadresse
example: ""
stock:
type: string
description: Stock der Anschlussadresse
example: 42
stiege:
type: string
description: Stiege der Anschlussadresse
example: ""
tuer:
type: string
description: Tür der Anschlussadresse
example: 1337
unit_string:
type: string
description: Zusatzangaben zur Identifizierung der Wohneinheit in einem String. Kann statt den Einzelfeldern (Block, Stiege, Stock, Tür) angegeben werden
example: Stg. 2 Stock 3 Tür 7
is_shipping:
type: boolean
description: Soll Starterkit an Anschlussadresse gesendet werden. Bei false wird das Starterkit an Vertrasinhaber (`customer`) gesendet.
example: true
required:
- street
- housenumber
- zip
- city
address_info:
type: string
description: Zusätzliche Info zur Adresse
example: im Carport
customer:
type: object
description: Vertragsinhaber
properties:
type:
type: string
enum: ["owner","tenant"]
description: |
Ist diese Adresse Besitzer oder Bewohner der Wohneinheit. Optional, aber kann je nach Kampagne ein Pflichtfeld sein.
| type | Description |
|--------|-------------|
| owner | Ist Besitzer |
| tenant | Ist Bewohner|
company:
type: string
description: Firmenname Kunde
example:
uid:
type: string
description: UID (wenn Firmenkunde)
example:
firstname:
type: string
description: Vorname Kunde
example: Vor
lastname:
type: string
description: Nachname Kunde
example: Nachname
street:
type: string
description: Straße Kunde
example: Beispielstraße
housenumber:
type: string
description: Hausnummer Kunde
example: 42
zip:
type: string
description: PLZ Kunde
example: 9999
city:
type: string
description: Ort Kunde
example: Beispielhausen
block:
type: string
description: Adresszusatz
example: null
stiege:
type: string
description: Adresszusatz
example: null
stock:
type: string
description: Adresszusatz
example: null
tuer:
type: string
description: Adresszusatz
example: null
unit_string:
type: string
description: Zusatzangaben zur Identifizierung der Wohneinheit in einem String. Kann statt den Einzelfeldern (Block, Stiege, Stock, Tür) angegeben werden
example: Stg. 2 Stock 3 Tür 7
phone:
type: string
description: Telefonnummer Kunde
example: "01 1234 567 89"
email:
type: string
description: Emailadresse Kunde
example: this.email@does-not.exist
required:
- firstname
- lastname
- street
- zip
- city
addonServices:
type: array
description: |
Zusätzlich gebuchte Services
Services müssen nicht vordefiniert sein, es können benutzerdefinierte Services übergeben werden
items:
type: object
properties:
service:
type: string
description: Name des gebuchten Service
example: installation_inhouse
ordered:
type: boolean
description: Wurde dieses Service dazu gebucht
example: true
data:
type: array
items:
type: object
description: Zusätzlich benötigte Felder für Service
properties:
name:
type: string
description: Name für zusätzliches Feld
example: accept_data_forwarding
value:
type: string
description: Wert für zusätzliches Feld
example: true
additionalData:
type: object
description: Benutzerdefiniertes Objekt. Wird unverändert gespeichert und in `GET /preorder` wieder ausgegeben
example:
myData: Hallo
moreData: Welt
lotsMoreData:
- key: name
value: test
- key: another Key
value: more value
required:
- connectionType
- preorderType
- acceptMarketing
- acceptAgb
- acceptDsgvo
- acceptWithdrawal
- address
- customer
preorderStatusDetail:
type: object
properties:
code:
type: string
description: Eindeutiger Code der Vorbestellung
example: A1B2C3D4
oaid:
type: string
description: Open Access ID der Wohneinheit
example: AT-9999-abcdef01.001
extref:
type: string
description: Providereigener Identifikationsstring. Wird unverändert gespeichert und kann statt `code` in `GET /preorder` und `DELETE /preorder` angegeben werden. **Darf nicht mit Dateiendung wie z.B. `.json`, `.csv` enden, da diese als Ausgabeformat interpretiert werden können**
status:
type: object
properties:
code:
type: integer
description: status ID
example: 230
text:
type: string
description: Statustext
example: Fiber installation work assigned
connectionType:
type: string
enum: [single-dwelling, multi-dwelling, apartment-building, apartment, business]
description: |
|connectionType | description |
|---------------|-------------|
| single-dwelling | Einfamilienhaus
| multi-dwelling | Mehrfamilienhaus (bis 3 Wohneinheiten)
| apartment-building | Mehrparteienhaus (ab 4 Wohneinheiten)
| apartment | Wohneinheit in Mehrparteienhaus
| business | Gewerbebetrieb |
connectionCount:
type: integer
default: 1
description: Anzahl Anschlüsse für Rabatt bei mehreren Anschlüssen in Mehrfamilienhaus
nullable: true
preorderType:
type: string
enum: [interest, provision, order]
description: |
Vorbestelltyp
| preorderType | Description |
|--------------|-------------|
| interest | Interessensbekundung |
| provision | Vorsorgeanschluss |
| order | Vollanschluss |
| reorder | Nachbestellung (nach Bauabschluss) |
acceptMarketing:
type: boolean
description: Zustimmung Datenspeicherung/-weitergabe
acceptAgb:
type: boolean
description: Zustimmung AGB
acceptDsgvo:
type: boolean
description: Zustimmung DSGVO
acceptWithdrawal:
type: boolean
description: Informationen zu Rücktrittsrecht akzeptiert
acceptDigging:
type: boolean
description: Zustimmung zu Grabungsarbeiten auf Privatgrund/Privatstraße gegeben
address_info:
type: string
description: Zusätzliche Info zur Adresse
example: im Carport
address:
$ref: '#/components/schemas/addressResponse'
customer:
$ref: '#/components/schemas/customerResponse'
addonServices:
type: array
description: |
Zusätzlich gebuchte Services
Services müssen nicht vordefiniert sein, es können benutzerdefinierte Services übergeben werden
items:
type: object
properties:
service:
type: string
description: Name des gebuchten Service
example: installation_inhouse
ordered:
type: boolean
description: Wurde dieses Service dazu gebucht
example: true
data:
type: array
items:
type: object
description: Zusätzlich benötigte Felder für Service
properties:
name:
type: string
description: Name für zusätzliches Feld
example: accept_data_forwarding
value:
type: string
description: Wert für zusätzliches Feld
example: true
additionalData:
type: object
description: Benutzerdefiniertes Objekt. Wird unverändert gespeichert und in `GET /preorder` wieder ausgegeben
example:
myData: Hallo
moreData: Welt
lotsMoreData:
- key: name
value: test
- key: another Key
value: more value
created:
type: string
format: date-time
description: Zeitpunkt der Anlage der Bestellung in ISO 8601 Format
example: "2023-02-01T00:00:00+01:00"
created_ts:
type: int
description: Zeitpunkt der Anlage der Bestellung in Sekunden seit der Unix Epoche
example: 1675206000
updated:
type: string
format: date-time
description: Zeitpunkt der letzen Bearbeitung der Bestellung in ISO 8601 Format
example: "2023-02-01T00:00:00+01:00"
updated_ts:
type: int
description: Zeitpunkt der letzten Bearbeitung der Bestellung in Sekunden seit der Unix Epoche
example: 1675206000
securitySchemes:
api_key_header:
type: apiKey
name: X-Api-Key
in: header
api_key_query:
type: apiKey
name: apikey
in: query
security:
- api_key_header: []
- api_key_query: []