Skip to content

Bulk upload and sync ​

Three paths for large catalogs (30,000 products and more):

TaskEndpointWhen
Create / update productsPOST /seller/productsWhen product content changes
Stock and pricesPUT /seller/offersMany times a day
Fetch changes on our sideGET /seller/products?updated_since=To keep your own system current

Bulk product upload ​

POST /seller/products takes 1–500 products per call (each in the product model shape). It answers 202 at once with a job; products are then validated and written one by one in the background. One product's error does not stop the others.

sh
curl -X POST https://api.ustageliyor.com/v1/seller/products \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: catalog-2026-10-23-batch-0007" \
  -d @batch-0007.json

Idempotency-Key ​

Give every batch a unique key (120 characters at most; e.g. date + batch number). Resend the same request with the same key after a network error and no new job is opened: the first job comes back. Keys are per seller.

Don't reuse a key

Sending different products with the same key also returns the first job, and the new products are not written. Every new batch gets a new key.

Follow the job ​

sh
curl https://api.ustageliyor.com/v1/seller/jobs/mij_… -H "Authorization: Bearer $KEY"
FieldMeaning
statusqueued → running → done | failed
total, processedProgress
created, updated, failedCounters
results[]Per product: index (position in the batch), ref (first stock code), ok, product_id, created, code, problems
errorWhy the job stopped, when failed

Recommended polling: every 2–5 seconds until done or failed. GET /seller/jobs lists the last 50 jobs (without results). A job resumes where it left off even if the server restarts.

Recommended flow: split the catalog into batches of 500, send the next one when the previous is done; fix the ok: false entries in results and resend only those.

Stock and prices ​

PUT /seller/offers updates stock and prices at once (no job) without touching product content. 1–1000 rows per call; each row is found by sku or barcode and only the fields you give change.

sh
curl -X PUT https://api.ustageliyor.com/v1/seller/offers \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{
    "items": [
      { "sku": "TLM-100-LAC-M", "stock": 18 },
      { "sku": "TLM-100-GRI-L", "price": 699.9, "list_price": 899.9 },
      { "barcode": "8680000000059", "stock": 0 }
    ]
  }'
json
{
  "updated": 2,
  "failed": 1,
  "results": [
    { "ref": "TLM-100-LAC-M", "ok": true, "variant_id": "variant_…" },
    { "ref": "TLM-100-GRI-L", "ok": true, "variant_id": "variant_…" },
    { "ref": "8680000000059", "ok": false, "code": "OFFER_NOT_FOUND" }
  ]
}

Row outcomes: OFFER_NOT_FOUND (you have no such code), OFFER_INVALID (price ≤ 0, stock not a whole number, or list_price < price). A bad row does not affect the others. Linked marketplaces get the change on their next sync.

Recommended cadence

  • Stock: send only the rows that changed, every 5–15 minutes.
  • Prices: when they change.
  • Full stock refresh: once a day, at night (30,000 variants = 30 calls).
  • Don't send the same row several times a minute; the last value wins.

Fetching changes ​

GET /seller/products returns cursor pages: limit up to 200 (default 50), cursor=<next_cursor> for the next page; a null next_cursor means the last page. Pages are equally fast on a 30,000-product catalog.

With updated_since (ISO 8601 with a time zone) only products changed at or after that moment come back, oldest first:

sh
curl "https://api.ustageliyor.com/v1/seller/products?updated_since=2026-10-23T06:00:00Z&limit=200" \
  -H "Authorization: Bearer $KEY"
json
{
  "data": [
    { "id": "prod_…", "updated_at": "2026-10-23T06:04:11.512Z", "variants": [] }
  ],
  "next_cursor": "eyJ…"
}

The sync loop:

  1. Read your stored last time (watermark); leave it empty the first time.
  2. Start with updated_since=watermark&limit=200 and follow pages until next_cursor is null.
  3. Write each product to your system (be ready to see a product twice: the boundary is inclusive).
  4. Store the largest updated_at you saw as the new watermark.

Other filters: q (search), status (published | draft), category_id.

Deleted products

A deleted product does not show in this list. To catch deletions, now and then (e.g. weekly) fetch the full list without updated_since and compare it with your side.

Listing does not count against the bulk limit

Reads (GET /seller/products, GET /seller/products/{id}) count only against the key quota (120 per minute). A full list of 30,000 products in pages of 200 is 150 calls and fits in about two minutes of quota. Writes (POST/PUT/DELETE) are also subject to the bulk limit; see Limits and errors.