Create cancellation request
POST /Orders/CreateOrderItemLineCancelRequest — OMS API · Cancellation & Return
Opens a cancellation request for order lines. The request appears on the seller's cancellation requests screen; the seller approves or rejects it and the result is notified to you via the CancelShipmentRequestApprovedEvent / CancelShipmentRequestRejectedEvent webhook. The body is an array; you can send multiple records in a single request.
When to call: When the customer wants to cancel a product that the seller has not yet shipped.
- Use
GetStatusReasonByType(statusType=Cancelled) forreasonId. - If the line status is not suitable for cancellation request, quantity is insufficient, or
reasonIdis incorrect, HTTP 200 withisSuccess: falseis returned. - If there is already a pending request for the line, the request is considered successful (retries are safe).
- If refund is enabled in the tenant, refund information generated is returned in
data.
İstek gövdesi
quantity(integer<int32>, zorunlu): Cancellation quantity (usually 1 per line).reasonId(integer<int64>, zorunlu): Cancellation reason ID;idfrom theGetStatusReasonByType(statusType=Cancelled) response.reasonDesc(string): Cancellation description.refundAction(string): Refund method:refund(money refund, default) orcredit(return voucher).sourceOrderItemLineId(string, zorunlu):sourceOrderItemLineIdvalue of the line to be cancelled.
Yanıtlar
- 200: Successful. Always check the
isSuccessfield in the body. - 400: Body could not be validated (missing required field, type mismatch, or malformed JSON). The response is in ASP.NET Core
ValidationProblemDetailsformat; theerrorsfield indicates which field is invalid. - 401:
Authorizationheader missing, token invalid or expired. Body returns empty; get a new token via/Auth/login. - 500: Unexpected server error. This response returns with PascalCase field names (unlike other responses) and includes
nullfields.
200 yanıt alanları
data(object[]): Generated payment refunds. Empty list if payment refund is disabled.data.total(number<double>): Payment amount.data.status(integer<int32>): Return status code.data.authCode(string): Provision code. Returned only if populated.data.interest(number<double>): Due difference.data.paidDate(string<date-time>): Payment time. Returned only if populated.data.posPoint(number<double>): POS points. Returned only if populated.data.refundId(string): Return record ID.data.createdOn(string<date-time>): Creation time. Returned only if populated.data.statusName(string): Return status name.data.paymentType(string): Payment type.data.refundTotal(number<double>): Amount to be refunded.data.transactionId(string): Transaction ID. Returned only if populated.data.paymentMethodId(string): Payment method ID.data.transactionCode(string): Transaction code. Returned only if populated.data.captureTransactionId(string): Collection transaction ID. Returned only if populated.
isSuccess(boolean, zorunlu):trueif the operation is successful.statusCode(string): Not used; usuallynull.errorMesssage(string): Error message. Returned only if there is an error.