POST PurchaseAndSale/PostPurchaseAndSale
Add a purchase and sale transaction.
Request Information
URI Parameters
Body Parameters
The request object used to create the contract
ClsGrPurAndSaleTran| Name | Description | Type | Additional Information |
|---|---|---|---|
| Location |
Location |
string |
Required Max length: 6 |
| TransactionDate |
TransactionDate |
date |
Required |
| ContractGainOrLoss |
ContractGainOrLoss |
decimal number |
Required Max of 2 decimal places |
| ClosingList |
ClosingList |
Collection of ClsGrPAndSTransClosing |
List cannot be empty Maximum of 1 allowed |
| ClosingDTList |
ClosingDTList |
Collection of ClsGrPAndSTransClosingDT |
List cannot be empty |
Request Formats
application/json, text/json
{
"Location": "sample string 3",
"TransactionDate": "2025-12-24T04:05:15.1221315+00:00",
"ContractGainOrLoss": 7.1,
"ClosingList": [
{
"Contract": "sample string 4",
"ContractLocation": "sample string 5",
"UnitsToClose": 6.1
},
{
"Contract": "sample string 4",
"ContractLocation": "sample string 5",
"UnitsToClose": 6.1
}
],
"ClosingDTList": [
{
"Contract": "sample string 4",
"ContractLocation": "sample string 5",
"UnitsToClose": 6.1
},
{
"Contract": "sample string 4",
"ContractLocation": "sample string 5",
"UnitsToClose": 6.1
}
]
}
application/xml, text/xml
<ClsGrPurAndSaleTran xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSI">
<ClosingDTList>
<ClsGrPAndSTransClosingDT>
<Contract>sample string 4</Contract>
<ContractLocation>sample string 5</ContractLocation>
<UnitsToClose>6.1</UnitsToClose>
</ClsGrPAndSTransClosingDT>
<ClsGrPAndSTransClosingDT>
<Contract>sample string 4</Contract>
<ContractLocation>sample string 5</ContractLocation>
<UnitsToClose>6.1</UnitsToClose>
</ClsGrPAndSTransClosingDT>
</ClosingDTList>
<ClosingList>
<ClsGrPAndSTransClosing>
<Contract>sample string 4</Contract>
<ContractLocation>sample string 5</ContractLocation>
<UnitsToClose>6.1</UnitsToClose>
</ClsGrPAndSTransClosing>
<ClsGrPAndSTransClosing>
<Contract>sample string 4</Contract>
<ContractLocation>sample string 5</ContractLocation>
<UnitsToClose>6.1</UnitsToClose>
</ClsGrPAndSTransClosing>
</ClosingList>
<ContractGainOrLoss>7.1</ContractGainOrLoss>
<Location>sample string 3</Location>
<TransactionDate>2025-12-24T04:05:15.1221315+00:00</TransactionDate>
</ClsGrPurAndSaleTran>
application/x-www-form-urlencoded
Response Information
Resource Description
Add a purchase and sale transaction.
AgvPurchaseAndSale| Name | Description | Type | Additional Information |
|---|---|---|---|
| Status |
0 = Success. 1 = An error occurred. 2 = An error occurred. 3 = Descriptive message, process was successful. |
string | |
| Message |
Informational message that corresponds to the Status returned. 0 - Message will be "OK". 1 - Detailed message returned to give user an indication of what went wrong. 2 - Less Detailed message returned that may not mean anything to the user but that the application might use to take a corrective action. 3 - Not an error but something the user might need to know. |
string | |
| ErrorList |
List of errors from the API |
Collection of string | |
| WarningList |
List of warnings from the API |
Collection of string | |
| GrPurAndSaleTranKey | integer | ||
| TranNum | string | ||
| Location | string | ||
| PreSignedUrl |
Url of the document created |
string |
Will be "null" when the status is not success. |
Response Formats
application/json, text/json
{
"Status": "sample string 1",
"Message": "sample string 2",
"ErrorList": [
"sample string 1",
"sample string 2"
],
"WarningList": [
"sample string 1",
"sample string 2"
],
"GrPurAndSaleTranKey": 3,
"TranNum": "sample string 4",
"Location": "sample string 5",
"PreSignedUrl": "sample string 6"
}
application/xml, text/xml
<AgvPurchaseAndSale xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.PurchaseAndSale">
<ErrorList xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</ErrorList>
<GrPurAndSaleTranKey>3</GrPurAndSaleTranKey>
<Location>sample string 5</Location>
<Message>sample string 2</Message>
<PreSignedUrl>sample string 6</PreSignedUrl>
<Status>sample string 1</Status>
<TranNum>sample string 4</TranNum>
<WarningList xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</WarningList>
</AgvPurchaseAndSale>