Skip to content

Instantly share code, notes, and snippets.

@robbi5
Last active January 4, 2020 17:12
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robbi5/f64739b2b771b092da5f600c181a4ffd to your computer and use it in GitHub Desktop.
Save robbi5/f64739b2b771b092da5f600c181a4ffd to your computer and use it in GitHub Desktop.
mobility inside api documentation

mobility inside is a new app, built by mobimeo, currently in its beta phase, that wants to solve the hassle of booking tickets for german public transport. the app - other than its competitors - is build on a relatively nice api that enables booking tickets even without using the app itself.

this is an unofficatial documentation for this api. feedback and improvements welcome.

hosts:

tenant URL
DING https://ding-mi.mobimeo.io
AVG https://avg-mi.mobimeo.io
MVG https://mvg-mi.mobimeo.io
RMV https://rmv-mi.mobimeo.io
SSB https://ssb-mi.mobimeo.io
VRN https://vrn-mi.mobimeo.io
bogestra https://bogestra-mi.mobimeo.io
DSW21 https://dsw21-mi.mobimeo.io
LVB https://lvb-mi.mobimeo.io

header:

x-api-key

is a different key per tenant. Can be aquired by looking at the apps traffic. /tenant-configuration (see below) outputs the key again.

Authorization

After authentication at /authentication/verify or /authentication/refresh_token, the Authorization header value contains Bearer <idToken>, with <idToken> from the response.

URLs

[...] in the request/response is user data.

GET /tenant-configuration

Response:

{
  "apiGatewayKey": "[...]",
  "apiGatewayUrl": "https://ding-mi.mobimeo.io",
  "customerService": {
    "modalities": [
      {
        "class": "email",
        "contact": "ding.feedback@mobilityinside.de"
      }
    ]
  },
  "features": {
    "analyticsRequireUserConsent": {
      "configuration": {},
      "enabled": true
    },
    "detection": {
      "configuration": {},
      "enabled": false
    },
    "mode": {
      "configuration": {},
      "enabled": true
    },
    "navigation": {
      "configuration": {},
      "enabled": false
    },
    "routeSubscriptions": {
      "configuration": {},
      "enabled": false
    },
    "search": {
      "configuration": {},
      "enabled": true
    },
    "studentPilot": {
      "configuration": {},
      "enabled": true
    },
    "supportsDisruptionMessages": {
      "configuration": {},
      "enabled": false
    },
    "supportsNativeTicket": {
      "configuration": {},
      "enabled": true
    },
    "ticketing": {
      "configuration": {
        "paymentMethods": [
          "Sepa"
        ]
      },
      "enabled": true
    }
  },
  "payment": {
    "cardinality": "single"
  },
  "policyDetails": {
    "impressum": {
      "url": {
        "de": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/de/legal/impressum.html",
        "en": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/en/legal/impressum.html"
      },
      "version": "v1"
    },
    "privacy-policy": {
      "url": {
        "de": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/de/legal/privacy.html",
        "en": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/en/legal/privacy.html"
      },
      "version": "v1"
    },
    "sepa-direct-debit": {
      "creditor": "LogPay Financial Services GmbH , Schwalbacher Str. 72, D-65760 Eschborn",
      "creditor-id": "DE90LPY00000046849",
      "legal-text": {
        "de": "Ich ermächtige (A) den Zahlungsempfänger Zahlungen von meinem Konto mittels Lastschrift einzuziehen. Zugleich (B) weise ich mein Kreditinstitut an, die vom Zahlungsempfänger auf mein Konto gezogenen Lastschriften einzulösen.\nHinweis: Ich kann innerhalb von acht Wochen, beginnend mit dem Belastungsdatum, die Erstattung des belasteten Betrages verlangen. Es gelten dabei die mit meinem/ unserem Kreditinstitut vereinbarten Bedingungen.\n\nHiermit erteile ich das SEPA Lastschriftmandat",
        "en": "By signing this mandate form, you authorise (A) the Creditor to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from the Creditor. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. Your rights are explained in a statement that you can obtain from your bank. I give the SEPA Direct Debit Mandate"
      }
    },
    "terms-and-conditions-policy": {
      "url": {
        "de": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/de/legal/terms.html",
        "en": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/en/legal/terms.html"
      },
      "version": "v1"
    },
    "third-party-licences-ios": {
      "url": {
        "de": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/de/legal/ios-third-party-licences.html",
        "en": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/all/html/ding-mi/en/legal/ios-third-party-licences.html"
      },
      "version": "v1"
    }
  },
  "searchFilters": {
    "publicTransport": [
      {
        "displayName": "U-Bahn",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/metro.png",
        "id": "metro",
        "name": {
          "de": "U-Bahn",
          "en": "U-Bahn"
        }
      },
      {
        "displayName": "S-Bahn",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/urban_rail.png",
        "id": "urban_rail",
        "name": {
          "de": "S-Bahn",
          "en": "S-Bahn"
        }
      },
      {
        "displayName": "Stadtbahn",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/tram.png",
        "id": "tram",
        "name": {
          "de": "Tram",
          "en": "Tram"
        }
      },
      {
        "displayName": "Bus",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/bus.png",
        "id": "bus",
        "name": {
          "de": "Bus",
          "en": "Bus"
        }
      },
      {
        "displayName": "Regio-Bahn",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/regional_rail.png",
        "id": "regional_rail",
        "name": {
          "de": "R-Bahn",
          "en": "R-Bahn"
        }
      },
      {
        "displayName": "Fernverkehr",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/long_distance_rail.png",
        "id": "long_distance_rail",
        "name": {
          "de": "Zug",
          "en": "Train"
        }
      },
      {
        "displayName": "Fähre",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/ferry.png",
        "id": "ferry",
        "name": {
          "de": "Fähre",
          "en": "Ferry"
        }
      }
    ],
    "sharedMobility": [
      {
        "class": "bicycle",
        "displayName": "nextbike",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/bicycle.png",
        "id": "nextbike"
      },
      {
        "class": "bicycle",
        "displayName": "MVG Rad",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/bicycle.png",
        "id": "mvgRad"
      },
      {
        "class": "car",
        "displayName": "car2Go",
        "iconUrl": "https://s3.eu-central-1.amazonaws.com/unterwegs-production-mobile-assets/search-filters/mi/car.png",
        "id": "car2go"
      }
    ]
  },
  "signup": {
    "extraData": [
      "name"
    ],
    "type": "phone"
  }
}

POST /authentication/challenge

Request:

{"username":"+491712523311"}

Response:

{
	"session": "[...]"
}

POST /authentication/verify

Request:

{"answer":"123456","session":"[...]","username":"+491712523311"}

Response:

{
	"isNewUser": true,
	"token": {
		"accessToken": "[...]",
		"expiresAt": "2019-10-15T10:00:00Z",
		"idToken": "[...]",
		"refreshToken": "[...]"
	}
}

POST /authentication/refresh_token

(Authorization Header required)

Request:

{"refresh_token": "[...]"}

Response:

{
  "accessToken": "[...]",
  "expiresAt": "2019-10-15T10:00:00Z",
  "idToken": "[...]",
  "refreshToken": "[...]"
}

GET /user/profile

(Authorization Header required)

Response:

{
	"billingAddress": {
		"additionalName": "[...]",
		"city": "[...]",
		"facilityType": "personal",
		"houseNumber": "[...]",
		"name": "[...]",
		"postalCode": "[...]",
		"street": "[...]"
	},
	"deepLinkExtension": "e=<email>&ev=<email>&lst=<lastName>&str=<street>&pc=<postalCode>&c=<city>&fst=<firstName>",
	"displayName": "[...]",
	"email": "[...]",
	"emailVerified": false,
	"firstName": "[...]",
	"lastName": "[...]",
	"paymentMethods": [{
		"additionalInformation": "[...]",
		"id": "<uuid>",
		"label": "DE..XXXXXXXXXXXXXXX...",
		"type": "Sepa"
	}],
	"phoneNumber": "+491712523311",
	"phoneNumberVerified": true
}

PATCH /user/profile

(Authorization Header required)

Request:

{"phoneNumber":"+491712523311","firstName":"[...]","phoneNumberVerified":true,"email":"[...]","emailVerified":false,"billingAddress":{"street":"[...]","city":"[...]","postalCode":"[...]","complement":"","houseNumber":"[...]","facilityType":"Personal","name":"[...]","additionalName":"[...]"},"lastName":"[...]"}

POST /ticket-issuer/user/payment/sepa

(Authorization Header required)

Request:

{"iban":"[...]","bic":"[...]","agreement":"Zahlungsempfänger: LogPay Financial Services GmbH , Schwalbacher Str. 72, D-65760 Eschborn \nGläubiger-Identifikationsnummer: DE90LPY00000046849 \nMandatsreferenz: Wird separat mitgeteilt nachdem Sie das Mandat erteilt haben. \nIch ermächtige (A) den Zahlungsempfänger Zahlungen von meinem Konto mittels Lastschrift einzuziehen. Zugleich (B) weise ich mein Kreditinstitut an, die vom Zahlungsempfänger auf mein Konto gezogenen Lastschriften einzulösen.\n Hinweis: Ich kann innerhalb von acht Wochen, beginnend mit dem Belastungsdatum, die Erstattung des belasteten Betrages verlangen. Es gelten dabei die mit meinem\/ unserem Kreditinstitut vereinbarten Bedingungen.\n\n Hiermit erteile ich das SEPA Lastschriftmandat \nZahlungsverpflichteter: [...] \nAnschrift: [...] \nPostleitzahl, Ort: [...] \nIBAN: [...]"}
  • agreement is concatenated text, based on /tenant-configurations .policy-details.sepa-direct-debit.creditor, .creditor-id, .legal-text.de and customer data

Response:

{
	"additionalInformation": "[...]",
	"id": "<uuid>",
	"label": "DE..XXXXXXXXXXXXXXX...",
	"type": "Sepa"
}

GET /places/check-business-area?lng=9.98936451514597&lat=48.39750108265383

Request:

{
	"inBusinessArea": true
}

GET /places/autocomplete?at=48.39741710318663,9.989252579883635&query=Lautengasse%204

Response:

{
	"items": [{
		"id": "loc-dmVyc2lvbj0xO3RpdGxlPUxhdXRlbmdhc3NlKzQ7bGFuZz1kZTtsYXQ9NDguMzk3NzAxMjYzNDI3NzM0O2xvbj05Ljk4OTI5MDIzNzQyNjc1ODtzdHJlZXQ9TGF1dGVuZ2Fzc2U7aG91c2U9NDtjaXR5PVVsbTtwb3N0YWxDb2RlPTg5MDczO2NvdW50cnk9REVVO2Rpc3RyaWN0PVVsbTtzdGF0ZT1CYWRlbi1XJUMzJUJDcnR0ZW1iZXJnO2NvdW50eT1VbG07Y2F0ZWdvcnlJZD1idWlsZGluZztzb3VyY2VTeXN0ZW09aW50ZXJuYWw7bmxhdD00OC4zOTc1OTA2MzcyMDcwMztubG9uPTkuOTg5MTkwMTAxNjIzNTM1O3Bkc0NhdGVnb3J5SWQ9OTAwLTkzMDAtMDAwMA",
		"mainText": "Lautengasse 4",
		"secondaryText": "89073 Ulm",
		"category": "address",
		"coordinates": {
			"lat": 48.397701,
			"lng": 9.98929
		}
	}, ...]
}

GET /navigation/search/trips?originLat=48.39750108265383&destinationLabel=Alte%20Siedlung&originLng=9.98936451514597&publicTransportModes=regional_rail,bus,metro,tram,long_distance_rail,ferry,urban_rail&originLabel=Lautengasse%204&sharedMobilityProviders=car2go,nextbike,mvgRad&destinationLng=9.982620000000001&departureTime=2019-10-18T07:58:04%2B02:00&destinationLat=48.35398

Response:

{
  "items": [
    {
      "departure": {
        "scheduledTime": "2019-10-18T06:09:00+00:00"
      },
      "arrival": {
        "scheduledTime": "2019-10-18T06:26:00+00:00"
      },
      "durationInSeconds": 1020,
      "price": {
        "amount": 2.10,
        "currency": "EUR"
      },
      "sections": [
        {
          "id": "ID-E4EF31AF-1098-4717-A4A5-6CE933B851AA/1",
          "legs": [
            {
              "id": "1",
              "origin": {
                "coordinates": {
                  "lat": 48.39708,
                  "lng": 9.98768
                },
                "name": "Steinerne Brücke"
              },
              "destination": {
                "coordinates": {
                  "lat": 48.39724,
                  "lng": 9.98752
                },
                "name": "Ulm Steinerne Brücke"
              },
              "departure": {
                "scheduledTime": "2019-10-18T06:09:00+00:00"
              },
              "arrival": {
                "scheduledTime": "2019-10-18T06:10:00+00:00"
              },
              "durationInSeconds": 60,
              "color": "#c7cfda",
              "iconUrl": "https://unterwegs-production-mobile-assets.s3.amazonaws.com/navigation/modalities/global/walk.png",
              "polyline": "wpkfH}u}{@Ep@YS",
              "distanceInMeters": 35,
              "type": "walking"
            },
            {
              "id": "2",
              "origin": {
                "coordinates": {
                  "lat": 48.39724,
                  "lng": 9.98741
                },
                "name": "Ulm Steinerne Brücke",
                "stationId": "de:08421:1001",
                "entrances": []
              },
              "destination": {
                "coordinates": {
                  "lat": 48.38501,
                  "lng": 9.98706
                },
                "name": "Neu-Ulm Donaubad",
                "stationId": "de:09775:1702",
                "entrances": []
              },
              "departure": {
                "scheduledTime": "2019-10-18T06:10:00+00:00"
              },
              "arrival": {
                "scheduledTime": "2019-10-18T06:16:00+00:00"
              },
              "durationInSeconds": 360,
              "headSign": "Wiblingen",
              "line": {
                "name": "4",
                "color": "#993399",
                "textColor": "#ffffff",
                "vehicle": {
                  "type": "bus"
                }
              },
              "alternativeLines": [],
              "polyline": "wqkfHit}{@?tDj@dDhD`IlDnOZOnChHtIyBn@qIzEgGtQ}\\pAYfFnHbAf@rBXrDgA",
              "distanceInMeters": 774,
              "color": "#993399",
              "iconUrl": "https://unterwegs-production-mobile-assets.s3.amazonaws.com/navigation/modalities/global/bus.png",
              "segments": [
                {
                  "nextStop": {
                    "name": "Ulm Ehinger Tor",
                    "departure": {
                      "scheduledTime": "2019-10-18T06:13:00+00:00"
                    },
                    "coordinates": {
                      "lat": 48.394817,
                      "lng": 9.980888
                    },
                    "stationId": "de:08421:1350:1:E"
                  }
                },
                {
                  "nextStop": {
                    "name": "Neu-Ulm Adenauerbrücke",
                    "departure": {
                      "scheduledTime": "2019-10-18T06:15:00+00:00"
                    },
                    "coordinates": {
                      "lat": 48.388535,
                      "lng": 9.988216
                    },
                    "stationId": "de:09775:1701:1:2"
                  }
                }
              ],
              "messages": [],
              "type": "public_transport"
            },
            {
              "id": "transfer:de:09775:1702|2019-10-18T06:16Z->de:09775:1702|2019-10-18T06:18Z",
              "origin": {
                "coordinates": {
                  "lat": 48.38501,
                  "lng": 9.98706
                },
                "name": "Neu-Ulm Donaubad"
              },
              "destination": {
                "coordinates": {
                  "lat": 48.38501,
                  "lng": 9.98706
                },
                "name": "Neu-Ulm Donaubad"
              },
              "departure": {
                "scheduledTime": "2019-10-18T06:16:00+00:00"
              },
              "arrival": {
                "scheduledTime": "2019-10-18T06:18:00+00:00"
              },
              "durationInSeconds": 900,
              "color": "#c7cfda",
              "iconUrl": "https://unterwegs-production-mobile-assets.s3.amazonaws.com/navigation/modalities/global/walk.png",
              "type": "transfer"
            },
            {
              "id": "3",
              "origin": {
                "coordinates": {
                  "lat": 48.38501,
                  "lng": 9.98706
                },
                "name": "Neu-Ulm Donaubad",
                "stationId": "de:09775:1702",
                "entrances": []
              },
              "destination": {
                "coordinates": {
                  "lat": 48.35384,
                  "lng": 9.98283
                },
                "name": "Wiblingen Alte Siedlung",
                "stationId": "de:08421:1602",
                "entrances": []
              },
              "departure": {
                "scheduledTime": "2019-10-18T06:18:00+00:00"
              },
              "arrival": {
                "scheduledTime": "2019-10-18T06:25:00+00:00"
              },
              "durationInSeconds": 420,
              "headSign": "Hüttisheim Schule",
              "line": {
                "name": "24",
                "color": "#993399",
                "textColor": "#ffffff",
                "vehicle": {
                  "type": "bus"
                }
              },
              "alternativeLines": [],
              "polyline": "ieifHcr}{@jIeCpScYzAg@`CGbEh@|UdF~E`BlHxHxAl@jFS`LgLbDeAbNpAfDjAvGxD|AfGzHu@`Aq@vDbArJdIjCd@fFfF`I~M",
              "distanceInMeters": 1866,
              "color": "#993399",
              "iconUrl": "https://unterwegs-production-mobile-assets.s3.amazonaws.com/navigation/modalities/global/bus.png",
              "segments": [
                {
                  "nextStop": {
                    "name": "Wiblingen Pranger",
                    "departure": {
                      "scheduledTime": "2019-10-18T06:23:00+00:00"
                    },
                    "coordinates": {
                      "lat": 48.360769,
                      "lng": 9.988249
                    },
                    "stationId": "de:08421:1600:0:2"
                  }
                },
                {
                  "nextStop": {
                    "name": "Wiblingen Oberer Wirt",
                    "departure": {
                      "scheduledTime": "2019-10-18T06:24:00+00:00"
                    },
                    "coordinates": {
                      "lat": 48.355793,
                      "lng": 9.985481
                    },
                    "stationId": "de:08421:1601:0:1"
                  }
                }
              ],
              "messages": [],
              "type": "public_transport"
            },
            {
              "id": "4",
              "origin": {
                "coordinates": {
                  "lat": 48.35383,
                  "lng": 9.98285
                },
                "name": "Wiblingen Alte Siedlung"
              },
              "destination": {
                "coordinates": {
                  "lat": 48.35406,
                  "lng": 9.98274
                },
                "name": "Alte Siedlung"
              },
              "departure": {
                "scheduledTime": "2019-10-18T06:25:00+00:00"
              },
              "arrival": {
                "scheduledTime": "2019-10-18T06:26:00+00:00"
              },
              "durationInSeconds": 60,
              "color": "#c7cfda",
              "iconUrl": "https://unterwegs-production-mobile-assets.s3.amazonaws.com/navigation/modalities/global/walk.png",
              "polyline": "mbcfHww|{@O_@]r@",
              "distanceInMeters": 41,
              "type": "walking"
            }
          ],
          "catalog": {
            "id": "P6yYRp2V1B9yUdhqa62Ya8",
            "timeZone": "Europe/Berlin",
            "lowestRegularPrice": {
              "amount": 2.10,
              "currency": "EUR"
            },
            "categories": [
              {
                "icon": "iconTicketCategoryDefault",
                "iconUrl": "",
                "name": "All",
                "products": [
                  {
                    "fullDescription": "Einzelfahrkarten gelten nur zum sofortigen Fahrtantritt. Umtausch und Erstattung sind ausgeschlossen.",
                    "icon": "iconTicketTypeDefault",
                    "iconUrl": "",
                    "id": "35KQpdzjoLipg7hWsHcvbuCPw3uYGxsI61QV27Hp5fX5U2Je2TzSQ12FaQGGFCEx:IVpwnR0gwP2ANrSW",
                    "name": "Einzelfahrschein Erw Handy Stadttarif Ulm/Neu-Ulm",
                    "parameters": [
                      {
                        "id": "startLocation",
                        "name": "From",
                        "type": "enumeration",
                        "values": [
                          {
                            "id": "de:08421:1001",
                            "label": "Ulm Steinerne Brücke"
                          }
                        ]
                      }
                    ],
                    "shortDescription": "Ulm Steinerne Brücke - Wiblingen Alte Siedlung",
                    "transportAssociation": "DING",
                    "variants": [
                      {
                        "id": "35KQpdzjoLipg7hWsHcvbuCPw3uYGxsI61QV27Hp5fX5U2Je2TzSQ12FaQGGFCEx:Lhhm36ziUKoZlyAh",
                        "price": {
                          "amount": 2.10,
                          "currency": "EUR"
                        }
                      }
                    ]
                  },
                  {
                    "fullDescription": "Tageskarten gelten am Lösungstag bis 4:30 Uhr des Folgetages. Umtausch und Erstattung sind ausgeschlossen.",
                    "icon": "iconTicketTypeDefault",
                    "iconUrl": "",
                    "id": "35KQpdzjoLipg7hWsHcvbuCPw3uYGxsI61QV27Hp5fX5U2Je2TzSQ12FaQGGFCEx:o9SDv1nhmairgydQ",
                    "name": "Tageskarte Single Stadttarif Ulm/Neu-Ulm",
                    "parameters": [
                      {
                        "id": "startLocation",
                        "name": "From",
                        "type": "enumeration",
                        "values": [
                          {
                            "id": "de:08421:1001",
                            "label": "Ulm Steinerne Brücke"
                          }
                        ]
                      }
                    ],
                    "shortDescription": "Ulm Steinerne Brücke - Wiblingen Alte Siedlung",
                    "transportAssociation": "DING",
                    "variants": [
                      {
                        "id": "35KQpdzjoLipg7hWsHcvbuCPw3uYGxsI61QV27Hp5fX5U2Je2TzSQ12FaQGGFCEx:ekmerf3rGbRFkTH4",
                        "price": {
                          "amount": 4.20,
                          "currency": "EUR"
                        }
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "type": "public_transport"
        }
      ],
      "id": "ID-E4EF31AF-1098-4717-A4A5-6CE933B851AA",
      "tripFingerprint": "9wNGMC7PLNrL4Espa936WENKChEwZYmS3ewCuX271N9Nh97TeSKw8oMvCBoEXBovZ1CZKDmiXkaqfh9zrHgygQi6DfPBZp1yevya1aKHVXxyLkESpL9nebzikbvLt7kSQpswSSaLpGd3K9BeQU6k82ae98etKCZU6V9PvW7riL9BBpVYA23LZjaKSyta24zBhSnzEw2rGhYGupUcPqaTiRHw7sd39nDyB3jWr8jc6AYsGiHNUpmaxY",
      "type": "public_transport",
      "alternativeDepartures": [],
      "links": [
        {
          "href": "/trip/ID-E4EF31AF-1098-4717-A4A5-6CE933B851AA/working-days",
          "relation": "workingDays",
          "method": "GET"
        }
      ],
      "messages": []
    }
  ]
}

POST /ticket-issuer/user/purchase

(Authorization Header required)

Request:

{"product":{"variantId":"[...]","parameters":{}},"requestId":"[...]","paymentId":"[...]"}
  • variantId is the id from an /navigation/search/trips response, see items[].sections[].catalog.categories[].products[].variants[].id
  • paymentId is the an uuid of one paymentMethod listed in the /user/profile
  • requestId ??? (looks like an UUID, locally generated)

Response:

{
	"inactiveTickets": [],
	"orderId": "[...]",
	"paymentDetails": {
		"paymentId": "[...]",
		"paymentType": "Sepa"
	},
	"tickets": [{
		"display": {
			"authorisationId": "100100",
			"aztecCode": "[base64 of png image]",
			"conditions": "Tageskarten gelten am Lösungstag bis 4:30 Uhr des Folgetages. Umtausch und Erstattung sind ausgeschlossen.",
			"issuedAt": "Ausgestellt am 10.10.2019 12:00",
			"orderId": "[...]",
			"originalProductName": "Tageskarte Single Stadttarif Ulm/Neu-Ulm",
			"passengerIdentity": "<passengerName>\nAusweis: amtlicher Lichtbildausweis",
			"passengerName": "<passengerName>",
			"price": "4,20 EUR inkl. Mwst.",
			"productDescription": "Tageskarte Single Stadttarif Ulm/Neu-Ulm",
			"startLocation": "Ulm Steinerne Brücke",
			"tariffZone": "Ulm Steinerne Brücke - Wiblingen Alte Siedlung",
			"tenant": "Donau-Iller-Nahverkehrsverbund",
			"tenantLogoUrl": "https://unterwegs-production-mobile-assets.s3.amazonaws.com/tickets/mi-ding-logo.png",
			"ticketId": "100100",
			"ticketPrice": {
				"amount": 4.20,
				"currency": "EUR"
			},
			"ticketType": "DING - Handy Ticket",
			"timeOfPurchase": "2019-10-15T10:00:00.000Z",
			"transportAssociationLogoUrl": "https://unterwegs-production-mobile-assets.s3.amazonaws.com/tickets/mi-ding-logo.png",
			"typeOfIdentification": "Ausweis: amtlicher Lichtbildausweis",
			"validity": "15.10.2019 10:00 - 16.10.2019 04:30\nVon Wabe 10 Ulm\nNach Wabe 10 Wiblingen (direkt)",
			"validitySummary": "Ulm Steinerne Brücke - Wiblingen Alte Siedlung",
			"validityTime": "15.10.2019 10:00"
		},
		"id": "100100",
		"orderId": "[...]",
		"parameters": [{
			"id": "startLocation",
			"name": "From",
			"type": "enumeration",
			"values": [{
				"id": "de:08421:1001",
				"label": "Ulm Steinerne Brücke"
			}]
		}],
		"product": {
			"fullDescription": "Tageskarten gelten am Lösungstag bis 4:30 Uhr des Folgetages. Umtausch und Erstattung sind ausgeschlossen.",
			"icon": "iconTicketTypeDefault",
			"iconUrl": "",
			"id": "[...]",
			"name": "Tageskarte Single Stadttarif Ulm/Neu-Ulm",
			"parameters": [{
				"id": "startLocation",
				"name": "From",
				"type": "enumeration",
				"values": [{
					"id": "de:08421:1001",
					"label": "Ulm Steinerne Brücke"
				}]
			}],
			"shortDescription": "Ulm Steinerne Brücke - Wiblingen Alte Siedlung",
			"transportAssociation": "DING",
			"variants": [{
				"id": "[...]",
				"price": {
					"amount": 4.20,
					"currency": "EUR"
				}
			}]
		},
		"productVariantId": "[...]",
		"validity": {
			"validFrom": "2019-10-15T10:00:00.000Z",
			"validUntil": "2019-10-16T02:30:00.000Z"
		}
	}]
}

POST /ticket-issuer/user/ticket-sale-acknowledgement

??? 501, The customer support service is not implemented for tenant ding-mi.

GET /ticket-issuer/public/products

Response:

{
	"code": 404,
	"error": "NOT_FOUND",
	"title": "There is no static catalog for ding-mi."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment