Create Line Item Selector (LIS)
Allows a business to define one or more line item selectors (LIS). You can bulk create a maximum of 20 line item selectors per API call. If the request input contains more than 20 LIS, only the first 20 are created, and the remaining are ignored.
For more information, see Offers Ingestion Management
To call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.
For more information on LIS settings, see the Line Item Selectors article on the Support Portal.
Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions here to access the Punchh Support Portal.
- Type: stringAccept
Set this header to application/json
- Type: stringAuthorizationrequired
Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".
- Type: stringContent
- Type Set this header to application/json
- Type: array object[]datarequired
A list of line item selectors (LIS) that needs to be created
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/offers/lis \
--request POST \
--header 'Accept: ' \
--header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--data '{
"data": [
{
"name": "Test LIS",
"external_id": "EXTERNAL_ID_GOES_HERE",
"filter_item_set": "base_and_modifiers",
"exclude_non_payable": true,
"base_items": {
"clauses": [
{
"attribute": "item_name",
"operator": "like",
"value": "White Rice"
},
{
"attribute": "item_id",
"operator": "like",
"value": "123456"
},
{
"attribute": "quantity",
"operator": "like",
"value": "1"
},
{
"attribute": "item_family",
"operator": "like",
"value": "123"
},
{
"attribute": "item_major_group",
"operator": "like",
"value": "123"
},
{
"attribute": "item_serial_number",
"operator": "like",
"value": "1"
},
{
"attribute": "line_item_type",
"operator": "like",
"value": "M"
},
{
"attribute": "item_total_amount",
"operator": "like",
"value": "12.96"
}
]
},
"modifiers": {
"max_discount_units": 2,
"processing_method": "max_price",
"clauses": [
{
"attribute": "item_name",
"operator": "like",
"value": "White Rice"
},
{
"attribute": "item_id",
"operator": "like",
"value": "123456"
},
{
"attribute": "quantity",
"operator": "like",
"value": "1"
},
{
"attribute": "item_family",
"operator": "like",
"value": "123"
},
{
"attribute": "item_major_group",
"operator": "like",
"value": "123"
},
{
"attribute": "item_serial_number",
"operator": "like",
"value": "1"
},
{
"attribute": "line_item_type",
"operator": "like",
"value": "M"
},
{
"attribute": "item_total_amount",
"operator": "like",
"value": "12.96"
}
]
}
}
]
}'
{
"results": [
{
"external_id": "EXTERNAL_ID_GOES_HERE",
"success": true,
"errors": [],
"warnings": {}
},
{
"external_id": "EXTERNAL_ID_GOES_HERE",
"success": false,
"errors": [
"ERROR MESSAGE"
],
"warnings": {}
},
{
"external_id": "EXTERNAL_ID_GOES_HERE",
"success": true,
"errors": [],
"warnings": {
"base_items": {
"clauses": [
{
"message": "Required parameters missing or invalid: attribute",
"item": {
"attribute": "item",
"operator": "like",
"value": "White Rice"
}
}
]
},
"modifiers": {
"clauses": [
{
"message": "Required parameter is duplicate: attribute",
"item": {
"attribute": "item_name",
"operator": "like",
"value": "123456"
}
}
]
}
}
}
]
}