HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Get Channels

Endpoint

Get https://open.shopline.io/v1/channels

Request Params

  • 如果希望拿到店家的所有 POS 實體店資訊,請看最底下 FAQ 建議用法。
FieldTypeDescriptionExample
belongs_tostringget channels by staff-wise or merchant-wise
default: staff
belongs_to=merchant
platformstringIf platforms is null, it is Required.

When belogs_to==merchant, it can filter channel by platform.

When belogs_to==staff, it can only filter channel by sc or shop_crm. default: shop_crm
platform=pos

"data":
pos
shopee
shop_crm
online
sc
platformsArrayIf platform is null, it is Required

When belogs_to==merchant, it can filter channel by platform.

When belogs_to==staff, it can only filter channel by sc or shop_crm. default: shop_crm
platforms[]=pos
include_fieldsArraySome fields need to be specified in this field, or it will not return any value.
fields: e_invoice_setting
include_fields[]=e_invoice_setting
fieldsArrayfor mobile logo media, need to add to this field.fields[]=items.mobile_logo_media_url
  • The result doesn't support pagination now.

Headers

FieldTypeDescriptionExample
AuthorizationStringBearer authentication with access token givenRequired: true

Response

Check https://open-api.docs.shoplineapp.com/docs/channel for details.

Example

{
    "items": [
        {
            "id": "5ea1d91de388091641f1a6cf",
            "name": {
                "en": "半夜測試中專用店",
                "zh-hant": "半夜測試中專用店"
            },
            "platform": "shop_crm",
            "merchant_id": "5e1d9a7439843300086c841c",
            "updated_at": "2020-06-03T11:43:01.801+00:00",
            "created_at": "2020-04-23T18:06:21.587+00:00",
            "default_warehouse_id": "5ea1d8f7e388091641f1a6cd",
            "identifier": "42865765",
            "company_name": null,
            "company_registration_number": null,
            "address": {
                "_id": "5ea1d91de388091641f1a6d0",
                "address_1": "香香的",
                "city": "香港島",
                "country": "香港",
                "country_code": "HK",
                "postcode": "",
                "state": "中西區",
                "id": "5ea1d91de388091641f1a6d0"
            },
            "phones": {},
            "currency_code": "TWD",
            "merchant_name": "和那第七間店 pos2",
            "pin_codes": []
        },
        {
            "id": "5ea227dfe388091641f1aa31",
            "name": {
                "en": "早起測試中專用店",
                "zh-hant": "早起測試中專用店"
            },
            "platform": "shop_crm",
            "merchant_id": "5e1d9a7439843300086c841c",
            "updated_at": "2020-06-03T11:42:55.839+00:00",
            "created_at": "2020-04-23T23:42:23.939+00:00",
            "default_warehouse_id": "5ea22791e388091641f1aa2f",
            "identifier": "42865765",
            "company_name": null,
            "company_registration_number": null,
            "address": {
                "_id": "5ea227dfe388091641f1aa32",
                "address_1": "希臘式優格",
                "city": "希臘式優格",
                "country": "希臘",
                "country_code": "GR",
                "postcode": "希臘式優格",
                "state": "希臘式優格",
                "id": "5ea227dfe388091641f1aa32"
            },
            "phones": {},
            "currency_code": "TWD",
            "merchant_name": "和那第七間店 pos2",
            "pin_codes": []
        },
        {
            "id": "5ea22d4ee388091641f1aa3b",
            "name": {
                "en": "第七間店的實體店",
                "zh-hant": "第七間店的實體店"
            },
            "platform": "shop_crm",
            "merchant_id": "5e1d9a7439843300086c841c",
            "updated_at": "2020-09-04T07:22:44.896+00:00",
            "created_at": "2020-04-24T00:05:34.451+00:00",
            "default_warehouse_id": "5ea2304ce388091641f1aba9",
            "identifier": "42865765",
            "company_name": null,
            "company_registration_number": null,
            "address": {
                "_id": "5ea22d4ee388091641f1aa3c",
                "address_1": "民生東路三段156號8樓-1 SHOPLINE",
                "city": "Taipei City",
                "country": "Taiwan",
                "country_code": "TW",
                "postcode": "104",
                "state": "Zhongshan",
                "id": "5ea22d4ee388091641f1aa3c"
            },
            "phones": {},
            "currency_code": "TWD",
            "merchant_name": "和那第七間店 pos2",
            "pin_codes": []
        },
        {
            "id": "6201f5f9cc2f8900360458c5",
            "name": {
                "en": "實體店",
                "zh-hant": "實體店"
            },
            "platform": "shop_crm",
            "merchant_id": "599fcfd001cda3332400002f",
            "updated_at": "2022-02-08T04:47:53.510+00:00",
            "created_at": "2022-02-08T04:47:53.510+00:00",
            "default_warehouse_id": "620102da54d46b001a700659",
            "identifier": null,
            "company_name": null,
            "company_registration_number": null,
            "address": {
                "_id": "6201f5f9cc2f8900360458c6",
                "address_1": "kkk",
                "city": "台北市",
                "country": "台灣",
                "country_code": "TW",
                "postcode": "100",
                "state": "中正區",
                "id": "6201f5f9cc2f8900360458c6"
            },
            "phones": {},
            "currency_code": "TWD",
            "merchant_name": "AlvinTest",
            "pin_codes": []
        }
    ]
    }
}

FAQ

  1. 如何取得店家的所有 POS 實體店資訊?(未來如果有新增 POS 門市時不需要手動重新幫 staff 勾選對應權限)

    建議使用 https://open.shopline.io/v1/channels?belongs_to=merchant&platform=shop_crm
    以 merchant 的維度去拿這整間店的所有 POS 門市,這樣未來如果有新增 POS 門市時就不需要再人工去幫 「Open API Token 的對應管理員」額外勾選對應門市權限,會比較方便。
    (注意:這個用法的 platform 固定要帶入 shop_crm ,等同於 pos 門市的意思,但因為程式內部的限制必須這樣使用)