addModifierGroup
POST /v2/pds/item/addModifierGroup
With this API call, the SaaS provider or ISV can add a modifier group to the current modifier groups 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 to update a modifier group.
Note: This field is an API idempotency field. For the addModifierGroup requests using the same requestId value, our server must return the same result. For details about API idempotency, see the Idempotency chapter. | "group_2022012111061234567890" |
modifierGroup | Yes | Indicates the details of the modifier group 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:
Error codes
Error codes are usually classified into the following categories:
- Common error codes are common for F&B mini program OpenAPIs. Â
Samples
Request
{
"modifierGroup": {
"groupId": "xichuAddGroup867",
"storeId": "lzteststore879856",
"groupName": "dish",
"childItemIds": [
"addonItem256",
"addonItem456"
],
"quantityRule": {
"min": 1,
"max": 3
}
},
"requestId": "f8c76625710f47b2b6e9aa69ecf3fcf3"
}
Response
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
}
}