POST PurchaseContract/SplitPurchaseContract

Split a purchase contract

Request Information

URI Parameters

Body Parameters

The contract guid or purchase contract object to split, a list of customers and split amounts, and amendment information if Purchase Contract Amendments are used

ClsSplitContractRequest
NameDescriptionTypeAdditional Information
ExistingContract

The GUID of an existing Purchase Contract to split. Only one of ExistingContract or NewContract can be used at a time.

globally unique identifier
NewContract

A Purchase Contract object to add and split. Only one of ExistingContract or NewContract can be used at a time.

ClsGrPurConAdd
Splits

The Customer IDs and Values to use for the contract units

Collection of SplitInfo

Required

BuyerSignatureDateTimeSignedUtc

The date and time the buyer's signature was captured in UTC (Only used with a valid AgvanceUserIdToAssignBuyerSignatureFrom set)

date
BuyerSignatureDateSignedToPrint

The date the buyer's signature was applied to the contract (Only used with a valid AgvanceUserIdToAssignBuyerSignatureFrom set)

date
AmendmentDate

The date to put on the amendment. If not sent, it will default to today.

string

Data type: DateTime

Format must be MM/dd/yyyy

AmendmentSigned

True or False. Sets the contract signed checkbox on the amendment

boolean
AmendmentType

The field that this amendment will be deducted from. Settlement Deduction, Basis Price, or Futures Price

AmendmentTypes
AmendmentDeductionGUID

If the TypeString is Settlement Deduction, this is the GUID of the Deduction that will be used

globally unique identifier
AmendmentDeductionRate

If the TypeString is Settlement Deduction, this is the rate for the settlement deduction

string
AmendmentDescription

A short description of this amendment

string

Max length: 100

AmendmentComment

Optional comments for this amendment. When Change Reasons are required, this field must be filled out

string
AmendmentQuantitySource

If the TypeString is Settlement Deduction, this is the quantity source for the amendment on the original contract.

QuantitySourceEnum

Valid values are "Units Left to Settle" (1), "Open Units" (2), "Change In Units" (3), or "Manual" (4). If not sent or invalid, Change In Units will be used

AmendmentQuantity

The quantity to put on the amendment. Only used when the QuantitySource is Manual (4)

decimal number

Request Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Unable to cast object of type 'System.Double' to type 'System.Enum'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Unable to cast object of type 'System.Double' to type 'System.Enum'.

application/xml, text/xml

Sample:
<ClsGrPurCon.ClsSplitContractRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Grain">
  <AmendmentComment>sample string 5</AmendmentComment>
  <AmendmentDate>sample string 1</AmendmentDate>
  <AmendmentDeductionGUID>a305348e-e283-4d32-8b2c-231103972d9f</AmendmentDeductionGUID>
  <AmendmentDeductionRate>sample string 3</AmendmentDeductionRate>
  <AmendmentDescription>sample string 4</AmendmentDescription>
  <AmendmentQuantity>1.1</AmendmentQuantity>
  <AmendmentQuantitySource>NotSelected</AmendmentQuantitySource>
  <AmendmentSigned>true</AmendmentSigned>
  <AmendmentType>NotSelected</AmendmentType>
  <BuyerSignatureDateSignedToPrint>2025-08-23T07:32:00.9026571+00:00</BuyerSignatureDateSignedToPrint>
  <BuyerSignatureDateTimeSignedUtc>2025-08-23T07:32:00.9026571+00:00</BuyerSignatureDateTimeSignedUtc>
  <ExistingContract>c1f27e68-be7f-41ff-a362-82ecbfa02dda</ExistingContract>
  <NewContract>
    <AgvanceUserIdToAssignBuyerSignatureFrom>sample string 24</AgvanceUserIdToAssignBuyerSignatureFrom>
    <BasisPrice>8.1</BasisPrice>
    <BidCriteriaID>sample string 15</BidCriteriaID>
    <BuyerSignatureDateSignedToPrint>2025-08-23T07:32:00.9026571+00:00</BuyerSignatureDateSignedToPrint>
    <BuyerSignatureDateTimeSignedUtc>2025-08-23T07:32:00.9026571+00:00</BuyerSignatureDateTimeSignedUtc>
    <CashPrice>6.1</CashPrice>
    <CommodityID>sample string 4</CommodityID>
    <ContractFormat>sample string 22</ContractFormat>
    <ContractID>sample string 1</ContractID>
    <ContractQuantity>7.1</ContractQuantity>
    <ContractSigned>true</ContractSigned>
    <ContractStatus>Open</ContractStatus>
    <ContractType>Priced</ContractType>
    <CustomerID>sample string 3</CustomerID>
    <DateEstablished>sample string 5</DateEstablished>
    <DirectShipped>true</DirectShipped>
    <ExchangeID>sample string 10</ExchangeID>
    <ExpireDate>sample string 12</ExpireDate>
    <ExternalContractID>sample string 21</ExternalContractID>
    <FarmId>sample string 26</FarmId>
    <FreightOnBoard>true</FreightOnBoard>
    <FuturesMonthID>sample string 9</FuturesMonthID>
    <FuturesPrice>13.1</FuturesPrice>
    <LocationID>sample string 2</LocationID>
    <MOTGuid>ab4ea650-857e-4460-9b11-6cb58c999284</MOTGuid>
    <PriceByDate>sample string 19</PriceByDate>
    <PricingNotes>sample string 18</PricingNotes>
    <PurchaseContractComments>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConCommAdd>
        <Comment>sample string 1</Comment>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConCommAdd>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConCommAdd>
        <Comment>sample string 1</Comment>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConCommAdd>
    </PurchaseContractComments>
    <PurchaseContractDeliveryDates>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConDdAdd>
        <CompleteDate>sample string 2</CompleteDate>
        <Quantity>3.1</Quantity>
        <StartDate>sample string 1</StartDate>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConDdAdd>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConDdAdd>
        <CompleteDate>sample string 2</CompleteDate>
        <Quantity>3.1</Quantity>
        <StartDate>sample string 1</StartDate>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConDdAdd>
    </PurchaseContractDeliveryDates>
    <PurchaseContractMinimumPriceInfo>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConRollAdd>
        <BasisPrice>2.1</BasisPrice>
        <BuyOptionMonth>sample string 4</BuyOptionMonth>
        <BuyOptionPorC>sample string 5</BuyOptionPorC>
        <BuyOptionPrice>3.1</BuyOptionPrice>
        <BuyOptionStrike>6.1</BuyOptionStrike>
        <Comments>sample string 14</Comments>
        <ExpirationDate>2025-08-23T07:32:00.9026571+00:00</ExpirationDate>
        <FuturesPrice>1.1</FuturesPrice>
        <MinimumPrice>13.1</MinimumPrice>
        <SellOptionMonth>sample string 8</SellOptionMonth>
        <SellOptionPorC>sample string 9</SellOptionPorC>
        <SellOptionPrice>7.1</SellOptionPrice>
        <SellOptionStrike>10.1</SellOptionStrike>
        <ServiceCharge>12.1</ServiceCharge>
        <Storage>11.1</Storage>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConRollAdd>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConRollAdd>
        <BasisPrice>2.1</BasisPrice>
        <BuyOptionMonth>sample string 4</BuyOptionMonth>
        <BuyOptionPorC>sample string 5</BuyOptionPorC>
        <BuyOptionPrice>3.1</BuyOptionPrice>
        <BuyOptionStrike>6.1</BuyOptionStrike>
        <Comments>sample string 14</Comments>
        <ExpirationDate>2025-08-23T07:32:00.9026571+00:00</ExpirationDate>
        <FuturesPrice>1.1</FuturesPrice>
        <MinimumPrice>13.1</MinimumPrice>
        <SellOptionMonth>sample string 8</SellOptionMonth>
        <SellOptionPorC>sample string 9</SellOptionPorC>
        <SellOptionPrice>7.1</SellOptionPrice>
        <SellOptionStrike>10.1</SellOptionStrike>
        <ServiceCharge>12.1</ServiceCharge>
        <Storage>11.1</Storage>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConRollAdd>
    </PurchaseContractMinimumPriceInfo>
    <PurchaseContractSchedules>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConGfAdd>
        <GradFactorId>sample string 1</GradFactorId>
        <PremiumDiscountGuid>8a857a08-a105-4b42-989b-3565f715985b</PremiumDiscountGuid>
        <ScheduleId>sample string 2</ScheduleId>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConGfAdd>
      <ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConGfAdd>
        <GradFactorId>sample string 1</GradFactorId>
        <PremiumDiscountGuid>8a857a08-a105-4b42-989b-3565f715985b</PremiumDiscountGuid>
        <ScheduleId>sample string 2</ScheduleId>
      </ClsGrPurCon.ClsGrPurConAdd.ClsGrPurConGfAdd>
    </PurchaseContractSchedules>
    <SalespersonID>sample string 17</SalespersonID>
    <SellerSignatureDateSignedToPrint>2025-08-23T07:32:00.9026571+00:00</SellerSignatureDateSignedToPrint>
    <ShippingDestinationID>sample string 16</ShippingDestinationID>
    <SpotContract>true</SpotContract>
    <StrikePrice>11.1</StrikePrice>
  </NewContract>
  <Splits>
    <ClsGrPurCon.ClsSplitContractRequest.SplitInfo>
      <AgvanceUserIdToAssignBuyerSignatureFrom>sample string 3</AgvanceUserIdToAssignBuyerSignatureFrom>
      <CustRef>sample string 1</CustRef>
      <Value>2.1</Value>
    </ClsGrPurCon.ClsSplitContractRequest.SplitInfo>
    <ClsGrPurCon.ClsSplitContractRequest.SplitInfo>
      <AgvanceUserIdToAssignBuyerSignatureFrom>sample string 3</AgvanceUserIdToAssignBuyerSignatureFrom>
      <CustRef>sample string 1</CustRef>
      <Value>2.1</Value>
    </ClsGrPurCon.ClsSplitContractRequest.SplitInfo>
  </Splits>
</ClsGrPurCon.ClsSplitContractRequest>

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

Response Information

Resource Description

Split a purchase contract

AgvPurchaseContractDetails
NameDescriptionTypeAdditional 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
Count

The number of results returned.

string
PurchaseContract

ClsGrPurCon

Response Formats

application/json, text/json

Sample:
{
  "Status": "sample string 1",
  "Message": "sample string 2",
  "Count": "1",
  "PurchaseContract": {
    "Contract": "sample string 1",
    "CustID": "sample string 2",
    "Location": "sample string 5",
    "Commodity": "sample string 6",
    "Dateest": "sample string 7",
    "ExpireDate": "sample string 8",
    "ContractStatus": "sample string 9",
    "ContractType": "sample string 10",
    "CashPrice": 11.1,
    "ContractQuantity": 12.1,
    "QuantityRecvd": 13.1,
    "Basisprice": 14.1,
    "FuturesMonth": "sample string 15",
    "Exchange": "sample string 17",
    "StrikePrice": 18.1,
    "Futuresprice": 19.1,
    "ContractSigned": true,
    "BidCriteria": "sample string 21",
    "ShipDestination": "sample string 22",
    "OriginContract": "sample string 23",
    "OriginLocation": "sample string 24",
    "SalesmanID": "sample string 25",
    "PricingNotes": "sample string 26",
    "IsSpot": true,
    "originalContractQuantity": 28.1,
    "PurchaseContractGuid": "e4d3e0c8-3d52-41c0-9321-820ab338f1b3",
    "SellerSignatureDateSignedToPrint": "2025-08-23T07:32:00.958538+00:00",
    "ContractFormat": "sample string 37",
    "DirectShipped": true,
    "LastModifiedUTC": "2025-08-23T07:32:00.958538+00:00",
    "PurchaseContractDeliveryDates": [
      {
        "Contract": "sample string 1",
        "Location": "sample string 2",
        "Lineitem": "3",
        "StartDate": "sample string 4",
        "Quantity": "5.1",
        "CompleteDate": "sample string 6"
      },
      {
        "Contract": "sample string 1",
        "Location": "sample string 2",
        "Lineitem": "3",
        "StartDate": "sample string 4",
        "Quantity": "5.1",
        "CompleteDate": "sample string 6"
      }
    ],
    "PurchaseContractGradeFactors": [
      {
        "Contract": "sample string 1",
        "Location": "sample string 2",
        "Lineitem": "3",
        "GradFact": "sample string 4",
        "Schedule": "sample string 5",
        "Commodity": "sample string 6"
      },
      {
        "Contract": "sample string 1",
        "Location": "sample string 2",
        "Lineitem": "3",
        "GradFact": "sample string 4",
        "Schedule": "sample string 5",
        "Commodity": "sample string 6"
      }
    ],
    "PurchaseContractComments": [
      {
        "CommentDate": "sample string 4",
        "Comment": "sample string 5"
      },
      {
        "CommentDate": "sample string 4",
        "Comment": "sample string 5"
      }
    ]
  }
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: No set method for property 'QuantityAsStringForApi' in type 'SKY.Core.Grain.ClsGrPurCon+ClsGrPurConDd'.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: No set method for property 'QuantityAsStringForApi' in type 'SKY.Core.Grain.ClsGrPurCon+ClsGrPurConDd'.