POST SalesContract/MigrateSalesContract

Migrate a Sales Contract

Request Information

URI Parameters

Body Parameters

ClsGrSalesConMigrate
NameDescriptionTypeAdditional Information
SourceContract

The Contract GUID to migrate

globally unique identifier

Required

(Hexadecimal 8-4-4-4-12)

ContractNumber

Contract Number of the new sales contract. Any number can be sent if contracts are autonumbered, it will not be used.

string

Required

Max length: 15

DateEstablished

Date the contract was established

string

Required

Data type: DateTime

Format must be MM/dd/yyyy

ContractQuantity

Quantity of the new contract. Can't exceed the quantity of the original

decimal number

Required

ExpireDate

Expiration date of the contract

string

Data type: DateTime

Format must be MM/dd/yyyy

ShippingDestination

ID of the shipping destination on the contract

string

Max length: 6

ContractStatus

Current status of contract

string
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

CashPrice

FOB price for the established conract

decimal number
DeliveredPrice

Price the terminal/processor will pay the grain elevator for the grain when delivered

decimal number
BidCriteria

ID for the terms of the bid

string

Max length: 20

TransportationMethodGuid

Method of transportation for the sales contract

globally unique identifier
FuturesPrice

Price the terminal/processor will pay the grain elevator for the grain when delivered

decimal number
BasisPrice

Basis price of the sales contract

decimal number
FuturesMonth

Futures month of the sales contract

string

Max length: 10

Exchange

ID of the exchange used to establish the price

string

Max length: 10

PricingNote

Pricing notes of the sales contract

string

Max length: 50

SalesContractDeliveryDates

List of Delivery Dates for the Sales Contract

Collection of clsGRSalesConDD
SalesContractPremiumDiscountSchedules

List of grade factors and schedules for the sales contract

Collection of clsGRSalesConGF
SalesContractComments

List of comments for the Sales contract

Collection of clsGRSalesConComm
ShipmentInfo

List of shipment information to move to the new contract

Collection of MigrationShipmentInfo

Request Formats

application/json, text/json

Sample:
{
  "SourceContract": "598ec1ae-42b5-4f2d-9b9d-896e190981d2",
  "ContractNumber": "sample string 2",
  "DateEstablished": "sample string 3",
  "ContractQuantity": 4.1,
  "ExpireDate": "sample string 5",
  "ShippingDestination": "sample string 6",
  "ContractStatus": "sample string 7",
  "BuyersReference": "sample string 8",
  "CashPrice": 9.1,
  "DeliveredPrice": 10.1,
  "BidCriteria": "sample string 11",
  "TransportationMethodGuid": "3c39d343-c639-4ec4-9868-17ad5def054f",
  "FuturesPrice": 12.1,
  "BasisPrice": 13.1,
  "FuturesMonth": "sample string 14",
  "Exchange": "sample string 15",
  "PricingNote": "sample string 16",
  "SalesContractDeliveryDates": [
    {
      "StartDeliveryDate": "sample string 5",
      "Quantity": 6.1,
      "CompleteDeliveryDate": "sample string 7"
    },
    {
      "StartDeliveryDate": "sample string 5",
      "Quantity": 6.1,
      "CompleteDeliveryDate": "sample string 7"
    }
  ],
  "SalesContractPremiumDiscountSchedules": [
    {
      "Gradfact": "sample string 5",
      "Schedule": "sample string 6"
    },
    {
      "Gradfact": "sample string 5",
      "Schedule": "sample string 6"
    }
  ],
  "SalesContractComments": [
    {
      "Commdate": "sample string 5",
      "Comment": "sample string 6"
    },
    {
      "Commdate": "sample string 5",
      "Comment": "sample string 6"
    }
  ],
  "ShipmentInfo": [
    {
      "ShipmentGUID": "1c3963c6-bd86-48c3-82dd-41ec5979ae9a",
      "ShipmentLineItem": 2,
      "UnitsToMigrate": 3.1
    },
    {
      "ShipmentGUID": "1c3963c6-bd86-48c3-82dd-41ec5979ae9a",
      "ShipmentLineItem": 2,
      "UnitsToMigrate": 3.1
    }
  ]
}

application/xml, text/xml

Sample:
<clsGRSalesCon.ClsGrSalesConMigrate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSI">
  <BasisPrice>13.1</BasisPrice>
  <BidCriteria>sample string 11</BidCriteria>
  <BuyersReference>sample string 8</BuyersReference>
  <CashPrice>9.1</CashPrice>
  <ContractNumber>sample string 2</ContractNumber>
  <ContractQuantity>4.1</ContractQuantity>
  <ContractStatus>sample string 7</ContractStatus>
  <DateEstablished>sample string 3</DateEstablished>
  <DeliveredPrice>10.1</DeliveredPrice>
  <Exchange>sample string 15</Exchange>
  <ExpireDate>sample string 5</ExpireDate>
  <FuturesMonth>sample string 14</FuturesMonth>
  <FuturesPrice>12.1</FuturesPrice>
  <PricingNote>sample string 16</PricingNote>
  <SalesContractComments>
    <clsGRSalesConComm>
      <Commdate>sample string 5</Commdate>
      <Comment>sample string 6</Comment>
    </clsGRSalesConComm>
    <clsGRSalesConComm>
      <Commdate>sample string 5</Commdate>
      <Comment>sample string 6</Comment>
    </clsGRSalesConComm>
  </SalesContractComments>
  <SalesContractDeliveryDates>
    <clsGRSalesConDD>
      <CompleteDeliveryDate>sample string 7</CompleteDeliveryDate>
      <Quantity>6.1</Quantity>
      <StartDeliveryDate>sample string 5</StartDeliveryDate>
    </clsGRSalesConDD>
    <clsGRSalesConDD>
      <CompleteDeliveryDate>sample string 7</CompleteDeliveryDate>
      <Quantity>6.1</Quantity>
      <StartDeliveryDate>sample string 5</StartDeliveryDate>
    </clsGRSalesConDD>
  </SalesContractDeliveryDates>
  <SalesContractPremiumDiscountSchedules>
    <clsGRSalesConGF>
      <Gradfact>sample string 5</Gradfact>
      <Schedule>sample string 6</Schedule>
    </clsGRSalesConGF>
    <clsGRSalesConGF>
      <Gradfact>sample string 5</Gradfact>
      <Schedule>sample string 6</Schedule>
    </clsGRSalesConGF>
  </SalesContractPremiumDiscountSchedules>
  <ShipmentInfo>
    <clsGRSalesCon.ClsGrSalesConMigrate.MigrationShipmentInfo>
      <ShipmentGUID>1c3963c6-bd86-48c3-82dd-41ec5979ae9a</ShipmentGUID>
      <ShipmentLineItem>2</ShipmentLineItem>
      <UnitsToMigrate>3.1</UnitsToMigrate>
    </clsGRSalesCon.ClsGrSalesConMigrate.MigrationShipmentInfo>
    <clsGRSalesCon.ClsGrSalesConMigrate.MigrationShipmentInfo>
      <ShipmentGUID>1c3963c6-bd86-48c3-82dd-41ec5979ae9a</ShipmentGUID>
      <ShipmentLineItem>2</ShipmentLineItem>
      <UnitsToMigrate>3.1</UnitsToMigrate>
    </clsGRSalesCon.ClsGrSalesConMigrate.MigrationShipmentInfo>
  </ShipmentInfo>
  <ShippingDestination>sample string 6</ShippingDestination>
  <SourceContract>598ec1ae-42b5-4f2d-9b9d-896e190981d2</SourceContract>
  <TransportationMethodGuid>3c39d343-c639-4ec4-9868-17ad5def054f</TransportationMethodGuid>
</clsGRSalesCon.ClsGrSalesConMigrate>

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 'ClsGrSalesConMigrate'.

Response Information

Resource Description

Migrate 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": "3f511640-7f3e-41b0-ab79-383a77751f6f",
      "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": "3f511640-7f3e-41b0-ab79-383a77751f6f",
      "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>3f511640-7f3e-41b0-ab79-383a77751f6f</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>3f511640-7f3e-41b0-ab79-383a77751f6f</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>