PUT Seed/PatchPutGrowerOrder

Updates a Grower Order.

Request Information

URI Parameters

Body Parameters

Grower Order object used to update a grower order.

GrowerOrderUpdate
NameDescriptionTypeAdditional Information
OrderNumber

Order Number

integer

Required

Cannot be negative

SalespersonId

The salesperson id

string

Max length: 15

Suppliers

List of suppliers

Collection of GrowerOrderSupplierEdit

Request Formats

application/json, text/json

Sample:
{
  "OrderNumber": 1,
  "SalespersonId": "sample string 2",
  "Suppliers": [
    {
      "VendorId": "sample string 1",
      "DirectShip": true,
      "AddLineItems": [
        {
          "DeptId": "sample string 1",
          "ProdId": "sample string 2",
          "Quantity": 3.1,
          "RequestedDate": "sample string 4",
          "SendLineToSupplier": true
        },
        {
          "DeptId": "sample string 1",
          "ProdId": "sample string 2",
          "Quantity": 3.1,
          "RequestedDate": "sample string 4",
          "SendLineToSupplier": true
        }
      ],
      "EditLineItems": [
        {
          "LineItem": 1,
          "Quantity": 1.1,
          "RequestedDate": "sample string 2",
          "SendLineToSupplier": true
        },
        {
          "LineItem": 1,
          "Quantity": 1.1,
          "RequestedDate": "sample string 2",
          "SendLineToSupplier": true
        }
      ],
      "DeleteLineItems": [
        {
          "LineItem": 1
        },
        {
          "LineItem": 1
        }
      ]
    },
    {
      "VendorId": "sample string 1",
      "DirectShip": true,
      "AddLineItems": [
        {
          "DeptId": "sample string 1",
          "ProdId": "sample string 2",
          "Quantity": 3.1,
          "RequestedDate": "sample string 4",
          "SendLineToSupplier": true
        },
        {
          "DeptId": "sample string 1",
          "ProdId": "sample string 2",
          "Quantity": 3.1,
          "RequestedDate": "sample string 4",
          "SendLineToSupplier": true
        }
      ],
      "EditLineItems": [
        {
          "LineItem": 1,
          "Quantity": 1.1,
          "RequestedDate": "sample string 2",
          "SendLineToSupplier": true
        },
        {
          "LineItem": 1,
          "Quantity": 1.1,
          "RequestedDate": "sample string 2",
          "SendLineToSupplier": true
        }
      ],
      "DeleteLineItems": [
        {
          "LineItem": 1
        },
        {
          "LineItem": 1
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<GrowerOrder.GrowerOrderUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Seed">
  <OrderNumber>1</OrderNumber>
  <SalespersonId>sample string 2</SalespersonId>
  <Suppliers>
    <GrowerOrder.GrowerOrderUpdate.GrowerOrderSupplierEdit>
      <AddLineItems>
        <GrowerOrder.GrowerOrderLiAdd>
          <DeptId>sample string 1</DeptId>
          <ProdId>sample string 2</ProdId>
          <Quantity>3.1</Quantity>
          <RequestedDate>sample string 4</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderLiAdd>
        <GrowerOrder.GrowerOrderLiAdd>
          <DeptId>sample string 1</DeptId>
          <ProdId>sample string 2</ProdId>
          <Quantity>3.1</Quantity>
          <RequestedDate>sample string 4</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderLiAdd>
      </AddLineItems>
      <DeleteLineItems>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
          <LineItem>1</LineItem>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
          <LineItem>1</LineItem>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
      </DeleteLineItems>
      <DirectShip>true</DirectShip>
      <EditLineItems>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
          <LineItem>1</LineItem>
          <Quantity>1.1</Quantity>
          <RequestedDate>sample string 2</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
          <LineItem>1</LineItem>
          <Quantity>1.1</Quantity>
          <RequestedDate>sample string 2</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
      </EditLineItems>
      <VendorId>sample string 1</VendorId>
    </GrowerOrder.GrowerOrderUpdate.GrowerOrderSupplierEdit>
    <GrowerOrder.GrowerOrderUpdate.GrowerOrderSupplierEdit>
      <AddLineItems>
        <GrowerOrder.GrowerOrderLiAdd>
          <DeptId>sample string 1</DeptId>
          <ProdId>sample string 2</ProdId>
          <Quantity>3.1</Quantity>
          <RequestedDate>sample string 4</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderLiAdd>
        <GrowerOrder.GrowerOrderLiAdd>
          <DeptId>sample string 1</DeptId>
          <ProdId>sample string 2</ProdId>
          <Quantity>3.1</Quantity>
          <RequestedDate>sample string 4</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderLiAdd>
      </AddLineItems>
      <DeleteLineItems>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
          <LineItem>1</LineItem>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
          <LineItem>1</LineItem>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiDelete>
      </DeleteLineItems>
      <DirectShip>true</DirectShip>
      <EditLineItems>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
          <LineItem>1</LineItem>
          <Quantity>1.1</Quantity>
          <RequestedDate>sample string 2</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
        <GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
          <LineItem>1</LineItem>
          <Quantity>1.1</Quantity>
          <RequestedDate>sample string 2</RequestedDate>
          <SendLineToSupplier>true</SendLineToSupplier>
        </GrowerOrder.GrowerOrderUpdate.GrowerOrderLiEdit>
      </EditLineItems>
      <VendorId>sample string 1</VendorId>
    </GrowerOrder.GrowerOrderUpdate.GrowerOrderSupplierEdit>
  </Suppliers>
</GrowerOrder.GrowerOrderUpdate>

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

Response Information

Resource Description

Updates a Grower Order.

AgvSeedGrowerOrder
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 errors from the API

Collection of string
WarningList

List of warnings from the API

Collection of string
Count

Number of results returned

string
Data

List of properties and values returned for each Grower Order that matches the request

Collection of GrowerOrder

Will be "null" when the status is not success.

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": "2",
  "Data": [
    {
      "GrowerOrderGuid": "ff42d8be-a831-4a2c-b6b5-3777b3a030b5",
      "OrderNumber": 1
    },
    {
      "GrowerOrderGuid": "ff42d8be-a831-4a2c-b6b5-3777b3a030b5",
      "OrderNumber": 1
    }
  ]
}

application/xml, text/xml

Sample:
<AgvSeedGrowerOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Seed">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/SKY.Core.Seed">
    <d2p1:GrowerOrder>
      <d2p1:GrowerOrderGuid>ff42d8be-a831-4a2c-b6b5-3777b3a030b5</d2p1:GrowerOrderGuid>
      <d2p1:OrderNumber>1</d2p1:OrderNumber>
    </d2p1:GrowerOrder>
    <d2p1:GrowerOrder>
      <d2p1:GrowerOrderGuid>ff42d8be-a831-4a2c-b6b5-3777b3a030b5</d2p1:GrowerOrderGuid>
      <d2p1:OrderNumber>1</d2p1:OrderNumber>
    </d2p1:GrowerOrder>
  </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>
</AgvSeedGrowerOrder>