First implementation is developed as customer plugin in Go-Drink.
Create Swagger endpoint provider DeliveryV10. Additionally create controller endpoint (BasePathV10 + Delivery).
...
Environment Diagram
Drawio | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Authentification
The authentification is similar to the Shop API (/wiki/spaces/TD/pages/15597635). The only difference is the user, for the delivery API there is a Delivery User.
Endpoints
DeliveryPath = api/v1.0/Core/VinX/Delivery/
Driver
GET on {DeliveryPath}/Driver
Global Filters
Filter | Query | Notes |
---|---|---|
Only drivers which were already assigned to a delivery |
...
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Vehicle
GET on {DeliveryPath}/Vehicle
...
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Tour
GET on {DeliveryPath}/Tour
Enum DeliveryDays
Name | Value |
---|---|
NoDelivery | 0 |
Morning | 10 |
Afternoon | 20 |
WholeDay | 30 |
...
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Package
GET on {DeliveryPath}/Package
Global Filters
Filter | Query | Notes |
---|---|---|
ArticleType | Artikeltyp = 1 | |
Return | Retourenanzeige = true |
...
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Deliveries Read
GET on {DeliveryPath}
Global Filters
Filter | Query | Notes | not closed | Status ||
---|---|---|---|---|---|
dateFrom |
| ||||
dateTo |
| in the future | StartZeit >= Today | ||
includeDelivered (optional, default false) | if false |
Enum State
Name | Value |
---|---|
Open | 10 |
Fixed | 20 |
Printed | 30 |
InDelivery | 50 |
Delivered | 60 |
Archived | 100 |
Field name | Data type | Field VinX | Notes |
---|---|---|---|
Id | number | Auslieferung_ID | |
TourId | number | Auslieferung_TourID | |
VehicleId | number | Auslieferung_FahrzeugID | |
DriverId | number | Auslieferung_ChauffeurID | |
State | enum State | Auslieferung_Status | |
Date | Date | Auslieferung_Datum | |
Timing | enum DeliveryDays | Auslieferung_Zeitpunkt | Morning, afternoon, whole day |
Stations | array | ||
.. Position | number | Station_Position | delivery sequence |
.. Address | object | ||
../.. Id | number | Adr_ID | |
../.. Number | number | Adr_Adressnummer | |
../.. Name | string | Adr_Name | |
../.. Street | string | Adr_Strasse | |
../.. City | string | Adr_Ort | |
../.. Zip | number | Adr_PLZ | |
string | Adr_EMail | ||
../.. NotifyByTelephone | boolean | Adr_AvisierungsKanal + Adr_LieferAvisierung | is calculated: notify is set and type is telephone |
.. Receipt | object | ||
../.. Id | number | Bel_ID | |
../.. number | number | Bel_BelegNr | |
../.. Remarks | string | Bel_Hinweis | |
../.. Type | string | Bel_Belegtyp | description from document type |
../.. Weight | number | calculated | aggregated from Artikelposition.Artikel.Gewichtsanteil |
../.. ValueValueOfGoods | number | Bel_ArtikelTotal | |
../.. TotalWithDiscount | number | Bel_GesamtMitSkonto | |
../.. Contact | object | ||
../../.. FirstName | string | KP_Vorname | |
../../.. LastName | string | KP_Name | |
../../.. Telephone | string | KP_Tel | |
../../.. Mobile | string | KP_Natel | |
string | KP_EMail | ||
../.. Positions | array | ||
../../.. Id | number | BelPos_Id | |
../../.. PositionOnReceipt | number | BelPos_Position | sequence of positions |
../../.. ArticleId | number | BelPos_ArtikelID | |
../../.. ArticleNumber | number | Art_Artikelnummer | |
../../.. Description | string | Art_Bezeichnung | |
../../.. Quantity | number | BelPos_MengeGG | |
../../.. QuantityPackage | number | Gross_EinhProGG | |
../../.. Filling | string | Abf_Suchbegriff | |
../../.. Package | string | Gross_Suchbegriff | |
../.. Packages | array | ||
../../.. Id | number | GebPos_ArtikelID | |
../../.. Number | number | Art_Artikelnummer | |
../../.. QuantityDelivered | number | GebPos_Geliefert | |
../../.. QuantityReturned | number | GebPos_Retour |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Deliveries Write
Post on {DeliveryPath}
Field name | Data type | Field VinX | Notes |
---|---|---|---|
Id | number | Auslieferung_ID | If Id is null a new delivery gets created. |
TourId | number | Auslieferung_TourID | |
VehicleId | number | Auslieferung_FahrzeugID | |
DriverId | number | Auslieferung_ChauffeurID | |
State | enum State | Auslieferung_Status | If Status changes to delivered, the receipt get the Delivery state “Delivered” |
Date | Date | Auslieferung_Datum |
|
Timing | enum DeliveryDays | Auslieferung_Zeitpunkt | Morning, afternoon, whole day |
Stations | array | If stations array is empty the delivery gets deleted. | |
.. Position | number | Station_Position | delivery sequence |
.. Receipt | object | ||
../.. Id | number | Bel_ID | |
../.. Packages | array | incremental Is used for return of packages. If Any Packages changes, the receipt get the Delivery state “Delivered - Returns” If Receipt is posted then it will return an error | |
../../.. Id | number | GebPos_ArtikelID | |
../../.. QuantityReturned | number | GebPos_Retour | if already exists value gets replaced |
...
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Media
Post on {DeliveryPath}/receipt/{id}/media
...