Prompt

product catalog api pagination webhooks

Technology / API Platforms2 observationsLast seen Oct 28, 2026

Latest observation

Oct 28, 2026OpenAI APIWeb search: off

Here’s a practical blueprint for a Product Catalog API with pagination and webhooks.

Core resources

  • Products
  • Categories
  • Inventory/Variants (optional)
  • Webhooks subscriptions

1) Product catalog API

List products

GET /products

Query params

  • limit — number of items per page
  • cursor — opaque pagination cursor
  • sort — e.g. created_at, updated_at, name
  • order — asc or desc
  • category_id — filter by category
  • q — search text
  • updated_since — incremental sync support

Example

GET /products?limit=20&cursor=eyJpZCI6MTIzfQ==

Response

{
  "data": [
    {
      "id": "prod_001",
      "sku": "SHOE-001",
      "name": "Running Shoe",
      "description": "Lightweight running shoe",
      "price": 89.99,
      "currency": "USD",
      "category_id": "cat_10",
      "stock": 42,
      "created_at": "2026-10-28T10:00:00Z",
      "updated_at": "2026-10-28T10:00:00Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "next_cursor": "eyJpZCI6MTQ0fQ==",
    "has_more": true
  }
}

Get a single product

GET /products/{product_id}

Create product

POST /products

{
  "sku": "SHOE-001",
  "name": "Running Shoe",
  "description": "Lightweight running shoe",
  "price": 89.99,
  "currency": "USD",
  "category_id": "cat_10",
  "stock": 42
}

Update product

PATCH /products/{product_id}

Delete product

DELETE /products/{product_id}


2) Pagination strategy

Recommended: cursor-based pagination

Cursor pagination is best for catalogs because it’s stable under inserts/deletes.

Pattern

  • Client requests the first page: GET /products?limit=20
  • API returns next_cursor
  • Client requests next page using that cursor: GET /products?limit=20&cursor=...

Why use it

  • Better than offset for large catalogs
  • Avoids duplicates/missing records when data changes
  • Good for syncing and infinite scroll

Alternative: offset pagination

GET /products?limit=20&offset=40

Use only if simplicity matters more than consistency.


3) Webhooks

Webhooks notify consumers when catalog data changes.

Supported events

  • product.created
  • product.updated
  • product.deleted
  • category.created
  • category.updated
  • category.deleted
  • inventory.updated

Subscribe to webhooks

POST /webhooks/subscriptions

{
  "url": "https://example.com/webhooks/catalog",
  "events": ["product.created", "product.updated", "product.deleted"],
  "secret": "shared-signing-secret"
}

Response

{
  "id": "wh_123",
  "url": "https://example.com/webhooks/catalog",
  "events": ["product.created", "product.updated", "product.deleted"],
  "status": "active"
}

Webhook payload example

{
  "id": "evt_001",
  "type": "product.updated",
  "created_at": "2026-10-28T10:05:00Z",
  "data": {
    "id": "prod_001",
    "sku": "SHOE-001",
    "name": "Running Shoe",
    "price": 84.99,
    "currency": "USD",
    "updated_at": "2026-10-28T10:05:00Z"
  }
}

4) Webhook delivery best practices

  • Sign payloads with HMAC (e.g. X-Signature)
  • Include event ID for idempotency
  • Retry on failures with exponential backoff
  • Return 2xx quickly; process asynchronously
  • Allow consumers to replay events
  • Store delivery logs/status

Headers

X-Webhook-Id: wh_123
X-Event-Id: evt_001
X-Signature: sha256=...
X-Event-Type: product.updated

5) Example event handling flow

  1. Admin updates a product
  2. API saves change
  3. API emits product.updated
  4. Webhook dispatcher queues delivery
  5. Consumer verifies signature
  6. Consumer processes event and returns 200 OK

6) Useful endpoints

  • GET /products
  • GET /products/{id}
  • POST /products
  • PATCH /products/{id}
  • DELETE /products/{id}
  • GET /categories
  • POST /webhooks/subscriptions
  • GET /webhooks/subscriptions
  • DELETE /webhooks/subscriptions/{id}
  • GET /webhooks/deliveries?subscription_id=...

If you want, I can turn this into:

  1. an OpenAPI spec,
  2. a database schema, or
  3. a Node/Express or FastAPI implementation.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.