m2pfintech
API LibraryCard Order Management

Cancel Card Order

Cancels a card order that is in a cancellable state such as RECEIVED. Both the orderId and branchId must match the original order for the cancellation to succeed. Orders that have already been processed or are in PENDING state at CMS may not be cancellable.

POST
/card-order/cancel

Authorization

tenantAuth
tenant<token>

The DCMS tenant name for multi-tenant isolation. Every API call must include this header to identify the client organization.

In: header

Header Parameters

tenant*string

The DCMS client or tenant name for multi-tenant isolation.

Request Body

application/json

orderId?string

Order identifier to cancel.

branchId?string

Branch identifier that placed the order.

Response Body

application/json

application/json

curl -X POST "https://api.dcms.example.com/v1/card-order/cancel" \  -H "tenant: ACME_BANK" \  -H "Content-Type: application/json" \  -d '{    "orderId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",    "branchId": "12345"  }'
{
  "result": "Order cancelled successfully",
  "exception": null,
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "ORD003",
    "shortMessage": "Order cannot be cancelled",
    "detailMessage": "The order is not in a cancellable state",
    "httpStatus": "BAD_REQUEST",
    "fieldError": [
      "Order status is PROCESSED and cannot be cancelled"
    ],
    "languageCode": "en"
  },
  "pagination": null
}