رفتن به محتوا
چسبیتوسعه‌دهندگان
پیشنهادهای فروش

List the caller's Offers

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

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

GET
/v1/me/offers

Returns a page of the Offers of the caller's Seller, the newest created first, then by id, each with its Variant, its Stock Status and its standing. productId keeps the Offers on Variants of one Product, and sellerSku the Offer whose Seller SKU reads the same once cleaned and upper-cased; one that is no Seller SKU matches nothing.

A page holds limit Offers, from 1 to 50, 20 without one. When more follow, next is the cursor of the next page; send it back with the same limit and filters. A malformed cursor, or one made for another list or other filters, is VALIDATION_FAILED with TYPE_MISMATCH. The call needs a token of the chasbi realm whose Account holds the Seller power PRODUCTS_AND_PRICES: the owner, or a Seller Member with the role MANAGER or PRODUCTS_AND_PRICES; or an access token of the chasbi-partners realm for an API Key of the Seller with the role MANAGER or PRODUCTS_AND_PRICES. 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.

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

cursor?string

The next of the page before, which is opaque. Leave it out for the first page.

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

The most Offers the page holds, from 1 to 50.

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

Only the Offers on Variants of this Product.

قالبuuid
sellerSku?string

Only the Offer with this Seller SKU, compared as the Seller SKUs of one Seller are: Persian digits read as Latin ones, case ignored.

بدنه پاسخ

A page of the caller's Offers.

application/json
  1. response

A page of the caller's Offers.

next?string

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

offers*array<>

The page's Offers, the newest created first.

نمونه درخواست
curl -X GET 'https://api.chasbi.com/v1/me/offers?sellerSku=mehr-ep-025'
نمونه پاسخ
{  "next": "string",  "offers": [    {      "ended": {        "at": "2019-08-24T14:15:22Z",        "keptOfferId": "fbebe47a-24c8-450b-825c-758272e4961d",        "reason": "MERGED",        "sellerSku": "string"      },      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "lastChangedBy": {        "apiKey": true,        "name": "string",        "owner": true      },      "minimumOrderQuantity": 0,      "paused": true,      "priceTiers": [        {          "fromQuantity": 0,          "toQuantity": 0,          "unitPrice": 0        }      ],      "sellerSku": "string",      "standing": "ENDED",      "stock": 0,      "stockOrPauseChangedAt": "2019-08-24T14:15:22Z",      "stockStatus": "IN_STOCK",      "updatedAt": "2019-08-24T14:15:22Z",      "variant": {        "axisValues": [          {            "axisLabel": {              "fa": "string"            },            "number": "string",            "optionLabel": {              "fa": "string"            },            "unitName": {              "fa": "string"            }          }        ],        "barcode": "string",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "mainImage": {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "large": {            "height": 0,            "url": "http://example.com",            "width": 0          },          "thumbnail": {            "height": 0,            "url": "http://example.com",            "width": 0          }        },        "manufacturerPartNumber": "string",        "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",        "productName": {          "fa": "string"        }      },      "version": 0    }  ]}