POST api/account/cancel-contract-tasks
Create a cancel contract task and attempt to execute that task. Check the task status on the returned object to determine the state of the request.
Request Information
URI Parameters
None.
Body Parameters
CancelContractTaskCreation object
CancelContractTaskCreationName | Description | Type | Additional information |
---|---|---|---|
ContractNoteID |
ID of contract to cancel |
integer |
None. |
Reason |
Cancellation description |
string |
String length: inclusive between 1 and 255 |
Request Formats
application/json, text/json
{ "ContractNoteID": 100000, "Reason": "Trade cancelled by market" }
application/xml, text/xml
<CancelContractTaskCreation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TPP.B2B.Webservices2.Contract.Tasks"> <ContractNoteID>100000</ContractNoteID> <Reason>Trade cancelled by market</Reason> </CancelContractTaskCreation>
Response Information
Resource Description
Created task
CancelContractTaskName | Description | Type | Additional information |
---|---|---|---|
ContractNoteID |
ID of the contract to cancel |
integer |
None. |
ID |
Task ID |
integer |
None. |
Type |
Task Type |
enTaskType |
None. |
Description |
Task description |
string |
None. |
DateTimeCreated |
Created date time |
date |
None. |
DateTimeUpdated |
Updated date time |
date |
None. |
Status |
Task status |
enTaskStatus |
None. |
RejectionReason |
Rejection reason |
string |
None. |
Response Formats
application/json, text/json
{ "ContractNoteID": 100000, "ID": 1234, "Type": 16, "Description": "Task description", "DateTimeCreated": "2025-04-04T05:20:19.2111253+11:00", "DateTimeUpdated": null, "Status": 0, "RejectionReason": null }
application/xml, text/xml
<CancelContractTask xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TPP.B2B.Webservices2.Contract.Tasks"> <DateTimeCreated>2025-04-04T05:20:19.2111253+11:00</DateTimeCreated> <DateTimeUpdated i:nil="true" /> <Description>Task description</Description> <ID>1234</ID> <RejectionReason i:nil="true" /> <Status>New</Status> <Type>CancelContractTask</Type> <ContractNoteID>100000</ContractNoteID> </CancelContractTask>
Error Response Information
Resource Description
Created task
stringError Response Formats
application/json, text/json
"sample string 1"
application/xml, text/xml
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>