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:
- (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.
- (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.
- 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.
Note: This field is an idempotency field.
| "brand_2022012111061234567890" |
brands | Array<Brand> | Yes | Indicates a list of the Brand object.
| - |
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 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 |
U | The status of full data synchronization of brands is unknown. The corresponding result.resultCode is 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:
- Common error codes are common for F&B mini program OpenAPIs. Â
Samples
Request
{
"requestId": "201815611844bb1j5440112221112",
"brands": [
{
"brandId": "V002001123221111112122",
"brandName": "brand A",
"brandImage": [
"http://www.example.com/iamges/cdZOWIR73/00ACicon.jpg"
]
}
]
}
Response
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
}
}