Skip to content
Last updated

Transfer Orders

Transfer order endpoints create reservations from search offers and manage them afterwards: retrieving the current state, checking cancellation eligibility, and canceling.

Create Order

Creates a transfer reservation from a search offer. The order starts in pendingPayment status; the response contains the exact amount to pay in the payment step.

Endpoint

POST /transfer/orders

Authentication

This endpoint requires authentication. Include your JWT access token in the Authorization header:

Authorization: Bearer YOUR_ACCESS_TOKEN

End User IP Address

Integrated agency systems must forward the end user's IP address via the X-Forwarded-For header. This information is required for audit and security purposes.

Request Body

FieldTypeRequiredDescription
searchIdstringYesSearch identifier from the transfer search
codestringYesSelected offer code from the search results
passengersarrayYesPassenger list; exactly one passenger must have primary: true
billingobjectNoCustom billing information (see Billing below)
flightNumberstringNoFlight number for the outbound pickup (strongly recommended for airport pickups)
returnFlightNumberstringNoFlight number for the return pickup (round trips)

Provide flightNumber whenever the pickup is at an airport. Suppliers use it to track the actual arrival time and adjust the pickup when the flight is delayed; without it the driver only waits at the scheduled time.

Passengers

Exactly one passenger must be marked primary: true; this is the contact passenger for the trip. Every passenger needs a name and exactly one identity document (identityNumber or passportNo). The remaining fields are required only for the primary passenger.

FieldTypeRequiredDescription
primarybooleanYesContact passenger flag. Exactly one must be true
firstNamestringYesPassenger first name
lastNamestringYesPassenger last name
genderstringPrimary onlyM or F
birthDatestringPrimary onlyBirth date (YYYY-MM-DD format)
nationalitystringPrimary onlyISO country code (2 characters)
emailstringPrimary onlyValid email address
phonestringPrimary onlyPhone number in E.164 format
identityNumberstringOne of the two11-digit identity number (for Turkish citizens)
passportNostringOne of the twoPassport number (for international travelers)

Billing

billing is optional. When it is omitted, the invoice is issued to your organization's registered billing address; if no billing address is registered for the organization, the request fails with error 5003.

Sending billing requires custom billing to be enabled for your agency. Without that permission the request is rejected with error 5004 even when the billing object is valid. Contact Yolcu360 to enable custom billing.

When sent, transfer billing is stricter than car rental billing: taxIdentifier and zipCode are always required (use the identity number for individuals), and line must be at least 5 characters.

FieldTypeRequiredDescription
typestringYesAddress type: individual, privateCompany, or corporateCompany
firstNamestringYesBilling first name (or company name for corporateCompany)
lastNamestringConditionalBilling last name. Required unless type is corporateCompany
emailstringYesBilling email address
phonestringYesBilling phone number in E.164 format
countryCodestringYesISO country code (2 characters)
countryNamestringYesFull country name
adm1stringYesAdministrative division level 1 (state/province)
adm2stringNoAdministrative division level 2 (city/district)
linestringYesAddress line (minimum 5 characters)
zipCodestringYesPostal/ZIP code
taxIdentifierstringYesTax ID number (identity number for individuals)
taxDivisionstringCompany typesTax office/division. Required for privateCompany and corporateCompany

Example Request

curl -X POST https://api.pro.yolcu360.com/api/v1/transfer/orders \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Forwarded-For: 203.0.113.195" \
  -d '{
    "searchId": "0ba0fea9-1e98-43ce-a69b-e895e2bc68a6",
    "code": "9972a93a-707e-403e-928e-cbb68a65584f",
    "flightNumber": "TK2021",
    "passengers": [
      {
        "primary": true,
        "firstName": "John",
        "lastName": "Doe",
        "gender": "M",
        "birthDate": "1990-01-15",
        "nationality": "US",
        "passportNo": "AB1234567",
        "email": "john.doe@example.com",
        "phone": "+905551234567"
      },
      {
        "primary": false,
        "firstName": "Jane",
        "lastName": "Doe",
        "identityNumber": "11111111110"
      }
    ],
    "billing": {
      "type": "individual",
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com",
      "phone": "+905551234567",
      "countryCode": "TR",
      "countryName": "Turkey",
      "adm1": "Istanbul",
      "adm2": "Beyoglu",
      "line": "Kocatepe Mah. Taksim Square No:1",
      "zipCode": "34437",
      "taxIdentifier": "11111111110"
    }
  }'

Response

Success Response (201 Created):

The response is the order itself, in the same shape as the order detail and the payment response. product is abbreviated here; it has the same structure as in the order detail below.

{
  "orderId": "YLPB_0503",
  "status": "pendingPayment",
  "paymentRequirement": {
    "amount": 145200,
    "currency": "TRY"
  },
  "flightNumber": "TK2021",
  "product": {
    "code": "9972a93a-707e-403e-928e-cbb68a65584f",
    "appointment": {
      "pickup": {"lat": 41.276146, "lon": 28.728735, "name": "Istanbul Airport (IST)"},
      "dropoff": {"lat": 41.037003, "lon": 28.985092, "name": "Taksim Square"},
      "pickupTime": "2027-06-15T10:00:00+03:00",
      "passengerCount": 2
    },
    "vehicle": {"name": "Minivan", "seatCount": 6, "baggageCount": 6},
    "pricing": {"currency": "TRY", "total": {"amount": 145200, "currency": "TRY"}},
    "cancellationPolicies": [
      {"type": "freeCancel", "until": "2027-06-15T09:00:00+03:00", "description": "You can cancel your transfer free of charge up to 1 hour before departure."}
    ]
  },
  "passengers": [
    {"primary": true, "firstName": "John", "lastName": "Doe", "gender": "M", "birthDate": "1990-01-15", "nationality": "US", "passportNo": "AB1234567", "email": "john.doe@example.com", "phone": "+905551234567"},
    {"primary": false, "firstName": "Jane", "lastName": "Doe", "identityNumber": "11111111110"}
  ]
}

Response Fields

FieldTypeDescription
orderIdstringTransfer order identifier (YLPB_xxxx). Use it in every subsequent transfer call
statusstringOrder lifecycle status, always pendingPayment right after creation
paymentRequirementobjectThe exact amount to pay in the payment step, in minor units. Returned only on create
flightNumberstringFlight number supplied in the request
returnFlightNumberstringReturn flight number supplied in the request (round trips)
productobjectThe booked offer, same structure as the search response product
passengersarrayThe passenger data supplied in the request

The order is now in pendingPayment status and expires roughly one hour after creation if no payment arrives. Continue with Transfer Payment.

Get Order Details

Retrieve the current state of a transfer order: lifecycle status, the booked product, and the passengers.

Endpoint

GET /transfer/orders/{orderId}

Authentication

This endpoint requires authentication. Include your JWT access token in the Authorization header.

Path Parameters

ParameterTypeRequiredDescription
orderIdstringYesTransfer order identifier

Example Request

curl -X GET https://api.pro.yolcu360.com/api/v1/transfer/orders/YLPB_0503 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

Success Response (200 OK):

{
  "orderId": "YLPB_0503",
  "status": "reserved",
  "vendorReservationId": "227699",
  "flightNumber": "TK2021",
  "product": {
    "code": "9972a93a-707e-403e-928e-cbb68a65584f",
    "appointment": {
      "pickup": {
        "lat": 41.276146,
        "lon": 28.728735,
        "name": "Istanbul Airport (IST)"
      },
      "dropoff": {
        "lat": 41.037003,
        "lon": 28.985092,
        "name": "Taksim Square"
      },
      "pickupTime": "2027-06-15T10:00:00+03:00",
      "passengerCount": 2
    },
    "onewayDistance": 41662,
    "onewayDuration": 2727,
    "vehicle": {
      "name": "Minivan",
      "seatCount": 6,
      "baggageCount": 6,
      "image": "https://cdn.example.com/assets/images/van.png"
    },
    "pricing": {
      "currency": "TRY",
      "fees": [
        {
          "amount": 132000,
          "currency": "TRY",
          "type": "oneway",
          "charge": "advance",
          "description": "Outbound Trip Amount"
        },
        {
          "amount": 13200,
          "currency": "TRY",
          "type": "commission",
          "charge": "advance",
          "description": "commission"
        }
      ],
      "vendorTotal": {
        "amount": 0,
        "currency": "TRY"
      },
      "paymentTotal": {
        "amount": 145200,
        "currency": "TRY"
      },
      "discountTotal": {
        "amount": 0,
        "currency": "TRY"
      },
      "total": {
        "amount": 145200,
        "currency": "TRY"
      }
    },
    "rules": [
      {
        "type": "freeCancellation",
        "description": "Free Cancellation"
      },
      {
        "type": "waitForFree",
        "description": "First 15 minutes of waiting free"
      },
      {
        "type": "safeTripWithInvoice",
        "description": "Safe trip with invoice"
      }
    ],
    "cancellationPolicies": [
      {
        "type": "freeCancel",
        "until": "2027-06-15T09:00:00+03:00",
        "description": "You can cancel your transfer free of charge up to 1 hour before departure."
      }
    ]
  },
  "passengers": [
    {
      "primary": true,
      "firstName": "John",
      "lastName": "Doe",
      "gender": "M",
      "birthDate": "1990-01-15",
      "nationality": "US",
      "passportNo": "AB1234567",
      "email": "john.doe@example.com",
      "phone": "+905551234567"
    },
    {
      "primary": false,
      "firstName": "Jane",
      "lastName": "Doe",
      "identityNumber": "11111111110"
    }
  ]
}

Response Fields

FieldTypeDescription
orderIdstringTransfer order identifier
statusstringOrder lifecycle status (see the table below)
vendorReservationIdstringSupplier booking reference. Present once the order is reserved; absent in pendingPayment
flightNumberstringFlight number supplied at order creation
returnFlightNumberstringReturn flight number supplied at order creation (round trips)
productobjectThe booked offer, same structure as the search response product
passengersarrayThe passenger data supplied at order creation

Order Status Values

StatusDescription
pendingPaymentOrder created, awaiting payment. Expires roughly one hour after creation if unpaid
reservedPayment completed and the transfer confirmed with the supplier
canceledOrder canceled by the agency or the supplier
expiredOrder was not paid in time and expired automatically
failedReservation could not be completed

Status Tracking Recommendation

The payment response already carries the order in its current state, read back after the charge, so the payment needs no follow-up detail call. Use this endpoint to re-check the order later: a reserved order can also drop (for example a supplier-side cancellation), so re-checking the status before the pickup time is recommended.

vendorReservationId is available from reserved onward and stays on the order after cancellation. On an order that later fails on the supplier side it may be missing.

Check Cancel Eligibility

Checks whether an order can be canceled and how much would be refunded. This endpoint does not modify the order.

Endpoint

POST /transfer/orders/{orderId}/cancel_eligibility

Authentication

This endpoint requires authentication. Include your JWT access token in the Authorization header.

Path Parameters

ParameterTypeRequiredDescription
orderIdstringYesIdentifier of the order to check

Example Request

curl -X POST https://api.pro.yolcu360.com/api/v1/transfer/orders/YLPB_0503/cancel_eligibility \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

Success Response (200 OK):

{
  "orderId": "YLPB_0503",
  "cancellable": true,
  "refundAmount": {
    "amount": 145200,
    "currency": "TRY"
  }
}

Response Fields

FieldTypeDescription
orderIdstringTransfer order identifier
cancellablebooleanWhether the order can be canceled now
refundAmountobjectAmount to be refunded if the order is canceled now, in minor units. Omitted when not applicable

refundAmount already has any cancellation penalty applied (see the offer's cancellationPolicies) and is capped at the amount actually paid. Note that the transfer eligibility response is richer than the car rental one: it returns the concrete refund amount instead of a refundable flag.

Cancel Order

Cancels a transfer order. The cancellation is forwarded to the supplier; a 200 response is returned only when the supplier accepts the cancellation. The refund is issued automatically back to your credit limit.

Endpoint

POST /transfer/orders/{orderId}/cancel

Authentication

This endpoint requires authentication. Include your JWT access token in the Authorization header.

Path Parameters

ParameterTypeRequiredDescription
orderIdstringYesIdentifier of the order to cancel

Example Request

curl -X POST https://api.pro.yolcu360.com/api/v1/transfer/orders/YLPB_0503/cancel \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

Success Response (200 OK):

{
  "orderId": "YLPB_0503",
  "status": "canceled"
}

If the supplier refuses the cancellation, or the order is not in a cancellable state (for example it was already canceled), the endpoint returns error 8012:

{
  "code": 8012,
  "description": "Transfer order cannot be canceled",
  "details": {
    "orderId": "YLPB_0503",
    "status": "canceled"
  }
}

Check cancel eligibility before canceling to avoid surprises, and treat 8012 as a non-retriable outcome: contact support if a cancellation is required but keeps failing.