POST BlendTicket/PostCalculateAnalysisPrice

Calculates the quantity, pricing, and products extensions for all products related to an analysis price.

Request Information

URI Parameters

Body Parameters

Request body to calculate the analysis price with

ClsCalculatePriceRequest
NameDescriptionTypeAdditional Information
PricingMethod

How to return the pricing request (if analysis - the analysis item will be the 1st product returned and products that should be suppressed will be removed)

PricingMethodEnum

Required

Range: inclusive between 0 and 2

Products

The list of all raw ingredients on the transaction and their quantities and unit prices to use for the calculations

Collection of ClsCalculatePriceRequestProduct

Required

List cannot be empty

Quantity

The quantity (acres) of the order to use for calculations

decimal number

Cannot be negative

Max of 3 decimal places

Must be filled out and numeric

LocationIdOrGuid

Identifier of the location for this order

string

Required

Max length: 36

ProductSetIdOrGuid

Identifier of the current product set for this order

string

Required

Max length: 36

Request Formats

application/json, text/json

Sample:
{
  "PricingMethod": 0,
  "Products": [
    {
      "BlendedAmount": 1.1,
      "UnitPrice": 2.1,
      "IsAnalysisItem": true,
      "ProductGUID": "4adada58-2d50-4e2c-93c2-6cd82ab1c687",
      "DepartmentID": "sample string 4",
      "ProductID": "sample string 5"
    },
    {
      "BlendedAmount": 1.1,
      "UnitPrice": 2.1,
      "IsAnalysisItem": true,
      "ProductGUID": "4adada58-2d50-4e2c-93c2-6cd82ab1c687",
      "DepartmentID": "sample string 4",
      "ProductID": "sample string 5"
    }
  ],
  "Quantity": 3.1,
  "LocationIdOrGuid": "sample string 4",
  "ProductSetIdOrGuid": "sample string 5"
}

application/xml, text/xml

Sample:
<ClsBlendPlanUtilities.ClsCalculatePriceRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSI.plbl">
  <LocationIdOrGuid>sample string 4</LocationIdOrGuid>
  <ProductSetIdOrGuid>sample string 5</ProductSetIdOrGuid>
  <Quantity>3.1</Quantity>
  <PricingMethod>Products</PricingMethod>
  <Products>
    <ClsBlendPlanUtilities.ClsCalculatePriceRequestProduct>
      <DepartmentID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 4</DepartmentID>
      <ProductGUID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">4adada58-2d50-4e2c-93c2-6cd82ab1c687</ProductGUID>
      <ProductID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 5</ProductID>
      <BlendedAmount>1.1</BlendedAmount>
      <IsAnalysisItem>true</IsAnalysisItem>
      <UnitPrice>2.1</UnitPrice>
    </ClsBlendPlanUtilities.ClsCalculatePriceRequestProduct>
    <ClsBlendPlanUtilities.ClsCalculatePriceRequestProduct>
      <DepartmentID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 4</DepartmentID>
      <ProductGUID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">4adada58-2d50-4e2c-93c2-6cd82ab1c687</ProductGUID>
      <ProductID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 5</ProductID>
      <BlendedAmount>1.1</BlendedAmount>
      <IsAnalysisItem>true</IsAnalysisItem>
      <UnitPrice>2.1</UnitPrice>
    </ClsBlendPlanUtilities.ClsCalculatePriceRequestProduct>
  </Products>
</ClsBlendPlanUtilities.ClsCalculatePriceRequest>

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

Response Information

Resource Description

Calculates the quantity, pricing, and products extensions for all products related to an analysis price.

AgvBlendTicketCalculatePrice
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
ErrorList

List of error messages of the API call.

Collection of string
WarningList

List of warning messages of the API call.

Collection of string
Count

Number of results returned.

string
Data

Calculated Price Response with Quantity, Pricing and Products updated.

ClsCalculatePriceResponse

Response Formats

application/json, text/json

Sample:
{
  "Status": "sample string 1",
  "Message": "sample string 2",
  "ErrorList": [
    "sample string 1",
    "sample string 2"
  ],
  "WarningList": [
    "sample string 1",
    "sample string 2"
  ],
  "Count": "1",
  "Data": {
    "Products": [
      {
        "ProductName": "sample string 1",
        "RatePerUnitAmount": 2.1,
        "TotalRatingAmount": 3.1,
        "RatingUnits": "sample string 4",
        "BlendedAmount": 5.1,
        "BlendingUnits": "sample string 6",
        "InventoryAmount": 7.1,
        "InventoryUnits": "sample string 8",
        "RateInPounds": 9.1,
        "UnitPrice": 10.1,
        "BillingUnits": "sample string 11",
        "ExtendedPrice": 12.1,
        "ProductIsLiquid": true,
        "Density": 14.1,
        "UnitWeight": 16.1,
        "RateToBlendRatio": 17.1,
        "BlendToInventoryRatio": 18.1,
        "BillingDivisor": 19.1,
        "ProductGUID": "bb53aaf7-1e94-4cc5-ae09-b44fcd20b2e5",
        "DepartmentID": "sample string 34",
        "ProductID": "sample string 35"
      },
      {
        "ProductName": "sample string 1",
        "RatePerUnitAmount": 2.1,
        "TotalRatingAmount": 3.1,
        "RatingUnits": "sample string 4",
        "BlendedAmount": 5.1,
        "BlendingUnits": "sample string 6",
        "InventoryAmount": 7.1,
        "InventoryUnits": "sample string 8",
        "RateInPounds": 9.1,
        "UnitPrice": 10.1,
        "BillingUnits": "sample string 11",
        "ExtendedPrice": 12.1,
        "ProductIsLiquid": true,
        "Density": 14.1,
        "UnitWeight": 16.1,
        "RateToBlendRatio": 17.1,
        "BlendToInventoryRatio": 18.1,
        "BillingDivisor": 19.1,
        "ProductGUID": "bb53aaf7-1e94-4cc5-ae09-b44fcd20b2e5",
        "DepartmentID": "sample string 34",
        "ProductID": "sample string 35"
      }
    ]
  }
}

application/xml, text/xml

Sample:
<AgvBlendTicketCalculatePrice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Blend">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/SSI.plbl">
    <d2p1:Products>
      <d2p1:ClsBlendPlanUtilities.ClsCalculatePriceResponseProduct>
        <DepartmentID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 34</DepartmentID>
        <ProductGUID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">bb53aaf7-1e94-4cc5-ae09-b44fcd20b2e5</ProductGUID>
        <ProductID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 35</ProductID>
        <d2p1:BillingDivisor>19.1</d2p1:BillingDivisor>
        <d2p1:BillingUnits>sample string 11</d2p1:BillingUnits>
        <d2p1:BlendToInventoryRatio>18.1</d2p1:BlendToInventoryRatio>
        <d2p1:BlendedAmount>5.1</d2p1:BlendedAmount>
        <d2p1:BlendingUnits>sample string 6</d2p1:BlendingUnits>
        <d2p1:Density>14.1</d2p1:Density>
        <d2p1:ExtendedPrice>12.1</d2p1:ExtendedPrice>
        <d2p1:InventoryAmount>7.1</d2p1:InventoryAmount>
        <d2p1:InventoryUnits>sample string 8</d2p1:InventoryUnits>
        <d2p1:ProductIsLiquid>true</d2p1:ProductIsLiquid>
        <d2p1:ProductName>sample string 1</d2p1:ProductName>
        <d2p1:RateInPounds>9.1</d2p1:RateInPounds>
        <d2p1:RatePerUnitAmount>2.1</d2p1:RatePerUnitAmount>
        <d2p1:RateToBlendRatio>17.1</d2p1:RateToBlendRatio>
        <d2p1:RatingUnits>sample string 4</d2p1:RatingUnits>
        <d2p1:TotalRatingAmount>3.1</d2p1:TotalRatingAmount>
        <d2p1:UnitPrice>10.1</d2p1:UnitPrice>
        <d2p1:UnitWeight>16.1</d2p1:UnitWeight>
      </d2p1:ClsBlendPlanUtilities.ClsCalculatePriceResponseProduct>
      <d2p1:ClsBlendPlanUtilities.ClsCalculatePriceResponseProduct>
        <DepartmentID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 34</DepartmentID>
        <ProductGUID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">bb53aaf7-1e94-4cc5-ae09-b44fcd20b2e5</ProductGUID>
        <ProductID xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">sample string 35</ProductID>
        <d2p1:BillingDivisor>19.1</d2p1:BillingDivisor>
        <d2p1:BillingUnits>sample string 11</d2p1:BillingUnits>
        <d2p1:BlendToInventoryRatio>18.1</d2p1:BlendToInventoryRatio>
        <d2p1:BlendedAmount>5.1</d2p1:BlendedAmount>
        <d2p1:BlendingUnits>sample string 6</d2p1:BlendingUnits>
        <d2p1:Density>14.1</d2p1:Density>
        <d2p1:ExtendedPrice>12.1</d2p1:ExtendedPrice>
        <d2p1:InventoryAmount>7.1</d2p1:InventoryAmount>
        <d2p1:InventoryUnits>sample string 8</d2p1:InventoryUnits>
        <d2p1:ProductIsLiquid>true</d2p1:ProductIsLiquid>
        <d2p1:ProductName>sample string 1</d2p1:ProductName>
        <d2p1:RateInPounds>9.1</d2p1:RateInPounds>
        <d2p1:RatePerUnitAmount>2.1</d2p1:RatePerUnitAmount>
        <d2p1:RateToBlendRatio>17.1</d2p1:RateToBlendRatio>
        <d2p1:RatingUnits>sample string 4</d2p1:RatingUnits>
        <d2p1:TotalRatingAmount>3.1</d2p1:TotalRatingAmount>
        <d2p1:UnitPrice>10.1</d2p1:UnitPrice>
        <d2p1:UnitWeight>16.1</d2p1:UnitWeight>
      </d2p1:ClsBlendPlanUtilities.ClsCalculatePriceResponseProduct>
    </d2p1:Products>
  </Data>
  <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>
  <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>
</AgvBlendTicketCalculatePrice>