POST PurchaseInvoice/PostPurchaseInvoice
Creates a new purchase invoice.
Request Information
URI Parameters
Body Parameters
Purchase Invoice object used to create a new purchase invoice.
clsPurInvName | Description | Type | Additional Information |
---|---|---|---|
VendorID | string |
Required Max length: 10 |
|
InvoiceNumber | string |
Required Max length: 15 Must not contain a space or a tic (') |
|
InvoiceDate | string |
Required Data type: DateTime Format must be MM/dd/yyyy |
|
DueDate | string |
Required Data type: DateTime Format must be MM/dd/yyyy |
|
Notes | string |
Max length: 40 |
|
FreightType | string |
Max length: 2 Only used when applying freight. Valid options: AD for Actual Total Dollars, AU for Actual Dollars/Unit, ED for Estimated Total Dollars, EU for Estimated Dollars/Unit. |
|
FreightVendorID | string |
Max length: 10 Only used when applying freight. |
|
EstimatedFreight | decimal number |
Max length: 10 Max of 4 decimal places Must be numeric Only used when applying freight, either the total or the cost-per-unit value. If EstimatedFreight is filled out ActualFreight must be zero. |
|
ActualFreight | decimal number |
Max length: 10 Max of 4 decimal places Must be numeric Only used when applying freight, either the total or the cost-per-unit value. If ActualFreight is filled out EstimatedFreight must be zero. |
|
DiscountGL | string |
Max length: 10 |
|
PurInvGuid | globally unique identifier | ||
InvoiceDetail | Collection of clsPurInvDt |
List cannot be empty |
|
InvoiceAddOn | Collection of clsPurInvAdd | ||
InvoicePayTerms |
List of Payment Terms to be applied to the Purchase Invoice |
Collection of clsPurInvPayTerms |
Maximum of 5 allowed |
Request Formats
application/json, text/json
{ "VendorID": "sample string 1", "InvoiceNumber": "sample string 2", "InvoiceDate": "sample string 3", "DueDate": "sample string 4", "Notes": "sample string 5", "FreightType": "sample string 7", "FreightVendorID": "sample string 8", "EstimatedFreight": 9.1, "ActualFreight": 10.1, "DiscountGL": "sample string 29", "PurInvGuid": "5288fe52-10ed-4dec-acb8-cd11425d612a", "InvoiceDetail": [ { "DirectYN": "sample string 4", "PONumber": "sample string 5", "POLineItem": 6, "PRNumber": "sample string 7", "PRLineItem": 8, "PrePaidYN": true, "DepartmentID": "sample string 10", "ProductID": "sample string 11", "ProductDescription": "sample string 12", "Quantity": 13.1, "UnitCost": 15.1, "Total": 17.1, "LotNumber": "sample string 21", "MFOriginCity": "sample string 24", "MFOriginState": "sample string 25", "MFDestinationCity": "sample string 26", "MFDestinationState": "sample string 27", "MFSellerLicense": "sample string 28", "MFModeOfTransportation": "sample string 29", "MFBillOfLadingDate": "sample string 30", "MFNetGallons": 31.1, "MFGrossGallons": 32.1, "MFSchedule": "sample string 33", "MFTaxFeeType": "sample string 34", "MFFreightVendorId": "sample string 35", "MFMILicenseType": "sample string 38", "ContainerKey": 39, "MFBillOfLadingNumber": "sample string 40", "MFSalesTaxPaid": true }, { "DirectYN": "sample string 4", "PONumber": "sample string 5", "POLineItem": 6, "PRNumber": "sample string 7", "PRLineItem": 8, "PrePaidYN": true, "DepartmentID": "sample string 10", "ProductID": "sample string 11", "ProductDescription": "sample string 12", "Quantity": 13.1, "UnitCost": 15.1, "Total": 17.1, "LotNumber": "sample string 21", "MFOriginCity": "sample string 24", "MFOriginState": "sample string 25", "MFDestinationCity": "sample string 26", "MFDestinationState": "sample string 27", "MFSellerLicense": "sample string 28", "MFModeOfTransportation": "sample string 29", "MFBillOfLadingDate": "sample string 30", "MFNetGallons": 31.1, "MFGrossGallons": 32.1, "MFSchedule": "sample string 33", "MFTaxFeeType": "sample string 34", "MFFreightVendorId": "sample string 35", "MFMILicenseType": "sample string 38", "ContainerKey": 39, "MFBillOfLadingNumber": "sample string 40", "MFSalesTaxPaid": true } ], "InvoiceAddOn": [ { "LineItem": 4, "DirectYN": "sample string 5", "Rate": 8.1, "CalculateAs": "sample string 9", "ApplyTo": "sample string 11", "GLAccount": "sample string 12", "Vendor": "sample string 13", "PrePaid": true, "ChargeID": "sample string 19" }, { "LineItem": 4, "DirectYN": "sample string 5", "Rate": 8.1, "CalculateAs": "sample string 9", "ApplyTo": "sample string 11", "GLAccount": "sample string 12", "Vendor": "sample string 13", "PrePaid": true, "ChargeID": "sample string 19" } ], "InvoicePayTerms": [ { "IfPaidBy": "sample string 1", "DiscountPercent": 2.1, "DiscountDollars": 3.1 }, { "IfPaidBy": "sample string 1", "DiscountPercent": 2.1, "DiscountDollars": 3.1 } ] }
application/xml, text/xml
<PurchaseInvoice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSI.Inv"> <ActualFreight>10.1</ActualFreight> <DiscountGL>sample string 29</DiscountGL> <DueDate>sample string 4</DueDate> <EstimatedFreight>9.1</EstimatedFreight> <FreightType>sample string 7</FreightType> <FreightVendorID>sample string 8</FreightVendorID> <InvoiceAddOn> <InvoiceAddOn> <ApplyTo>sample string 11</ApplyTo> <CalculateAs>sample string 9</CalculateAs> <ChargeID>sample string 19</ChargeID> <DirectYN>sample string 5</DirectYN> <GLAccount>sample string 12</GLAccount> <LineItem>4</LineItem> <PrePaid>true</PrePaid> <Rate>8.1</Rate> <Vendor>sample string 13</Vendor> </InvoiceAddOn> <InvoiceAddOn> <ApplyTo>sample string 11</ApplyTo> <CalculateAs>sample string 9</CalculateAs> <ChargeID>sample string 19</ChargeID> <DirectYN>sample string 5</DirectYN> <GLAccount>sample string 12</GLAccount> <LineItem>4</LineItem> <PrePaid>true</PrePaid> <Rate>8.1</Rate> <Vendor>sample string 13</Vendor> </InvoiceAddOn> </InvoiceAddOn> <InvoiceDate>sample string 3</InvoiceDate> <InvoiceDetail> <InvoiceDetail> <ContainerKey>39</ContainerKey> <DepartmentID>sample string 10</DepartmentID> <DirectYN>sample string 4</DirectYN> <LotNumber>sample string 21</LotNumber> <MFBillOfLadingDate>sample string 30</MFBillOfLadingDate> <MFBillOfLadingNumber>sample string 40</MFBillOfLadingNumber> <MFDestinationCity>sample string 26</MFDestinationCity> <MFDestinationState>sample string 27</MFDestinationState> <MFFreightVendorId>sample string 35</MFFreightVendorId> <MFGrossGallons>32.1</MFGrossGallons> <MFMILicenseType>sample string 38</MFMILicenseType> <MFModeOfTransportation>sample string 29</MFModeOfTransportation> <MFNetGallons>31.1</MFNetGallons> <MFOriginCity>sample string 24</MFOriginCity> <MFOriginState>sample string 25</MFOriginState> <MFSalesTaxPaid>true</MFSalesTaxPaid> <MFSchedule>sample string 33</MFSchedule> <MFSellerLicense>sample string 28</MFSellerLicense> <MFTaxFeeType>sample string 34</MFTaxFeeType> <POLineItem>6</POLineItem> <PONumber>sample string 5</PONumber> <PRLineItem>8</PRLineItem> <PRNumber>sample string 7</PRNumber> <PrePaidYN>true</PrePaidYN> <ProductDescription>sample string 12</ProductDescription> <ProductID>sample string 11</ProductID> <Quantity>13.1</Quantity> <Total>17.1</Total> <UnitCost>15.1</UnitCost> </InvoiceDetail> <InvoiceDetail> <ContainerKey>39</ContainerKey> <DepartmentID>sample string 10</DepartmentID> <DirectYN>sample string 4</DirectYN> <LotNumber>sample string 21</LotNumber> <MFBillOfLadingDate>sample string 30</MFBillOfLadingDate> <MFBillOfLadingNumber>sample string 40</MFBillOfLadingNumber> <MFDestinationCity>sample string 26</MFDestinationCity> <MFDestinationState>sample string 27</MFDestinationState> <MFFreightVendorId>sample string 35</MFFreightVendorId> <MFGrossGallons>32.1</MFGrossGallons> <MFMILicenseType>sample string 38</MFMILicenseType> <MFModeOfTransportation>sample string 29</MFModeOfTransportation> <MFNetGallons>31.1</MFNetGallons> <MFOriginCity>sample string 24</MFOriginCity> <MFOriginState>sample string 25</MFOriginState> <MFSalesTaxPaid>true</MFSalesTaxPaid> <MFSchedule>sample string 33</MFSchedule> <MFSellerLicense>sample string 28</MFSellerLicense> <MFTaxFeeType>sample string 34</MFTaxFeeType> <POLineItem>6</POLineItem> <PONumber>sample string 5</PONumber> <PRLineItem>8</PRLineItem> <PRNumber>sample string 7</PRNumber> <PrePaidYN>true</PrePaidYN> <ProductDescription>sample string 12</ProductDescription> <ProductID>sample string 11</ProductID> <Quantity>13.1</Quantity> <Total>17.1</Total> <UnitCost>15.1</UnitCost> </InvoiceDetail> </InvoiceDetail> <InvoiceNumber>sample string 2</InvoiceNumber> <InvoicePayTerms> <InvoicePayTerms> <DiscountDollars>3.1</DiscountDollars> <DiscountPercent>2.1</DiscountPercent> <IfPaidBy>sample string 1</IfPaidBy> </InvoicePayTerms> <InvoicePayTerms> <DiscountDollars>3.1</DiscountDollars> <DiscountPercent>2.1</DiscountPercent> <IfPaidBy>sample string 1</IfPaidBy> </InvoicePayTerms> </InvoicePayTerms> <Notes>sample string 5</Notes> <PurInvGuid>5288fe52-10ed-4dec-acb8-cd11425d612a</PurInvGuid> <VendorID>sample string 1</VendorID> </PurchaseInvoice>
application/x-www-form-urlencoded
Response Information
Resource Description
Creates a new purchase invoice.
AgvPurchaseInvoiceCreateName | Description | Type | Additional Information |
---|---|---|---|
Status |
Status of the API call. |
string | |
Message |
Message of the API call. |
string | |
PurchaseInvoice |
JSON object of Purchase Invoice |
clsPurInv |
Response Formats
application/json, text/json
{ "Status": "sample string 1", "Message": "sample string 2", "PurchaseInvoice": { "VendorID": "sample string 1", "InvoiceNumber": "sample string 2", "InvoiceDate": "sample string 3", "DueDate": "sample string 4", "Notes": "sample string 5", "FreightType": "sample string 7", "FreightVendorID": "sample string 8", "EstimatedFreight": 9.1, "ActualFreight": 10.1, "DiscountGL": "sample string 29", "PurInvGuid": "f1095210-81b9-4745-8c0e-8069aac0b48c", "InvoiceDetail": [ { "DirectYN": "sample string 4", "PONumber": "sample string 5", "POLineItem": 6, "PRNumber": "sample string 7", "PRLineItem": 8, "PrePaidYN": true, "DepartmentID": "sample string 10", "ProductID": "sample string 11", "ProductDescription": "sample string 12", "Quantity": 13.1, "UnitCost": 15.1, "Total": 17.1, "LotNumber": "sample string 21", "MFOriginCity": "sample string 24", "MFOriginState": "sample string 25", "MFDestinationCity": "sample string 26", "MFDestinationState": "sample string 27", "MFSellerLicense": "sample string 28", "MFModeOfTransportation": "sample string 29", "MFBillOfLadingDate": "sample string 30", "MFNetGallons": 31.1, "MFGrossGallons": 32.1, "MFSchedule": "sample string 33", "MFTaxFeeType": "sample string 34", "MFFreightVendorId": "sample string 35", "MFMILicenseType": "sample string 38", "ContainerKey": 39, "MFBillOfLadingNumber": "sample string 40", "MFSalesTaxPaid": true }, { "DirectYN": "sample string 4", "PONumber": "sample string 5", "POLineItem": 6, "PRNumber": "sample string 7", "PRLineItem": 8, "PrePaidYN": true, "DepartmentID": "sample string 10", "ProductID": "sample string 11", "ProductDescription": "sample string 12", "Quantity": 13.1, "UnitCost": 15.1, "Total": 17.1, "LotNumber": "sample string 21", "MFOriginCity": "sample string 24", "MFOriginState": "sample string 25", "MFDestinationCity": "sample string 26", "MFDestinationState": "sample string 27", "MFSellerLicense": "sample string 28", "MFModeOfTransportation": "sample string 29", "MFBillOfLadingDate": "sample string 30", "MFNetGallons": 31.1, "MFGrossGallons": 32.1, "MFSchedule": "sample string 33", "MFTaxFeeType": "sample string 34", "MFFreightVendorId": "sample string 35", "MFMILicenseType": "sample string 38", "ContainerKey": 39, "MFBillOfLadingNumber": "sample string 40", "MFSalesTaxPaid": true } ], "InvoiceAddOn": [ { "LineItem": 4, "DirectYN": "sample string 5", "Rate": 8.1, "CalculateAs": "sample string 9", "ApplyTo": "sample string 11", "GLAccount": "sample string 12", "Vendor": "sample string 13", "PrePaid": true, "ChargeID": "sample string 19" }, { "LineItem": 4, "DirectYN": "sample string 5", "Rate": 8.1, "CalculateAs": "sample string 9", "ApplyTo": "sample string 11", "GLAccount": "sample string 12", "Vendor": "sample string 13", "PrePaid": true, "ChargeID": "sample string 19" } ], "InvoicePayTerms": [ { "IfPaidBy": "sample string 1", "DiscountPercent": 2.1, "DiscountDollars": 3.1 }, { "IfPaidBy": "sample string 1", "DiscountPercent": 2.1, "DiscountDollars": 3.1 } ] } }
application/xml, text/xml
<AgvPurchaseInvoiceCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Vendor"> <Message>sample string 2</Message> <PurchaseInvoice xmlns:d2p1="http://schemas.datacontract.org/2004/07/SSI.Inv"> <d2p1:ActualFreight>10.1</d2p1:ActualFreight> <d2p1:DiscountGL>sample string 29</d2p1:DiscountGL> <d2p1:DueDate>sample string 4</d2p1:DueDate> <d2p1:EstimatedFreight>9.1</d2p1:EstimatedFreight> <d2p1:FreightType>sample string 7</d2p1:FreightType> <d2p1:FreightVendorID>sample string 8</d2p1:FreightVendorID> <d2p1:InvoiceAddOn> <d2p1:InvoiceAddOn> <d2p1:ApplyTo>sample string 11</d2p1:ApplyTo> <d2p1:CalculateAs>sample string 9</d2p1:CalculateAs> <d2p1:ChargeID>sample string 19</d2p1:ChargeID> <d2p1:DirectYN>sample string 5</d2p1:DirectYN> <d2p1:GLAccount>sample string 12</d2p1:GLAccount> <d2p1:LineItem>4</d2p1:LineItem> <d2p1:PrePaid>true</d2p1:PrePaid> <d2p1:Rate>8.1</d2p1:Rate> <d2p1:Vendor>sample string 13</d2p1:Vendor> </d2p1:InvoiceAddOn> <d2p1:InvoiceAddOn> <d2p1:ApplyTo>sample string 11</d2p1:ApplyTo> <d2p1:CalculateAs>sample string 9</d2p1:CalculateAs> <d2p1:ChargeID>sample string 19</d2p1:ChargeID> <d2p1:DirectYN>sample string 5</d2p1:DirectYN> <d2p1:GLAccount>sample string 12</d2p1:GLAccount> <d2p1:LineItem>4</d2p1:LineItem> <d2p1:PrePaid>true</d2p1:PrePaid> <d2p1:Rate>8.1</d2p1:Rate> <d2p1:Vendor>sample string 13</d2p1:Vendor> </d2p1:InvoiceAddOn> </d2p1:InvoiceAddOn> <d2p1:InvoiceDate>sample string 3</d2p1:InvoiceDate> <d2p1:InvoiceDetail> <d2p1:InvoiceDetail> <d2p1:ContainerKey>39</d2p1:ContainerKey> <d2p1:DepartmentID>sample string 10</d2p1:DepartmentID> <d2p1:DirectYN>sample string 4</d2p1:DirectYN> <d2p1:LotNumber>sample string 21</d2p1:LotNumber> <d2p1:MFBillOfLadingDate>sample string 30</d2p1:MFBillOfLadingDate> <d2p1:MFBillOfLadingNumber>sample string 40</d2p1:MFBillOfLadingNumber> <d2p1:MFDestinationCity>sample string 26</d2p1:MFDestinationCity> <d2p1:MFDestinationState>sample string 27</d2p1:MFDestinationState> <d2p1:MFFreightVendorId>sample string 35</d2p1:MFFreightVendorId> <d2p1:MFGrossGallons>32.1</d2p1:MFGrossGallons> <d2p1:MFMILicenseType>sample string 38</d2p1:MFMILicenseType> <d2p1:MFModeOfTransportation>sample string 29</d2p1:MFModeOfTransportation> <d2p1:MFNetGallons>31.1</d2p1:MFNetGallons> <d2p1:MFOriginCity>sample string 24</d2p1:MFOriginCity> <d2p1:MFOriginState>sample string 25</d2p1:MFOriginState> <d2p1:MFSalesTaxPaid>true</d2p1:MFSalesTaxPaid> <d2p1:MFSchedule>sample string 33</d2p1:MFSchedule> <d2p1:MFSellerLicense>sample string 28</d2p1:MFSellerLicense> <d2p1:MFTaxFeeType>sample string 34</d2p1:MFTaxFeeType> <d2p1:POLineItem>6</d2p1:POLineItem> <d2p1:PONumber>sample string 5</d2p1:PONumber> <d2p1:PRLineItem>8</d2p1:PRLineItem> <d2p1:PRNumber>sample string 7</d2p1:PRNumber> <d2p1:PrePaidYN>true</d2p1:PrePaidYN> <d2p1:ProductDescription>sample string 12</d2p1:ProductDescription> <d2p1:ProductID>sample string 11</d2p1:ProductID> <d2p1:Quantity>13.1</d2p1:Quantity> <d2p1:Total>17.1</d2p1:Total> <d2p1:UnitCost>15.1</d2p1:UnitCost> </d2p1:InvoiceDetail> <d2p1:InvoiceDetail> <d2p1:ContainerKey>39</d2p1:ContainerKey> <d2p1:DepartmentID>sample string 10</d2p1:DepartmentID> <d2p1:DirectYN>sample string 4</d2p1:DirectYN> <d2p1:LotNumber>sample string 21</d2p1:LotNumber> <d2p1:MFBillOfLadingDate>sample string 30</d2p1:MFBillOfLadingDate> <d2p1:MFBillOfLadingNumber>sample string 40</d2p1:MFBillOfLadingNumber> <d2p1:MFDestinationCity>sample string 26</d2p1:MFDestinationCity> <d2p1:MFDestinationState>sample string 27</d2p1:MFDestinationState> <d2p1:MFFreightVendorId>sample string 35</d2p1:MFFreightVendorId> <d2p1:MFGrossGallons>32.1</d2p1:MFGrossGallons> <d2p1:MFMILicenseType>sample string 38</d2p1:MFMILicenseType> <d2p1:MFModeOfTransportation>sample string 29</d2p1:MFModeOfTransportation> <d2p1:MFNetGallons>31.1</d2p1:MFNetGallons> <d2p1:MFOriginCity>sample string 24</d2p1:MFOriginCity> <d2p1:MFOriginState>sample string 25</d2p1:MFOriginState> <d2p1:MFSalesTaxPaid>true</d2p1:MFSalesTaxPaid> <d2p1:MFSchedule>sample string 33</d2p1:MFSchedule> <d2p1:MFSellerLicense>sample string 28</d2p1:MFSellerLicense> <d2p1:MFTaxFeeType>sample string 34</d2p1:MFTaxFeeType> <d2p1:POLineItem>6</d2p1:POLineItem> <d2p1:PONumber>sample string 5</d2p1:PONumber> <d2p1:PRLineItem>8</d2p1:PRLineItem> <d2p1:PRNumber>sample string 7</d2p1:PRNumber> <d2p1:PrePaidYN>true</d2p1:PrePaidYN> <d2p1:ProductDescription>sample string 12</d2p1:ProductDescription> <d2p1:ProductID>sample string 11</d2p1:ProductID> <d2p1:Quantity>13.1</d2p1:Quantity> <d2p1:Total>17.1</d2p1:Total> <d2p1:UnitCost>15.1</d2p1:UnitCost> </d2p1:InvoiceDetail> </d2p1:InvoiceDetail> <d2p1:InvoiceNumber>sample string 2</d2p1:InvoiceNumber> <d2p1:InvoicePayTerms> <d2p1:InvoicePayTerms> <d2p1:DiscountDollars>3.1</d2p1:DiscountDollars> <d2p1:DiscountPercent>2.1</d2p1:DiscountPercent> <d2p1:IfPaidBy>sample string 1</d2p1:IfPaidBy> </d2p1:InvoicePayTerms> <d2p1:InvoicePayTerms> <d2p1:DiscountDollars>3.1</d2p1:DiscountDollars> <d2p1:DiscountPercent>2.1</d2p1:DiscountPercent> <d2p1:IfPaidBy>sample string 1</d2p1:IfPaidBy> </d2p1:InvoicePayTerms> </d2p1:InvoicePayTerms> <d2p1:Notes>sample string 5</d2p1:Notes> <d2p1:PurInvGuid>f1095210-81b9-4745-8c0e-8069aac0b48c</d2p1:PurInvGuid> <d2p1:VendorID>sample string 1</d2p1:VendorID> </PurchaseInvoice> <Status>sample string 1</Status> </AgvPurchaseInvoiceCreate>