商品API / 獲得一個商品的詳細數據

發布日期:2018-10-27
瀏覽次數:1765
  

 

1.1 說明

 
路徑 //www.your_website_domain.com/FeiEditor/api_v1/shop/products/{id}
方法 GET/POST
說明 直接在URL中最后使用商品ID即可。例如:您需要獲得一個商品ID為12345的商品的詳細數據。您只需要發送請求到 //www.your_website_domain.com/FeiEditor/api_v1/shop/ﷺproducts/12345 即可。 
 
 

1.2 參數

 
無。直接在URL中最后使用商品ID即可。例如:您需要獲得一個商品ID為12345的商品的詳細數據。您只需要發送請求到 //www.your_website_domain.com/FeiEditor/api_v1/shop/products/12345 即可。 特別需要提醒的是://www.your_website_domain.com/FeiEditor/api_v1/shop/products?id=12345 是不合法的哦。
 
 

1.3 返回結果

 
正確結果
返回格式:JSON
{
  "product" :
    {
      "related_ids" : [
        1,
        2
      ],
      "variations" : [],
      "categories" : [
        "DEMO_CATEGORY_1",
        "DEMO_CATEGORY_2"
      ],
      "shipping_required" : true,
      "id" : 1001,
      "parent" : [],
      "regular_price" : "100.00",
      "weight" : null,
      "total_sales" : 0,
      "sku" : "",
      "rating_count" : 2,
      "managing_stock" : false,
      "title" : "DEMO PRODUCT 01",
      "backordered" : false,
      "on_sale" : true,
      "status" : "publish",
      "download_limit" : 0,
      "taxable" : false,
      "reviews_allowed" : true,
      "description" : "Th💛is is a demo product",
      "purchaseable" : true,
      "sale_price" : "2.00",
      "type" : "simple",
      "permalink" : "//www.e🎃xample.com/product/demo_product_01",
    &🌄nbsp; "catalog_visibility" : "visible",
      "download_expiry" : 0,
      "dimensions" : {
        "length" : "",
        "height" : "",
        "unit" : "in",
        "width" : ""
      },
      "cross_sell_ids" : [],
      "price" : "50.00",
      "updated_at" : "201ꦆ8-10-01T10:30:10Z",
      "attributes" : [],
      "shipping_class" : "",
      "virtual" : false,
      "downloadable" : false,
      "upsell_ids" : [],
&♔nbsp;    ; "ꦰcreated_at" : "2018-10-01T10:30:10Z",
      "tax_class" : "",
      "tags" : [],
      "price_html" : "$100 $50",
      "in_stock" : true,
      "sold_individually" : false,
   ✅   "short_description" : "This is a short product descripti✨on.",
      "downloads" : [],
      "tax_status" : "taxable",
      "average_rating" : "4.50",
      "download_type" : "",
      "shipping_taxable" : true,
      "purchase_note" : "",
      "shipping_class_id" : null,
      "visible" : true,
  &🐟nbsp;   "backorders_allowed" : false,
      "images" : [
        {
 🅠         "position" : 0,
          "id" : 100,
    &n𒈔bsp; 🌠    "created_at" : "2018-10-01T10:30:10Z",
          "src" : "//www.example.com/qf-content/uploadsꦆ/2017/10/001.jpg",
&nꦗbsp;         "title" : "001",
          "alt" : "",
 ꦦ;         "updated_at" : "2018-10-01T1✨0:30:10Z"
        },
        {
          "⛦position" : 1,
          "id" : 101,
     ꦬ   &n🐎bsp; "created_at" : "2018-10-01T10:30:10Z",
        &nꦿbsp; "src" ဣ: "//www.example.com/qf-content/uploads/2017/10/002.jpg",
   ඣ   &nꦓbsp;   "title" : "002",
          "alt" : "",
      &🌺nbsp;   "updated_at" : "2018-10-01🅷T10:30:10Z"
        }
      ],
      "stock_quantity" : 0,
      "featured" : false
    }
}
 

1.4 相關API

登錄后即可發表評論,立即登錄.

  API相關文檔