Entity Posting API - Stock Item Add/Update
All non-ticket sales are captured as shop sales. All shop sales are the sale of a particular stock item. These stock items are classified as one of the following types:
Retail, Merchandise, Voucher, Membership, Bar, Restaurant, Donation
If the StockItemID does not exist, a new Stock Item record will be created. If it does, it will be updated.
Triggered Updates:
- The name, supplier and groupings for any existing transactions with the StockItemID and SiteID will be updated
Standard ShowTimeAnalytics Message Parameters:
- DataSupplierID: Assigned unique identifier for your account
- String
(required) - MessageSequence: Unique sequence number incremented for each message posted
- Long
(required) - CallbackUrl: Dataprovider defined URL that result of processing the message is posted back to
- String
Fields for Stock Item Entity:
- ID attribute: Unique identifier for Stock Item
- String
(required)
- SiteID attribute: Unique identifier for site that the Stock Item applies to. Only populated if stock item is local to the site
- String
- Type: Base categorisation for stock item. Accepted values: Retail, Merchandise, Voucher, Membership, Bar, Restaurant, Donation, Deposit, Discount, Certificate
- String
(required) - Name: Name for Stock Item
- String
(required) - Supplier: Who supplies the site with the Stock Item
- String
- Category: Primary classification of the stock item
- String
- Id attribute: The unique identifier for the category being assigned
- Integer
(required)
- Sub Category: Secondary classification of the stock item
- String
- Id attribute: The unique identifier for the category being assigned
- Integer
(required)
- Tags: User defined list of tags they might want to filter on
- String
- Currency: The Currency value that defines the cost and saleprice of the Stock Item (defaults to site's currency)
- ISO-4217 Code e.g. USD
- SoldAs: How the Stock Item is sold e.g. packet, weight
- String
- IsCombo: Is the Stock Item a combo i.e. a grouping of other stockitems (default false)
- Boolean
- CostPrice: How much the Stock Item costs the site to buy in
- Integer
- Precision attribute: The number of decimal places in the CostPrice field
- Integer
(required)
- SalePrice: How much the Stock Item is sold for
- Integer
- Precision attribute: The number of decimal places in the SalePrice field
- Integer
(required)
- EffectiveFrom: DateTime when the pricing structure for the Stock Item comes into effect
- ISO-8601 datetime
(required) - Parts:
- StockId: In a lot of cases there are a number of parts that come together to form a stock item. These are items that are stored in stock but never sold. Example is for a Medium Coke we have parts like Medium Cup, Straw, syrup, etc. We need to record these for tracking stock levels and disposals.
- String
(required) - Quantity: The number of each item that make up the part (default 1)
- Integer
- StockId: In a lot of cases there are a number of parts that come together to form a stock item. These are items that are stored in stock but never sold. Example is for a Medium Coke we have parts like Medium Cup, Straw, syrup, etc. We need to record these for tracking stock levels and disposals.
- PerCapInclude: Should sales of this stock item be included in per cap calculation. (Default true)
- true/false
PLEASE NOTE: All field and attribute names are case sensitive
Message Structure - XML:
Callback Post Fields:
- DataSupplierID: Unique identifier for your account, same as passed in post message
- MessageSequence: Unique sequence number for message, same as passed in post message
- ID attribute: Unique identifier for Stock Item, same as passed in post message
- Status: Processing result flag - ok/error
- Error: If the status flag is "error", list of warning messages during processing