HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Update pickup store in delivery options

PUT <<api_domain>>/v1/delivery_options/{id}/stores_info

To update a delivery option(store pickup)'s store information.
更新門市自取的送貨方式的門市資訊。

Request Parameters

id string Delivery Option ID 物流方式ID
e.g. 58d25b9d01cda3475300002d

Request Body

store_pickup_option Object
store_pickup_option.config_fields Object
store_pickup_option.config_fields.[lang] Object Supported Translation include en, zh-hant, ms, zh-cn, th, vi
addresses Array
addresses[].level_1_translations Translation
addresses[].level_2_translations Translation
addresses[].level_3_translations Translation
addresses[].store_name_translations Translation
addresses[].store_address_translations Translation
addresses[].instruction_translations Translation

Request Example Body

{
  "store_pickup_option": {
    "config_fields": {
      "en": {
        "level_1": "City",
        "level_2": "Region",
        "level_3": "Street"
      },
      "zh-hant": {
        "level_1": "城市",
        "level_2": "地區",
        "level_3": "街道"
      }
    }
  },
  "addresses": [
    {
      "level_1_translations": {
        "en": "Hong Kong",
        "zh-hant": "香港"
      },
      "level_2_translations": {
        "en": "Hong Kong Island",
        "zh-hant": "香港島"
      },
      "level_3_translations": {
        "en": "Sheung Wan",
        "zh-hant": "上環"
      },
      "store_name_translations": {
        "en": "SHOPLINE",
        "zh-hant": "商線"
      },
      "store_address_translations": {
        "en": "21F, 148 Wing Lok St, Sheung Wan",
        "zh-hant": "上環永樂街148號21樓"
      },
      "instruction_translations": {
        "en": "Business hours:Monday to Friday 10AM to 7PM",
        "zh-hant": "營業時間:週一至週五 10AM-7PM"
      }
    }
  ]
}

Response Example

Response can contain both success and partial response depending on error param is present.

{
  "delivery_option": {
    "id": "58d25b6201cda3475300002b",
    "status": "active",
    "name_translations": {
      "zh-hant": "面交取貨"
    },
    "requires_customer_address": true,
    "show_description_on_checkout": true,
    "description_translations": {
      "en": "string",
      "zh-hant": "string",
      "zh-cn": "string",
      "vi": "string",
      "ms": "string",
      "ja": "string",
      "th": "string",
      "id": "string",
      "de": "string",
      "fr": "string"
    },
    "delivery_time_description_translations": {
      "en": "string",
      "zh-hant": "string",
      "zh-cn": "string",
      "vi": "string",
      "ms": "string",
      "ja": "string",
      "th": "string",
      "id": "string",
      "de": "string",
      "fr": "string"
    },
    "fee_type": "flat",
    "form_fields": [
      {}
    ],
    "region_type": "custom",
    "delivery_type": "custom",
    "excluded_payment_ids": [
      "5de88dbdce10df002ad927e0"
    ],
    "config_data": {
      "support_cod": false,
      "lead_time": 30,
      "max_lead_time": 1,
      "excluded_weekdays": [
        0
      ],
      "excluded_dates": [
        "2021/01/31"
      ],
      "delivery_time_required": true,
      "specific_delivery_time_translations": {
        "en": "09:00AM - 12:00 PM",
        "zh-hant": "上午09:00 - 下午12:00"
      },
      "delivery_target_area": "localOnly"
    },
    "supported_countries": [
      "TW"
    ],
    "delivery_rates": [
      {
        "countries": [
          "CN",
          "HK"
        ],
        "rate_limit": -1,
        "fee": {
          "cents": 0,
          "currency_symbol": "HK$",
          "currency_iso": "HKD",
          "label": "",
          "dollars": 0
        }
      }
    ],
    "approved": "true/false",
    "support_cod": "true/false",
    "support_non_cod": "true/false",
    "store_pickup_option": {
      "config_option": {
        "dropdown_fields_v2": {
          "en": [
            {
              "field": "level_1",
              "label": "City"
            },
            {
              "field": "level_2",
              "label": "Region"
            },
            {
              "field": "level_3",
              "label": "Street"
            }
          ],
          "zh-hant": [
            {
              "field": "level_1",
              "label": "城市"
            },
            {
              "field": "level_2",
              "label": "地區"
            },
            {
              "field": "level_3",
              "label": "街道"
            }
          ]
        },
        "level_fields": [
          "level_1",
          "level_2",
          "level_3"
        ]
      },
      "addresses": [
        {
          "name_translations": {
            "en": "Hong Kong",
            "zh-hant": "香港"
          },
          "level": "level_1",
          "next_level": [
            {
              "name_translations": {
                "en": "Hong Kong Island",
                "zh-hant": "香港島"
              },
              "level": "level_2",
              "next_level": [
                {
                  "name_translations": {
                    "en": "Sheung Wan",
                    "zh-hant": "上環"
                  },
                  "level": "level_3",
                  "next_level": [
                    {
                      "level": "store",
                      "store_name": {
                        "en": "SHOPLINE",
                        "zh-hant": "商線"
                      },
                      "store_address": {
                        "en": "21F, 148 Wing Lok St, Sheung Wan",
                        "zh-hant": "上環永樂街148號21樓"
                      },
                      "instruction": {
                        "en": "Business hours:Monday to Friday 10AM to 7PM",
                        "zh-hant": "營業時間:週一至週五 10AM-7PM"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  },
  "errors": [
    "addresses[440].instruction_translations is unmatch with merchant's supported languages [\\\"en\\\", \\\"zh-hant\\\"]"
  ]
}

complete fail will return as HTTP Code 422 error

{
  "message": "Unable to process the changes [\\\"store_pickup_option.addresses[0].level_1_translations\\\" is required]"
}