مطوّرو ليتس بيتزاv1.0.0

مرجع الواجهة

إشعارات Webhook

Your own signed webhook subscriptions: events pushed to your address instead of polling.

GETYour subscriptions#

GET/partner/v1/webhooks

Scope webhooks:manage. Your own subscriptions on the Let’s Pizza webhook service: signed deliveries (X-LP-Signature: v1=<hex HMAC-SHA256(secret, "<X-LP-Timestamp>.<raw body>")>), retries after 1 min, 5 min, 30 min, 2 h and 12 h, a delivery log and replay. The branches are your key’s; whether the customer’s full details travel is your settings.customerData, not the request.

المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
webhooks:manage
curl -sS "$LP_BASE_URL/partner/v1/webhooks" \
  -H "Authorization: Bearer $LP_API_KEY"

الردود

200OKWebhookSubscription[]

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

200 · JSON
[
  {
    "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
    "name": "string",
    "url": "string",
    "events": [
      "order.created"
    ],
    "branches": [
      "string"
    ],
    "pii": true,
    "active": true,
    "pausedAt": "2026-11-19T19:30:12+03:00",
    "pausedReason": "string",
    "secretHint": "string",
    "createdAt": "2026-11-19T19:30:12+03:00",
    "createdBy": "string",
    "partnerId": "string",
    "updatedAt": "2026-11-19T19:30:12+03:00",
    "lastDeliveryAt": "2026-11-19T19:30:12+03:00",
    "failureCount": 0,
    "waiting": 0,
    "dead": 0
  }
]

POSTSubscribe an address#

POST/partner/v1/webhooks

Scope webhooks:manage. Your own subscriptions on the Let’s Pizza webhook service: signed deliveries (X-LP-Signature: v1=<hex HMAC-SHA256(secret, "<X-LP-Timestamp>.<raw body>")>), retries after 1 min, 5 min, 30 min, 2 h and 12 h, a delivery log and replay. The branches are your key’s; whether the customer’s full details travel is your settings.customerData, not the request. The signing secret is returned this once (a replay of the same request answers the subscription with an empty secret: rotate it if it was lost).

المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
webhooks:manage
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
}'

المعاملات

الاسمالموضعالنوعالوصف
Idempotency-Key *headerstringYour unique id of this request (≤ 128 characters). A repeat with the same key and body returns the first answer; the same key with another body is 422 IDEMPOTENCY_KEY_REUSED.

جسم الطلب SaveWebhookRequest

  • namestringمطلوب

    الطول: 1 – 80

  • urlstringمطلوب

    الطول: 8 – 500

  • eventsWebhookEventType[]مطلوب

    القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

    العناصر: 1 – 21

  • branchesstring[]اختيارييقبل null

    العناصر: ≤ 200

  • piibooleanاختياري
  • activebooleanاختياري

الردود

201CreatedWebhookSecretIssued

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

  • subscriptionWebhookSubscriptionمطلوب
    الحقول الداخلية (18)
    • idstringمطلوب

      الطول: 1 – 64

    • namestringمطلوب
    • urlstringمطلوب
    • eventsWebhookEventType[]مطلوب

      القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

    • branchesstring[]مطلوبيقبل null
    • piibooleanمطلوب
    • activebooleanمطلوب
    • pausedAtstring<date-time>مطلوبيقبل null
    • pausedReasonstringمطلوبيقبل null
    • secretHintstringمطلوب
    • createdAtstring<date-time>مطلوب
    • createdBystringمطلوبيقبل null
    • partnerIdstringمطلوبيقبل null
    • updatedAtstring<date-time>مطلوب
    • lastDeliveryAtstring<date-time>مطلوبيقبل null
    • failureCountintegerمطلوب

      القيمة: ≥ 0

    • waitingintegerمطلوب

      القيمة: ≥ 0

    • deadintegerمطلوب

      القيمة: ≥ 0

  • secretstringمطلوب
400INVALID_REQUEST (field, detail.issues), IDEMPOTENCY_KEY_REQUIREDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
422WEBHOOK_INVALID (detail.issues[] of {path, code}: URL_INVALID, URL_NOT_HTTPS, URL_PRIVATE_ADDRESS, URL_CREDENTIALS, EVENT_NOT_AVAILABLE, EVENT_REPEATED, BRANCHES_EMPTY, BRANCH_UNKNOWN), IDEMPOTENCY_KEY_REUSEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

201 · WebhookSecretIssued
{
  "subscription": {
    "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
    "name": "string",
    "url": "string",
    "events": [
      "order.created"
    ],
    "branches": [
      "string"
    ],
    "pii": true,
    "active": true,
    "pausedAt": "2026-11-19T19:30:12+03:00",
    "pausedReason": "string",
    "secretHint": "string",
    "createdAt": "2026-11-19T19:30:12+03:00",
    "createdBy": "string",
    "partnerId": "string",
    "updatedAt": "2026-11-19T19:30:12+03:00",
    "lastDeliveryAt": "2026-11-19T19:30:12+03:00",
    "failureCount": 0,
    "waiting": 0,
    "dead": 0
  },
  "secret": "string"
}

GETOne subscription#

GET/partner/v1/webhooks/{id}
المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
أي مفتاح صالح
curl -sS "$LP_BASE_URL/partner/v1/webhooks/7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01" \
  -H "Authorization: Bearer $LP_API_KEY"

المعاملات

الاسمالموضعالنوعالوصف
id *pathstring

الردود

200OKWebhookSubscription

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

  • idstringمطلوب

    الطول: 1 – 64

  • namestringمطلوب
  • urlstringمطلوب
  • eventsWebhookEventType[]مطلوب

    القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

  • branchesstring[]مطلوبيقبل null
  • piibooleanمطلوب
  • activebooleanمطلوب
  • pausedAtstring<date-time>مطلوبيقبل null
  • pausedReasonstringمطلوبيقبل null
  • secretHintstringمطلوب
  • createdAtstring<date-time>مطلوب
  • createdBystringمطلوبيقبل null
  • partnerIdstringمطلوبيقبل null
  • updatedAtstring<date-time>مطلوب
  • lastDeliveryAtstring<date-time>مطلوبيقبل null
  • failureCountintegerمطلوب

    القيمة: ≥ 0

  • waitingintegerمطلوب

    القيمة: ≥ 0

  • deadintegerمطلوب

    القيمة: ≥ 0

401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
404WEBHOOK_NOT_FOUND: not one of your subscriptionsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

200 · WebhookSubscription
{
  "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
  "name": "string",
  "url": "string",
  "events": [
    "order.created"
  ],
  "branches": [
    "string"
  ],
  "pii": true,
  "active": true,
  "pausedAt": "2026-11-19T19:30:12+03:00",
  "pausedReason": "string",
  "secretHint": "string",
  "createdAt": "2026-11-19T19:30:12+03:00",
  "createdBy": "string",
  "partnerId": "string",
  "updatedAt": "2026-11-19T19:30:12+03:00",
  "lastDeliveryAt": "2026-11-19T19:30:12+03:00",
  "failureCount": 0,
  "waiting": 0,
  "dead": 0
}

PUTChange a subscription#

PUT/partner/v1/webhooks/{id}
المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
أي مفتاح صالح
curl -sS -X PUT "$LP_BASE_URL/partner/v1/webhooks/7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01" \
  -H "Authorization: Bearer $LP_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "string",
  "url": "string",
  "events": [
    "order.created"
  ],
  "branches": [
    "string"
  ],
  "pii": true,
  "active": true
}'

المعاملات

الاسمالموضعالنوعالوصف
id *pathstring

جسم الطلب SaveWebhookRequest

  • namestringمطلوب

    الطول: 1 – 80

  • urlstringمطلوب

    الطول: 8 – 500

  • eventsWebhookEventType[]مطلوب

    القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

    العناصر: 1 – 21

  • branchesstring[]اختيارييقبل null

    العناصر: ≤ 200

  • piibooleanاختياري
  • activebooleanاختياري

الردود

200OKWebhookSubscription

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

  • idstringمطلوب

    الطول: 1 – 64

  • namestringمطلوب
  • urlstringمطلوب
  • eventsWebhookEventType[]مطلوب

    القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

  • branchesstring[]مطلوبيقبل null
  • piibooleanمطلوب
  • activebooleanمطلوب
  • pausedAtstring<date-time>مطلوبيقبل null
  • pausedReasonstringمطلوبيقبل null
  • secretHintstringمطلوب
  • createdAtstring<date-time>مطلوب
  • createdBystringمطلوبيقبل null
  • partnerIdstringمطلوبيقبل null
  • updatedAtstring<date-time>مطلوب
  • lastDeliveryAtstring<date-time>مطلوبيقبل null
  • failureCountintegerمطلوب

    القيمة: ≥ 0

  • waitingintegerمطلوب

    القيمة: ≥ 0

  • deadintegerمطلوب

    القيمة: ≥ 0

401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
404WEBHOOK_NOT_FOUND: not one of your subscriptionsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
422WEBHOOK_INVALID (detail.issues[] of {path, code}: URL_INVALID, URL_NOT_HTTPS, URL_PRIVATE_ADDRESS, URL_CREDENTIALS, EVENT_NOT_AVAILABLE, EVENT_REPEATED, BRANCHES_EMPTY, BRANCH_UNKNOWN), IDEMPOTENCY_KEY_REUSEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

200 · WebhookSubscription
{
  "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
  "name": "string",
  "url": "string",
  "events": [
    "order.created"
  ],
  "branches": [
    "string"
  ],
  "pii": true,
  "active": true,
  "pausedAt": "2026-11-19T19:30:12+03:00",
  "pausedReason": "string",
  "secretHint": "string",
  "createdAt": "2026-11-19T19:30:12+03:00",
  "createdBy": "string",
  "partnerId": "string",
  "updatedAt": "2026-11-19T19:30:12+03:00",
  "lastDeliveryAt": "2026-11-19T19:30:12+03:00",
  "failureCount": 0,
  "waiting": 0,
  "dead": 0
}

DELRemove a subscription and its log#

DEL/partner/v1/webhooks/{id}
المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
أي مفتاح صالح
curl -sS -X DELETE "$LP_BASE_URL/partner/v1/webhooks/7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01" \
  -H "Authorization: Bearer $LP_API_KEY"

المعاملات

الاسمالموضعالنوعالوصف
id *pathstring

الردود

204Removed
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
404WEBHOOK_NOT_FOUND: not one of your subscriptionsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

POSTA new signing secret#

POST/partner/v1/webhooks/{id}/secret

Returned this once; the old secret stops working at once.

المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
أي مفتاح صالح
curl -sS -X POST "$LP_BASE_URL/partner/v1/webhooks/7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01/secret" \
  -H "Authorization: Bearer $LP_API_KEY"

المعاملات

الاسمالموضعالنوعالوصف
id *pathstring

الردود

201CreatedWebhookSecretIssued

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

  • subscriptionWebhookSubscriptionمطلوب
    الحقول الداخلية (18)
    • idstringمطلوب

      الطول: 1 – 64

    • namestringمطلوب
    • urlstringمطلوب
    • eventsWebhookEventType[]مطلوب

      القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

    • branchesstring[]مطلوبيقبل null
    • piibooleanمطلوب
    • activebooleanمطلوب
    • pausedAtstring<date-time>مطلوبيقبل null
    • pausedReasonstringمطلوبيقبل null
    • secretHintstringمطلوب
    • createdAtstring<date-time>مطلوب
    • createdBystringمطلوبيقبل null
    • partnerIdstringمطلوبيقبل null
    • updatedAtstring<date-time>مطلوب
    • lastDeliveryAtstring<date-time>مطلوبيقبل null
    • failureCountintegerمطلوب

      القيمة: ≥ 0

    • waitingintegerمطلوب

      القيمة: ≥ 0

    • deadintegerمطلوب

      القيمة: ≥ 0

  • secretstringمطلوب
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
404WEBHOOK_NOT_FOUND: not one of your subscriptionsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

201 · WebhookSecretIssued
{
  "subscription": {
    "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
    "name": "string",
    "url": "string",
    "events": [
      "order.created"
    ],
    "branches": [
      "string"
    ],
    "pii": true,
    "active": true,
    "pausedAt": "2026-11-19T19:30:12+03:00",
    "pausedReason": "string",
    "secretHint": "string",
    "createdAt": "2026-11-19T19:30:12+03:00",
    "createdBy": "string",
    "partnerId": "string",
    "updatedAt": "2026-11-19T19:30:12+03:00",
    "lastDeliveryAt": "2026-11-19T19:30:12+03:00",
    "failureCount": 0,
    "waiting": 0,
    "dead": 0
  },
  "secret": "string"
}

POSTSend a signed ping now#

POST/partner/v1/webhooks/{id}/test

One attempt, logged like any delivery, never retried.

المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
أي مفتاح صالح
curl -sS -X POST "$LP_BASE_URL/partner/v1/webhooks/7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01/test" \
  -H "Authorization: Bearer $LP_API_KEY"

المعاملات

الاسمالموضعالنوعالوصف
id *pathstring

الردود

201SentWebhookDelivery

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

  • idstringمطلوب

    الطول: 1 – 64

  • subscriptionIdstringمطلوب

    الطول: 1 – 64

  • eventIdstringمطلوبيقبل null
  • eventTypeWebhookEventTypeمطلوب

    القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

  • subjectstringمطلوبيقبل null
  • branchIdstringمطلوبيقبل null
  • attemptintegerمطلوب

    القيمة: ≥ 0

  • statusWebhookDeliveryStatusمطلوب

    القيم: "pending""delivered""failed""dead"

  • httpStatusintegerمطلوبيقبل null
  • durationMsintegerمطلوبيقبل null
  • errorstringمطلوبيقبل null
  • nextAtstring<date-time>مطلوبيقبل null
  • createdAtstring<date-time>مطلوب
  • lastAttemptAtstring<date-time>مطلوبيقبل null
  • deliveredAtstring<date-time>مطلوبيقبل null
  • replayOfstringمطلوبيقبل null
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
404WEBHOOK_NOT_FOUND: not one of your subscriptionsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

201 · WebhookDelivery
{
  "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
  "subscriptionId": "string",
  "eventId": "BC-EVT-000985",
  "eventType": "order.created",
  "subject": "string",
  "branchId": "28",
  "attempt": 0,
  "status": "pending",
  "httpStatus": 0,
  "durationMs": 0,
  "error": "string",
  "nextAt": "2026-11-19T19:30:12+03:00",
  "createdAt": "2026-11-19T19:30:12+03:00",
  "lastAttemptAt": "2026-11-19T19:30:12+03:00",
  "deliveredAt": "2026-11-19T19:30:12+03:00",
  "replayOf": "string"
}

GETThe delivery log#

GET/partner/v1/webhooks/{id}/deliveries
المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
أي مفتاح صالح
curl -sS "$LP_BASE_URL/partner/v1/webhooks/7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01/deliveries" \
  -H "Authorization: Bearer $LP_API_KEY"

المعاملات

الاسمالموضعالنوعالوصف
id *pathstring
statusquerystringComma-separated: pending, delivered, failed, dead.
beforequerystring
limitqueryinteger

الردود

200OKWebhookDeliveryPage

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

  • deliveriesWebhookDelivery[]مطلوب
    الحقول الداخلية (16)
    • idstringمطلوب

      الطول: 1 – 64

    • subscriptionIdstringمطلوب

      الطول: 1 – 64

    • eventIdstringمطلوبيقبل null
    • eventTypeWebhookEventTypeمطلوب

      القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

    • subjectstringمطلوبيقبل null
    • branchIdstringمطلوبيقبل null
    • attemptintegerمطلوب

      القيمة: ≥ 0

    • statusWebhookDeliveryStatusمطلوب

      القيم: "pending""delivered""failed""dead"

    • httpStatusintegerمطلوبيقبل null
    • durationMsintegerمطلوبيقبل null
    • errorstringمطلوبيقبل null
    • nextAtstring<date-time>مطلوبيقبل null
    • createdAtstring<date-time>مطلوب
    • lastAttemptAtstring<date-time>مطلوبيقبل null
    • deliveredAtstring<date-time>مطلوبيقبل null
    • replayOfstringمطلوبيقبل null
  • nextBeforestringاختياري
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
404WEBHOOK_NOT_FOUND: not one of your subscriptionsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

200 · WebhookDeliveryPage
{
  "deliveries": [
    {
      "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
      "subscriptionId": "string",
      "eventId": "BC-EVT-000985",
      "eventType": "order.created",
      "subject": "string",
      "branchId": "28",
      "attempt": 0,
      "status": "pending",
      "httpStatus": 0,
      "durationMs": 0,
      "error": "string",
      "nextAt": "2026-11-19T19:30:12+03:00",
      "createdAt": "2026-11-19T19:30:12+03:00",
      "lastAttemptAt": "2026-11-19T19:30:12+03:00",
      "deliveredAt": "2026-11-19T19:30:12+03:00",
      "replayOf": "string"
    }
  ],
  "nextBefore": "string"
}

POSTSend a delivery again#

POST/partner/v1/webhooks/{id}/deliveries/{deliveryId}/replay

A new delivery of the same envelope (same id: deduplicate on it), sent by the worker.

المصادقة
مفتاح الشريك في ترويسة Authorization
الصلاحيات المطلوبة
أي مفتاح صالح
curl -sS -X POST "$LP_BASE_URL/partner/v1/webhooks/7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01/deliveries/string/replay" \
  -H "Authorization: Bearer $LP_API_KEY"

المعاملات

الاسمالموضعالنوعالوصف
id *pathstring
deliveryId *pathstring

الردود

201QueuedWebhookDelivery

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
RateLimit-LimitintegerThe key's requests per minute.
RateLimit-RemainingintegerRequests left in the current minute.
RateLimit-ResetintegerSeconds until the minute window resets.

البنية

  • idstringمطلوب

    الطول: 1 – 64

  • subscriptionIdstringمطلوب

    الطول: 1 – 64

  • eventIdstringمطلوبيقبل null
  • eventTypeWebhookEventTypeمطلوب

    القيم: "order.created""order.accepted""order.preparing""order.ready""order.out_for_delivery""order.delivered""order.picked_up""order.cancelled""order.rejected""order.failed_delivery""order.not_collected""order.ack_overdue""payment.succeeded""payment.refunded""invoice.issued""branch.closed""branch.opened""branch.busy""availability.changed""catalog.published""ping"

  • subjectstringمطلوبيقبل null
  • branchIdstringمطلوبيقبل null
  • attemptintegerمطلوب

    القيمة: ≥ 0

  • statusWebhookDeliveryStatusمطلوب

    القيم: "pending""delivered""failed""dead"

  • httpStatusintegerمطلوبيقبل null
  • durationMsintegerمطلوبيقبل null
  • errorstringمطلوبيقبل null
  • nextAtstring<date-time>مطلوبيقبل null
  • createdAtstring<date-time>مطلوب
  • lastAttemptAtstring<date-time>مطلوبيقبل null
  • deliveredAtstring<date-time>مطلوبيقبل null
  • replayOfstringمطلوبيقبل null
401UNAUTHENTICATED (no key, a wrong or revoked one), KEY_EXPIRED, KEY_ENVIRONMENT_MISMATCH (a test key on production or the other way round)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
403PARTNER_SUSPENDED, IP_NOT_ALLOWED, SCOPE_REQUIRED (detail.required lists the scopes), BRANCH_NOT_ALLOWEDPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
404WEBHOOK_NOT_FOUND: not one of your subscriptionsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
429RATE_LIMITED: wait Retry-After seconds (also in detail.retryAfterSeconds)PartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.
500INTERNAL_ERROR: retryable; quote the X-Request-Id if it persistsPartnerError

الترويسات

الاسمالنوعالوصف
X-Request-IdstringThe id of this request: quote it to support. Send your own (8–64 of A-Z a-z 0-9 . _ -) to trace a call end to end.

مثال الرد

201 · WebhookDelivery
{
  "id": "7f3a2c10-5b8e-4d21-9c47-1a2b3c4d5e01",
  "subscriptionId": "string",
  "eventId": "BC-EVT-000985",
  "eventType": "order.created",
  "subject": "string",
  "branchId": "28",
  "attempt": 0,
  "status": "pending",
  "httpStatus": 0,
  "durationMs": 0,
  "error": "string",
  "nextAt": "2026-11-19T19:30:12+03:00",
  "createdAt": "2026-11-19T19:30:12+03:00",
  "lastAttemptAt": "2026-11-19T19:30:12+03:00",
  "deliveredAt": "2026-11-19T19:30:12+03:00",
  "replayOf": "string"
}