Sale Data
SmartConnect supports sending Sale (SKU) data with any transaction type from above (i.e. as part of the request sent to the Transaction end-point).
Sale data is sent as part of the SaleData
field in the request body, which will need to be URL-encoded, as all other fields.
This is a single text field, and accepts a serialized JSON object, which has the following structure:
Root Object
Parameter Name | Type | Comment | Mandatory |
---|---|---|---|
version | string | The version of this JSON Schema is "1.0.0", please supply this version in the content. | Yes |
saleData | SaleData Object | Yes |
SaleData Object
Parameter Name | Type | Comment | Mandatory |
---|---|---|---|
saleId | string | Unique sale identifier from the originating application. | No |
invoiceNumber | string | Invoice number (if available). | No |
createdAt | string | Date and time the sale was created, in UTC time, formatted according to ISO 8601. | No |
updatedAt | string | Date and time the sale was last updated, in UTC time, formatted according to ISO 8601. | No |
totalAmount | string | Total amount of all the bundled products/services (tax included). | Yes |
totalTax | string | Total tax (if applicable). | Yes |
totalTips | string | Total amount of tips (if not entered on the EFTPOS Terminal, if entered on the Terminal they will be part of the response sent back to the POS). | No |
totalSurcharge | string | Total surcharge amount (if not entered on the EFTPOS Terminal, if entered on the Terminal they will be part of the response sent back to the POS). | No |
returnFor | string | If this sale is a return (refund) sale, the Id of the originating sale (if available). | No |
userId | string | The Id of the user creating the sale. | No |
userName | string | The name of the user creating the sale. | No |
customerId | string | The Id of the customer (if available). | No |
customerName | string | The name of the customer. | No |
lineItems | Array of LineItem Objects | No |
LineItems Object
Parameter Name | Type | Comment | Mandatory |
---|---|---|---|
lineId | string | Id of the line (if available), should be unique per sale, does not need to be unique across all sales. | No |
sequenceNumber | string | The sequence of this line within a sale. | No |
productId | string | Id of the product, should be unique inside the scope of the originating application. | No |
productName | string | Name of the product. | Yes |
productDescription | string | Product description (if available). | No |
categories | Array of Categories Objects | No | |
brandId | string | Id of the brand the product belongs to (if available), should be unique inside the scope of the originating application. | No |
brandName | string | Name of the brand. | No |
quantity | string | Quantity of the product. | Yes |
unitPrice | string | Price of this line item (tax included), per unit. In case of a returned item, should be a negative amount. | Yes |
unitTax | string | Tax amount applied to this line item (if applicable), per unit. | Yes |
unitDiscount | string | Discount applied to this line item (if applicable), per unit. | No |
totalPrice | string | Total price of this line item (tax included). In case of a returned item, should be a negative amount. | Yes |
totalTax | string | Total tax amount applied to this line item (if applicable). | Yes |
totalDiscount | string | Total discount applied to this line item (if applicable). | No |
modifierFor | string | Implicitly defines if this line item is a modifier to another line item, where this Id should match the lineId (or sequenceNumber) of the line item it modifies. | No |
skuCode | string | The SKU code, if this line item is a product. | No |
barcode | string | The barcode, if this line item is a product, which can be UPC (GS1) or EAN. | No |
Categories Object
Parameter Name | Type | Comment | Mandatory |
---|---|---|---|
categoryId | string | Id of the category the product belongs to (if available), should be unique inside the scope of the originating application. | No |
categoryName | string | Name of the category. | Yes |
departmentId | string | Id of the department the category belongs to (if available), should be unique inside the scope of the originating application. | No |
departmentName | string | Name of the department. | No |
Full Schema
The complete JSON schema is as follows:
{
"version": "1.0.0",
"saleData":
{
"saleId": "string",
"invoiceNumber": "string",
"createdAt": "string",
"updatedAt": "string",
"totalAmount": "string",
"totalTax": "string",
"totalTips": "string",
"totalSurcharge": "string",
"returnFor": "string",
"userId": "string",
"userName": "string",
"customerId": "string",
"customerName": "string",
"lineItems": [
{
"lineId": "string",
"sequenceNumber": "string",
"productId": "string",
"productName": "string",
"productDescription": "string",
"categories": [
{
"categoryId": "string",
"categoryName": "string",
"departmentId": "string",
"departmentName": "string"
}
],
"brandId": "string",
"brandName": "string",
"quantity": "string",
"unitPrice": "string",
"unitTax": "string",
"unitDiscount": "string",
"totalPrice": "string",
"totalTax": "string",
"totalDiscount": "string",
"modifierFor": "string",
"skuCode": "string",
"barcode": "string"
}
]
}
}