POST Invoice/PostArInvoice
Creates a new AR Invoice.
Request Information
URI Parameters
Body Parameters
Invoice object used to create the transaction.
ClsArInvoiceAdd| Name | Description | Type | Additional Information |
|---|---|---|---|
| LocationId |
The posting location for the new Invoice |
string |
Required Max length: 6 |
| InvDate |
The date of the Invoice |
string |
Required Format must be MM/dd/yyyy |
| DueDate |
The due date for the Invoice |
string |
Required Format must be MM/dd/yyyy |
| GrowId |
Grower Id of the field for this Invoice |
string |
Max length: 6 |
| FieldId |
Field Id of the field for this Invoice |
string |
Max length: 8 |
| FieldCoordinatesRequiredPasswordOverride |
The password to use when the field is not included, but a product is set to require field coordinates and the option for checking allows for a password override |
string | |
| Comments |
The Comments for the Invoice |
string |
Max length: 80 |
| IsFinanceCharge |
The boolean value indicating if this Invoice is a Finance Charge Invoice or not When true - FinanceChargeCalculatedFrom is required |
boolean |
Must be 0, 1, True, or False |
| FinanceChargeCalculatedFrom |
The dollars that this finance charge Invoice was used to calculate from Only used when IsFinanceCharge is true |
decimal number |
Cannot be negative Max of 2 decimal places |
| ShipVia |
Ship Via for this Invoice |
string |
Max length: 25 |
| ShipTo |
The ShipTo Address ID for the 1st customer in the splits |
string |
Max length: 50 |
| County |
County for this Invoice |
string |
Max length: 60 |
| CustPo |
The customer provided Purchase Order Number for this Invoice |
string |
Max length: 20 |
| AdditionalComments |
The Additional Comments for the Invoice |
string |
Max length: 240 |
| ControlNumber |
An additional identifier for this Invoice |
string |
Max length: 10 |
| SalesPersonId |
The salesperson getting credit for this Invoice sale |
string |
Max length: 15 |
| Territory |
The sales territory for this Invoice |
string |
Max length: 15 |
| Acres |
Invoiced Acres - based on UnitType |
decimal number |
Cannot be negative Max of 3 decimal places |
| UnitType |
Invoiced Acres UOM (A = Acres, T = Tons, H = Hectare, M = Tonne, F = 1000 SqFt) When not included the default of "A" will be used Must be sent in as a capital letter |
string |
Must be one of these values: A,T,H,M,F |
| CropId |
The Crop of this Invoice |
string |
Max length: 15 |
| UseType |
Selection of 1 through 6 used for reporting purposes in some states This may be used for tonnage tax reporting or restricted use products as defined by the state For example, a "1" is for farm use fertilizer, a "2" is for non-farm use fertilizer When not included the default of "1" will be used |
string |
Must be one of these values: 1,2,3,4,5,6 |
| InvSplits |
List of customers for the Invoice |
Collection of ClsArInvSplitAdd |
Required List cannot be empty Maximum of 8 allowed |
Request Formats
application/json, text/json
{
"LocationId": "sample string 1",
"InvDate": "sample string 2",
"DueDate": "sample string 3",
"GrowId": "sample string 5",
"FieldId": "sample string 6",
"FieldCoordinatesRequiredPasswordOverride": "sample string 7",
"Comments": "sample string 9",
"IsFinanceCharge": true,
"FinanceChargeCalculatedFrom": 1.1,
"ShipVia": "sample string 48",
"ShipTo": "sample string 49",
"County": "sample string 51",
"CustPo": "sample string 52",
"AdditionalComments": "sample string 57",
"ControlNumber": "sample string 58",
"SalesPersonId": "sample string 59",
"Territory": "sample string 60",
"Acres": 61.1,
"UnitType": "sample string 62",
"CropId": "sample string 63",
"UseType": "sample string 66",
"InvSplits": [
{
"CustId": "sample string 2",
"Percents1": 3.1,
"Percents2": 4.1,
"Percents3": 5.1,
"BillTo": "sample string 6",
"DiscOpt": "sample string 7",
"InvLis": [
{
"DeptId": "sample string 2",
"ProdId": "sample string 3",
"OverrideProductName": "sample string 4",
"InvAmt": 5.1,
"Extension": 6.1,
"OverrideLineItemPercent": 1.1,
"Tax": true,
"TaxAmount": 8.1,
"TaxExempt": "sample string 9",
"TaxRate": 10.1,
"StTaxCode": "sample string 11",
"AdjTaxCode": "sample string 12",
"StTaxAmount": 1.1,
"StTaxRate": 1.1,
"StMaxTax": 1.1,
"AdjTaxAmount": 1.1,
"AdjTaxRate": 1.1,
"AdjMaxTax": 1.1
},
{
"DeptId": "sample string 2",
"ProdId": "sample string 3",
"OverrideProductName": "sample string 4",
"InvAmt": 5.1,
"Extension": 6.1,
"OverrideLineItemPercent": 1.1,
"Tax": true,
"TaxAmount": 8.1,
"TaxExempt": "sample string 9",
"TaxRate": 10.1,
"StTaxCode": "sample string 11",
"AdjTaxCode": "sample string 12",
"StTaxAmount": 1.1,
"StTaxRate": 1.1,
"StMaxTax": 1.1,
"AdjTaxAmount": 1.1,
"AdjTaxRate": 1.1,
"AdjMaxTax": 1.1
}
]
},
{
"CustId": "sample string 2",
"Percents1": 3.1,
"Percents2": 4.1,
"Percents3": 5.1,
"BillTo": "sample string 6",
"DiscOpt": "sample string 7",
"InvLis": [
{
"DeptId": "sample string 2",
"ProdId": "sample string 3",
"OverrideProductName": "sample string 4",
"InvAmt": 5.1,
"Extension": 6.1,
"OverrideLineItemPercent": 1.1,
"Tax": true,
"TaxAmount": 8.1,
"TaxExempt": "sample string 9",
"TaxRate": 10.1,
"StTaxCode": "sample string 11",
"AdjTaxCode": "sample string 12",
"StTaxAmount": 1.1,
"StTaxRate": 1.1,
"StMaxTax": 1.1,
"AdjTaxAmount": 1.1,
"AdjTaxRate": 1.1,
"AdjMaxTax": 1.1
},
{
"DeptId": "sample string 2",
"ProdId": "sample string 3",
"OverrideProductName": "sample string 4",
"InvAmt": 5.1,
"Extension": 6.1,
"OverrideLineItemPercent": 1.1,
"Tax": true,
"TaxAmount": 8.1,
"TaxExempt": "sample string 9",
"TaxRate": 10.1,
"StTaxCode": "sample string 11",
"AdjTaxCode": "sample string 12",
"StTaxAmount": 1.1,
"StTaxRate": 1.1,
"StMaxTax": 1.1,
"AdjTaxAmount": 1.1,
"AdjTaxRate": 1.1,
"AdjMaxTax": 1.1
}
]
}
]
}
application/xml, text/xml
<ClsArInvoice.ClsArInvoiceAdd xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.AR">
<Acres>61.1</Acres>
<AdditionalComments>sample string 57</AdditionalComments>
<Comments>sample string 9</Comments>
<ControlNumber>sample string 58</ControlNumber>
<County>sample string 51</County>
<CropId>sample string 63</CropId>
<CustPo>sample string 52</CustPo>
<DueDate>sample string 3</DueDate>
<FieldCoordinatesRequiredPasswordOverride>sample string 7</FieldCoordinatesRequiredPasswordOverride>
<FieldId>sample string 6</FieldId>
<FinanceChargeCalculatedFrom>1.1</FinanceChargeCalculatedFrom>
<GrowId>sample string 5</GrowId>
<InvDate>sample string 2</InvDate>
<InvSplits>
<ClsArInvoice.ClsArInvSplitAdd>
<BillTo>sample string 6</BillTo>
<CustId>sample string 2</CustId>
<DiscOpt>sample string 7</DiscOpt>
<InvLis>
<ClsArInvoice.ClsArInvLiAdd>
<AdjMaxTax>1.1</AdjMaxTax>
<AdjTaxAmount>1.1</AdjTaxAmount>
<AdjTaxCode>sample string 12</AdjTaxCode>
<AdjTaxRate>1.1</AdjTaxRate>
<DeptId>sample string 2</DeptId>
<Extension>6.1</Extension>
<InvAmt>5.1</InvAmt>
<OverrideLineItemPercent>1.1</OverrideLineItemPercent>
<OverrideProductName>sample string 4</OverrideProductName>
<ProdId>sample string 3</ProdId>
<StMaxTax>1.1</StMaxTax>
<StTaxAmount>1.1</StTaxAmount>
<StTaxCode>sample string 11</StTaxCode>
<StTaxRate>1.1</StTaxRate>
<Tax>true</Tax>
<TaxAmount>8.1</TaxAmount>
<TaxExempt>sample string 9</TaxExempt>
<TaxRate>10.1</TaxRate>
</ClsArInvoice.ClsArInvLiAdd>
<ClsArInvoice.ClsArInvLiAdd>
<AdjMaxTax>1.1</AdjMaxTax>
<AdjTaxAmount>1.1</AdjTaxAmount>
<AdjTaxCode>sample string 12</AdjTaxCode>
<AdjTaxRate>1.1</AdjTaxRate>
<DeptId>sample string 2</DeptId>
<Extension>6.1</Extension>
<InvAmt>5.1</InvAmt>
<OverrideLineItemPercent>1.1</OverrideLineItemPercent>
<OverrideProductName>sample string 4</OverrideProductName>
<ProdId>sample string 3</ProdId>
<StMaxTax>1.1</StMaxTax>
<StTaxAmount>1.1</StTaxAmount>
<StTaxCode>sample string 11</StTaxCode>
<StTaxRate>1.1</StTaxRate>
<Tax>true</Tax>
<TaxAmount>8.1</TaxAmount>
<TaxExempt>sample string 9</TaxExempt>
<TaxRate>10.1</TaxRate>
</ClsArInvoice.ClsArInvLiAdd>
</InvLis>
<Percents1>3.1</Percents1>
<Percents2>4.1</Percents2>
<Percents3>5.1</Percents3>
</ClsArInvoice.ClsArInvSplitAdd>
<ClsArInvoice.ClsArInvSplitAdd>
<BillTo>sample string 6</BillTo>
<CustId>sample string 2</CustId>
<DiscOpt>sample string 7</DiscOpt>
<InvLis>
<ClsArInvoice.ClsArInvLiAdd>
<AdjMaxTax>1.1</AdjMaxTax>
<AdjTaxAmount>1.1</AdjTaxAmount>
<AdjTaxCode>sample string 12</AdjTaxCode>
<AdjTaxRate>1.1</AdjTaxRate>
<DeptId>sample string 2</DeptId>
<Extension>6.1</Extension>
<InvAmt>5.1</InvAmt>
<OverrideLineItemPercent>1.1</OverrideLineItemPercent>
<OverrideProductName>sample string 4</OverrideProductName>
<ProdId>sample string 3</ProdId>
<StMaxTax>1.1</StMaxTax>
<StTaxAmount>1.1</StTaxAmount>
<StTaxCode>sample string 11</StTaxCode>
<StTaxRate>1.1</StTaxRate>
<Tax>true</Tax>
<TaxAmount>8.1</TaxAmount>
<TaxExempt>sample string 9</TaxExempt>
<TaxRate>10.1</TaxRate>
</ClsArInvoice.ClsArInvLiAdd>
<ClsArInvoice.ClsArInvLiAdd>
<AdjMaxTax>1.1</AdjMaxTax>
<AdjTaxAmount>1.1</AdjTaxAmount>
<AdjTaxCode>sample string 12</AdjTaxCode>
<AdjTaxRate>1.1</AdjTaxRate>
<DeptId>sample string 2</DeptId>
<Extension>6.1</Extension>
<InvAmt>5.1</InvAmt>
<OverrideLineItemPercent>1.1</OverrideLineItemPercent>
<OverrideProductName>sample string 4</OverrideProductName>
<ProdId>sample string 3</ProdId>
<StMaxTax>1.1</StMaxTax>
<StTaxAmount>1.1</StTaxAmount>
<StTaxCode>sample string 11</StTaxCode>
<StTaxRate>1.1</StTaxRate>
<Tax>true</Tax>
<TaxAmount>8.1</TaxAmount>
<TaxExempt>sample string 9</TaxExempt>
<TaxRate>10.1</TaxRate>
</ClsArInvoice.ClsArInvLiAdd>
</InvLis>
<Percents1>3.1</Percents1>
<Percents2>4.1</Percents2>
<Percents3>5.1</Percents3>
</ClsArInvoice.ClsArInvSplitAdd>
</InvSplits>
<IsFinanceCharge>true</IsFinanceCharge>
<LocationId>sample string 1</LocationId>
<SalesPersonId>sample string 59</SalesPersonId>
<ShipTo>sample string 49</ShipTo>
<ShipVia>sample string 48</ShipVia>
<Territory>sample string 60</Territory>
<UnitType>sample string 62</UnitType>
<UseType>sample string 66</UseType>
</ClsArInvoice.ClsArInvoiceAdd>
application/x-www-form-urlencoded
Response Information
Resource Description
Creates a new AR Invoice.
AgvArInvoice| Name | Description | Type | Additional 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 Invoice that matches the request |
Collection of ClsArInvoice |
Will be "null" when the status is not success. |
Response Formats
application/json, text/json
{
"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": [
{
"InvoiceGuid": "81badd1c-9215-4fbf-8609-d43b867f6446",
"InvNum": 1,
"LocationId": "sample string 1",
"InvDate": "2025-11-28T17:58:32.2419027+00:00"
},
{
"InvoiceGuid": "81badd1c-9215-4fbf-8609-d43b867f6446",
"InvNum": 1,
"LocationId": "sample string 1",
"InvDate": "2025-11-28T17:58:32.2419027+00:00"
}
]
}
application/xml, text/xml
<AgvArInvoice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Invoice">
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/SKY.Core.AR">
<d2p1:ClsArInvoice>
<d2p1:InvDate>2025-11-28T17:58:32.2419027+00:00</d2p1:InvDate>
<d2p1:InvNum>1</d2p1:InvNum>
<d2p1:InvoiceGuid>81badd1c-9215-4fbf-8609-d43b867f6446</d2p1:InvoiceGuid>
<d2p1:LocationId>sample string 1</d2p1:LocationId>
</d2p1:ClsArInvoice>
<d2p1:ClsArInvoice>
<d2p1:InvDate>2025-11-28T17:58:32.2419027+00:00</d2p1:InvDate>
<d2p1:InvNum>1</d2p1:InvNum>
<d2p1:InvoiceGuid>81badd1c-9215-4fbf-8609-d43b867f6446</d2p1:InvoiceGuid>
<d2p1:LocationId>sample string 1</d2p1:LocationId>
</d2p1:ClsArInvoice>
</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>
</AgvArInvoice>