initializeShoppingArea
POST /v2/pds/store/initializeShoppingArea
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 shopping area 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 shopping areas.
Note: This field is an idempotency field.
| "area_2022012111061234567890" |
shoppingAreas | Array<ShoppingArea> | Yes | Indicates a list of the ShoppingArea 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 shopping areas 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 shopping areas is successful. The corresponding result.resultCode is |
U | The status of full data synchronization of shopping areas is unknown. The corresponding result.resultCode is |
F | The full data synchronization of shopping areas 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": "202215168498545476025589001",
"shoppingAreas": [
{
"name": "Toy Hawker Centre",
"areaId": "A39200300011234546705001",
"address": "Toy Hawker Centre,Road C,District B,City A,Country Z",
"images": [
"http://www.example.com/iamges/cdZOWIR73/0011icon.jpg"
],
"description": "Toy Hawker Centre, the largest hawker with long history in Singapore",
"shoppingAreaStatus": "OPEN",
"pickUpAddress": "door one",
"recommendItemIds": [
"singleItem1234"
],
"pickUpContactDetails": [
{
"name": "John Doe",
"phoneNo": "9999999999"
}
],
"timeZone": "GMT+8:00",
"serviceAvailabilityList": [
{
"dayOfWeek": "MONDAY",
"timePeriods": [
{
"startTime": "08:00",
"endTime": "17:00",
"description": "timePeriod desc"
}
]
}
],
"location": {
"latitude": "24.1",
"longitude": "154.2",
"postCode": "9999999"
},
"contactPhoneNos": [
"9999999999"
],
"commentFlag": true
}
]
}
Response
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
}
}