Skip to content

Accept offer

POST/offers/{id}/accept

Auth: X-API-Key headerhttps://warpdrive.staging.transferz.com/transfercompanies

Accepts an available offer

Accepts an offer. The journey is assigned to your company and returned in full, including the traveller's details; a journeyFleetAssignedEvent follows. When meetingPointRequired is true, send the id and type of one of the offer's meeting points. Accepting an offer you already accepted succeeds again with 200 and the journey, so a retry after a timeout is safe.

Guides: Accept or decline offers, How a journey reaches you

Path parameters

  • idinteger · int64required

    The id of the offer to accept

Headers

  • X-Request-IDstring

    The optional (ideally unique) request identifier used for later analysis or diagnostics

Request body

application/json

  • meetingPointIdinteger · int64

    Id of one of the offer's meeting points.

  • typeenum

    Type of the chosen meeting point.

    HUB
    A meeting point managed by Transferz for the hub (for example a desk in arrivals).
    TRANSFER_COMPANY
    A meeting point of the transfer company itself.

Responses

OK

  • idinteger · int64

    Journey id (journeyId in webhook events).

  • codestring

    Journey reference shown to the traveller and the driver.

  • pickupobject

    Where the traveller is picked up.

  • dropoffobject

    Where the traveller is dropped off.

  • pickupTimeobject

    Pickup time, local to the pickup location.

  • addonsPerQuantityarray of objects

    Booked add-ons and how many of each.

  • vehicleCategoryenum
    SEDAN
    Standard car for up to 3 passengers with luggage.
    STATIONWAGON
    Estate car with extra luggage space.
    SUV
    Sport utility vehicle.
    MINIVAN
    People carrier for up to 6–7 passengers.
    BUSINESS_LIMOUSINE
    Deprecated business category; use BUSINESS_SEDAN.
    BUSINESS_SEDAN
    Business-class sedan.
  • typeenum

    Whether the journey starts or ends at a hub.

    HUB
    Starts or ends at a hub such as an airport or station.
    POINT_TO_POINT
    Between two addresses, neither of them a hub.
  • distancenumber

    Route distance in distanceUnit.

  • distanceUnitenum
    METER
    Metres.
    FEET
    Feet.
    KILOMETER
    Kilometres.
    MILE
    Miles.
  • durationinteger · int32

    Expected driving time in seconds.

  • fareSummaryobject

    What you are paid for the journey.

  • statusenum

    Current status of the journey.

    NOT_PAID
    The booking exists but has not been paid; the journey is not yet sent to a transfer company.
    AWAITING_APPROVAL
    Paid, waiting for an internal Transferz approval before it is processed.
    PENDING
    Paid and being processed; Transferz is looking for a transfer company.
    CONFIRMED
    A transfer company has been assigned and confirmed the journey.
    PLANNED
    A driver has been assigned.
    DRIVER_UNDERWAY
    The driver is on the way to the pickup point.
  • meetingPointobject

    Where the driver meets the traveller.

  • driverCodestring

    Code the driver uses to identify the journey.

  • assignmentStatusenum

    Whether a driver is assigned.

    NOT_ASSIGNED
    No driver has been assigned yet.
    ASSIGNED
    A driver is assigned.
    REASSIGNED
    The journey was assigned to a different driver after a first assignment.
  • travellerInfoobject

    The traveller, passengers, luggage and travel details.

  • partnerReferencestring

    The booking partner's reference.

  • driverobject

    The assigned driver.

  • lastKnownDriverPositionobject

    The driver's last reported position.

  • vehicleobject

    The assigned vehicle.

  • hostTravellerMetTimestring · date-time

    When the host met the traveller, if recorded.

  • hostTravellerMetPositionobject

    Where the host met the traveller, if recorded.

  • hashstring

    Changes whenever the journey changes; compare it to detect updates.

Errors this endpoint can return

  • 400, failedOFFER_MISSED

    When: Another company accepted the journey first.

    What to do: Remove the offer from your list; an offerStatusChangedEvent with MISSED is sent too.

  • 400, failedOFFER_EXPIRED

    When: The offer expired.

    What to do: Respond to offers before expiry.

  • 400, failedOFFER_FINALIZED

    When: You already declined the offer.

    What to do: Check the offer status with Get offer before responding.

  • When: A meeting point is required and none (or an unknown one) was sent.

    What to do: Send a meetingPointId from the offer's meetingPoints with its type.