updateBrand

POST /v2/pds/store/updateBrand

With this API call, the SaaS provider or ISV can update an existing brand that has been synchronized via the initializeBrand or addBrand API, such as making small edits or deleting the brand.

Note:

  • To update a store, make sure one of the following conditions are met:
  • To learn how the update works, check below:
    • To update a field, pass the field with a new value.
    • To delete a field, pass the field with an empty object, for example, "" for String, {} for Object, [] for Array. The required fields in the initializeBrand or addBrand API cannot be deleted with this API call.
    • If you do not pass a field, it will not be updated.

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

brandId

String

Yes

Indicates the unique ID assigned by the SaaS provider or ISV to identify a brand.

  • Maximum length: 255 characters

"20220112115009000116419747301498"

brandName

String

No

Indicates the name of the brand.

  • Maximum length: 1024 characters

Note: This field should be in English. If multi-language is needed, refer to MultiLanguageDetail.

"KFC"

brandImage

Array<String>

No

Indicates a list of the brand image URLs.

  • Maximum size: 5 elements
  • Element maximum length: 255 characters

Note: To add or update an element of this array, pass the entire new list. We will replace the old list of elements with the new list.

-

isDeleted

String

No

Indicates whether the brand is deleted.

The valid value is:

  • DELETED: The brand is deleted and not visible to users. Once deleted, the brand cannot be retrieved. Call the addBrand API to add it back.

Note: If the value you set is DELETED but the brand ID does not exist, S is returned, which means the request to delete the brand is successful.

"DELETED"

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 

S

The brand is updated successfully.

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

U

The status of the request to update the brand 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 update the brand.

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
{
    "brandId": "V0020011232211111051511621",
    "brandName": "Brand C",
    "brandImage": [
        "https://wwww.example.com/images/uploads/meals/2cf2dfssdmgkeqec1c.png"
    ]
}

Response

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