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

Get one of the caller's Offers

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

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

GET
/v1/me/offers/{offerId}

Returns the Offer with its Variant, its Stock Status and its standing. OFFER_NOT_FOUND, with the offerId in details, for an id that no Offer of the caller's Seller has, another Seller's Offer included, and for an Offer whose Variant left its Draft and is not Published, which is discarded a moment later. 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.

پارامترهای مسیر

offerId*string

The id of the Offer.

قالبuuid

بدنه پاسخ

The Offer.

application/json
  1. response

One Seller's terms for one Variant: Price Tiers, Minimum Order Quantity, stock and the derived Stock Status and standing.

ended?

How it ended, once a Product Merge or an Operator's removal of its Variant ended it; its writes then answer 409 OFFER_ENDED.

id*string

The id of the Offer.

قالبuuid
lastChangedBy?

Who of the Seller's team changed the Offer's terms, stock or pause last, on getOwnOffer only, once someone changed it after Seller Members arrived.

minimumOrderQuantity*integer

The fewest units a Buyer can order.

قالبint32
paused*boolean

Whether its Seller paused it. A paused Offer keeps its terms.

priceTiers*array<>

The Price Tiers in order, each with its band.

sellerSku?string

The Seller's own code for the Offer, as typed.

standing*string

Where the Offer stands on its way to being sold, derived when it is read, the first that holds: NOT_YET_PUBLISHED while its Variant is in a Draft and not Published; IN_REVIEW during its Product's first Review; and once the Variant is Published, PRODUCT_UNPUBLISHED while an Operator keeps the Product unpublished, SELLER_SUSPENDED while its Seller is suspended, TAX_DETAILS_UNVERIFIED while its Seller has no verified Tax Details, PAUSED while its Seller paused it, NOT_PERMITTED while its Seller may not sell in the Variant's Category, and ON_SALE otherwise, whatever its Stock Status. Nothing of it is stored, so lifting a stop resumes the sale at once, with the terms unchanged.

مقدار در"ENDED""NOT_YET_PUBLISHED""IN_REVIEW""PRODUCT_UNPUBLISHED""SELLER_SUSPENDED""TAX_DETAILS_UNVERIFIED""PAUSED""NOT_PERMITTED""ON_SALE"
stock*integer

The units on hand.

قالبint32
stockOrPauseChangedAt*string

When its stock or its pause switch last changed, or when it opened. A change of its Price Tiers, Minimum Order Quantity or Seller SKU alone leaves it.

قالبdate-time
stockStatus*string

Derived from the stock and the Minimum Order Quantity, never typed: OUT_OF_STOCK when the stock can't fill the minimum, LOW_STOCK when it fills fewer than ten of them, IN_STOCK otherwise.

مقدار در"IN_STOCK""LOW_STOCK""OUT_OF_STOCK"
updatedAt*string

When its terms or its pause switch last changed, or when it opened.

قالبdate-time
variant*

The Variant the Offer sells.

version*integer

The version of the Offer, which rises with every change. A change sends the version it is based on.

قالبint64
نمونه درخواست
curl -X GET 'https://api.chasbi.com/v1/me/offers/497f6eca-6276-4993-bfeb-53cbbbba6f08'
نمونه پاسخ
{  "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}