POST v2/ranches/{ranchGuid}/commodity-types.{ext}
Saves a commodity type ranch association. This association determines what commodity types are available for a ranch.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| ranchGuid | globally unique identifier |
Required |
Body Parameters
CommodityTypesRanchSaveViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| CommodityTypeId |
Commodity type ID |
integer |
None. |
| CropTypeIds |
A list of crop type IDs associated with a commodity type |
Collection of integer |
None. |
Request Formats
application/json, text/json, text/html
Sample:
{
"CommodityTypeId": 1,
"CropTypeIds": [
1,
2
]
}
application/xml, text/xml
Sample:
<CommodityTypesRanchSaveViewModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CommodityTypeId>1</CommodityTypeId>
<CropTypeIds>
<int>1</int>
<int>2</int>
</CropTypeIds>
</CommodityTypesRanchSaveViewModel>
Response Information
Resource Description
SuccessResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Message |
Response message |
string |
None. |
Response Formats
application/json, text/json, text/html
Sample:
{
"Message": "sample string 1"
}
application/xml, text/xml
Sample:
<SuccessResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Message>sample string 1</Message> </SuccessResponse>