Let's Pizza Developersv1.0.0

Guides

Receive orders by webhooks

The fastest way: the order reaches you within seconds. You need a public HTTPS address that checks our signature. Used when settings.orders.delivery is webhooks.

The flow#

  1. Let's Pizza → Your systemA signed new-order eventPOST <your URL> · order.created
  2. Your systemChecks the signature, stores the order
  3. Your system → Let's Pizza2xx within 10 seconds
  4. Your system → Let's PizzaAcknowledge, with your numberPOST /partner/v1/orders/{id}/ack

Your own subscriptions#

With the webhooks:manage scope you manage your subscriptions yourself through /partner/v1/webhooks: address and events, the delivery log, replay, a test event and a new secret. The branches are your key’s, and you receive only what is yours:

EventsScope neededWhat you get
order.* · invoice.issuedorders:readOnly the orders that are in your feed.
payment.*payments:readPayments of your orders.
catalog.publishedcatalog:readEach new menu version published.
branch.* · availability.changedbranches:readYour key’s branches.
order.ack_overdueorders:readOnly about yourself: an order you did not acknowledge in time.

Customer details travel whole or trimmed according to your settings.customerData as Let’s Pizza sets it now, not by the subscription request. The signing secret is shown once, at creation; if lost, rotate it.

curl -sS -X POST "$LP_BASE_URL/partner/v1/webhooks" \
  -H "Authorization: Bearer $LP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "string",
  "url": "string",
  "events": [
    "order.created"
  ],
  "branches": [
    "string"
  ],
  "pii": true,
  "active": true
}'

Your receiver#

  1. Read the raw body bytes, before any JSON parsing.
  2. Verify the signature and timestamp as in Signature verification.
  3. Skip the event if you already processed its id.
  4. Store, answer 2xx at once, then do the work after answering.

If your receiver is down#

We retry 5 times with growing delays, and any event can be replayed from the console. The retry schedule. As a safety net, pull unacknowledged orders every few minutes.

Endpoints used#

Anything marked “Coming soon” is not served yet; it joins the reference as soon as it ships.