POST SalesContract/PostSalesContract
Creates a Sales Contract
Request Information
URI Parameters
Body Parameters
ClsSalesConAdd| Name | Description | Type | Additional Information |
|---|---|---|---|
| ContractID |
ID of the sales contract |
string |
Required Max length: 15 |
| LocationID |
ID of the delivery location of the sales contract |
string |
Required Max length: 6 |
| CustomerID |
ID of the customer on the sales contract |
string |
Required Max length: 6 |
| BuyersReference |
Represents the contract number of the terminal/processor. If blank, the grain elevator is using the ContractNumber to represent the contract number of the terminal/processor. |
string |
Max length: 15 |
| CommodityID |
ID of the commodity on the sales contract |
string |
Required Max length: 6 |
| DateEstablished |
Date the contract was established |
string |
Required Format must be MM/dd/yyyy |
| ContractType |
Type of contract |
SalesContractType |
Required |
| ContractStatus |
Current status of contract |
SalesContractStatus |
Required |
| CashPrice |
FOB price for the established conract |
decimal number |
Max of 4 decimal places |
| ContractQuantity |
Quantity of the sales contract |
decimal number |
Required Cannot be negative Max of 4 decimal places |
| DelPrice |
Price the terminal/processor will pay the grain elevator for the grain when delivered |
decimal number |
Max of 4 decimal places |
| BasisPrice |
Basis price of the sales contract |
decimal number |
Max of 4 decimal places |
| FuturesMonthID |
Futures month of the sales contract |
string |
Max length: 10 |
| ShippingDestinationID |
ID of the shipping destination on the contract |
string |
Max length: 6 |
| ExpireDate |
Expiration date of the contract |
string |
Format must be MM/dd/yyyy |
| FuturesPrice |
Futures price established for the contract |
decimal number |
Max of 4 decimal places |
| ExchangeID |
ID of the exchange used to establish the price |
string |
Max length: 10 |
| PricingNotes |
Pricing notes on a contract |
string |
Max length: 50 |
| BidCriteriaID |
ID for the terms of the bid |
string |
Max length: 20 |
| TransportationMethodGuid |
Method of transportation for the sales contract |
globally unique identifier | |
| DocumentFormatGuid |
Format Guid of a Sales Contract |
globally unique identifier | |
| SalesContractDeliveryDates |
List of delivery dates for the sales contract |
Collection of ClsGrSalesConDdAdd | |
| SalesContractGradeFactorsAndSchedules |
List of grade factors and schedules for the sales contract |
Collection of ClsGrSalesConGfAdd | |
| SalesContractComments |
List of comments for the Sales contract |
Collection of ClsGrSalesConCommAdd | |
| GrSalesConPurConAdd |
List of sales contracts linked to purchase contracts |
Collection of ClsGrSalesConPurConAdd |
Request Formats
application/json, text/json
{
"ContractID": "sample string 1",
"LocationID": "sample string 2",
"CustomerID": "sample string 3",
"BuyersReference": "sample string 4",
"CommodityID": "sample string 5",
"DateEstablished": "sample string 6",
"ContractType": 1,
"ContractStatus": 1,
"CashPrice": 7.1,
"ContractQuantity": 8.1,
"DelPrice": 9.1,
"BasisPrice": 10.1,
"FuturesMonthID": "sample string 11",
"ShippingDestinationID": "sample string 12",
"ExpireDate": "sample string 13",
"FuturesPrice": 14.1,
"ExchangeID": "sample string 15",
"PricingNotes": "sample string 17",
"BidCriteriaID": "sample string 18",
"TransportationMethodGuid": "83fe5815-d227-4aa5-94f5-d4ceb3c2e203",
"DocumentFormatGuid": "079a5062-9eb1-4520-b57b-cda2673ec6a4",
"SalesContractDeliveryDates": [
{
"StartDate": "sample string 1",
"Quantity": 2.1,
"CompleteDate": "sample string 3"
},
{
"StartDate": "sample string 1",
"Quantity": 2.1,
"CompleteDate": "sample string 3"
}
],
"SalesContractGradeFactorsAndSchedules": [
{
"PremiumDiscountGuid": "e7e7b7e2-9a69-4df7-8f47-e50c31ebbff9",
"GradFactorId": "sample string 1",
"ScheduleId": "sample string 2"
},
{
"PremiumDiscountGuid": "e7e7b7e2-9a69-4df7-8f47-e50c31ebbff9",
"GradFactorId": "sample string 1",
"ScheduleId": "sample string 2"
}
],
"SalesContractComments": [
{
"CommmentDate": "sample string 1",
"Comment": "sample string 2"
},
{
"CommmentDate": "sample string 1",
"Comment": "sample string 2"
}
],
"GrSalesConPurConAdd": [
{
"PurchaseConNumber": "sample string 1",
"PurchaseConLocation": "sample string 2",
"PurchaseConGuid": "8f59dffa-8791-4604-ab46-6f676225b07a",
"LinkedUnits": 3.1
},
{
"PurchaseConNumber": "sample string 1",
"PurchaseConLocation": "sample string 2",
"PurchaseConGuid": "8f59dffa-8791-4604-ab46-6f676225b07a",
"LinkedUnits": 3.1
}
]
}
application/xml, text/xml
<ClsGrSalesCon.ClsSalesConAdd xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Grain">
<BasisPrice>10.1</BasisPrice>
<BidCriteriaID>sample string 18</BidCriteriaID>
<BuyersReference>sample string 4</BuyersReference>
<CashPrice>7.1</CashPrice>
<CommodityID>sample string 5</CommodityID>
<ContractID>sample string 1</ContractID>
<ContractQuantity>8.1</ContractQuantity>
<ContractStatus>Open</ContractStatus>
<ContractType>Priced</ContractType>
<CustomerID>sample string 3</CustomerID>
<DateEstablished>sample string 6</DateEstablished>
<DelPrice>9.1</DelPrice>
<DocumentFormatGuid>079a5062-9eb1-4520-b57b-cda2673ec6a4</DocumentFormatGuid>
<ExchangeID>sample string 15</ExchangeID>
<ExpireDate>sample string 13</ExpireDate>
<FuturesMonthID>sample string 11</FuturesMonthID>
<FuturesPrice>14.1</FuturesPrice>
<GrSalesConPurConAdd>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConPurConAdd>
<LinkedUnits>3.1</LinkedUnits>
<PurchaseConGuid>8f59dffa-8791-4604-ab46-6f676225b07a</PurchaseConGuid>
<PurchaseConLocation>sample string 2</PurchaseConLocation>
<PurchaseConNumber>sample string 1</PurchaseConNumber>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConPurConAdd>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConPurConAdd>
<LinkedUnits>3.1</LinkedUnits>
<PurchaseConGuid>8f59dffa-8791-4604-ab46-6f676225b07a</PurchaseConGuid>
<PurchaseConLocation>sample string 2</PurchaseConLocation>
<PurchaseConNumber>sample string 1</PurchaseConNumber>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConPurConAdd>
</GrSalesConPurConAdd>
<LocationID>sample string 2</LocationID>
<PricingNotes>sample string 17</PricingNotes>
<SalesContractComments>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConCommAdd>
<Comment>sample string 2</Comment>
<CommmentDate>sample string 1</CommmentDate>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConCommAdd>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConCommAdd>
<Comment>sample string 2</Comment>
<CommmentDate>sample string 1</CommmentDate>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConCommAdd>
</SalesContractComments>
<SalesContractDeliveryDates>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConDdAdd>
<CompleteDate>sample string 3</CompleteDate>
<Quantity>2.1</Quantity>
<StartDate>sample string 1</StartDate>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConDdAdd>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConDdAdd>
<CompleteDate>sample string 3</CompleteDate>
<Quantity>2.1</Quantity>
<StartDate>sample string 1</StartDate>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConDdAdd>
</SalesContractDeliveryDates>
<SalesContractGradeFactorsAndSchedules>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConGfAdd>
<GradFactorId>sample string 1</GradFactorId>
<PremiumDiscountGuid>e7e7b7e2-9a69-4df7-8f47-e50c31ebbff9</PremiumDiscountGuid>
<ScheduleId>sample string 2</ScheduleId>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConGfAdd>
<ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConGfAdd>
<GradFactorId>sample string 1</GradFactorId>
<PremiumDiscountGuid>e7e7b7e2-9a69-4df7-8f47-e50c31ebbff9</PremiumDiscountGuid>
<ScheduleId>sample string 2</ScheduleId>
</ClsGrSalesCon.ClsSalesConAdd.ClsGrSalesConGfAdd>
</SalesContractGradeFactorsAndSchedules>
<ShippingDestinationID>sample string 12</ShippingDestinationID>
<TransportationMethodGuid>83fe5815-d227-4aa5-94f5-d4ceb3c2e203</TransportationMethodGuid>
</ClsGrSalesCon.ClsSalesConAdd>
application/x-www-form-urlencoded
Response Information
Resource Description
Creates a Sales Contract
AgvSalesContract| Name | Description | Type | Additional Information |
|---|---|---|---|
| Status |
Status of the API call. |
string | |
| Message |
Message of the API call. |
string | |
| Count |
Count of how many Sales Contracts. |
string | |
| ErrorList |
List of error messages of the API call. |
Collection of string | |
| WarningList |
List of warning messages of the API call. |
Collection of string | |
| SalesContracts | Collection of clsGRSalesCon |
Response Formats
application/json, text/json
{
"Status": "sample string 1",
"Message": "sample string 2",
"Count": "2",
"ErrorList": [
"sample string 1",
"sample string 2"
],
"WarningList": [
"sample string 1",
"sample string 2"
],
"SalesContracts": [
{
"CustomerID": "sample string 24",
"BuyersReference": "sample string 25",
"ContractNumber": "sample string 26",
"Location": "sample string 27",
"Commodity": "sample string 28",
"DeliveredPrice": 29.1,
"ShippingDestination": "sample string 30",
"DateEstablished": "sample string 31",
"ContractType": "sample string 33",
"ContractStatus": "sample string 34",
"CashPrice": 35.1,
"BasisPrice": 39.1,
"FuturesMonth": "sample string 40",
"FuturesPrice": 41.1,
"BidCriteria": "sample string 45",
"OriginalQuantity": 46.1,
"SalesContractGUID": "37e3e658-881e-4a54-b158-557d36c15326",
"QuantityRemaining": 47.1,
"LastModifiedUtc": "2025-11-14T20:47:28.3252167+00:00",
"DeliveryDates": [
{
"StartDeliveryDate": "sample string 5",
"Quantity": 6.1,
"CompleteDeliveryDate": "sample string 7"
},
{
"StartDeliveryDate": "sample string 5",
"Quantity": 6.1,
"CompleteDeliveryDate": "sample string 7"
}
]
},
{
"CustomerID": "sample string 24",
"BuyersReference": "sample string 25",
"ContractNumber": "sample string 26",
"Location": "sample string 27",
"Commodity": "sample string 28",
"DeliveredPrice": 29.1,
"ShippingDestination": "sample string 30",
"DateEstablished": "sample string 31",
"ContractType": "sample string 33",
"ContractStatus": "sample string 34",
"CashPrice": 35.1,
"BasisPrice": 39.1,
"FuturesMonth": "sample string 40",
"FuturesPrice": 41.1,
"BidCriteria": "sample string 45",
"OriginalQuantity": 46.1,
"SalesContractGUID": "37e3e658-881e-4a54-b158-557d36c15326",
"QuantityRemaining": 47.1,
"LastModifiedUtc": "2025-11-14T20:47:28.3252167+00:00",
"DeliveryDates": [
{
"StartDeliveryDate": "sample string 5",
"Quantity": 6.1,
"CompleteDeliveryDate": "sample string 7"
},
{
"StartDeliveryDate": "sample string 5",
"Quantity": 6.1,
"CompleteDeliveryDate": "sample string 7"
}
]
}
]
}
application/xml, text/xml
<AgvSalesContract xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Sales_Contract">
<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>
<Message>sample string 2</Message>
<SalesContracts xmlns:d2p1="http://schemas.datacontract.org/2004/07/SSI">
<d2p1:clsGRSalesCon>
<d2p1:BasisPrice>39.1</d2p1:BasisPrice>
<d2p1:BidCriteria>sample string 45</d2p1:BidCriteria>
<d2p1:BuyersReference>sample string 25</d2p1:BuyersReference>
<d2p1:CashPrice>35.1</d2p1:CashPrice>
<d2p1:Commodity>sample string 28</d2p1:Commodity>
<d2p1:ContractNumber>sample string 26</d2p1:ContractNumber>
<d2p1:ContractStatus>sample string 34</d2p1:ContractStatus>
<d2p1:ContractType>sample string 33</d2p1:ContractType>
<d2p1:CustomerID>sample string 24</d2p1:CustomerID>
<d2p1:DateEstablished>sample string 31</d2p1:DateEstablished>
<d2p1:DeliveredPrice>29.1</d2p1:DeliveredPrice>
<d2p1:DeliveryDates>
<d2p1:clsGRSalesConDD>
<d2p1:CompleteDeliveryDate>sample string 7</d2p1:CompleteDeliveryDate>
<d2p1:Quantity>6.1</d2p1:Quantity>
<d2p1:StartDeliveryDate>sample string 5</d2p1:StartDeliveryDate>
</d2p1:clsGRSalesConDD>
<d2p1:clsGRSalesConDD>
<d2p1:CompleteDeliveryDate>sample string 7</d2p1:CompleteDeliveryDate>
<d2p1:Quantity>6.1</d2p1:Quantity>
<d2p1:StartDeliveryDate>sample string 5</d2p1:StartDeliveryDate>
</d2p1:clsGRSalesConDD>
</d2p1:DeliveryDates>
<d2p1:FuturesMonth>sample string 40</d2p1:FuturesMonth>
<d2p1:FuturesPrice>41.1</d2p1:FuturesPrice>
<d2p1:LastModifiedUtc>2025-11-14T20:47:28.3252167+00:00</d2p1:LastModifiedUtc>
<d2p1:Location>sample string 27</d2p1:Location>
<d2p1:OriginalQuantity>46.1</d2p1:OriginalQuantity>
<d2p1:QuantityRemaining>47.1</d2p1:QuantityRemaining>
<d2p1:SalesContractGUID>37e3e658-881e-4a54-b158-557d36c15326</d2p1:SalesContractGUID>
<d2p1:ShippingDestination>sample string 30</d2p1:ShippingDestination>
</d2p1:clsGRSalesCon>
<d2p1:clsGRSalesCon>
<d2p1:BasisPrice>39.1</d2p1:BasisPrice>
<d2p1:BidCriteria>sample string 45</d2p1:BidCriteria>
<d2p1:BuyersReference>sample string 25</d2p1:BuyersReference>
<d2p1:CashPrice>35.1</d2p1:CashPrice>
<d2p1:Commodity>sample string 28</d2p1:Commodity>
<d2p1:ContractNumber>sample string 26</d2p1:ContractNumber>
<d2p1:ContractStatus>sample string 34</d2p1:ContractStatus>
<d2p1:ContractType>sample string 33</d2p1:ContractType>
<d2p1:CustomerID>sample string 24</d2p1:CustomerID>
<d2p1:DateEstablished>sample string 31</d2p1:DateEstablished>
<d2p1:DeliveredPrice>29.1</d2p1:DeliveredPrice>
<d2p1:DeliveryDates>
<d2p1:clsGRSalesConDD>
<d2p1:CompleteDeliveryDate>sample string 7</d2p1:CompleteDeliveryDate>
<d2p1:Quantity>6.1</d2p1:Quantity>
<d2p1:StartDeliveryDate>sample string 5</d2p1:StartDeliveryDate>
</d2p1:clsGRSalesConDD>
<d2p1:clsGRSalesConDD>
<d2p1:CompleteDeliveryDate>sample string 7</d2p1:CompleteDeliveryDate>
<d2p1:Quantity>6.1</d2p1:Quantity>
<d2p1:StartDeliveryDate>sample string 5</d2p1:StartDeliveryDate>
</d2p1:clsGRSalesConDD>
</d2p1:DeliveryDates>
<d2p1:FuturesMonth>sample string 40</d2p1:FuturesMonth>
<d2p1:FuturesPrice>41.1</d2p1:FuturesPrice>
<d2p1:LastModifiedUtc>2025-11-14T20:47:28.3252167+00:00</d2p1:LastModifiedUtc>
<d2p1:Location>sample string 27</d2p1:Location>
<d2p1:OriginalQuantity>46.1</d2p1:OriginalQuantity>
<d2p1:QuantityRemaining>47.1</d2p1:QuantityRemaining>
<d2p1:SalesContractGUID>37e3e658-881e-4a54-b158-557d36c15326</d2p1:SalesContractGUID>
<d2p1:ShippingDestination>sample string 30</d2p1:ShippingDestination>
</d2p1:clsGRSalesCon>
</SalesContracts>
<Status>sample string 1</Status>
<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>
</AgvSalesContract>