AVB LINQ Public API

<back to all web services

AvbSaleCreate

Avb Sales
The following routes are available for this service:
PUT/avbsalesInsert Sale(s). Max of 1000 Sales.
AvbSaleCreate Parameters:
NameParameterData TypeRequiredDescription
SalesbodyList<SaleCreateModel>No
SaleCreateModel Parameters:
NameParameterData TypeRequiredDescription
ExternalOrderNumberformstringYes
SaleDateformDateTimeYes
CustomerNameformstringNo
CustomerPhoneformstringNo
CustomerEmailformstringNo
CustomerZipcodeformstringNo
SalesRepformstringNo
StoreLocationformstringNo
GrandTotalformdecimalNo
SubtotalformdecimalNo
DiscountformdecimalNo
MiscformdecimalNo
TaxformdecimalNo
ShippingformdecimalNo
SourceformSaleSourceNoSource is: 'LINQ','POS', or 'Website'
ShippingAddressLine1formstringNo
ShippingAddressLine2formstringNo
ShippingAddressCityformstringNo
ShippingAddressStateformstringNo
ShippingAddressZipformstringNo
ShippingMethodformstringNo
PaymentTypeformstringNo
CustomerIDformstringNo
DeliveredDateformDateTime?No
SaleItemsformList<SaleItemModel>No
SaleSource Enum:
Undefined
LINQ
POS
Website
SaleItemModel Parameters:
NameParameterData TypeRequiredDescription
MfgSkuformstringYes
BrandformstringYes
SellerSkuformstringNo
NameformstringNo
ItemQtyformdecimalYes
ItemCostformdecimalNo
AvbSaleCreateReturn Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /avbsales HTTP/1.1 
Host: avb-pos.avbportal.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AvbSaleCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/S1.API.DTO">
  <Sales xmlns:d2p1="http://schemas.datacontract.org/2004/07/S1.API.Models">
    <d2p1:SaleCreateModel>
      <d2p1:CustomerEmail>String</d2p1:CustomerEmail>
      <d2p1:CustomerID>String</d2p1:CustomerID>
      <d2p1:CustomerName>String</d2p1:CustomerName>
      <d2p1:CustomerPhone>String</d2p1:CustomerPhone>
      <d2p1:CustomerZipcode>String</d2p1:CustomerZipcode>
      <d2p1:DeliveredDate>0001-01-01T00:00:00</d2p1:DeliveredDate>
      <d2p1:Discount>0</d2p1:Discount>
      <d2p1:ExternalOrderNumber>String</d2p1:ExternalOrderNumber>
      <d2p1:GrandTotal>0</d2p1:GrandTotal>
      <d2p1:Misc>0</d2p1:Misc>
      <d2p1:PaymentType>String</d2p1:PaymentType>
      <d2p1:SaleDate>0001-01-01T00:00:00</d2p1:SaleDate>
      <d2p1:SaleItems>
        <d2p1:SaleItemModel>
          <d2p1:Brand>String</d2p1:Brand>
          <d2p1:ItemCost>0</d2p1:ItemCost>
          <d2p1:ItemQty>0</d2p1:ItemQty>
          <d2p1:MfgSku>String</d2p1:MfgSku>
          <d2p1:Name>String</d2p1:Name>
          <d2p1:SellerSku>String</d2p1:SellerSku>
        </d2p1:SaleItemModel>
      </d2p1:SaleItems>
      <d2p1:SalesRep>String</d2p1:SalesRep>
      <d2p1:Shipping>0</d2p1:Shipping>
      <d2p1:ShippingAddressCity>String</d2p1:ShippingAddressCity>
      <d2p1:ShippingAddressLine1>String</d2p1:ShippingAddressLine1>
      <d2p1:ShippingAddressLine2>String</d2p1:ShippingAddressLine2>
      <d2p1:ShippingAddressState>String</d2p1:ShippingAddressState>
      <d2p1:ShippingAddressZip>String</d2p1:ShippingAddressZip>
      <d2p1:ShippingMethod>String</d2p1:ShippingMethod>
      <d2p1:Source>Undefined</d2p1:Source>
      <d2p1:StoreLocation>String</d2p1:StoreLocation>
      <d2p1:Subtotal>0</d2p1:Subtotal>
      <d2p1:Tax>0</d2p1:Tax>
    </d2p1:SaleCreateModel>
  </Sales>
</AvbSaleCreate>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AvbSaleCreateReturn xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/S1.API.DTO">
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</AvbSaleCreateReturn>