GET/v1/trains/order/:gdsprovider/:orderId/refundable-items

List refundable train items

Find the order items that can be selected for a refund.

Share

Find the order items that can be selected for a refund.

Authentication and headers

HeaderDescription
AuthorizationBearer <secret_key>. Keep the secret on the server and never write it to client logs.
X-Travelandz-Id<public_key>:<profile_code>, where the persisted profile code has the form dp_<12 alphanumeric>.
Content-Typeapplication/json for requests with a JSON body.

Request

Path parameters: gdsprovider is currently 0; orderId comes from order creation.

Request Params Schema

gdsprovider
enum
0
Yes
Currently 0
orderId
stringYes
Order id returned by order creation.

Success response

Returns items[] with item ids, refundable amounts and the affected journey segments.

Response Body Schema

items
arrayYes
items[]id
stringYes
items[]amountToRefund
objectYes
items[]amountToRefundamount
numberYes
items[]amountToRefundcurrency
stringYes
items[]refundOfferParts
arrayYes
items[]refundOfferParts[]segments
arrayYes
items[]refundOfferParts[]segments[]departureAt
string
Format: ISO 8601
Yes
items[]refundOfferParts[]segments[]arrivalAt
string
Format: ISO 8601
Yes
items[]refundOfferParts[]segments[]durationInMinutes
numberYes
items[]refundOfferParts[]segments[]transport
enum
trainbusferry
Yes
items[]refundOfferParts[]segments[]identifier
stringYes

Errors

  • 400 for validation or unknown fields.
  • 401 or 403 for invalid API credentials.
  • 500 internal_communication_error or unknown_error for provider failures.
  • order_not_found when the order does not exist.

Usage notes

Store each selected items[].id and send those ids to the refund endpoint.

cURL example

bash
bash
curl --request GET \
  --url "https://api.sandbox.travelandz.com/v1/trains/order/0/order_123/refundable-items" \
  --header "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  --header "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"