رفتن به محتوا
چسبیتوسعه‌دهندگان
خوراک کالا

List the Shopping Feed

شرح نقطه‌های پایانی در مرجع API به انگلیسی است؛ واژه‌ها و قالب‌ها همان است که در پاسخ‌ها می‌بینید.

نمونه‌ها نشانی محیط اصلی را دارند، اما «امتحان کنید» همان درخواست را فقط به محیط آزمایشی می‌فرستد. کلید محرمانه شما نه در این سایت ذخیره می‌شود و نه در گزارش‌های آن می‌آید.

GET
/v1/feed/variants

Returns a page of the listed Variants, the least recently changed first, then by id, each with its page, name, images and Specifications, and the unit price its product page opens with for the storefront's default Ship-to Province, at one unit; a Variant whose page opens at more than one unit is left out, and one no Offer can sell is listed as not available at 0. With updatedSince, only Variants changed since then, those left out since then included with listed false and their ids alone, so a copy can drop them. A page holds limit Variants, from 1 to 50, 20 without one. When more follow, next is the cursor of the next page; send it back with the same updatedSince and limit. A malformed cursor, or one made for another list or updatedSince, is VALIDATION_FAILED with TYPE_MISMATCH. The call needs an access token of the chasbi-partners realm for an active API Key, a Feed Partner's or a Seller's. Any other token is refused with ACCESS_DENIED.

احراز هویت

oauth2
headerAuthorizationBearer <token>

An access token of the chasbi-partners realm, made by the client-credentials grant with an API Key's client id and secret in the Authorization: Basic header. It lives five minutes and comes with no refresh token: ask for a new one when it ends.

پارامترهای کوئری

updatedSince?string

Lists only Variants changed at or after this instant.

قالبdate-time
cursor?string

The next of the previous page.

الگو^[A-Za-z0-9_-]+$
limit?integer

How many Variants a page holds, from 1 to 50.

قالبint32
بازه1 <= value <= 50
پیش‌فرض20

بدنه پاسخ

A page of the Shopping Feed.

application/json
  1. response

A page of the Shopping Feed.

entries*array<>

The Variants on this page.

next?string

An opaque token to send as cursor for the next page, with the same updatedSince and limit. Absent on the last page.

نمونه درخواست
curl -X GET 'https://api.chasbi.com/v1/feed/variants'
نمونه پاسخ
{  "entries": [    {      "addedAt": "2019-08-24T14:15:22Z",      "available": true,      "categoryName": {        "fa": "string"      },      "images": [        "string"      ],      "listed": true,      "pageUrl": "string",      "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",      "sellerCity": "string",      "sellerName": "string",      "specifications": [        {          "label": {            "fa": "string"          },          "value": {            "fa": "string"          }        }      ],      "struckPriceRial": 0,      "title": {        "fa": "string"      },      "unitPriceRial": 0,      "updatedAt": "2019-08-24T14:15:22Z",      "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf"    }  ],  "next": "string"}