Record the items sent back to the Buyer
شرح نقطههای پایانی در مرجع API به انگلیسی است؛ واژهها و قالبها همان است که در پاسخها میبینید.
نمونهها نشانی محیط اصلی را دارند، اما «امتحان کنید» همان درخواست را فقط به محیط آزمایشی میفرستد. کلید محرمانه شما نه در این سایت ذخیره میشود و نه در گزارشهای آن میآید.
After «بدون بازپرداخت», records once the Tracking Code of the items sent back to the Order's Delivery Address «پسکرایه», which the Buyer sees. Another Seller's request is 404 RETURN_REQUEST_NOT_FOUND. A request no longer in a status that takes the act is 409 RETURN_REQUEST_ALREADY_MOVED, with its status; a stale version is 409 STALE_WRITE. The call needs a token of the chasbi realm whose Account holds the Seller power ORDERS: the owner, or a Seller Member with the role MANAGER or ORDERS; or an access token of the chasbi-partners realm for an API Key of the Seller with the role MANAGER or ORDERS. 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.
returnRequestId*stringThe id of the Return Request.
uuidIdempotency-Key?stringMakes the call safe to repeat. Send a new key with every new request, such as a random UUID, as a Structured Field String (RFC 9651): 1 to 255 printable ASCII characters in double quotes, with \" and \\ escaped, as in "8e03978e-40d5-43e8-bc93-6894a57f9324". Chasbi keeps each key for 24 hours from the start of the request it runs, for the caller whose token sent it.
Within 24 hours, the same key with the same method, path, query and body, byte for byte, gets the first answer again, with its status, Location and body and the header Idempotent-Replayed: true, and the call isn't made a second time. A body serialized differently is another request. That holds for a refusal (4xx) too, so after a refusal, send a new key once you've changed anything; an answer of 500 or more isn't kept, so the request may be sent again with the same key. The same key with another request is 422 IDEMPOTENCY_KEY_REUSED. While the first request with the key is still being processed, the key is 409 IDEMPOTENCY_KEY_IN_USE; send the request again in a moment. If the first request hasn't answered 5 minutes after it started, it is taken as lost, and the same key runs the request again. A value that isn't such a string is 400 VALIDATION_FAILED, with TYPE_MISMATCH for Idempotency-Key. With the header, a JSON body over 1 MiB is 413 CONTENT_TOO_LARGE. Without the header, the call is made every time it is sent.
application/json- body
The Tracking Code of the items the Seller sent back «پسکرایه».
trackingCode*stringThe post's Tracking Code (RETURN_TRACKING_CODE_INVALID). The Buyer reads it, so one that reads as a phone number, a national ID or a Sheba number is refused (RETURN_TRACKING_CODE_HAS_CONTACT), and so is a link (RETURN_TRACKING_CODE_HAS_LINK).
1 <= length <= 50version*integerThe version of the Return Request the act is based on, as the last read returned it. Another value is refused with STALE_WRITE.
int64The request.
application/json- response
One of the Seller's Return Requests, with what the Seller may read of it.
acceptOffered*booleanWhether the Seller may accept the problem (/answer with accept).
accepted?booleanWhether the answer accepted it.
answerDue?stringWhile it waits for the Seller's answer, its deadline; silence accepts.
date-timeansweredBy?stringWho answered the problem: the Seller or its silence (SYSTEM).
"BUYER""SELLER""OPERATOR""SYSTEM"conditionReason?stringThe condition Chasbi decided.
"USED""DAMAGED""OPENED""PARTS_MISSING"deadline?stringThe deadline of what it waits for.
date-timedeliveryAddress?After «بدون بازپرداخت», where to send the items back, until the sending is recorded.
endedAt?stringWhen it ended.
date-timefault?stringOnce accepted, whether it is the Seller's fault.
"NONE""SELLER"id*stringThe id of the Return Request.
uuidlines*array<>The lines sent back.
money?The money decided.
number*integerThe request's number «کد مرجوعی».
int64openedAt*stringWhen it was opened.
date-timeorderId*stringThe Order.
uuidorderNumber*integerThe Order's number.
int64photos*array<>The Buyer's photos of the problem and the Seller's own of returned items.
postBy?stringOnce accepted, when the Buyer must post by.
date-timeposting?How the items were posted.
reason*stringWhy the items go back.
"CHANGE_OF_MIND""DAMAGED""NOT_AS_ORDERED""NOT_GENUINE""MISSING_PARTS"receiptDecision?stringChasbi's decision on it.
"FULL_REFUND""PARTIAL_REFUND""NO_REFUND""RECEIVED""WAIT"receiptDue?stringOnce posted, when the Seller must confirm receipt by; silence confirms it.
date-timereceiptIssue?stringThe issue the Seller reported.
"USED""DAMAGED""OPENED""PARTS_MISSING""NOT_ARRIVED"receiptIssueOffered*booleanWhether the Seller may still report an issue with what came back: until its receipt deadline, after which its silence has confirmed receipt.
receiptIssueOffers*array<>The issues the Seller may report for this request's reason, with the photos each takes.
receiptOffered*booleanWhether the Seller may confirm receipt «تحویل گرفتم» (/receipt with RECEIVED).
refusalOffered*booleanWhether the Seller may still refuse it: until its answer deadline, after which its silence has accepted it.
refusalReasonOffers*array<>The reasons the Seller may refuse with, and which needs a note.
returnAddress?The return address copied at acceptance.
sendBackDue?stringAfter «بدون بازپرداخت», when the Seller must send the items back by.
date-timesendBackOffered*booleanWhether the Seller must record the items sent back to the Buyer (/sent-back).
sentBack?The items sent back to the Buyer.
shipmentId*stringThe Shipment.
uuidshipmentPosition*integerThe Shipment's position in its Order.
int32status*stringWhere the request stands.
"AWAITING_SELLER""AWAITING_OPERATOR""AWAITING_RETURN_ADDRESS""ACCEPTED""POSTED""RECEIPT_DISPUTED""REFUNDING""REFUNDED""NOT_REFUNDED""REFUSED""WITHDRAWN""LAPSED"tab*stringThe tab that lists it.
"TO_ANSWER""AT_CHASBI""TO_BE_POSTED""POSTED""TO_SEND_BACK""CLOSED"trackingCode?stringOnce posted, the post's Tracking Code.
version*integerThe version an act names.
int64waiting*booleanWhether it waits for the Seller.
waitingKind?stringWhat the Seller must do.
"RETURN_REQUEST_TO_POST""RETURN_REQUEST_TO_ANSWER""RETURN_REQUEST_TO_RECEIVE""RETURN_REQUEST_TO_SEND_BACK""RETURN_REQUEST_TO_DECIDE""RETURN_REQUEST_ADDRESS_MISSING"curl -X POST 'https://api.chasbi.com/v1/me/seller/return-requests/497f6eca-6276-4993-bfeb-53cbbbba6f08/sent-back' \ -H 'Idempotency-Key: "8e03978e-40d5-43e8-bc93-6894a57f9324"' \ -H 'Content-Type: application/json' \ -d '{ "trackingCode": "string", "version": 0}'{ "acceptOffered": true, "accepted": true, "answerDue": "2019-08-24T14:15:22Z", "answeredBy": "BUYER", "conditionReason": "USED", "deadline": "2019-08-24T14:15:22Z", "deliveryAddress": { "addressLine": "string", "city": "string", "plate": "string", "postalCode": "string", "province": "ALBORZ", "recipient": "string", "unit": "string" }, "endedAt": "2019-08-24T14:15:22Z", "fault": "NONE", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "lines": [ { "bought": 0, "mainImageId": "cd398d71-4443-4270-9f21-bcc59332a255", "position": 0, "quantity": 0, "title": { "fa": "string" }, "unitPrice": 0, "values": [ { "axis": { "fa": "string" }, "number": "string", "option": { "fa": "string" }, "unit": { "fa": "string" } } ] } ], "money": { "decidedAt": "2019-08-24T14:15:22Z", "decidedBy": "BUYER", "itemsRial": 0, "keptBackRial": 0, "postageRial": 0, "refundRial": 0, "shippingFeeRial": 0 }, "number": 0, "openedAt": "2019-08-24T14:15:22Z", "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5", "orderNumber": 0, "photos": [ { "mediaId": "5a8ffac5-2288-485d-b463-90c3cd9941ad", "party": "BUYER" } ], "postBy": "2019-08-24T14:15:22Z", "posting": { "postageCapRial": 0, "postageRial": 0, "postedOn": "2019-08-24", "trackingCode": "string" }, "reason": "CHANGE_OF_MIND", "receiptDecision": "FULL_REFUND", "receiptDue": "2019-08-24T14:15:22Z", "receiptIssue": "USED", "receiptIssueOffered": true, "receiptIssueOffers": [ { "issue": "USED", "photosMax": 0, "photosMin": 0 } ], "receiptOffered": true, "refusalOffered": true, "refusalReasonOffers": [ { "noteRequired": true, "reason": "SENT_AS_ORDERED" } ], "returnAddress": { "addressLine": "string", "city": "string", "postalCode": "string", "province": "ALBORZ", "recipient": "string" }, "sendBackDue": "2019-08-24T14:15:22Z", "sendBackOffered": true, "sentBack": { "sentBackAt": "2019-08-24T14:15:22Z", "trackingCode": "string" }, "shipmentId": "47efd5a2-af91-4417-950a-7f546cd1b5cf", "shipmentPosition": 0, "status": "AWAITING_SELLER", "tab": "TO_ANSWER", "trackingCode": "string", "version": 0, "waiting": true, "waitingKind": "RETURN_REQUEST_TO_POST"}