Skip to main content

Get Items By Category ID

Method : POST

URL: https://open.revenuemonster.my/v3/service

Sandbox URL: https://sb-open.revenuemonster.my/v3/service

note
  • Using categoryId to get items

Request Parameters

ParameterTypeDescriptionExample
serviceStringalacarte service"alacarte"
versionStringCurrently only support 'v1""v1"
functionStringFunction that provide by alacarte"get.category.items"
requestObjectRefer to explanation below(Refer to explanation below)
ParameterTypeDescriptionExample
categoryIdStringID of the Category"5eabf31ee0e9cd7b01a3a35e"

Example Request

curl --location --request POST 'https://sb-open.revenuemonster.my/v3/service' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTgtMDMtMTMiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiYXBpX2NsaWVudEBFaGNLQzA5QmRYUm9RMnhwWlc1MEVKTE42dFdBMG82MEx3Il0sImV4cCI6MTYwMzI1NDU2OSwiaWF0IjoxNjAwNjYyNTY5LCJpc3MiOiJodHRwczovL3NiLW9hdXRoLnJldmVudWVtb25zdGVyLm15IiwianRpIjoiRWh3S0VFOUJkWFJvUVdOalpYTnpWRzlyWlc0UTZNenR5b1RFckpzVyIsIm5iZiI6MTYwMDY2MjU2OSwic3ViIjoiRWhRS0NFMWxjbU5vWVc1MEVKWFZ6ZDN3cmFxVE9SSVFDZ1JWYzJWeUVJeUpxSXp2eU1QVmNRIn0.H3G6UDX7sR9EXtTMNs4Q2OHdhUGIhhCfdlAeOpywH4rDuVOcWXXwzF4Imbx8E7I10vFAJpwYZrEkCWCdCCw-WV11y9VT5kP6k75CeS-ZPMOLcKnC5iFT7vEi07r6ovwty9erlcZeXrtrmEIn3rnLva-dxSg3vZ2MyymoNDk-kV7ltXnkoWW4jtXRls6siLhxeY__8kXn2qa0ojVX4Nm6HmzN_vgi-RKSmToMgsdzTF94Y61QVBWhZfolD2-JpHx4qNlklcUdv8HOJ1QHHWpyoJytaJmvr3GJ5G399LbcTLwxB1p2qPg7z4hpoGNu4AP-ybRJVC3P9q9OscQYDNX-dA' \
--header 'X-Signature: sha256 Sty3LNcKA8+WlMHtAgIY+y1xbwnzKsN0UdyKaW+yYIgcTkBAtF7G5Lx251qQITURJ4wiXPDODxhs1nFVmBBing==' \
--header 'X-Nonce-Str: VYNknZohxwicZMaWbNdBKUrnrxDtaRhN' \
--header 'X-Timestamp: 1528450585' \
--data-raw '{
"service": "alacarte",
"version": "v1",
"function": "get.category.items",
"request": {
"categoryId": "5eabf31ee0e9cd7b01a3a35e"
}
}'

Response Parameters

ParameterTypeDescriptionExample
cursorStringOptional, if pagination exists.""
countUintCurrent page record2
itemsObject(Refer to explanation below)(Refer to explanation below)
ParameterTypeDescriptionExample
categoryIdStringCategory ID""
categoryNameStringName of Category""
createdAtDateTimeCreation date time"2020-09-22T04:44:57.950398414Z"
descriptionStringDescription of the item"Describe"
imageUrlArrayItem image[]
isAvailableBoolItem availabletrue
itemIdStringItem ID"5eaeee9db07a77cef7caceb6"
nameStringItem name"Test123"
positionUintCurrent position among item2
preferencesArrayRefer to explanation below(Refer to explanation below)
priceObjectRefer to the Price parameter( Refer to the Price parameter)
quantityUintItem quantity350
schedulesArraySchedules startAt and endAt["2020-09-22T02:00:00.000Z", "2020-09-22T14:00:00.000Z"]
sidesArrayRefer to explanation below(Refer to explanation below)
skuStringItem SKU"fkj31i"
updatedAtDateTimeLast update date time"2020-09-22T04:44:57.950398414Z"

Inside Sides (parameter)

ParameterTypeDescriptionExample
idStringSide Category ID"5f698149585d7cc1ae35a395"
nameStringSide Category name"Side Category 1"
isAvailableBoolSide Category availabletrue
minChoiceUintSet minimum choice1
maxChoiceUintSet maximum choice3
sideItemsArrayRefer to explanation below(Refer to explanation below)

Inside Side Items (parameter)

ParameterTypeDescriptionExample
idStringSide Item ID"5f698149585d7cc1ae35a392"
isAvailableBoolSide Item is availabletrue
nameStringSide Item name"Coke"
priceObjectRefer to the Price parameter( Refer to the Price parameter)
referenceItemIdStringOptional, Item reference ID"5eaa7b72e0e9cd7b01a3a2b2"

Inside Price (parameter)

ParameterTypeDescriptionExample
amountUintAmount in cent (min RM 0.10 10 = RM 0.10)100
currencyTypeStringCurrent only support Ringgit Malaysia"MYR"

Inside Preferences (parameter)

ParameterTypeDescriptionExample
idStringPreferences ID"5f698149585d7cc1ae35a38d"
nameStringPreferences name"Sweetness"
minChoiceUintSet minimum choice1
maxChoiceUintSet maximum choice3
labelsArrayRefer to explanation below(Refer to explanation below)

Inside Labels (parameter)

ParameterTypeDescriptionExample
idStringLabel ID"5f698149585d7cc1ae35a38e"
nameStringLabel name"Basic"

Example Response

{
"count": 2,
"cursor": "",
"items": [
{
"categoryId": "5eabf31ee0e9cd7b01a3a35e",
"categoryName": "Chinese Cuisine ",
"createdAt": "0001-01-01T00:00:00Z",
"description": "yummz",
"imageUrl": [
"https://smart-cafe-sandbox.oss-ap-southeast-3.aliyuncs.com/images/4118165203679668885/3b198791-fedb-426e-98ef-adb8cd3d6718"
],
"isAvailable": false,
"itemId": "5eaeee9db07a77cef7caceb6",
"name": "Hainan Chicken Rice",
"position": 11,
"preferences": [],
"price": {
"amount": 500,
"currencyType": "MYR"
},
"quantity": 380,
"schedules": [
["2020-09-22T02:00:00.000Z", "2020-09-22T14:00:00.000Z"],
["2020-09-22T15:00:00.000Z", "2020-09-22T15:45:00.000Z"]
],
"sides": [
{
"id": "",
"isAvailable": false,
"maxChoice": 1,
"minChoice": 0,
"name": "test",
"sideItems": [
{
"id": "5f865c458590c3866c35b1a8",
"isAvailable": false,
"name": "Tandoori Chicken",
"price": {
"amount": 1000,
"currencyType": "MYR"
}
}
]
}
],
"updatedAt": "2020-10-14T02:02:45.102Z"
},
{
"categoryId": "5eabf31ee0e9cd7b01a3a35e",
"categoryName": "Chinese Cuisine ",
"createdAt": "0001-01-01T00:00:00Z",
"description": "",
"imageUrl": [
"https://smart-cafe-sandbox.oss-ap-southeast-3.aliyuncs.com/images/4118165203679668885/16af5d54-f96b-42eb-9d73-6cc9ff220d92"
],
"isAvailable": true,
"itemId": "5eaeeffeb07a77cef7caced1",
"name": "Penang Char Kuey Teow",
"position": 12,
"preferences": [],
"price": {
"amount": 200,
"currencyType": "MYR"
},
"quantity": 0,
"schedules": null,
"sides": [],
"sku": "fkj31i",
"updatedAt": "2020-09-29T04:33:52.303Z"
}
]
}