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.

  • Maximum length: 255 characters

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

ModifierGroup

Yes

Indicates the details of the modifier group to add.

-

Response parameters

Field

Data type

Required

Description

result

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 modifier group 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 modifier group is added successfully.

The corresponding result.resultCode is SUCCESS and result.resultMessage is SUCCESS.

U

The status of the request to add the modifier group is unknown.

The corresponding result.resultCode is UNKNOWN_EXCEPTION and result.resultMessage is "An API calling is failed, which is caused by unknown reasons.".

For details, see the Common error codes section.

F

Failed to add the modifier group.

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:

Samples

Request

copy
{
    "modifierGroup": {
        "groupId": "xichuAddGroup867",
        "storeId": "lzteststore879856",
        "groupName": "dish",
        "childItemIds": [
            "addonItem256",
            "addonItem456"
        ],
        "quantityRule": {
            "min": 1,
            "max": 3
        }
    },
    "requestId": "f8c76625710f47b2b6e9aa69ecf3fcf3"
}

Response

copy
{
    "result": {
        "resultCode": "SUCCESS",
        "resultStatus": "S",
        "resultMessage": "success"
    }
}