Skip to content

Delivery Codes

A Delivery Code proves that the parcel reached your customer. The partner cannot complete the delivery without it.

Tujyane turns codes on for your account when you ask. From then on, every new Shipment has deliveryProof: "CODE" and a 4-digit deliveryCode, in test mode and in live mode.

A Shipment keeps the setting it was created with. A change applies to new Shipments only.

  1. Read deliveryCode from the create answer, or from any later Shipment object.
  2. Give the code to your customer: in your app, by SMS, or on the order page. Tujyane does not send it.
  3. At the door, the partner asks your customer for the code and enters it in the Tujyane app. The partner never sees the code before that.
  4. With the right code, the Shipment becomes DELIVERED with deliveryConfirmedBy: "CODE".

If your customer uses the Tujyane app with the Recipient phone, the app also shows the code.

The partner has 5 attempts per Shipment. After the fifth wrong code, Tujyane locks the Shipment:

  • No code completes it any more.
  • You get the shipment.delivery_code_locked event.
  • The status stays PICKED_UP.

Then one of two things happens:

  • The partner reports the delivery failed with CODE_NOT_PROVIDED and brings the parcel back. See Failed deliveries.
  • Tujyane staff confirm the delivery with your customer and mark it delivered. The Shipment gets deliveryConfirmedBy: "STAFF", and the staff note is in endReason.

When deliveryProof is NONE, deliveryCode is null. The partner’s “Delivered” tap completes the Shipment with deliveryConfirmedBy: "PARTNER".

deliveredAt is the delivery time. deliveredLocation is { lat, lng } where the partner’s phone was at that moment, or null when Tujyane does not know it. Tujyane does not compare it with the drop-off point.