addMenu
POST /v2/pds/store/addMenu
With this API call, the SaaS provider or ISV can add a menu to the current menus that have been synchronized via the initializeStore API.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request parameters
Field | Data type | Required | Description | Example |
requestId | String | Yes | Indicates the unique ID assigned by the SaaS provider or ISV to identify a request for adding a menu.
Note: This field is an idempotency field. For the addMenu requests using the same requestId value, our server must return the same result. For details about API idempotency, see the Idempotency chapter. | "menu_2022012111061234567890" |
menu | Yes | Indicates the details of the menu to add. | - |
Response parameters
Field | Data type | Required | Description |
result | Yes | Indicates the request result, such as status and error codes. |
Result process logic
In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status:
Result status | Description |
A | The request for adding the menu is accepted by us. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the following Error codes section. |
S | The menu is added successfully. The corresponding result.resultCode is |
U | The status of the request to add the menu is unknown. The corresponding result.resultCode is For details, see the Common error codes section. |
F | Failed to add the menu. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the following Error codes section. |
Error codes
Error codes are usually classified into the following categories:
- Common error codes are common for F&B mini program OpenAPIs. Â
Samples
Request
{
"requestId": "164612849264621ded6c962212",
"menu": {
"menuId": "M1110",
"storeId": "lzteststore879856",
"menuType": "PICKUP",
"title": "Breakfast",
"subTitle": "",
"menuStatus": "VALID",
"pickUpRules": [
{
"startTime": "08:00",
"endTime": "09:30",
"step": "30",
"supportDays": 2,
"minPrepareMinutes": 15
}
],
"description": "Breakfast menu"
}
}
Response
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
}
}