Skip to content

Offers

Proves your system receives an offer for a journey and reads it, accepts it with a meeting point, declines another offer with a reason, and follows each offer's status by webhook.

Verified by:Webhook acknowledgedProof of receiptRequest observedDeclaration

Instructions

  1. This section starts once Direct assignment has passed. Choose a hub where your fleet has an offer tender on staging, and an address; the portal suggests the ones you used for Direct assignment. Without an offer tender, offers go to other companies.
  2. Offer received: the portal books a test journey from the hub and offers it to your fleet. Answer offerCreatedEvent with a 2xx response and enter the journey's pickup time from the offer (the fare including VAT when the offer has no pickup time).
  3. Accept the offer: send POST /offers/{offerId}/accept from your system with the id and type of one of the offer's meeting points, before the offer expires. The portal shows the offer ID; everything after uses the journey ID.
  4. Journey assigned: answer journeyFleetAssignedEvent with a 2xx response and enter the traveller detail the portal asks for.
  5. Offer accepted: answer offerStatusChangedEvent (ACCEPTED) with a 2xx response.
  6. Second offer: the portal books another test journey, to the hub, and offers it to your fleet. Answer offerCreatedEvent with a 2xx response.
  7. Decline the offer: send POST /offers/{offerId}/decline from your system with a reason (OTHER needs a description), before the offer expires. If your system accepts offers automatically, turn that rule off for this test.
  8. Offer declined: answer offerStatusChangedEvent (DECLINED) with a 2xx response and confirm that the offer is no longer open in your system. The portal then cancels the journey.
  9. If no offer reaches your company within 2 minutes of booking, your fleet has no offer tender with free capacity for the hub in that direction: ask Transferz for one, then try again. If you accept or decline the wrong offer, or an offer expires, use Get a new offer.
  10. Each event step waits up to 5 minutes for a 2xx answer; a 2xx to an event Transferz delivers late still counts. Calls made with Try it in the portal don't count.

Pass criteria

  • Your endpoint answers offerCreatedEvent (twice), journeyFleetAssignedEvent and offerStatusChangedEvent (ACCEPTED, then DECLINED) with 2xx, each within 5 minutes (a 2xx to an event Transferz delivers late still counts)
  • The pickup time (or fare) and the traveller detail you enter match the ones in the events
  • A successful POST /offers/{offerId}/accept from your system with one of the offer's meeting points, before the offer expires
  • A successful POST /offers/{offerId}/decline from your system with a reason, before the offer expires
  • You confirm that the declined offer is no longer open in your system

Was this helpful?