Manage age-restricted items in the Inventory API
The purchase of age-restricted items requires age verification and enforcing restrictions at the point-of-sale (POS) and during order fulfillment. This ensures compliance with regulations, prevents underage sales, and mitigates legal risks.
At Clover, the categories for age-restricted items are—Alcohol, Tobacco, Over-the-counter (OTC) products, and Pharmacy products, such as vitamins and supplements. Use the Clover Inventory API to create, view, and update age-restricted item types and minimum age, with fixed identifiers and names as follows:
| Identifier | Name |
|---|---|
| K2PM5DPQGBQEJ | Alcohol |
| DHXH8XT6CHZKA | Tobacco |
| KH9G35W3YZ5YE | OTC drugs |
| 4GJEQRKG7X370 | Vitamin & Supplements |
Prerequisite
Generate a merchant-specific API token.
View default age-restricted item types and identifiers
- Send a GET request to
/v3/merchants/{mId}/age_restricted/types. - Enter the merchantId in the
mIdfield. - Set the Authorization header as Bearer token type, and enter the merchant's API token.
In response, the age-restricted item types are displayed along with their identifiers (IDs).
Important! The age-restricted item type names and identifiers are fixed and must be used as available in the response.
Request and Response example—View age-restricted item types
curl --location 'https://apisandbox.dev.clover.com/v3/merchants/{mId}/age_restricted/types' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer {access_token}' \
{
"ageRestrictedTypes": {
"elements": [
{
"id": "K2PM5DPQGBQEJ",
"name": "Alcohol"
},
{
"id": "DHXH8XT6CHZKA",
"name": "Tobacco"
},
{
"id": "KH9G35W3YZ5YE",
"name": "OTC drugs"
},
{
"id": "4GJEQRKG7X370",
"name": "Vitamin & Supplements"
}
]
}
}
Create age-restricted item for the inventory
- Send a POST request to
/v3/merchants/{mId}/items. - Enter required information—
mId,nameandprice(in cents).
Note: All money amount values are represented in cents. For example, $20.99 is represented as an amount value of2099. For merchants that use value-added tax (VAT), thepricevalue includes tax. In this case, setpriceWithoutVatas the base price without VAT. - Set
isAgeRestrictedto true. - In the
ageRestrictedObjobject, enter itemid,nameandminimumAge.
Note: See View default age-restricted item types and identifiers for the names and ids. - Assign a
colorCodeto the item using the hex values. - Set the Authorization header as Bearer token type, and enter the merchant's API token.
In response, a unique item id is generated. The hidden, priceType, and isRevenue values are set by default, and the ageRestricted value displays as true.
Request and Response example—Create an age-restricted item
curl --request POST \
--url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}/items' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
"hidden": false,
"name": "Iron Supplement",
"price": 1000,
"priceType": "FIXED",
"defaultTaxRates": false,
"cost": 0,
"isRevenue": true,
"type": "REGULAR",
"isAgeRestricted": true,
"ageRestrictedObj": {
"id": "4GJEQRKG7X370",
"name": "Vitamin & Supplements",
"minimumAge": 18
}
}'
{
"id": "016MJS84H6W68",
"hidden": false,
"available": true,
"autoManage": false,
"name": "Iron Supplement",
"price": 1000,
"priceType": "FIXED",
"defaultTaxRates": false,
"cost": 0,
"isRevenue": true,
"modifiedTime": 1736244719000,
"deleted": false,
"isAgeRestricted": true,
"colorCode": "#FF0080",
"ageRestrictedObj": {
"id": "4GJEQRKG7X370",
"name": "Vitamin & Supplements",
"minimumAge": 18,
"items": {
"elements": [
{
"id": "Y50GE5E2SF9F6"
}
]
}
}
}
View age-restricted items in the inventory
View a single age-restricted item
- Send a GET request to
/v3/merchants/{mId}/items/{itemId}?expand=ageRestricted. - Enter required information—
mIdanditemId. - In the expand field, enter
ageRestricted. - Set the Authorization header as Bearer token type, and enter the merchant's API token.
Request and Response example— View an age-restricted item
curl --request GET \
--url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}/items/{itemId}?expand=ageRestricted' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer {access_token}'
{
"id": "F60YZY9NQRDG8",
"hidden": false,
"available": true,
"autoManage": false,
"name": "Iron Supplement",
"price": 2200,
"priceType": "FIXED",
"defaultTaxRates": false,
"cost": 0,
"isRevenue": true,
"modifiedTime": 1735878400000,
"deleted": false,
"isAgeRestricted": true,
"ageRestrictedObj": {
"id": "4GJEQRKG7X370",
"name": "Vitamin & Supplements",
"minimumAge": 18,
"items": {
"elements": [
{
"id": "F60YZY9NQRDG8"
}
]
}
}
}
View all age-restricted items
- Send a GET request to
/v3/merchants/{mId}/items?expand=ageRestricted&limit=2&offset=0. - Enter the merchantId in the
mIdfield. - Use filters and expansions to indicate the search parameters.
- Set the Authorization header as Bearer token type, and enter the merchant's API token.
Request and Response example—View all age-restricted items
curl --request GET \
--url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}/items?expand=ageRestricted&limit=2&offset=0' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer {access_token}'
{
"elements": [
{
"id": "F60YZY9NQRDG8",
"hidden": false,
"available": true,
"autoManage": false,
"name": "Iron Supplement",
"price": 999,
"priceType": "FIXED",
"defaultTaxRates": false,
"cost": 0,
"isRevenue": true,
"modifiedTime": 1735878400000,
"deleted": false,
"isAgeRestricted": true,
"ageRestrictedObj": {
"id": "4GJEQRKG7X370",
"name": "Vitamin & Supplements",
"minimumAge": 21,
"items": {
"elements": [
{
"id": "F60YZY9NQRDG8"
}
]
}
}
},
{
"id": "WY5SC2THH60KY",
"hidden": false,
"available": true,
"autoManage": false,
"name": "Cigar",
"price": 1000,
"priceType": "FIXED",
"defaultTaxRates": false,
"cost": 0,
"isRevenue": true,
"modifiedTime": 1735797496000,
"deleted": false,
"isAgeRestricted": true,
"ageRestrictedObj": {
"id": "DHXH8XT6CHZKA",
"name": "Tobacco",
"minimumAge": 25,
"items": {
"elements": [
{
"id": "WY5SC2THH60KY"
}
]
}
}
}
],
}
See Apply filters and Use expandable fields for more information on working with filter and expand parameters in your requests.
Update age-restricted item in the inventory
- Send a POST request to
/v3/merchants/{mId}/items/{itemId}. - Enter required information—
mIdanditemId. - Enter information in the field to update, such as
priceorquantity. - Set the Authorization header as Bearer token type, and enter the merchant's API token.
In response, the updated information is displayed. In the following sample,autoManage is set as true and price and quantity are updated.
Request and Response example—Update age-restricted item
curl --request POST \
--url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}/items/{itemId}' \
--header 'content-type: application/json' \
--header 'authorization: Bearer {access_token}' \
--data '{
"hidden": false,
"available": true,
"autoManage": true,
"name": "Iron Supplements",
"price": 1500,
"priceType": "FIXED",
"defaultTaxRates": false,
"cost": 0,
"isRevenue": true,
"itemStock": {
"quantity": 60
},
"isAgeRestricted": true,
"ageRestrictedObj": {
"id": "4GJEQRKG7X370",
"minimumAge": 18
}
}'
{
"id": "F60YZY9NQRDG8",
"hidden": false,
"available": true,
"autoManage": true,
"name": "Iron Supplements",
"price": 1500,
"priceType": "FIXED",
"defaultTaxRates": false,
"cost": 0,
"isRevenue": true,
"stockCount": 0,
"modifiedTime": 1736234226000,
"deleted": false,
"isAgeRestricted": true
}
Related topics
- Work with inventory
- Create an inventory item endpoint
- Get all inventory items endpoint
- Get a single inventory item endpoint
- Update an existing inventory item endpoint
- Clover Help—Define your items
Updated 2 months ago
