addShoppingArea

POST /v2/pds/store/addShoppingArea

With this API call, the SaaS provider or ISV can add a shopping area to the current shopping areas that have been synchronized via the initializeShoppingArea API.

Note: To add a store, make sure one of the following conditions are met:

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 adding a shopping area.

  • Maximum length: 255 characters

Note: This field is an idempotency field. For the addShoppingArea requests using the same requestId value, our server must return the same result. For details about API idempotency, see the Idempotency chapter.

"area_2022012111061234567890"

shoppingArea

ShoppingArea

Yes

Indicates the details of the shopping area 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 shopping area 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 shopping area is added successfully.

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

U

The status of the request for adding the shopping area 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 shopping area.

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": "f8c7662571bf44d341e9bb69ecf3fcf3",
    "shoppingArea": {
        "name": "Toy Hawker",
        "areaId": "A3920022391032455212",
        "address": "Toy Centre,Road C,District B,City A,Country Z",
        "images": [
         "https://wwww.example.com/images/uploads/meals/2cf2dfssdmgkeqec1c.png"
        ],
        "description": "Toy Hawker Centre,The largest hawker with long history in Singapore",
        "shoppingAreaStatus": "OPEN",
        "pickUpAddress": "door one",
        "RecommendItemIds": [
            "singleitem1234"
        ],
        "PickUpContactDetails": [
            {
                "name": "Will",
                "phoneNo": "999999"
            }
        ],
        "timeZone": "GMT+8:00",
        "serviceAvailabilityList": [
            {
                "dayOfWeek": "MONDAY",
                "timePeriods": [
                    {
                        "startTime": "08:00",
                        "endTime": "17:00",
                        "description": ""
                    }
                ]
            }
        ],
        "location": {
            "latitude": "34.1",
            "longitude": "125.2",
            "postCode": "999999"
        },
        "contactPhoneNos": [
            "9999999"
        ],
        "commentFlag": true
    }
}

Response

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