Skip to Content
Sayren 유저가이드
주문 상품 처리

판매자 취소 미리보기

판매자 취소를 하면 돌려줄 현금·적립금·배송비다. 실제 취소와 같은 계산을 쓰기 없이 돌린다. `quantity`를 생략하면 남은 수량 전체다. `responsibility`·`deductAmount`는 취소 요청과 같은 뜻이다(#301). `restockRequired`가 true면 취소 요청에 `restock`이 있어야 하고, `purchasePointAmount`가 0보다 크면 `reclaimPurchasePoints`로 그 구매 적립금을 회수할 수 있다. 취소할 수 없는 주문상품은 취소와 같은 409(`ALREADY_CANCELED`·`CLAIM_IN_PROGRESS`·`INVALID_STATUS`)다

GET
/v1/order-items/{orderItemId}/cancel-preview

판매자 취소를 하면 돌려줄 현금·적립금·배송비다. 실제 취소와 같은 계산을 쓰기 없이 돌린다. quantity를 생략하면 남은 수량 전체다. responsibility·deductAmount는 취소 요청과 같은 뜻이다(#301). restockRequired가 true면 취소 요청에 restock이 있어야 하고, purchasePointAmount가 0보다 크면 reclaimPurchasePoints로 그 구매 적립금을 회수할 수 있다. 취소할 수 없는 주문상품은 취소와 같은 409(ALREADY_CANCELED·CLAIM_IN_PROGRESS·INVALID_STATUS)다

Authorization

accessToken
headerAuthorizationBearer <JWT>

Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)

Path Parameters

orderItemId*string

Query Parameters

quantity?string

취소할 수량. 생략하면 남은 수량 전체

responsibility?string

귀책. 생략하면 SELLER

Value in"SELLER""BUYER"
deductAmount?string

추가 차감(원). 생략하면 0

Header Parameters

X-Store-Id*string

대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X GET 'https://api.sayren.io/v1/order-items/string/cancel-preview' \  -H 'X-Store-Id: string'
Example Response
{  "meta": {    "status": 200,    "code": "OK",    "message": "OK",    "isSuccess": true  },  "data": {    "orderItemId": "string",    "quantity": 0,    "refundAmount": 0,    "pointRefundAmount": 0,    "deliveryFeeRefundAmount": 0,    "deliveryFeeChargeAmount": 0,    "deductAmount": 0,    "restockRequired": false,    "purchasePointAmount": 0  },  "error": null}