Modern PetstoreAPI Docs
HomeGuidesModern PetstoreAPI
Classic PetstoreAPI
HomeGuidesModern PetstoreAPI
Classic PetstoreAPI
  1. Webhooks
  • Pet
    • Get Pet
      GET
    • Update Pet
      PUT
    • Delete Pet
      DELETE
    • Create Pet
      POST
    • List Pets
      GET
    • Advanced Pet Search (QUERY method)
      QUERY
    • Upload Pet Image
      POST
  • Chat
    • Pet Care AI Consultation
      POST
  • Payments
    • Pay Order
      POST
  • Store
    • Get Store Inventory
      GET
    • Create Order
      POST
    • Get Order
      GET
    • Cancel Order
      DELETE
    • Callback Example
      POST
  • User
    • Create User
      POST
    • Update User
      PUT
    • Get User
      GET
    • Delete User Account
      DELETE
    • Create Authentication Token
      POST
  • Webhooks
    • Order Status Changed Event
    • Payment Succeeded Event
  • Schemas
    • Pet
    • PetCollection
    • User
    • OrderPayment
    • Bank Card
    • Bank Account
    • Category
    • Links
    • Order
    • ApiResponse
    • Tag
    • Error
  1. Webhooks

Order Status Changed Event

Webhook
POST
orderStatusChanged
Triggered when an order's status changes. This webhook notifies your system of order lifecycle events, enabling real-time updates for order tracking, notifications, and fulfillment workflows.

Status Transitions#

Orders follow this lifecycle:
PLACED → APPROVED (payment confirmed)
APPROVED → SHIPPED (order dispatched)
SHIPPED → DELIVERED (order completed)
Any status → CANCELLED (order cancelled)

Webhook Security#

All webhooks include a signature header (X-Webhook-Signature) for verification. See our webhook security guide for implementation details.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
OAuth 2.0
Authorization Code
deviceCode
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Authorize URL: https://auth.petstoreapi.com/authorize
Token URL: https://auth.petstoreapi.com/token
Refresh URL: https://auth.petstoreapi.com/refresh
or
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200
Webhook received successfully
This response does not have a body.
🟠401
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://your-api-server.com' \
--header 'X-Tenant-ID: 550e8400-e29b-41d4-a716-446655440000' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "eventId": "evt_9f4a8b3c-2d5e-6f7g-8h9i-0j1k2l3m4n5o",
    "eventType": "order.statusChanged",
    "timestamp": "2024-12-16T10:30:00Z",
    "data": {
        "order": {
            "id": "019b4139-1234-7abc-8def-123456789abc",
            "petId": "019b4132-70aa-764f-b315-e2803d882a24",
            "userId": "019b4138-e0af-70b9-8f0c-6ea97d495dfa",
            "status": "APPROVED",
            "totalAmount": "125.50",
            "currency": "USD",
            "createdAt": "2024-12-16T09:00:00Z",
            "updatedAt": "2024-12-16T10:30:00Z"
        },
        "previousStatus": "PLACED",
        "newStatus": "APPROVED",
        "changedAt": "2024-12-16T10:30:00Z",
        "changedBy": "system"
    }
}'
Modified at 2026-03-13 15:47:21
Previous
Create Authentication Token
Next
Payment Succeeded Event
Built with