{"openapi":"3.0.1","info":{"title":"Amtrak TripLink Corporate Profile API","description":"Corporate profile, connection, booking and receipt management for Amtrak TripLink/Concur integration. Migrated from MuleSoft — all 13 runbook endpoints under /v1/triplink/*.\n","version":"1.0.1","contact":{"name":"Case Management Team","email":"DLEAISupport@amtrak.com"}},"servers":[{"url":"https://{dev-host}/{basePath}","description":"Development environment","variables":{"dev-host":{"default":"dev-host","description":"Development API host — substituted at runtime"},"basePath":{"default":"","description":"API base path (e.g. v1, soap/trainstatusv2)"}}},{"url":"https://{stage-host}/{basePath}","description":"Stage environment","variables":{"stage-host":{"default":"stage-host","description":"Stage API host — substituted at runtime"},"basePath":{"default":"","description":"API base path (e.g. v1, soap/trainstatusv2)"}}},{"url":"https://{prod-host}/{basePath}","description":"Production environment","variables":{"prod-host":{"default":"prod-host","description":"Production API host — substituted at runtime"},"basePath":{"default":"","description":"API base path (e.g. v1, soap/trainstatusv2)"}}}],"paths":{"/v1/triplink/authToken":{"get":{"tags":["TripLink Corporate Profile"],"summary":"Get auth token","description":"Retrieves a cached OAuth2 client_credentials token for TripLink/Concur API calls. EP-001.","operationId":"getAuthToken","responses":{"200":{"description":"Auth token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthToken"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]}},"/v1/triplink/connections":{"get":{"tags":["TripLink Corporate Profile"],"summary":"Get connections","description":"Retrieves TripLink connection requests for a user from Concur. EP-002.","operationId":"getConnections","parameters":[{"name":"accessToken","in":"header","required":true,"schema":{"type":"string"}},{"name":"geolocation","in":"header","required":false,"schema":{"type":"string"}},{"name":"agrNumber","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Connections list","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["TripLink Corporate Profile"],"summary":"Delete connection","description":"Removes a TripLink connection from Concur by geoLocation. EP-006.","operationId":"deleteConnection","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"geoLocation":{"type":"string"},"accessToken":{"type":"string"}}}}}},"responses":{"204":{"description":"Connection deleted"},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]}},"/v1/triplink/connections/{userName}":{"put":{"tags":["TripLink Corporate Profile"],"summary":"Update connection","description":"Updates a Concur connection request status for a user. EP-005.","operationId":"updateConnection","parameters":[{"name":"userName","in":"path","required":true,"schema":{"type":"string"},"example":"jdoe@amtrak.com"},{"name":"accessToken","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Connection updated","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]}},"/v1/triplink/accessToken":{"post":{"tags":["TripLink Corporate Profile"],"summary":"Request access token","description":"Obtains a TripLink access token via password grant. EP-003.","operationId":"requestAccessToken","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","example":"jdoe@amtrak.com"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"Access token returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthToken"}}}},"422":{"description":"Validation or auth error"}},"security":[{"BearerAuth":[]}]}},"/v1/triplink/internalprofile":{"post":{"tags":["TripLink Corporate Profile"],"summary":"Create internal profile","description":"Saves AGR profile data to CDH. Optionally syncs with Concur when callerId=pnrsync. EP-004.","operationId":"createInternalProfile","parameters":[{"name":"callerId","in":"header","required":false,"schema":{"type":"string"},"description":"Caller ID — 'pnrsync' triggers Concur sync"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agrNumber":{"type":"string"},"accessToken":{"type":"string"},"geolocation":{"type":"string"},"password":{"type":"string","description":"refresh_token"},"expiresIn":{"type":"integer"},"uuid":{"type":"string"}}}}}},"responses":{"200":{"description":"Profile created/updated","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]}},"/v1/triplink/profile":{"get":{"tags":["TripLink Corporate Profile"],"summary":"Get profile","description":"Retrieves the CDH + Concur corporate profile for a given AGR number. EP-008.","operationId":"getProfile","parameters":[{"name":"agrNumber","in":"query","required":true,"schema":{"type":"string"},"example":"9112086153"},{"name":"callerId","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Profile data","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Profile not found"},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]},"post":{"tags":["TripLink Corporate Profile"],"summary":"Create profile","description":"Creates a new AGR corporate profile in CDH via TripLink. EP-009.","operationId":"createProfile","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agrNumber":{"type":"string","example":"9112086153"},"agrNumberRefreshTokenNbr":{"type":"string"},"tokenExprTime":{"type":"string","example":"2026-04-20T10:30:00"},"geoLocCode":{"type":"string","example":"https://us2.api.concursolutions.com"},"uUIDCode":{"type":"string"},"companyName":{"type":"string"},"discountCode":{"type":"string"}}}}}},"responses":{"200":{"description":"Profile created","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]},"patch":{"tags":["TripLink Corporate Profile"],"summary":"Update profile","description":"Updates an existing AGR corporate profile in CDH via TripLink. EP-007.","operationId":"updateProfile","parameters":[{"name":"agrNumber","in":"query","required":true,"schema":{"type":"string"},"example":"9112086153"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"geoLocCode":{"type":"string"},"companyName":{"type":"string"},"discountCode":{"type":"string"},"uUIDCode":{"type":"string"}}}}}},"responses":{"200":{"description":"Profile updated","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]}},"/v1/triplink/booking":{"post":{"tags":["TripLink Corporate Profile"],"summary":"Create booking","description":"Creates a new travel booking in Concur (JSON→XML→POST). EP-010.","operationId":"createBooking","parameters":[{"name":"accessToken","in":"header","required":true,"schema":{"type":"string"}},{"name":"geoLocation","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Booking created","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]},"delete":{"tags":["TripLink Corporate Profile"],"summary":"Cancel booking","description":"Cancels a Concur travel booking. EP-011.","operationId":"cancelBooking","parameters":[{"name":"bookingSource","in":"query","required":true,"schema":{"type":"string"},"example":"Amtrak"},{"name":"confirmationNumber","in":"query","required":true,"schema":{"type":"string"},"example":"CONF-12345"},{"name":"accessToken","in":"header","required":true,"schema":{"type":"string"}},{"name":"geoLocation","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Booking cancelled"},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]},"put":{"tags":["TripLink Corporate Profile"],"summary":"Update booking","description":"Updates an existing Concur travel booking. EP-012.","operationId":"updateBooking","parameters":[{"name":"accessToken","in":"header","required":true,"schema":{"type":"string"}},{"name":"geoLocation","in":"header","required":true,"schema":{"type":"string"}},{"name":"concurTripId","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Booking updated","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]}},"/v1/triplink/receipt/{userid}":{"post":{"tags":["TripLink Corporate Profile"],"summary":"Create receipt","description":"Submits a travel receipt to Concur for a user, with timezone formatting. EP-013.","operationId":"createReceipt","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"},"example":"f5a42d4e-0000-1234"},{"name":"accessToken","in":"header","required":true,"schema":{"type":"string"}},{"name":"geoLocation","in":"header","required":true,"schema":{"type":"string"}},{"name":"link","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Receipt submitted","content":{"application/json":{"schema":{"type":"object"}}}},"422":{"description":"Error response"}},"security":[{"BearerAuth":[]}]}}},"components":{"schemas":{"AuthToken":{"type":"object","description":"OAuth 2.0 authentication token returned by TripLink/Concur","properties":{"access_token":{"type":"string","description":"OAuth 2.0 access token","example":"eyJhbGciOiJSUzI1NiJ9..."},"refresh_token":{"type":"string","description":"OAuth 2.0 refresh token"},"token_type":{"type":"string","description":"Token type","example":"Bearer"},"expires_in":{"type":"integer","description":"Token expiration in seconds","example":3600},"scope":{"type":"string","description":"OAuth scope","example":"openid"},"issued_at":{"type":"string","format":"date-time"},"geolocation":{"type":"string","example":"US"},"uuid":{"type":"string","description":"UUID from Concur id_token JWT sub claim"},"refresh_expires_in":{"type":"integer","example":7776000}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Azure AD OAuth2 JWT token. Pass as 'Authorization: Bearer <token>'."}}}}