Read the caller's «موجودی»
شرح نقطههای پایانی در مرجع API به انگلیسی است؛ واژهها و قالبها همان است که در پاسخها میبینید.
نمونهها نشانی محیط اصلی را دارند، اما «امتحان کنید» همان درخواست را فقط به محیط آزمایشی میفرستد. کلید محرمانه شما نه در این سایت ذخیره میشود و نه در گزارشهای آن میآید.
Returns one page of every Offer of the caller's Seller, each with its stock on hand, the units its Reservations hold, the units left to order, its Stock Status from those, its first unit price, its Minimum Order Quantity, its pause switch, when its stock or pause last changed, its version, and whether it is a First Offer under its Product's first Review. The page is numbered: page from 1 and size from 1 to 50, with the total the tab and the search hold, since the sort by available units has no lasting order to page by cursor.
tab keeps ALL the Offers still selling or able to, LOW_STOCK or OUT_OF_STOCK by their Stock Status, PAUSED the paused ones, whatever their Stock Status, and ENDED «پایانیافته» the Offers a Product Merge or an Operator's removal of their Variant ended, which are in no other tab and change no more; WAITING is always empty, since no Offer waits for its Seller; and NEW answers only the Offers ids names. ids, 1 to 50 Offers, answers exactly those of the caller's Offers the tab holds, and every ended one it names, with how it ended, in the order given, on one page, whatever q, sort and page say. q keeps the Offers whose Seller SKU, Product name or axis values hold it, compared as the storefront's search compares texts. sort is LEAST_AVAILABLE, MOST_AVAILABLE, LATEST_CHANGE of stock or pause, NAME in Persian alphabetical order, or CHEAPEST first unit price, each with the Offer's id breaking ties. An unknown tab or sort 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.
oauth2AuthorizationBearer <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.
tab?stringWhich Offers the page holds.
"ALL""NEW""WAITING""ALL""LOW_STOCK""OUT_OF_STOCK""PAUSED""ENDED"ids?array<>Only these Offers, in this order, 1 to 50.
1 <= items <= 50q?stringText the Seller SKU, the Product name or an axis value holds.
sort?stringThe order of the Offers.
"LEAST_AVAILABLE""LEAST_AVAILABLE""MOST_AVAILABLE""LATEST_CHANGE""NAME""CHEAPEST"page?integerThe page's number, from 1.
int321 <= value1size?integerThe most Offers the page holds, from 1 to 50.
int321 <= value <= 5010A page of the caller's «موجودی».
application/json- response
One page of the caller's «موجودی», with the number of Offers the tab and search hold.
items*array<>The page's Offers, in the order asked for.
page*integerThe page's number, from 1.
int32size*integerThe most Offers a page holds.
int32total*integerHow many Offers the tab and the search hold, on every page.
int32curl -X GET 'https://api.chasbi.com/v1/me/offers/stock'{ "items": [ { "available": 0, "discount": { "discountId": "80df6fdf-c450-406e-948b-f77d4ac1cdb8", "endsAt": "2019-08-24T14:15:22Z", "percent": 0, "status": "SCHEDULED" }, "ended": { "at": "2019-08-24T14:15:22Z", "keptOfferId": "fbebe47a-24c8-450b-825c-758272e4961d", "reason": "MERGED", "sellerSku": "string" }, "firstUnitPrice": 0, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "inReview": true, "minimumOrderQuantity": 0, "paused": true, "reserved": 0, "sellerSku": "string", "stock": 0, "stockOrPauseChangedAt": "2019-08-24T14:15:22Z", "stockStatus": "IN_STOCK", "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 } ], "page": 0, "size": 0, "total": 0}