POST Invoice/PostArInvoice
Creates a new AR Invoice.
Request Information
URI Parameters
Body Parameters
Invoice object used to create the transaction.
ClsArInvoiceAddName | 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 |
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 1 allowed |
Request Formats
application/json, text/json
{ "LocationId": "sample string 1", "InvDate": "sample string 2", "DueDate": "sample string 3", "Comments": "sample string 8", "IsFinanceCharge": true, "FinanceChargeCalculatedFrom": 1.1, "ShipVia": "sample string 47", "ShipTo": "sample string 48", "County": "sample string 50", "CustPo": "sample string 51", "AdditionalComments": "sample string 56", "ControlNumber": "sample string 57", "SalesPersonId": "sample string 58", "Territory": "sample string 59", "Acres": 60.1, "UnitType": "sample string 61", "CropId": "sample string 62", "UseType": "sample string 65", "InvSplits": [ { "CustId": "sample string 2", "InvLis": [ { "DeptId": "sample string 2", "ProdId": "sample string 3", "OverrideProductName": "sample string 4", "InvAmt": 5.1, "Extension": 6.1 }, { "DeptId": "sample string 2", "ProdId": "sample string 3", "OverrideProductName": "sample string 4", "InvAmt": 5.1, "Extension": 6.1 } ] }, { "CustId": "sample string 2", "InvLis": [ { "DeptId": "sample string 2", "ProdId": "sample string 3", "OverrideProductName": "sample string 4", "InvAmt": 5.1, "Extension": 6.1 }, { "DeptId": "sample string 2", "ProdId": "sample string 3", "OverrideProductName": "sample string 4", "InvAmt": 5.1, "Extension": 6.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>60.1</Acres> <AdditionalComments>sample string 56</AdditionalComments> <Comments>sample string 8</Comments> <ControlNumber>sample string 57</ControlNumber> <County>sample string 50</County> <CropId>sample string 62</CropId> <CustPo>sample string 51</CustPo> <DueDate>sample string 3</DueDate> <FinanceChargeCalculatedFrom>1.1</FinanceChargeCalculatedFrom> <InvDate>sample string 2</InvDate> <InvSplits> <ClsArInvoice.ClsArInvSplitAdd> <CustId>sample string 2</CustId> <InvLis> <ClsArInvoice.ClsArInvLiAdd> <DeptId>sample string 2</DeptId> <Extension>6.1</Extension> <InvAmt>5.1</InvAmt> <OverrideProductName>sample string 4</OverrideProductName> <ProdId>sample string 3</ProdId> </ClsArInvoice.ClsArInvLiAdd> <ClsArInvoice.ClsArInvLiAdd> <DeptId>sample string 2</DeptId> <Extension>6.1</Extension> <InvAmt>5.1</InvAmt> <OverrideProductName>sample string 4</OverrideProductName> <ProdId>sample string 3</ProdId> </ClsArInvoice.ClsArInvLiAdd> </InvLis> </ClsArInvoice.ClsArInvSplitAdd> <ClsArInvoice.ClsArInvSplitAdd> <CustId>sample string 2</CustId> <InvLis> <ClsArInvoice.ClsArInvLiAdd> <DeptId>sample string 2</DeptId> <Extension>6.1</Extension> <InvAmt>5.1</InvAmt> <OverrideProductName>sample string 4</OverrideProductName> <ProdId>sample string 3</ProdId> </ClsArInvoice.ClsArInvLiAdd> <ClsArInvoice.ClsArInvLiAdd> <DeptId>sample string 2</DeptId> <Extension>6.1</Extension> <InvAmt>5.1</InvAmt> <OverrideProductName>sample string 4</OverrideProductName> <ProdId>sample string 3</ProdId> </ClsArInvoice.ClsArInvLiAdd> </InvLis> </ClsArInvoice.ClsArInvSplitAdd> </InvSplits> <IsFinanceCharge>true</IsFinanceCharge> <LocationId>sample string 1</LocationId> <SalesPersonId>sample string 58</SalesPersonId> <ShipTo>sample string 48</ShipTo> <ShipVia>sample string 47</ShipVia> <Territory>sample string 59</Territory> <UnitType>sample string 61</UnitType> <UseType>sample string 65</UseType> </ClsArInvoice.ClsArInvoiceAdd>
application/x-www-form-urlencoded
Response Information
Resource Description
Creates a new AR Invoice.
AgvArInvoiceName | 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": "65ec2f68-e619-4e43-8c5d-3b05cdf17bd4", "InvNum": 1, "LocationId": "sample string 1", "InvDate": "2025-10-14T01:46:42.5553512+00:00" }, { "InvoiceGuid": "65ec2f68-e619-4e43-8c5d-3b05cdf17bd4", "InvNum": 1, "LocationId": "sample string 1", "InvDate": "2025-10-14T01:46:42.5553512+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-10-14T01:46:42.5553512+00:00</d2p1:InvDate> <d2p1:InvNum>1</d2p1:InvNum> <d2p1:InvoiceGuid>65ec2f68-e619-4e43-8c5d-3b05cdf17bd4</d2p1:InvoiceGuid> <d2p1:LocationId>sample string 1</d2p1:LocationId> </d2p1:ClsArInvoice> <d2p1:ClsArInvoice> <d2p1:InvDate>2025-10-14T01:46:42.5553512+00:00</d2p1:InvDate> <d2p1:InvNum>1</d2p1:InvNum> <d2p1:InvoiceGuid>65ec2f68-e619-4e43-8c5d-3b05cdf17bd4</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>