TMW Web-API Schnittstelle

Version: 2.5.3

Server: SQL01.TMW.AC.AT\TMW

Kundenkonto Funktionen


Allgemein
Headers Values
Authorization Basic
Content-Type application/json

CustomerAccount
Property Type Description
CustomerAccount_ID Int Primary-Key of CustomerAccount
EmailAddress String E-Mail-Addrees of the customer as unique key
FirstName String (NULL) Firstname of the customer
LastName String (NULL) Lastname of the customer
HasNewsletter Boolean Indicates if the customer receives the newsletter
Salutation_ID Int Primary-Key of Salutation
Language_ID Int Primary-Key of Language
CustomerAccount - Functions
Purpose Method Parameter Return-Value Example
Name Type Description
Get a customer account by its email address. GET e_mail string Customers e-Mail address CustomerAccount https://webapi.tmw.at/customer-account?e_mail=#SECRET#
Get a customer account by its primary key GET id Int Primary-Key of CustomerAccount CustomerAccount https://webapi.tmw.at/customer-account?id=#SECRET#
Create a customer account POST e_mail String Valid E-Mail-Address CustomerAccount https://webapi.tmw.at/customer-account/create?e_mail=#SECRET#&first_name=Zaligaquo&last_name=Dawapisai&salutation_id=2&language_id=2
first_name String Firstname of the customer
last_name String Lastname of the customer
salutation_id Int (NULL) Primary-Key of Salutation
language_id Int (NULL) Primary-Key of Language
Update a customer account
(Only passed values are updated)
POST id Int Primary-Key of CustomerAccount CustomerAccount https://webapi.tmw.at/customer-account/update?id=#SECRET#&first_name=Zaligaquo&last_name=Dawapisai&salutation_id=2&language_id=2&street=Xelstraße 63&city=Veza&postcode=36959&country_id=197
first_name String Firstname of the customer
last_name String Lastname of the customer
salutation_id Int (NULL) Primary-Key of Salutation
language_id Int (NULL) Primary-Key of Language
street String Customers address
city String Customers city
postcode String Customers post code
country_id Int (NULL) Primary-Key of Country
Delete the address of a customer account POST id Int Primary-Key of CustomerAccount CustomerAccount https://webapi.tmw.at/customer-account/del-address?id=#SECRET#

Salutation
Property Type Description
Salutation_ID Int Primary-Key of Salutation
SalutationName String Name of the salutation
Abbreviation String Abbreviation of the salutation
Language_ID Int Primary-Key of Language
Online Boolean Flag for used salutations at Homepage
Salutation - Functions
Purpose Method Parameter Return-Value Example
Name Type Description
Get a list of all possible salutations GET online Boolean (NULL) Flag for salutations used at homepage
(true = online, false = offline, NULL = all)
List[Salutation] https://webapi.tmw.at/salutation
Get a list of all possible salutations by specified language GET language_id int Primary-Key of Language List[Salutation] https://webapi.tmw.at/salutation?language_id=2
online Boolean (NULL) Flag for salutations used at homepage
(true = online, false = offline, NULL = all)
Get a salutation by it's primary key GET id Int Primary-Key of Salutation Salutation https://webapi.tmw.at/salutation?id=2

Country
Property Type Description
Country_ID Int Primary-Key of Country
CountryName String Name of the salutation
IsoToken String ISO 3166 (2 digits)
Country - Functions
Purpose Method Parameter Return-Value Example
Name Type Description
Get a list of all countries GET --- --- --- List[Country] https://webapi.tmw.at/country
Get a country by it's primary key GET id Int Primary-Key of Country Country https://webapi.tmw.at/country?id=197

NewsletterType
Property Type Description
NewsletterType_ID Int Primary-Key of NewsletterType
NewsletterTypeName String Name of the newsletter type
NewsletterType - Functions
Purpose Method Parameter Return-Value Example
Name Type Description
Get a list of all possible newsletter types GET --- --- --- List[NewsletterType] https://webapi.tmw.at/newsletter-type
Get a newsletter type by it's primary key GET id Int Primary-Key of NewsletterType NewsletterType https://webapi.tmw.at/newsletter-type?id=4

Newsletter - Functions
Purpose Method Parameter Return-Value Example
Name Type Description
Get a list of registered newsletters by email-address. GET email_address String E-Mail-Address List[NewsletterType] https://webapi.tmw.at/newsletter-registration?email_address=#SECRET#
Get a list of registered newsletters by coustomer account. GET customer_account_id Int Primary-Key of CustomerAccount List[NewsletterType] https://webapi.tmw.at/newsletter-registration?customer_account_id=#SECRET#
Make a newsletter registration by email-address. POST type_id List[Int] Primary-Key of NewsletterType HttpResponseMessage https://webapi.tmw.at/newsletter-registration?type_id=1&type_id=2&type_id=4&email_address=#SECRET#
request body:
OK
email_address String E-Mail-Address
Make a newsletter registration by customer-account-id POST type_id List[Int] Primary-Key of NewsletterType HttpResponseMessage https://webapi.tmw.at/newsletter-registration?type_id=1&type_id=3&customer_account_id=#SECRET#
request body:
OK
customer_account_id Int Primary-Key of CustomerAccount
Make a newsletter cancellation by email-address. POST type_id Int Primary-Key of NewsletterType HttpResponseMessage https://webapi.tmw.at/newsletter-cancellation?type_id=4&email_address=#SECRET#
request body:
OK
email_address String E-Mail-Address
Make a newsletter cancellation by customer-account-id POST type_id Int Primary-Key of NewsletterType HttpResponseMessage https://webapi.tmw.at/newsletter-cancellation?type_id=4&customer_account_id=#SECRET#
request body:
OK
customer_account_id Int Primary-Key of CustomerAccount
Newsletter opt-out by customer-account-id POST customer_account_id Int Primary-Key of CustomerAccount HttpResponseMessage https://webapi.tmw.at/newsletter-cancellation/opt-out?customer_account_id=#SECRET#
request body:
OK
Newsletter opt-out by email-address POST email_address String E-Mail-Address HttpResponseMessage https://webapi.tmw.at/newsletter-cancellation/opt-out?email_address=#SECRET#
request body:
OK
Landing function after newsletter opt-in POST uid String Emarsys contact uid HttpResponseMessage https://webapi.tmw.at/newsletter-registration/opt-in-done?uid=#SECRET#
Get the Opt-In status by customer-account-id GET customer_account_id Int Primary-Key of CustomerAccount String
(None, OptIn, OptOut, InProgress)
https://webapi.tmw.at/newsletter-registration/opt-in-status?customer_account_id=#SECRET#
Get the Opt-In status by email-address GET email_address String E-Mail-Address String
(None, OptIn, OptOut, InProgress)
https://webapi.tmw.at/newsletter-registration/opt-in-status?email_address=#SECRET#

AnnualTicket
Property Type Description
CustomerAccount_ID Int Primary-Key of CustomerAccount
TicketNumber String Unique Number of the annual ticket
MediaStorage_ID Int PrimaryKey of MediaStorage (passport photo of customer)
ValidFrom DateTime (NULL) Starting date of validity
ValidThru DateTime (NULL) Ending date of validity
TransferDate DateTime (NULL) Date when the annual ticket was transferd to the accounting system
AnnualTicketStatus
Key Value Key Value Key Value Key Value Key Value
1 None 2 Created 3 Valid 4 Expired 5 Mismatch
AnnualTicketType
Key Value Key Value Key Value Key Value
1 Card 2 Online 3 OnlineCard 4 Unknown
LoyaltyProgramCode
Key Value Key Value Key Value Key Value
JKTMW Webshop Annual Ticket JKTMWBP Webshop Annual Ticket with attendant JKONL Online Annual Ticket JKONLBP Online Annual Ticket with attendant
AnnualTicket - Functions
Purpose Method Parameter Return-Value Example
Name Type Description
Get a List of customers AnnualTickets (valid, last expiered, last created) GET customer_account_id Int PrimaryKey of CustomerAccount MediaStorage (NULL) https://webapi.tmw.at/customer-account/annual-ticket?customer_account_id=#SECRET#
Upload a file into the media storage POST customer_account_id Int PrimaryKey of CustomerAccount MediaStorage (NULL) https://webapi.tmw.at/media-storage/upload-annual-ticket-photo?customer_account_id=#SECRET#&remarks=Annual-Ticket-Photo Upload
remarks String Remarks regarding the file
Attache the file to the request as a stream
Order an annual-ticket card POST invoice_number String The invoice number the ticket was payed with HttpResponseMessage https://webapi.tmw.at/customer-account/order-annual-ticket?invoice_number=#SECRET#&customer_account_id=#SECRET#&media_storage_id=511625&pickup_date=2024-12-27&loyalty_program_code=JKTMWBP
customer_account_id Int Primary-Key of CustomerAccount
media_storage_id Int PrimaryKey of MediaStorage (passport photo of customer)
pickup_date Date Date for picking up the ticket at the information desk.
loyalty_program_code String (NULL) Loyalty-Program-Code:
JKTMW(default) - Webshop Annual Ticket
JKTMWBP - Webshop Annual Ticket with attendant
Make an annual-ticket request POST customer_account_id Int Primary-Key of CustomerAccount HttpResponseMessage https://webapi.tmw.at/customer-account/create-annual-ticket?customer_account_id=#SECRET#&media_storage_id=511625&loyalty_program_code=JKONLBP
media_storage_id Int PrimaryKey of MediaStorage (passport photo of customer)
loyalty_program_code String (NULL) Loyalty-Program-Code:
JKONL(default) - Online Annual Ticket
JKONLBP - Online Annual Ticket with attendant
Activate an online annual-ticket POST customer_account_id Int Primary-Key of CustomerAccount HttpResponseMessage https://webapi.tmw.at/customer-account/activate-annual-ticket?customer_account_id=#SECRET#&ticket_number=#SECRET#&invoice_number=#SECRET#
invoice_number String The invoice number the ticket was payed with.
ticket_number String Ticket number of the online annual ticket
Change the passport photo of an annual-ticket
(Only allowed when status of the ticket is not equal to "valid")
POST customer_account_id Int Primary-Key of CustomerAccount HttpResponseMessage https://webapi.tmw.at/customer-account/replace-picture-annual-ticket?customer_account_id=#SECRET#&ticket_number=#SECRET#&media_storage_id=511625
ticket_number String Ticket number of the online annual ticket
media_storage_id Int PrimaryKey of MediaStorage (passport photo of customer)
Reactivate an annual-ticket
(Only allowed when status of the ticket is equal to "expired")
POST customer_account_id Int Primary-Key of CustomerAccount HttpResponseMessage https://webapi.tmw.at/customer-account/reactivate-annual-ticket?customer_account_id=#SECRET#&ticket_number=#SECRET#&invoice_number=#SECRET#
invoice_number String The invoice number the ticket was payed with
ticket_number String Ticket number of the online annual ticket
media_storage_id Int (NULL) PrimaryKey of MediaStorage (passport photo of customer). If ommited the existing photo is used.
Renew an annual-ticket
(Only allowed when status of the ticket is equal to "valid")
POST customer_account_id Int Primary-Key of CustomerAccount HttpResponseMessage https://webapi.tmw.at/customer-account/renewal-annual-ticket?customer_account_id=#SECRET#&ticket_number=#SECRET#&invoice_number=#SECRET#
ticket_number String Ticket number of the online annual ticket
invoice_number String The invoice number the ticket was payed with.
media_storage_id Int (NULL) PrimaryKey of MediaStorage (passport photo of customer). If ommited the existing photo is used.