v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Products

Search Products

To search products with specific conditions.<br>利用特殊條件搜尋商品列表。

post/products/search

Request body

pageinteger

Page Number<br>頁數(第n頁)

per_pageinteger

每頁顯示 n 筆資料,建議最多 50 筆<br>If there're many products, set per_page to 50

querystring

支援 product_name、sku、barcode 的模糊查詢

idstring

商品 ID,支援等於、不等於、in 多筆查詢

category_idstring

商品分類 ID,支援以逗號分隔多筆

status'active' | 'draft' | 'removed' | 'hidden'

商品狀態

sort_type'created_at' | 'lowest_price' | 'quantity_sold' | 'custom_sorting'

排序類型,預設為 created_at

sort_by'asc' | 'desc'

排序方向,預設為 desc。當 sort_type 為 quantity_sold 時只能為 desc。

skustring

商品貨號,支援等於、不等於、in 多筆查詢

barcodestring

條碼,支援等於、不等於、in 多筆查詢

is_preorderboolean

是否為預購商品

quantitystring

規格數量,支援 lt/lte/gt/gte/not 等查詢

variation_quantitystring

Variation 數量查詢條件,語法同 quantity

unlimited_quantityboolean

是否為無限數量

created_atstring

建立時間,支援比較運算子(gt/gte/lt/lte)

updated_atstring

更新時間,支援比較運算子

title_translationsstring

標題關鍵字(多語系)

summary_translationsstring

摘要關鍵字(多語系)

tagsstring

標籤關鍵字

excludesstring[]

要排除的欄位

fieldsstring[]

僅顯示的欄位

include_fieldsstring[]

要額外包含的欄位

retail_status'active' | 'draft'

POS 商品上架狀態

with_product_setboolean

是否包含組合商品

purchasableboolean

是否可購買

root_productboolean

是否為 Root Product 查詢模式(僅看 supplier_id 和 pos_category_id)

supplier_idstring

供應商 ID(root_product 為 true 時使用)

pos_category_idstring

POS 分類 ID(root_product 為 true 時使用)

typestring

商品類型(如 product_set)

previous_idstring

上一頁最後一筆的 ID(用於 cursor-based 分頁)

allow_giftboolean

是否允許作為贈品

Example request

{
  "page": 1,
  "per_page": 24,
  "query": "productName1",
  "id": "in:61addda36c12c4004c2dcbda,61addda36c12c4004c2dcbdb",
  "category_id": "cat1,cat2",
  "status": "active",
  "sort_type": "created_at",
  "sort_by": "desc",
  "sku": "sku_123",
  "barcode": "841928488",
  "quantity": "gte:10",
  "variation_quantity": "lt:100",
  "unlimited_quantity": true,
  "created_at": "2018-11-11 12:30:30",
  "updated_at": "2018-11-11 12:30:30",
  "title_translations": "Shopline",
  "summary_translations": "快速出貨",
  "tags": "summer,new",
  "excludes": [
    "items.status"
  ],
  "fields": [
    "items.title"
  ],
  "retail_status": "active",
  "with_product_set": true,
  "purchasable": true,
  "root_product": true,
  "supplier_id": "supplier1",
  "pos_category_id": "pos_cat1",
  "type": "product_set",
  "previous_id": "5f1e837c1be895004582ad47",
  "allow_gift": true
}

Response

OK

Example response

{
  "items": [
    {
      "id": "5d3594c276e7ec003b7021c0",
      "status": "active",
      "retail_status": "active",
      "title_translations": {
        "en": "testing SL-8049",
        "zh-hant": "測試 SL-8049 round 2"
      },
      "summary_translations": {
        "en": "testing SL-8049",
        "zh-hant": "測試 SL-8049 round 2"
      },
      "price": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "price_sale": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "lowest_price": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "lowest_price_sale": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "same_price": true,
      "cost": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "member_price": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "retail_price": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "flash_price_sets": [
        {
          "price_set": {
            "price": {
              "cents": 999999999,
              "currency_symbol": "NT$",
              "currency_iso": "TWD",
              "label": "NT$999,999,999",
              "dollars": 999999999
            },
            "price_sale": {
              "cents": 999999999,
              "currency_symbol": "NT$",
              "currency_iso": "TWD",
              "label": "NT$999,999,999",
              "dollars": 999999999
            },
            "price_details": [
              {
                "price": {
                  "cents": 999999999,
                  "currency_symbol": "NT$",
                  "currency_iso": "TWD",
                  "label": "NT$999,999,999",
                  "dollars": 999999999
                },
                "price_sale": {
                  "cents": 999999999,
                  "currency_symbol": "NT$",
                  "currency_iso": "TWD",
                  "label": "NT$999,999,999",
                  "dollars": 999999999
                }
              }
            ]
          }
        }
      ],
      "preorder_limit": 1,
      "preorder_note_translations": {
        "en": "Shipping starts April 20th, 1971, preorder NOW!",
        "zh-hant": "1971/04/20 開始出貨, 立即訂購!"
      },
      "weight": 123.99,
      "quantity": 87,
      "total_orderable_quantity": 87,
      "medias": [
        {
          "id": "5f8e5dc08a8bb70a5c9cd93c",
          "alt_translations": {
            "en": "Image ALT",
            "zh-hant": "圖片ALT"
          },
          "images": {
            "original": {
              "width": 800,
              "height": 800,
              "url": "https://img.example.com/media/1234/thumb.jpg"
            }
          }
        }
      ],
      "detail_medias": [
        {
          "id": "5f8e5dc08a8bb70a5c9cd93c",
          "alt_translations": {
            "en": "Image ALT",
            "zh-hant": "圖片ALT"
          },
          "images": {
            "original": {
              "width": 800,
              "height": 800,
              "url": "https://img.example.com/media/1234/thumb.jpg"
            }
          }
        }
      ],
      "category_ids": [
        "5be90603d1270b4032bed8b4"
      ],
      "sku": "sku_123345",
      "field_titles": [
        {
          "key": "color",
          "label": "Color",
          "name_translations": {
            "en": "Color",
            "zh-hant": "顏色"
          },
          "selectorEnabled": false
        },
        {
          "key": "custom",
          "label": "Custom",
          "name_translations": {
            "en": "Custom1",
            "zh-hant": "自訂1"
          },
          "selectorEnabled": false
        }
      ],
      "variations": [
        {
          "id": "5d3594c2e95d2f000642e011",
          "price": {
            "cents": 999999999,
            "currency_symbol": "NT$",
            "currency_iso": "TWD",
            "label": "NT$999,999,999",
            "dollars": 999999999
          },
          "price_sale": {
            "cents": 999999999,
            "currency_symbol": "NT$",
            "currency_iso": "TWD",
            "label": "NT$999,999,999",
            "dollars": 999999999
          },
          "member_price": {
            "cents": 999999999,
            "currency_symbol": "NT$",
            "currency_iso": "TWD",
            "label": "NT$999,999,999",
            "dollars": 999999999
          },
          "retail_price": {
            "cents": 999999999,
            "currency_symbol": "NT$",
            "currency_iso": "TWD",
            "label": "NT$999,999,999",
            "dollars": 999999999
          },
          "cost": {
            "cents": 999999999,
            "currency_symbol": "NT$",
            "currency_iso": "TWD",
            "label": "NT$999,999,999",
            "dollars": 999999999
          },
          "quantity": 100,
          "total_orderable_quantity": 100,
          "preorder_limit": 1,
          "media": {
            "id": "5f8e5dc08a8bb70a5c9cd93c",
            "alt_translations": {
              "en": "Image ALT",
              "zh-hant": "圖片ALT"
            },
            "images": {
              "original": {
                "width": 800,
                "height": 800,
                "url": "https://img.example.com/media/1234/thumb.jpg"
              }
            }
          },
          "sku": "green_l1",
          "location_id": "LaB123",
          "feed_variations": {
            "color": {
              "zh-hant": "紅色",
              "en": "red"
            },
            "size": {
              "zh-hant": "xs",
              "en": "xs"
            }
          },
          "variant_option_ids": [
            "5d3594c2622a56618082c99f",
            "5d3594c2622a56618082c9a0"
          ],
          "locked_inventory_count": 10,
          "weight": 1.2
        }
      ],
      "variant_options": [
        {
          "id": "5d3594c2622a56618082c99f",
          "name_translations": {
            "en": "green",
            "zh-hant": "綠"
          },
          "type": "custom",
          "media": {},
          "index": 0
        },
        {
          "id": "5d3594c2622a56618082c9a0",
          "name_translations": {
            "en": "L1",
            "zh-hant": "大1"
          },
          "type": "custom",
          "media": {},
          "index": 1
        },
        {
          "id": "5d3594c2622a56618082c9a1",
          "name_translations": {
            "en": "S1",
            "zh-hant": "小1"
          },
          "type": "custom",
          "media": {},
          "index": 1
        },
        {
          "id": "5d3594c2622a56618082c9a2",
          "name_translations": {
            "en": "Red",
            "zh-hant": "紅"
          },
          "type": "custom",
          "media": {},
          "index": 0
        }
      ],
      "location_id": "shoplineabc",
      "feed_category": {
        "google_category_id": "animals_pet_supplies",
        "google_option_id": "live_animals",
        "google_product_category": "Animals & Pet Supplies > Live Animals"
      },
      "feed_variations": {
        "color": "red",
        "size": "small",
        "material": "gold"
      },
      "seo_keywords": "電商, 開店, 創業",
      "related_product_ids": [
        "5d3593cd5722660032e8fbed",
        "5d355b7b0e5da9001741ac2c"
      ],
      "max_order_quantity": 4,
      "blacklisted_feed_channels": [
        "google"
      ],
      "updated_at": "2020-12-09T07:15:06.813+00:00",
      "created_at": "2020-11-23T02:31:32.926+00:00",
      "created_by": "openapi",
      "is_excluded_promotion": true,
      "taxable": true,
      "labels": [
        {
          "en": "ABC",
          "zh-hant": "ddd"
        }
      ],
      "locked_inventory_count": 10,
      "schedule_publish_at": "2020-11-23T02:31:32.926+00:00",
      "product_price_tiers": [
        {
          "_id": "610cdc702c1c120047c3519c",
          "created_at": "2021-08-06T06:55:45.471Z",
          "updated_at": "2021-08-06T06:55:45.471Z",
          "member_price": {
            "cents": 999999999,
            "currency_symbol": "NT$",
            "currency_iso": "TWD",
            "label": "NT$999,999,999",
            "dollars": 999999999
          },
          "membership_tier_id": "5de6192b9a8b7900365abb5b",
          "product_id": "5d3594c276e7ec003b7021c0",
          "status": "active",
          "variation_key": "610cdcf19f09bc003a2139a4"
        }
      ],
      "metafields": {
        "namespace": {
          "key1": "value",
          "key2": 3,
          "key3": {
            "json": "object"
          }
        }
      },
      "subscription_enabled": true,
      "subscription_period_duration": 30,
      "subscription_recurring_count_limit": 5,
      "filter_tags": [
        {
          "id": "5d3594c2e95d2f000642e011"
        }
      ],
      "bundle_set": {
        "price_type": "fixed_amount",
        "discount_value": 20,
        "bundle_set_products": {
          "6200c988dcf97a004b22ec26": {
            "min_quantity": 1
          }
        }
      },
      "type": "product",
      "allow_gift": true,
      "is_custom": true,
      "sold_out": true,
      "cart_tag_id": "63ec73c11ac51b368c74b92b",
      "cart_tag": {
        "id": "63ec73c11ac51b368c74b92b",
        "name_translations": {
          "en": "",
          "zh-hant": "一車常溫"
        },
        "priority": 1
      }
    }
  ]
}