POST PurchaseReceipt/PostPurchaseReceipt
Creates a new purchase receipt
Request Information
URI Parameters
Body Parameters
Purchase Receipt object used to create a new purchase receipt.
ClsPurJnlName | Description | Type | Additional Information |
---|---|---|---|
VendorID |
ID of the vendor selected on the purchase receipt |
string |
Required Max length: 10 |
TicketNumber |
Ticket number assigned to the purchase receipt |
string |
Required If auto numbering is turned on send 0, if not send the purchase receipt ticket number Max length: 15 |
Shipdate |
Shipping date of the purchase |
string |
Required Data type: DateTime Format must be MM/dd/yyyy |
ControlNumber |
Control number assigned to the purchase receipt |
string |
Max length: 15 Must not contain a space or a tic (') |
LocationID |
The LocationID used when the preferences are set for auto numbering the purchase receipt with a location prefix |
string |
Max length: 6 |
FreightType |
Type of freight applied - AD for actual total dollars or ED for estimated total dollars |
string |
Max length: 2 Only used when applying freight; Valid options - AD for Actual Total Dollars or ED for Estimated Total Dollars |
FreightVendorID |
ID of the vendor to apply freight to |
string |
Max length: 10 Only used when applying freight. |
LoadNumber |
Load number assigned to the purchase receipt |
string |
Max length: 15 Must not contain a space or a tic (') |
Notes | string |
Max length: 255 |
|
FreightTotalDollars |
Total dollars of freight applied |
decimal number |
Max length: 10 Max of 2 decimal places Must be numeric |
UseAgvanceAddons |
Indicates whether or not add-on charges are applied |
boolean |
Must be 0, 1, True, or False |
CalculateFreightFromPurchaseOrders |
Indicates whether or not to ignore freight info supplied and use only what exists on purchase orders |
boolean |
Must be 0, 1, True, or False |
CalculateAddOnsFromPurchaseOrders |
Indicates whether or not to ignore Addon info supplied and use only what exists on purchase orders |
boolean |
Must be 0, 1, True, or False |
PurchaseReceiptGuid |
The globally unique identifier in the Agvance database |
globally unique identifier | |
LastModifiedUTC |
The last date and time in UTC format that the purchase receipt was modified in Agvance. Valid only for GET methods |
date | |
ReceiptDetail |
List of products on the purchase receipt |
Collection of ClsPurJnlDt |
List cannot be empty |
ReceiptAddOn |
List of add-on charges on the purchase receipt |
Collection of ClsPurJnlAdd |
Request Formats
application/json, text/json
{ "VendorID": "sample string 1", "TicketNumber": "sample string 2", "Shipdate": "sample string 3", "ControlNumber": "sample string 4", "LocationID": "sample string 5", "FreightType": "sample string 6", "FreightVendorID": "sample string 7", "LoadNumber": "sample string 11", "Notes": "sample string 12", "FreightTotalDollars": 17.1, "UseAgvanceAddons": true, "CalculateFreightFromPurchaseOrders": true, "CalculateAddOnsFromPurchaseOrders": true, "PurchaseReceiptGuid": "57559829-3d7c-4e93-9497-e34405041cab", "LastModifiedUTC": "2024-11-21T09:43:18.7419473+00:00", "ReceiptDetail": [ { "DepartmentID": "sample string 4", "ProductID": "sample string 5", "ProductDescription": "sample string 6", "Quantity": 7.1, "Cost": 8.1, "Lotnum": "sample string 12", "LotExpireDate": "sample string 13", "PONumber": "sample string 14", "POLineItem": 15 }, { "DepartmentID": "sample string 4", "ProductID": "sample string 5", "ProductDescription": "sample string 6", "Quantity": 7.1, "Cost": 8.1, "Lotnum": "sample string 12", "LotExpireDate": "sample string 13", "PONumber": "sample string 14", "POLineItem": 15 } ], "ReceiptAddOn": [ { "LineItem": 4, "Rate": 7.1, "CalculateAs": "sample string 8", "ApplyTo": "sample string 10", "GlAccount": "sample string 11", "Vendor": "sample string 12", "ChargeId": "sample string 14" }, { "LineItem": 4, "Rate": 7.1, "CalculateAs": "sample string 8", "ApplyTo": "sample string 10", "GlAccount": "sample string 11", "Vendor": "sample string 12", "ChargeId": "sample string 14" } ] }
application/xml, text/xml
<PurchaseReceipt xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory"> <CalculateAddOnsFromPurchaseOrders>true</CalculateAddOnsFromPurchaseOrders> <CalculateFreightFromPurchaseOrders>true</CalculateFreightFromPurchaseOrders> <ControlNumber>sample string 4</ControlNumber> <FreightTotalDollars>17.1</FreightTotalDollars> <FreightType>sample string 6</FreightType> <FreightVendorID>sample string 7</FreightVendorID> <LastModifiedUTC>2024-11-21T09:43:18.7419473+00:00</LastModifiedUTC> <LoadNumber>sample string 11</LoadNumber> <LocationID>sample string 5</LocationID> <Notes>sample string 12</Notes> <PurchaseReceiptGuid>57559829-3d7c-4e93-9497-e34405041cab</PurchaseReceiptGuid> <ReceiptAddOn> <ReceiptAddOn> <ApplyTo>sample string 10</ApplyTo> <CalculateAs>sample string 8</CalculateAs> <ChargeId>sample string 14</ChargeId> <GlAccount>sample string 11</GlAccount> <LineItem>4</LineItem> <Rate>7.1</Rate> <Vendor>sample string 12</Vendor> </ReceiptAddOn> <ReceiptAddOn> <ApplyTo>sample string 10</ApplyTo> <CalculateAs>sample string 8</CalculateAs> <ChargeId>sample string 14</ChargeId> <GlAccount>sample string 11</GlAccount> <LineItem>4</LineItem> <Rate>7.1</Rate> <Vendor>sample string 12</Vendor> </ReceiptAddOn> </ReceiptAddOn> <ReceiptDetail> <ReceiptDetail> <Cost>8.1</Cost> <DepartmentID>sample string 4</DepartmentID> <LotExpireDate>sample string 13</LotExpireDate> <Lotnum>sample string 12</Lotnum> <POLineItem>15</POLineItem> <PONumber>sample string 14</PONumber> <ProductDescription>sample string 6</ProductDescription> <ProductID>sample string 5</ProductID> <Quantity>7.1</Quantity> </ReceiptDetail> <ReceiptDetail> <Cost>8.1</Cost> <DepartmentID>sample string 4</DepartmentID> <LotExpireDate>sample string 13</LotExpireDate> <Lotnum>sample string 12</Lotnum> <POLineItem>15</POLineItem> <PONumber>sample string 14</PONumber> <ProductDescription>sample string 6</ProductDescription> <ProductID>sample string 5</ProductID> <Quantity>7.1</Quantity> </ReceiptDetail> </ReceiptDetail> <Shipdate>sample string 3</Shipdate> <TicketNumber>sample string 2</TicketNumber> <UseAgvanceAddons>true</UseAgvanceAddons> <VendorID>sample string 1</VendorID> </PurchaseReceipt>
application/x-www-form-urlencoded
Response Information
Resource Description
Creates a new purchase receipt
AgvPurchaseReceiptFullName | 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 | |
Count |
Number of results returned |
string | |
PurchaseReceipt |
JSON Object of PurchaseReceipt |
ClsPurJnl |
Response Formats
application/json, text/json
{ "Status": "sample string 1", "Message": "sample string 2", "Count": "sample string 3", "PurchaseReceipt": { "VendorID": "sample string 1", "TicketNumber": "sample string 2", "Shipdate": "sample string 3", "ControlNumber": "sample string 4", "LocationID": "sample string 5", "FreightType": "sample string 6", "FreightVendorID": "sample string 7", "LoadNumber": "sample string 11", "Notes": "sample string 12", "FreightTotalDollars": 17.1, "UseAgvanceAddons": true, "CalculateFreightFromPurchaseOrders": true, "CalculateAddOnsFromPurchaseOrders": true, "PurchaseReceiptGuid": "c8172d8e-1bd2-4eb0-9369-58c27b57f0cf", "LastModifiedUTC": "2024-11-21T09:43:18.7709481+00:00", "ReceiptDetail": [ { "DepartmentID": "sample string 4", "ProductID": "sample string 5", "ProductDescription": "sample string 6", "Quantity": 7.1, "Cost": 8.1, "Lotnum": "sample string 12", "LotExpireDate": "sample string 13", "PONumber": "sample string 14", "POLineItem": 15 }, { "DepartmentID": "sample string 4", "ProductID": "sample string 5", "ProductDescription": "sample string 6", "Quantity": 7.1, "Cost": 8.1, "Lotnum": "sample string 12", "LotExpireDate": "sample string 13", "PONumber": "sample string 14", "POLineItem": 15 } ], "ReceiptAddOn": [ { "LineItem": 4, "Rate": 7.1, "CalculateAs": "sample string 8", "ApplyTo": "sample string 10", "GlAccount": "sample string 11", "Vendor": "sample string 12", "ChargeId": "sample string 14" }, { "LineItem": 4, "Rate": 7.1, "CalculateAs": "sample string 8", "ApplyTo": "sample string 10", "GlAccount": "sample string 11", "Vendor": "sample string 12", "ChargeId": "sample string 14" } ] } }
application/xml, text/xml
<AgvPurchaseReceiptFull xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Vendor"> <Count>sample string 3</Count> <Message>sample string 2</Message> <PurchaseReceipt xmlns:d2p1="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory"> <d2p1:CalculateAddOnsFromPurchaseOrders>true</d2p1:CalculateAddOnsFromPurchaseOrders> <d2p1:CalculateFreightFromPurchaseOrders>true</d2p1:CalculateFreightFromPurchaseOrders> <d2p1:ControlNumber>sample string 4</d2p1:ControlNumber> <d2p1:FreightTotalDollars>17.1</d2p1:FreightTotalDollars> <d2p1:FreightType>sample string 6</d2p1:FreightType> <d2p1:FreightVendorID>sample string 7</d2p1:FreightVendorID> <d2p1:LastModifiedUTC>2024-11-21T09:43:18.7709481+00:00</d2p1:LastModifiedUTC> <d2p1:LoadNumber>sample string 11</d2p1:LoadNumber> <d2p1:LocationID>sample string 5</d2p1:LocationID> <d2p1:Notes>sample string 12</d2p1:Notes> <d2p1:PurchaseReceiptGuid>c8172d8e-1bd2-4eb0-9369-58c27b57f0cf</d2p1:PurchaseReceiptGuid> <d2p1:ReceiptAddOn> <d2p1:ReceiptAddOn> <d2p1:ApplyTo>sample string 10</d2p1:ApplyTo> <d2p1:CalculateAs>sample string 8</d2p1:CalculateAs> <d2p1:ChargeId>sample string 14</d2p1:ChargeId> <d2p1:GlAccount>sample string 11</d2p1:GlAccount> <d2p1:LineItem>4</d2p1:LineItem> <d2p1:Rate>7.1</d2p1:Rate> <d2p1:Vendor>sample string 12</d2p1:Vendor> </d2p1:ReceiptAddOn> <d2p1:ReceiptAddOn> <d2p1:ApplyTo>sample string 10</d2p1:ApplyTo> <d2p1:CalculateAs>sample string 8</d2p1:CalculateAs> <d2p1:ChargeId>sample string 14</d2p1:ChargeId> <d2p1:GlAccount>sample string 11</d2p1:GlAccount> <d2p1:LineItem>4</d2p1:LineItem> <d2p1:Rate>7.1</d2p1:Rate> <d2p1:Vendor>sample string 12</d2p1:Vendor> </d2p1:ReceiptAddOn> </d2p1:ReceiptAddOn> <d2p1:ReceiptDetail> <d2p1:ReceiptDetail> <d2p1:Cost>8.1</d2p1:Cost> <d2p1:DepartmentID>sample string 4</d2p1:DepartmentID> <d2p1:LotExpireDate>sample string 13</d2p1:LotExpireDate> <d2p1:Lotnum>sample string 12</d2p1:Lotnum> <d2p1:POLineItem>15</d2p1:POLineItem> <d2p1:PONumber>sample string 14</d2p1:PONumber> <d2p1:ProductDescription>sample string 6</d2p1:ProductDescription> <d2p1:ProductID>sample string 5</d2p1:ProductID> <d2p1:Quantity>7.1</d2p1:Quantity> </d2p1:ReceiptDetail> <d2p1:ReceiptDetail> <d2p1:Cost>8.1</d2p1:Cost> <d2p1:DepartmentID>sample string 4</d2p1:DepartmentID> <d2p1:LotExpireDate>sample string 13</d2p1:LotExpireDate> <d2p1:Lotnum>sample string 12</d2p1:Lotnum> <d2p1:POLineItem>15</d2p1:POLineItem> <d2p1:PONumber>sample string 14</d2p1:PONumber> <d2p1:ProductDescription>sample string 6</d2p1:ProductDescription> <d2p1:ProductID>sample string 5</d2p1:ProductID> <d2p1:Quantity>7.1</d2p1:Quantity> </d2p1:ReceiptDetail> </d2p1:ReceiptDetail> <d2p1:Shipdate>sample string 3</d2p1:Shipdate> <d2p1:TicketNumber>sample string 2</d2p1:TicketNumber> <d2p1:UseAgvanceAddons>true</d2p1:UseAgvanceAddons> <d2p1:VendorID>sample string 1</d2p1:VendorID> </PurchaseReceipt> <Status>sample string 1</Status> </AgvPurchaseReceiptFull>