Transaction Cancel
A TransactionCancelRequest
is issued when a vendor wants to cancel a transaction and ensure that the customer cannot print any remaining copies for a given asset. This is used in cases where the customer is no longer eligible to print the remaining asset copies. For example, if the vendor issues a credit for the customer's order, then the customer should no longer be allowed to print the remaining copies of the credited assets. In this case, the vendor would send a TransactionCancelRequest
to cancel the transaction that was opened for the credited order.
The format of an XML TransactionCancelRequest
is similar to a TransactionRetryRequest
: one or more TransactionItem
element containing TransactionId
elements. The TransactionId
elements may have been obtained either from a TransactionOpenRequest
or a TransactionRetryRequest
. No Quantity
value needs to be supplied. The effect is to mark the status of each indicated transaction as CANCELLED. The cancel process will mark any related transactions as CANCELLED -- children, grandchildren, sibilings, parents, and grandparents will be marked as CANCELLED.
The response will include a TransactionItem
element for each TransactionItem
in the request, containing the TransactionId
from the request and a StatusCode
indicating whether the cancel operation was successful. A code of 1 indicates success. The status codes and status descriptions are specified on the DAM Status Codes page.
If a TransactionCancelRequest
is made for any TransactionId
that was initially obtained as part of a Package TransactionOpenRequest
, the system will cancel the OPEN and RETRY requests for all the digital assets in that package, not just the digital asset whose TransactionId
was sent as part of the TransactionCancelRequest
. This ensures that the sale of the package can be credited back in full as a single entity to the customer whose package sale was cancelled.
A vendor may cancel an order at any time.
Request / Response Examples
TransactionCancelRequest Example:
<?xml version="1.0"?>
<!DOCTYPE DAMRequest SYSTEM "https://haldms.halleonard.com/dam_dtd/DAMRequestVersion5.dtd">
<DAMRequest>
<RequestHdr>
<DAMVersion>5.0</DAMVersion>
<VendorId>123</VendorId>
<VendorKey>theKey123</VendorKey>
</RequestHdr>
<TransactionCancelRequest>
<TransactionItem>
<TransactionId>1122444</TransactionId>
</TransactionItem>
</TransactionCancelRequest>
</DAMRequest>
TransactionCancelResponse Example:
<?xml version="1.0"?>
<!DOCTYPE DAMResponse SYSTEM "https://haldms.halleonard.com/dam_dtd/DAMResponseVersion5.dtd">
<DAMResponse>
<ResponseHdr>
<DAMVersion>5.0</DAMVersion>
<VendorId>123</VendorId>
</ResponseHdr>
<TransactionCancelResponse>
<TransactionItem>
<AssetId>4000</AssetId>
<OrderNumber>12345</OrderNumber>
<StatusCode>1</StatusCode>
<StatusDescription>OK.</StatusDescription>
<TransactionId>1122444</TransactionId>
</TransactionItem>
</TransactionCancelResponse>
</DAMResponse>