POST CustomerPermits/CheckPermits
Customer permit checking for restricted products.
Request Information
URI Parameters
Body Parameters
Customer permit information
ClsPermitChecking| Name | Description | Type | Additional Information |
|---|---|---|---|
| CustomerId |
The Customer ID of the first customer on the document |
string |
Max length: 6 |
| GrowerId |
Grower(Customer) ID of the field on the document - if included, FieldId is required |
string |
Max length: 6 |
| FieldId |
Agvance Field Id of the field on the document - if included, GrowerId is required |
string |
Max length: 8 |
| LocationId |
LocationID of the location on the document |
string |
Max length: 6 |
| ShipTo |
Ship to address for the first customer on the document - if included, CustomerId is required |
string |
Max length: 50 |
| CustomApplied |
Indicates whether or not the products on the document are custom applied |
boolean | |
| DocumentDate |
The date of the document |
string |
Required Format must be MM/dd/yyyy |
| FederalPermits |
List of federal permits on the document |
Collection of ClsPermitCheckingFederalPermit |
Maximum of 1 allowed |
| StatePermits |
List of state permits for the first customer on the document - if included, CustomerId is required |
Collection of ClsPermitCheckingStatePermit | |
| Products |
List of products on the document |
Collection of ClsPermitCheckingProduct |
List cannot be empty |
Request Formats
application/json, text/json
{
"CustomerId": "sample string 1",
"GrowerId": "sample string 2",
"FieldId": "sample string 3",
"LocationId": "sample string 4",
"ShipTo": "sample string 5",
"CustomApplied": true,
"DocumentDate": "sample string 7",
"FederalPermits": [
{
"Permit": "sample string 1",
"CustomerId": "sample string 2"
},
{
"Permit": "sample string 1",
"CustomerId": "sample string 2"
}
],
"StatePermits": [
{
"Permit": "sample string 1"
},
{
"Permit": "sample string 1"
}
],
"Products": [
{
"DepartmentId": "sample string 1",
"ProductId": "sample string 2"
},
{
"DepartmentId": "sample string 1",
"ProductId": "sample string 2"
}
]
}
application/xml, text/xml
<PermitChecking xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">
<CustomApplied>true</CustomApplied>
<CustomerId>sample string 1</CustomerId>
<DocumentDate>sample string 7</DocumentDate>
<FederalPermits>
<PermitCheckingFederalPermit>
<CustomerId>sample string 2</CustomerId>
<Permit>sample string 1</Permit>
</PermitCheckingFederalPermit>
<PermitCheckingFederalPermit>
<CustomerId>sample string 2</CustomerId>
<Permit>sample string 1</Permit>
</PermitCheckingFederalPermit>
</FederalPermits>
<FieldId>sample string 3</FieldId>
<GrowerId>sample string 2</GrowerId>
<LocationId>sample string 4</LocationId>
<Products>
<PermitCheckingProduct>
<DepartmentId>sample string 1</DepartmentId>
<ProductId>sample string 2</ProductId>
</PermitCheckingProduct>
<PermitCheckingProduct>
<DepartmentId>sample string 1</DepartmentId>
<ProductId>sample string 2</ProductId>
</PermitCheckingProduct>
</Products>
<ShipTo>sample string 5</ShipTo>
<StatePermits>
<PermitCheckingStatePermit>
<Permit>sample string 1</Permit>
</PermitCheckingStatePermit>
<PermitCheckingStatePermit>
<Permit>sample string 1</Permit>
</PermitCheckingStatePermit>
</StatePermits>
</PermitChecking>
application/x-www-form-urlencoded
Response Information
Resource Description
Customer permit checking for restricted products.
AgvCustomerPermits| Name | Description | Type | Additional Information |
|---|---|---|---|
| Status |
0 = Success; 1 = An error occurred; 2 = Descriptive message; 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 - Error occurred - Detailed message returned to give user an indication of what went wrong; 2 - Permit Checking Error. Detailed message returned to give user an indication of what went wrong; 3 - Permit Checking Warning. Detailed message returned to give user an indication of what went wrong; |
string | |
| Count |
Number of messages returned |
string | |
| PermitMessages |
Messages returned from permit checking |
Collection of string | |
| RestrictionInformation |
Additional information about the remaining restrictions |
ClsRestrictionInformation |
Response Formats
application/json, text/json
{
"Status": "sample string 1",
"Message": "sample string 2",
"Count": "2",
"PermitMessages": [
"sample string 1",
"sample string 2"
],
"RestrictionInformation": {
"FederalOrStateChecking": "sample string 1",
"RestrictedMethod": 2,
"StateRestrictedProducts": [
{
"DepartmentId": "sample string 1",
"ProductId": "sample string 2"
},
{
"DepartmentId": "sample string 1",
"ProductId": "sample string 2"
}
],
"FederalRestrictedProducts": [
{
"DepartmentId": "sample string 1",
"ProductId": "sample string 2"
},
{
"DepartmentId": "sample string 1",
"ProductId": "sample string 2"
}
]
}
}
application/xml, text/xml
<AgvCustomerPermits xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Customer">
<Message>sample string 2</Message>
<PermitMessages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</PermitMessages>
<RestrictionInformation xmlns:d2p1="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">
<d2p1:FederalOrStateChecking>sample string 1</d2p1:FederalOrStateChecking>
<d2p1:FederalRestrictedProducts>
<d2p1:PermitCheckingProduct>
<d2p1:DepartmentId>sample string 1</d2p1:DepartmentId>
<d2p1:ProductId>sample string 2</d2p1:ProductId>
</d2p1:PermitCheckingProduct>
<d2p1:PermitCheckingProduct>
<d2p1:DepartmentId>sample string 1</d2p1:DepartmentId>
<d2p1:ProductId>sample string 2</d2p1:ProductId>
</d2p1:PermitCheckingProduct>
</d2p1:FederalRestrictedProducts>
<d2p1:RestrictedMethod>2</d2p1:RestrictedMethod>
<d2p1:StateRestrictedProducts>
<d2p1:PermitCheckingProduct>
<d2p1:DepartmentId>sample string 1</d2p1:DepartmentId>
<d2p1:ProductId>sample string 2</d2p1:ProductId>
</d2p1:PermitCheckingProduct>
<d2p1:PermitCheckingProduct>
<d2p1:DepartmentId>sample string 1</d2p1:DepartmentId>
<d2p1:ProductId>sample string 2</d2p1:ProductId>
</d2p1:PermitCheckingProduct>
</d2p1:StateRestrictedProducts>
</RestrictionInformation>
<Status>sample string 1</Status>
</AgvCustomerPermits>