Cancel line
POST /Orders/CancelOrderItemLineList — OMS API · Cancellation & Return
Directly cancels order lines (does not wait for approval). The body is an array; you can send multiple records in a single request.
When to call: When the cancellation decision is finalized on your side (e.g. out of stock, operator cancellation). In cases requiring seller approval, use the Create cancellation request endpoint instead.
- Use
GetStatusReasonByType(statusType=Cancelled) forreasonId. - In partial cancellations, remaining products are moved to a new package; if the sales channel setting is enabled, you can provide the shipping info of this package with
newPackageCargoKey/newPackageTrackingNumber. - If the line is not found or not eligible for cancellation, HTTP 200 with
isSuccess: falseis returned.
İstek gövdesi
quantity(integer<int32>, zorunlu): Quantity to cancel.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).newPackageCargoKey(string): Cargo key of the new package formed after partial cancellation with remaining products (used if sales channel setting is enabled).sourceOrderItemLineId(string, zorunlu):sourceOrderItemLineIdvalue of the canceled line.newPackageTrackingNumber(string): Tracking number of the new package formed after partial cancellation (used if sales channel setting is enabled).
Yanıtlar
- 200: Successful. Always check the
isSuccessfield in the body. - 400: Body validation failed (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. Empty body returned; obtain a new token via/Auth/login. - 500: Unexpected server error. This response returns fields in PascalCase (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>): Interest 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.