PUT SalesContract/PutSalesContract

Updates a Sales Contract

Request Information

URI Parameters

Body Parameters

ClsSalesConUpdate
NameDescriptionTypeAdditional Information
GrSalesContractGUID

Guid of a sales contract

globally unique identifier
OldContractID

Old Contract Id of a sales contract

string

Max length: 15

OldLocationID

Old Contract Location of a sales contract

string

Max length: 6

ContractID

New Contract ID of the sales contract

string

Required

Max length: 15

LocationID

New 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 ClsGrSalesConDdUpdate
SalesContractGradeFactorsAndSchedules

List of grade factors and schedules for the sales contract

Collection of ClsGrSalesConGfUpdate
SalesContractComments

List of comments for the Sales contract

Collection of ClsGrSalesConCommUpdate
SalesConPurCon

Collection of ClsGrSalesConPurConUpdate

Request Formats

application/json, text/json

Sample:
{
  "GrSalesContractGUID": "33619f2b-0e46-4026-a59f-a80da0ff5f32",
  "OldContractID": "sample string 1",
  "OldLocationID": "sample string 2",
  "ContractID": "sample string 3",
  "LocationID": "sample string 4",
  "CustomerID": "sample string 5",
  "BuyersReference": "sample string 6",
  "CommodityID": "sample string 7",
  "DateEstablished": "sample string 8",
  "ContractType": 1,
  "ContractStatus": 1,
  "CashPrice": 9.1,
  "ContractQuantity": 10.1,
  "DelPrice": 11.1,
  "BasisPrice": 12.1,
  "FuturesMonthID": "sample string 13",
  "ShippingDestinationID": "sample string 14",
  "ExpireDate": "sample string 15",
  "FuturesPrice": 16.1,
  "ExchangeID": "sample string 17",
  "PricingNotes": "sample string 18",
  "BidCriteriaID": "sample string 19",
  "TransportationMethodGuid": "fbe52c63-c3c7-4bc0-97f5-7dd3ec7d66a2",
  "DocumentFormatGuid": "06831443-9157-4532-96f2-c074be887274",
  "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": "efebf62b-e97c-498a-9910-9c0c61a6dfc3",
      "GradFactorId": "sample string 1",
      "ScheduleId": "sample string 2"
    },
    {
      "PremiumDiscountGuid": "efebf62b-e97c-498a-9910-9c0c61a6dfc3",
      "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"
    }
  ],
  "SalesConPurCon": [
    {
      "PurchaseConNumber": "sample string 1",
      "PurchaseConLocation": "sample string 2",
      "GRPurConGUID": "5f03c44f-a73c-4a94-b40c-700fa08523dd",
      "LinkedUnits": 3.1
    },
    {
      "PurchaseConNumber": "sample string 1",
      "PurchaseConLocation": "sample string 2",
      "GRPurConGUID": "5f03c44f-a73c-4a94-b40c-700fa08523dd",
      "LinkedUnits": 3.1
    }
  ]
}

application/xml, text/xml

Sample:
<ClsGrSalesCon.ClsSalesConUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Grain">
  <BasisPrice>12.1</BasisPrice>
  <BidCriteriaID>sample string 19</BidCriteriaID>
  <BuyersReference>sample string 6</BuyersReference>
  <CashPrice>9.1</CashPrice>
  <CommodityID>sample string 7</CommodityID>
  <ContractID>sample string 3</ContractID>
  <ContractQuantity>10.1</ContractQuantity>
  <ContractStatus>Open</ContractStatus>
  <ContractType>Priced</ContractType>
  <CustomerID>sample string 5</CustomerID>
  <DateEstablished>sample string 8</DateEstablished>
  <DelPrice>11.1</DelPrice>
  <DocumentFormatGuid>06831443-9157-4532-96f2-c074be887274</DocumentFormatGuid>
  <ExchangeID>sample string 17</ExchangeID>
  <ExpireDate>sample string 15</ExpireDate>
  <FuturesMonthID>sample string 13</FuturesMonthID>
  <FuturesPrice>16.1</FuturesPrice>
  <GrSalesContractGUID>33619f2b-0e46-4026-a59f-a80da0ff5f32</GrSalesContractGUID>
  <LocationID>sample string 4</LocationID>
  <OldContractID>sample string 1</OldContractID>
  <OldLocationID>sample string 2</OldLocationID>
  <PricingNotes>sample string 18</PricingNotes>
  <SalesConPurCon>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConPurConUpdate>
      <GRPurConGUID>5f03c44f-a73c-4a94-b40c-700fa08523dd</GRPurConGUID>
      <LinkedUnits>3.1</LinkedUnits>
      <PurchaseConLocation>sample string 2</PurchaseConLocation>
      <PurchaseConNumber>sample string 1</PurchaseConNumber>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConPurConUpdate>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConPurConUpdate>
      <GRPurConGUID>5f03c44f-a73c-4a94-b40c-700fa08523dd</GRPurConGUID>
      <LinkedUnits>3.1</LinkedUnits>
      <PurchaseConLocation>sample string 2</PurchaseConLocation>
      <PurchaseConNumber>sample string 1</PurchaseConNumber>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConPurConUpdate>
  </SalesConPurCon>
  <SalesContractComments>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConCommUpdate>
      <Comment>sample string 2</Comment>
      <CommmentDate>sample string 1</CommmentDate>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConCommUpdate>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConCommUpdate>
      <Comment>sample string 2</Comment>
      <CommmentDate>sample string 1</CommmentDate>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConCommUpdate>
  </SalesContractComments>
  <SalesContractDeliveryDates>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConDdUpdate>
      <CompleteDate>sample string 3</CompleteDate>
      <Quantity>2.1</Quantity>
      <StartDate>sample string 1</StartDate>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConDdUpdate>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConDdUpdate>
      <CompleteDate>sample string 3</CompleteDate>
      <Quantity>2.1</Quantity>
      <StartDate>sample string 1</StartDate>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConDdUpdate>
  </SalesContractDeliveryDates>
  <SalesContractGradeFactorsAndSchedules>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConGfUpdate>
      <GradFactorId>sample string 1</GradFactorId>
      <PremiumDiscountGuid>efebf62b-e97c-498a-9910-9c0c61a6dfc3</PremiumDiscountGuid>
      <ScheduleId>sample string 2</ScheduleId>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConGfUpdate>
    <ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConGfUpdate>
      <GradFactorId>sample string 1</GradFactorId>
      <PremiumDiscountGuid>efebf62b-e97c-498a-9910-9c0c61a6dfc3</PremiumDiscountGuid>
      <ScheduleId>sample string 2</ScheduleId>
    </ClsGrSalesCon.ClsSalesConUpdate.ClsGrSalesConGfUpdate>
  </SalesContractGradeFactorsAndSchedules>
  <ShippingDestinationID>sample string 14</ShippingDestinationID>
  <TransportationMethodGuid>fbe52c63-c3c7-4bc0-97f5-7dd3ec7d66a2</TransportationMethodGuid>
</ClsGrSalesCon.ClsSalesConUpdate>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ClsSalesConUpdate'.

Response Information

Resource Description

Updates a Sales Contract

AgvSalesContract
NameDescriptionTypeAdditional 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

Sample:
{
  "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 22",
      "BuyersReference": "sample string 23",
      "ContractNumber": "sample string 24",
      "Location": "sample string 25",
      "Commodity": "sample string 26",
      "DeliveredPrice": 27.1,
      "ShippingDestination": "sample string 28",
      "DateEstablished": "sample string 29",
      "ContractType": "sample string 31",
      "ContractStatus": "sample string 32",
      "CashPrice": 33.1,
      "BasisPrice": 37.1,
      "FuturesMonth": "sample string 38",
      "FuturesPrice": 39.1,
      "BidCriteria": "sample string 43",
      "OriginalQuantity": 44.1,
      "SalesContractGUID": "9c807970-c9a9-495e-89af-2505cd0faeb8",
      "QuantityRemaining": 45.1,
      "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 22",
      "BuyersReference": "sample string 23",
      "ContractNumber": "sample string 24",
      "Location": "sample string 25",
      "Commodity": "sample string 26",
      "DeliveredPrice": 27.1,
      "ShippingDestination": "sample string 28",
      "DateEstablished": "sample string 29",
      "ContractType": "sample string 31",
      "ContractStatus": "sample string 32",
      "CashPrice": 33.1,
      "BasisPrice": 37.1,
      "FuturesMonth": "sample string 38",
      "FuturesPrice": 39.1,
      "BidCriteria": "sample string 43",
      "OriginalQuantity": 44.1,
      "SalesContractGUID": "9c807970-c9a9-495e-89af-2505cd0faeb8",
      "QuantityRemaining": 45.1,
      "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

Sample:
<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>37.1</d2p1:BasisPrice>
      <d2p1:BidCriteria>sample string 43</d2p1:BidCriteria>
      <d2p1:BuyersReference>sample string 23</d2p1:BuyersReference>
      <d2p1:CashPrice>33.1</d2p1:CashPrice>
      <d2p1:Commodity>sample string 26</d2p1:Commodity>
      <d2p1:ContractNumber>sample string 24</d2p1:ContractNumber>
      <d2p1:ContractStatus>sample string 32</d2p1:ContractStatus>
      <d2p1:ContractType>sample string 31</d2p1:ContractType>
      <d2p1:CustomerID>sample string 22</d2p1:CustomerID>
      <d2p1:DateEstablished>sample string 29</d2p1:DateEstablished>
      <d2p1:DeliveredPrice>27.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 38</d2p1:FuturesMonth>
      <d2p1:FuturesPrice>39.1</d2p1:FuturesPrice>
      <d2p1:Location>sample string 25</d2p1:Location>
      <d2p1:OriginalQuantity>44.1</d2p1:OriginalQuantity>
      <d2p1:QuantityRemaining>45.1</d2p1:QuantityRemaining>
      <d2p1:SalesContractGUID>9c807970-c9a9-495e-89af-2505cd0faeb8</d2p1:SalesContractGUID>
      <d2p1:ShippingDestination>sample string 28</d2p1:ShippingDestination>
    </d2p1:clsGRSalesCon>
    <d2p1:clsGRSalesCon>
      <d2p1:BasisPrice>37.1</d2p1:BasisPrice>
      <d2p1:BidCriteria>sample string 43</d2p1:BidCriteria>
      <d2p1:BuyersReference>sample string 23</d2p1:BuyersReference>
      <d2p1:CashPrice>33.1</d2p1:CashPrice>
      <d2p1:Commodity>sample string 26</d2p1:Commodity>
      <d2p1:ContractNumber>sample string 24</d2p1:ContractNumber>
      <d2p1:ContractStatus>sample string 32</d2p1:ContractStatus>
      <d2p1:ContractType>sample string 31</d2p1:ContractType>
      <d2p1:CustomerID>sample string 22</d2p1:CustomerID>
      <d2p1:DateEstablished>sample string 29</d2p1:DateEstablished>
      <d2p1:DeliveredPrice>27.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 38</d2p1:FuturesMonth>
      <d2p1:FuturesPrice>39.1</d2p1:FuturesPrice>
      <d2p1:Location>sample string 25</d2p1:Location>
      <d2p1:OriginalQuantity>44.1</d2p1:OriginalQuantity>
      <d2p1:QuantityRemaining>45.1</d2p1:QuantityRemaining>
      <d2p1:SalesContractGUID>9c807970-c9a9-495e-89af-2505cd0faeb8</d2p1:SalesContractGUID>
      <d2p1:ShippingDestination>sample string 28</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>