Pulse JSONL Ingestion

Bulk ingest pulse/inventory variants for listings. Each line is a JSON object with a listing_id and a variants array. Requires pulse config to be set for the tenant first.

POST /v1/listings/pulse/ingest/jsonl

Prerequisites

Configure pulse dimensions and field mappings via POST /v1/listings/pulse/config before ingesting.

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/x-ndjson

Request Body Format

Raw body — one JSON object per line. Maximum 5,000 rows per request.

Each line must contain a listing_id and a variants array. Variant field paths (location, pricing, inventory) are mapped via your tenant's pulse config.

Error Response (422)

When pulse config is not set:

{
  "error": "No pulse_config found for this tenant. Configure via POST /v1/listings/pulse/config first."
}

Notes

  • dimension_fields in pulse config define how variants are keyed (e.g., branch_id, service_type).
  • regular_price_field, promo_price_field, and stock-related fields map to your variant structure.
  • Each variant represents availability and pricing for a specific dimension combination (e.g., branch + delivery mode).

Parameters

listing_id
string
Required
The identifier of the listing these variants belong to. Must match an already-ingested listing.
variants
array
Required
Array of variant objects, each representing availability and pricing for a specific dimension combination (e.g., branch + delivery mode).
POST/v1/listings/pulse/ingest/jsonl
curl https://api-eu-aisearch.tradly.app/v1/listings/pulse/ingest/jsonl \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR....." \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"listing_id":"prod_1","variants":[{"location":{"id":"branch_A"},"delivery_mode":"home_delivery","pricing":{"base_price":9.99},"inventory":{"available_units":100}}]}'
RESPONSE
{
  "success": true,
  "total": 2,
  "processed": 2,
  "errors": []
}