initializeBrand

POST /v2/pds/store/initializeBrand

The F&B (food and beverage) mini program relies on the SaaS provider or Independent Software Vendor (ISV) to feed full data. With this API call, the SaaS provider or ISV can complete the full data synchronization of the brand list.

Note: To execute the full data synchronization, follow the steps below:

  1. (Optional) Full synchronization of all shopping areas via the initializeShoppingArea API. Maximum 50 shopping areas per API call. This step is required when areaId is requested in the initializeStore API.
  2. (Optional) Full synchronization of all brands via the initializeBrand API. Maximum 50 brands per API call. This step is required when brandId is requested in the initializeStore API.
  3. Full synchronization of all stores via the initializeStore API. 20 stores at most for one API call. The store data object includes menu, category, item, SKU, and modifier group information.

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 the full synchronization of brands.

  • Maximum length: 255 characters

Note: This field is an idempotency field.

  • To synchronize brands (more than 50) in several batches, requestId should be different for each API call.
  • For the initializeBrand requests using the same requestId value, our server must return the same result.
  • For details about API idempotency, see the Idempotency chapter.

"brand_2022012111061234567890"

brands

Array<Brand>

Yes

Indicates a list of the Brand object.

  • Maximum size: 50 elements
-

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 full data synchronization of brands 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 full data synchronization of brands is successful.

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

U

The status of full data synchronization of brands 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

The full data synchronization of brands failed.

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
{
    "requestId": "201815611844bb1j5440112221112",
    "brands": [
        {
            "brandId": "V002001123221111112122",
            "brandName": "brand A",
            "brandImage": [
                "http://www.example.com/iamges/cdZOWIR73/00ACicon.jpg"
            ]
        }
    ]
}

Response

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