Skip to the content
YallaRoute

Platform / Business and developers

A REST API and signed webhooks for your own systems

Everything a person does in YallaRoute to book and follow a delivery, a program can do too. The REST API creates deliveries, returns prices and labels and reports status. Webhooks tell your systems the moment something happens. A web shop, a warehouse system or an order app can then book deliveries with you without anybody retyping an address.

Feature

API

22 / 22
Plans
Included in Growth, Scale and Enterprise.
Used by
Developer, Sender, Operations manager, Owner
During the trial
Included for the first 14 days on every new workspace.

What it does

API and webhooks: what you get

  • A small, predictable API

    Create a delivery, list and read deliveries, cancel one, fetch its label, get a price for a parcel before booking, read summary figures and read vehicle positions. Requests and responses are JSON.
  • Keys with scopes

    A key is read, write or admin. It is shown once when you create it and stored only as a hash, so a copy of the database does not contain a usable key. Keys can be revoked at any moment.
  • Safe retries

    Send an idempotency key with a request that creates something. If the network fails and you send it again, you get the original answer, not a second delivery.
  • Events pushed to you

    Register an address and choose events: booked, collected, out for delivery, delivered, failed, returned and more. Each event is sent as it happens with the delivery's details. The delivered event carries the proof.
  • Signed and retried

    Every webhook is signed with your secret using HMAC-SHA256 over a timestamp and the body, so you can verify it came from your workspace and is fresh. A failed delivery is retried with growing gaps.
  • Logs you can read

    A request log shows each API call and its result. A delivery log shows each webhook attempt and the response from your server, with a button to send it again.

Step by step

How it runs in practice

  1. Step 1 of 6

    Create a key

    In the developers screen. Give it the narrowest scope that does the job and copy it once.
  2. Step 2 of 6

    Ask for a price

    Send a parcel and an address and receive the price per service, the same price a person would see.
  3. Step 3 of 6

    Create a delivery

    Send the recipient, address, parcels and options. Receive the tracking number, the tracking link and the label link.
  4. Step 4 of 6

    Register a webhook

    Give an https address and pick events. Verify the signature in your handler.
  5. Step 5 of 6

    Go live

    Watch the request log and the webhook log for the first day. Both show exactly what was sent and received.
  6. Step 6 of 6

    Let senders connect themselves

    A sender can create keys and webhooks for their own account in the portal.

Who gets what

What each person gets from it

Developer
Integrates in an afternoon against a small API with clear errors and a log of every call.
Sender
Has deliveries booked straight from their web shop at checkout or dispatch.
Operations manager
Sees orders arrive on the board without anyone keying them in.
Owner
Can say yes to a customer who asks whether you integrate.

Yours to set

What you can configure, and what it does not do

Set per company

  • Keys: name, scope and revocation.
  • Webhook addresses, the events each receives, and rotation of the signing secret.
  • How long request logs and webhook logs are kept.

What it does not do

  • Every key is a live key. There is no separate test mode; use the sample network or a test booking to try things.
  • Requests are rate limited per key. The limit is returned in the response headers.
  • Webhook addresses must use https.
  • A webhook is attempted five times over a little more than an hour. After that it is marked failed and can be sent again by hand.
  • There are no ready-made plug-ins for particular web-shop platforms. Integration is through the API.

We would rather you read this here than find it out after you have signed up.

Plans

Which plan includes it

The API and webhooks depend on the plan. Public tracking by number needs no key.

The plans that include REST API and Webhooks
CapabilityStarterGrowthScaleEnterprise
REST APICreate and track deliveries, get quotes and labels from your own systems.Not includedIncludedIncludedIncluded
WebhooksSigned, retried event deliveries to your endpoints.Not includedIncludedIncludedIncluded

Prices and every limit are on the pricing page. How usage is counted is explained in plans and usage.

Questions

Questions about API and webhooks

How do I authenticate?

Send the key as a bearer token in the Authorization header. Keys begin with a recognisable prefix so they are easy to spot in a configuration file and hard to confuse with anything else.

How do I verify a webhook?

Compute HMAC-SHA256 of the timestamp, a full stop and the raw body with your secret, and compare it with the signature in the header. Reject anything with an old timestamp.

Is the API versioned?

Yes. The version is part of the address, and every response carries a version header, so you can always tell what answered.

Where is the reference?

On the developers page of this site, with every endpoint, field, error and event, and worked examples.

See it working in your own workspace

Start free and it is there from the first minute. Every new workspace has the Scale features for 14 days, and the sample network gives you something to try it on.