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) for reasonId.
  • 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: false is returned.

İstek gövdesi

  • quantity (integer<int32>, zorunlu): Quantity to cancel.
  • reasonId (integer<int64>, zorunlu): Cancellation reason ID; id from the GetStatusReasonByType (statusType=Cancelled) response.
  • reasonDesc (string): Cancellation description.
  • refundAction (string): Refund method: refund (money refund, default) or credit (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): sourceOrderItemLineId value 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 isSuccess field in the body.
  • 400: Body validation failed (missing required field, type mismatch, or malformed JSON). The response is in ASP.NET Core ValidationProblemDetails format; the errors field indicates which field is invalid.
  • 401: Authorization header 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 null fields.

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): true if the operation is successful.
  • statusCode (string): Not used; usually null.
  • errorMesssage (string): Error message. Returned only if there is an error.