更新賣場屬性調整提案單

賣場屬性調整提案 #

更新賣場屬性調整提案單 #

更新已建立的 賣場屬性調整提案單

Endpoint URL: https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListingModels
HTTP Method: PUT

Request Parameters #

id #

提案單號。
資料型態: Integer
必填: 是

Request Body #

listing #

賣場資訊,賣場 ID 為必填。
資料型態: ProposalListing
必填: 是

models #

賣場屬性的內容,包含既有的屬性與更新的屬性,提案內容為賣場最後呈現的屬性內容。models 的結構分別說明如下:

  • sku:第 1 層屬性的商品編號

    • 調整的賣場結構為無屬性調整為單層賣場:若為新增商品時,此欄位不需填寫,反之需完整的填寫 skuspec
    • 調整的賣場結構為單層屬性:若為新增商品時,此欄位不需填寫,反之需完整的填寫 skuspec
    • 調整的賣場結構為雙層屬性:
      • 若第 1 層屬性項目不存在原賣場中,輸入 spec 說明更新後的第 1 層屬性名稱與項目
      • 若第 1 層屬性項目已既存於賣場中,由此欄位說明欲調整的屬性,API 將自動帶入該 SKU 的屬性名稱與項目
    • 若為新增商品時,此欄將於提案執行完成後由 API 自動產生
  • spec:第 1 層屬性的名稱與項目

    • 調整的賣場結構為無屬性調整為單層賣場:需完整的填寫 skuspec
    • 調整的賣場結構為單層屬性:需完整的填寫 skuspec
    • 調整的賣場結構為雙層屬性:
      • 若第 1 層屬性項目不存在原賣場中,由此欄位說明屬性的名稱與項目
      • 若第 1 層屬性項目已既存於賣場中,只需輸入 sku 說明欲調整的屬性,API 將自動帶入該 SKU 的屬性名稱與項目。若同時輸入 skuspec,將以提案輸入的 spec 更新成該 SKU 的屬性名稱與項目
  • items:第 2 層屬性

    • 若欲調整的賣場結構為雙層屬性,此欄需填寫第 2 層屬性
    • 資料型態: ProposalItem[]
      ProposalItem
      • id:第 2 層屬性的商品編號

        • 若為新增商品時,此欄位不需填寫,反之需完整的填寫 skuspec
        • 若為新增商品時,此欄將於提案執行完成後由 API 自動產生
      • spec:第 2 層屬性的名稱與項目

        • 此欄位必填
      • isVisible:第 2 層屬性是否顯示於前台賣場

      • images:第 2 層屬性項目的商品圖

        • 欲新增商品時,此欄可填
          • 新增商品至既有的第 1 層屬性下:此欄位不需填寫,將由 API 自動帶入第 1 層屬性商品圖片
          • 新增商品至新增的第 1 層屬性下:此欄位必填
      • attributes:第 2 層屬性項目的規格表屬性

        • 僅供於調整雙層賣場
        • 規格表項目僅需包含和屬性名稱相同之項目(即 ProposalModel 和 ProposalItem 之 spec.name
        • values 內容需為 GET v1/struDataAttrClusters 取回的內容 (即 StruDataAttrCluster 中的 attributes)
        • 倘若需修改賣場頁顯示的屬性名稱,可透過 spec.selectedValue 做調整
        • 若於調整屬性提案內新增商品,則此欄填寫商品規格表,且為必填
        • 欲調整屬性項目規格表時,則此欄位填寫屬性項目規格表,若未填寫將由 API 自動帶入既有屬性項目規格表
      • barcode:第 2 層屬性項目的實際國際條碼

        • 欲新增商品時,此欄可填
      • stock:第 2 層屬性項目的備貨數量

        • 欲新增商品時,此欄可填
      • partNo:第 2 層屬性項目的商品料號

        • 欲新增商品時,此欄可填
      • name:第 2 層屬性項目的商品名稱

        • 僅供於調整雙層賣場
        • 若於調整屬性提案內新增商品,若未填寫將由 API 自動建立屬性商品名稱 {賣場名稱}-{第一層屬性顯示名稱}-{第二層屬性顯示名稱}
        • 欲調整屬性商品名稱時,則此欄位填寫屬性商品名稱,若未填寫將由 API 自動帶入既有屬性商品名稱
  • isVisible:第 1 層屬性是否顯示於前台賣場

  • images:第 1 層屬性項目的商品圖

    • 欲新增商品時,此欄可填
      • 共用商品圖賣場:此欄位不需填寫,將由 API 自動帶入賣場圖片
      • 非共用商品圖賣場:此欄位必填
  • attributes:第 1 層屬性項目的規格表屬性

    • 僅供於調整單層賣場
    • 規格表項目僅需包含和屬性名稱相同之項目(即 ProposalModel 之 spec.name
    • values 內容需為 GET v1/struDataAttrClusters 取回的內容 (即 StruDataAttrCluster 中的 attributes)
    • 倘若需修改賣場頁顯示的屬性名稱,可透過 spec.selectedValue 做調整
    • 若於調整屬性提案內新增商品,則此欄填寫商品規格表,且為必填
    • 欲調整屬性項目規格表時,則此欄位填寫屬性項目規格表,若未填寫將由 API 自動帶入既有屬性項目規格表
  • barcode:第 1 層屬性項目的實際國際條碼

    • 欲新增商品時,此欄可填
  • stock:第 1 層屬性項目的備貨數量

    • 欲新增商品時,此欄可填
  • partNo:第 1 層屬性項目的商品料號

    • 欲新增商品時,此欄可填
  • name:第 1 層屬性項目的商品名稱

    • 僅供於調整單層賣場
    • 若於調整屬性提案內新增商品,若未填寫將由 API 自動建立屬性商品名稱 {賣場名稱}-{第一層屬性顯示名稱}
    • 欲調整屬性商品名稱時,則此欄位填寫屬性商品名稱,若未填寫將由 API 自動帶入既有屬性商品名稱

資料型態: ProposalModel[]
必填: 是

applicant #

提案人。
資料型態: String
必填: 是
長度限制: 最長 10 個字
格式: 繁/簡體中文

complimentary #

  • models
    買就送贈品的內容。 贈品的結構可分為有屬性贈品無屬性贈品,分別說明如下:
    • 無屬性贈品
      • sku:贈品商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有買就送贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • shortTitle:贈品短標題
    • 有屬性贈品
      • sku:贈品屬性商品編號。若為新增買就送贈品屬性時,此欄位不需填寫將由 API 自動產生,反之需填寫欲調整的賣場買就送贈品屬性商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有買就送贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • items:
        • sku:贈品商品編號
        • spec:
          • name:贈品屬性項目名稱,此欄位由 API 自動產生
          • selectedValue:贈品屬性項目顯示名稱
        • shortTitle:贈品短標題
      • shortTitle:贈品短標題。此欄位不需填寫,將由 API 自動帶入第一個贈品屬性項目之短標題

資料型態: ProposalComplimentary

selectComplimentary #

  • selectedMinQty:任選贈品的必選數量
  • models
    任選贈品的內容。 贈品的結構可分為有屬性贈品無屬性贈品,分別說明如下:
    • 無屬性贈品
      • sku:贈品商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有任選贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • shortTitle:贈品短標題
    • 有屬性贈品
      • sku:贈品屬性商品編號。若為新增任選贈品屬性時,此欄位不需填寫將由 API 自動產生,反之需填寫欲調整的賣場任選贈品屬性商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有任選贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • items:
        • sku:贈品商品編號
        • spec:
          • name:贈品屬性項目名稱,此欄位由 API 自動產生
          • selectedValue:贈品屬性項目顯示名稱
        • shortTitle:贈品短標題
      • shortTitle:贈品短標題。此欄位不需填寫,將由 API 自動帶入第一個贈品屬性項目之短標題

資料型態: ProposalComplimentary

additionalPurchases #

加價購的內容。

  • sku:加價購商品編號
  • spec:
    • name:加價購分類名稱。若原賣場存在既有加價購分類,將由 API 自動帶入加價購分類名稱,反之將由 API 自動產生
    • selectedValue:加價購顯示名稱
  • price:加價購商品售價

資料型態: ProposalModel[]

reviewStatus #

審核狀態,詳見 定義表
資料型態: String
必填: 是
有效值:

  • composing:當提案單審核狀態為 composing 時,可變更為 composing
  • draft:當提案單審核狀態為 composingdraft 時,可變更為 draft
  • pendingReview:當提案單審核狀態為 composingdraftpendingReview 時,可變更為 pendingReview

note #

提案備註。
資料型態: String
必填: 否
長度限制: 最長 200 個字

Request/Response Syntax #

PUT /api/spa/v1/proposal/updateListingModels/{id}

{
  "applicant": string,
  "reviewStatus": string,
  "listing": {
    "id": number
  },
  "complimentary": {
    "models": [
      {
        "sku": number,
        "spec": {
          "selectedValue": string
        },
        "items": [
          {
            "sku": number,
            "spec": {
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "shortTitle": string
      }
    ]
  },
  "selectComplimentary": {
    "selectedMinQty": number,
    "models": [
      {
        "sku": number,
        "spec": {
          "selectedValue": string
        },
        "items": [
          {
            "sku": number,
            "spec": {
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "shortTitle": string
      }
    ]
  },
  "additionalPurchases": [
    {
      "sku": number,
      "spec": {
        "selectedValue": string
      },
      "price": string
    }
  ],
  "models": [
    {
      "spec": {
        "name": string,
        "selectedValue": string
      },
      "sku": number,
      "items": [
        {
          "id": number,
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "isVisible": boolean,
          "images": [
            {
              "order": number,
              "url": string
            }
          ],
          "name": string,
          "attributes": [
            {
              "name": string,
              "values": [
                string
              ]
            }
          ],
          "partNo": string,
          "barcode": string,
          "stock": number
        }
      ],
      "isVisible": boolean,
      "images": [
        {
          "order": number,
          "url": string
        }
      ],
      "name": string,
      "attributes": [
        {
          "name": string,
          "values": [
            string
          ]
        }
      ],
      "partNo": string,
      "barcode": string,
      "stock": number
    }
  ],
  "note": string
}
{
  "applicant": string,
  "contactWindow": string,
  "creator": string,
  "createdTs": string,
  "executeStatus": string,
  "executedTs": string,
  "expiredTs": string,
  "modifiedTimes": number,
  "modifiedTs": string,
  "modifier": string,
  "reviewStatus": string,
  "supplierId": number,
  "note": string,
  "suggestion": string,
  "id": number,
  "listing": {
    "id": number,
    "origLayer": number
  },
  "complimentary": {
    "models": [
      {
        "items": [
          {
            "id": number,
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "shortTitle": string
      }
    ]
  },
  "complimentaryDiff": {
    "added": [
      {
        "items": [
          {
            "id": number,
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "shortTitle": string
      }
    ],
    "updated": [
      {
        "origin": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "parentSku": number,
          "shortTitle": string
        },
        "outcome": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "parentSku": number,
          "shortTitle": string
        },
        "sku": number
      }
    ],
    "removed": [
      {
        "items": [
          {
            "isVisible": boolean,
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "shortTitle": string
      }
    ]
  },
  "selectComplimentary": {
    "selectedMinQty": number,
    "models": [
      {
        "items": [
          {
            "id": number,
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "shortTitle": string
      }
    ]
  },
  "selectComplimentaryDiff": {
    "added": [
      {
        "items": [
          {
            "id": number,
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "shortTitle": string
      }
    ],
    "updated": [
      {
        "origin": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "parentSku": number,
          "shortTitle": string
        },
        "outcome": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "parentSku": number,
          "shortTitle": string
        },
        "sku": number
      }
    ],
    "removed": [
      {
        "items": [
          {
            "isVisible": boolean,
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "shortTitle": string
          }
        ],
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "shortTitle": string
      }
    ],
    "updatedField": [
      {
        "field": string,
        "origin": string,
        "outcome": string
      }
    ]
  },
  "additionalPurchases": [
    {
      "sku": number,
      "spec": {
        "name": string,
        "selectedValue": string
      },
      "price": string
    }
  ],
  "additionalPurchasesDiff": {
    "added": [
      {
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "price": string
      }
    ],
    "updated": [
      {
        "sku": number,
        "origin": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "price": string
        },
        "outcome": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "price": string
        }
      }
    ],
    "removed": [
      {
        "sku": number,
        "spec": {
          "name": string,
          "selectedValue": string
        }
      }
    ]
  },
  "models": [
    {
      "spec": {
        "name": string,
        "selectedValue": string
      },
      "sku": number,
      "items": [
        {
          "id": number,
          "sku": number,
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "isVisible": boolean,
          "images": [
            {
              "order": number,
              "url": string
            }
          ],
          "attributes": [
            {
              "name": string,
              "values": [
                string
              ]
            }
          ],
          "partNo": string,
          "barcode": string,
          "stock": number,
          "name": string
        }
      ],
      "isVisible": boolean,
      "images": [
        {
          "order": number,
          "url": string
        }
      ],
      "attributes": [
        {
          "name": string,
          "values": [
            string
          ]
        }
      ],
      "partNo": string,
      "barcode": string,
      "stock": number,
      "name": string
    }
  ],
  "products": [
    {
      "id": number,
      "sku": number,
      "supplierId": number,
      "name": string,
      "cost": string,
      "partNo": string,
      "stock": number,
      "availableCount": number,
      "images": [
        {
          "url": string,
          "width": number,
          "height": number,
          "order": number
        }
      ],
      "parentSpec": {
        "name": string,
        "selectedValue": string
      },
      "spec": {
        "name": string,
        "selectedValue": string
      },
      "structuredData": {
        "attributes": [
          {
            "name": string,
            "values": [
              string
            ]
          }
        ],
        "struDataAttrClusterId": string
      },
      "isExpiringItem": boolean,
      "isInstallRequired": boolean,
      "isNeedRecycle": boolean,
      "minPackingCount": number,
      "taxable": boolean,
      "msrp": string,
      "brand": string,
      "length": number,
      "width": number,
      "height": number,
      "weight": number,
      "preserveDays": number,
      "catId": string,
      "catItemId": string,
      "isSoftGame": boolean,
      "gameContents": [
        string
      ],
      "shipType": {
        "id": number,
        "type": string
      }
    }
  ],
  "diff": {
    "added": [
      {
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "sku": number,
        "items": [
          {
            "id": number,
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "isVisible": boolean,
            "images": [
              {
                "order": number,
                "url": string
              }
            ],
            "attributes": [
              {
                "name": string,
                "values": [
                  string
                ]
              }
            ],
            "partNo": string,
            "barcode": string,
            "stock": number,
            "name": string
          }
        ],
        "isVisible": boolean,
        "images": [
          {
            "order": number,
            "url": string
          }
        ],
        "attributes": [
          {
            "name": string,
            "values": [
              string
            ]
          }
        ],
        "partNo": string,
        "barcode": string,
        "stock": number,
        "name": string
      }
    ],
    "removed": [
      {
        "spec": {
          "name": string,
          "selectedValue": string
        },
        "sku": number,
        "items": [
          {
            "sku": number,
            "spec": {
              "name": string,
              "selectedValue": string
            },
            "isVisible": boolean,
            "name": string,
            "attributes": [
              {
                "name": string,
                "values": [
                  string
                ]
              }
            ]
          }
        ],
        "isVisible": boolean,
        "name": string,
        "attributes": [
          {
            "name": string,
            "values": [
              string
            ]
          }
        ]
      }
    ],
    "updated": [
      {
        "origin": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "parentSku": number,
          "name": string,
          "attributes": [
            {
              "name": string,
              "values": [
                string
              ]
            }
          ]
        },
        "sku": number,
        "outcome": {
          "spec": {
            "name": string,
            "selectedValue": string
          },
          "parentSpec": {
            "name": string,
            "selectedValue": string
          },
          "parentSku": number,
          "name": string,
          "attributes": [
            {
              "name": string,
              "values": [
                string
              ]
            }
          ]
        }
      }
    ]
  }
}

Response Elements #

若操作成功,API 會回傳 HTTP 200 response。並以 JSON 格式回傳完整的 UpdateListingModelProposal 物件。

id #

提案編號。
資料型態: Integer

supplierId #

供應商編號。
資料型態: Integer

listing #

賣場資訊。
資料型態: ProposalListing

subStationId #

提案當下的提案子站編號, e.g. sub1
資料型態: String

subStationName #

提案當下的提案子站名稱。
資料型態: String

models #

賣場屬性商品的內容。models 的結構分別說明如下:

  • sku:第 1 層屬性的商品編號
  • spec:第 1 層屬性的名稱與項目
  • items:若欲調整的賣場結構為雙層屬性,則此欄顯示為第 2 層屬性
  • isVisible:第 1 層屬性是否顯示於前台賣場
  • images:第 1 層屬性項目的商品圖
  • attributes:第 1 層屬性項目的規格表屬性
  • barcode:第 1 層屬性項目的實際國際條碼
  • stock:第 1 層屬性項目的備貨數量
  • partNo:第 1 層屬性項目的商品料號
  • name:第 1 層屬性項目的商品名稱

資料型態: ProposalModel[]

diff #

儲存提案時賣場屬性與提案內容的差異,詳情請參考 欄位說明
資料型態: ProposalSkuDiff[]

complimentary #

  • models
    買就送贈品的內容。 贈品的結構可分為有屬性贈品無屬性贈品,分別說明如下:
    • 無屬性贈品
      • sku:贈品商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有買就送贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • shortTitle:贈品短標題
    • 有屬性贈品
      • sku:贈品屬性商品編號。若為新增買就送贈品屬性時,此欄位不需填寫將由 API 自動產生,反之需填寫欲調整的賣場買就送贈品屬性商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有買就送贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • items:
        • sku:贈品商品編號
        • spec:
          • name:贈品屬性項目名稱,此欄位由 API 自動產生
          • selectedValue:贈品屬性項目顯示名稱
        • shortTitle:贈品短標題
      • shortTitle:贈品短標題。此欄位不需填寫,將由 API 自動帶入第一個贈品屬性項目之短標題

資料型態: ProposalComplimentary

complimentaryDiff #

儲存提案時賣場買就送贈品與提案買就送贈品內容的差異。詳情請參考 欄位說明
complimentaryDiff 的結構包含:

  • added 表示提案新增的買就送贈品資訊,結構請參考 ProposalModel
  • removed 表示移除的賣場既有買就送贈品,結構請參考 ListingModel
  • updated 表示更新的賣場既有買就送贈品,結構請參考 ProposalUpdatedSku

資料型態: ProposalSkuDiff

selectComplimentary #

  • selectedMinQty:任選贈品的必選數量
  • models
    任選贈品的內容。 贈品的結構可分為有屬性贈品無屬性贈品,分別說明如下:
    • 無屬性贈品
      • sku:贈品商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有任選贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • shortTitle:贈品短標題
    • 有屬性贈品
      • sku:贈品屬性商品編號。若為新增任選贈品屬性時,此欄位不需填寫將由 API 自動產生,反之需填寫欲調整的賣場任選贈品屬性商品編號
      • spec:
        • name:贈品分類名稱。若原賣場存在既有任選贈品分類,將由 API 自動帶入贈品分類名稱,反之將由 API 自動產生
        • selectedValue:贈品顯示名稱
      • items:
        • sku:贈品商品編號
        • spec:
          • name:贈品屬性項目名稱,此欄位由 API 自動產生
          • selectedValue:贈品屬性項目顯示名稱
        • shortTitle:贈品短標題
      • shortTitle:贈品短標題。此欄位不需填寫,將由 API 自動帶入第一個贈品屬性項目之短標題

資料型態: ProposalComplimentary

selectComplimentaryDiff #

儲存提案時賣場任選贈品與提案任選贈品內容的差異。詳情請參考 欄位說明
selectComplimentaryDiff 的結構包含:

  • added 表示提案新增的任選贈品資訊,結構請參考 ProposalModel
  • removed 表示移除的賣場既有任選贈品,結構請參考 ListingModel
  • updated 表示更新的賣場既有任選贈品,結構請參考 ProposalUpdatedSku
  • updatedField 表示提案內容更新的任選贈品欄位,結構請參考 ProposalUpdatedField

資料型態: ProposalSkuDiff

additionalPurchases #

加價購的內容。

  • sku:加價購商品編號
  • spec:
    • name:加價購分類名稱。若原賣場存在既有加價購分類,將由 API 自動帶入加價購分類名稱,反之將由 API 自動產生
    • selectedValue:加價購顯示名稱
  • price:加價購商品售價

資料型態: ProposalModel[]

additionalPurchasesDiff #

儲存提案時賣場加價購與提案加價購內容的差異。詳情請參考 欄位說明
additionalPurchasesDiff 的結構包含:

  • added 表示提案新增的加價購商品資訊,結構請參考 ProposalModel
  • removed 表示移除的賣場既有加價購商品,結構請參考 ListingModel
  • updated 表示更新的賣場既有加價購商品,結構請參考 ProposalUpdatedSku

資料型態: ProposalSkuDiff

applicant #

提案人。
資料型態: String

appliedTs #

提案時間。
資料型態: String
格式: ISO-8601

expiredTs #

提案有效時間。
資料型態: String
格式: ISO-8601

contactWindow #

提案對象。
資料型態: String

createdTs #

建檔時間。
資料型態: String
格式: ISO-8601

creator #

建檔者。
資料型態: String

modifiedTimes #

更新次數。
資料型態: Integer

modifiedTs #

更新時間。
資料型態: String
格式: ISO-8601

modifier #

更新者。
資料型態: String

executeStatus #

執行狀態。
資料型態: String
有效值: 詳見 執行狀態

reviewStatus #

審核狀態。
資料型態: String
有效值: 詳見 審核狀態

note #

提案備註。
資料型態: String

suggestion #

改善或建議。
資料型態: String

products #

允許加入賣場的屬性商品詳細資訊。
資料型態: Product[]

欄位說明
欄位名稱 資料型態 欄位說明
id Integer Product ID (SKU)
name String 商品名稱
partNo String 商品貨號
sku Integer 商品 ID
stock Integer 商品庫存
cost String 商品成本
images ProductImage[] 商品圖片
structuredData StructuredData 商品規格表
spec Attribute 單層屬性商品的屬性名稱與項目 / 雙層屬性商品的第 2 層屬性名稱與項目
parentSpec Attribute 雙層屬性商品的第 1 層屬性名稱與項目,單層及無屬性商品無此欄位。
isExpiringItem Boolean 是否為即期品
isInstallRequired Boolean 是否需要安裝
isNeedRecycle Boolean 是否屬於廢四機
minPackingCount Int32 最小包裝數
taxable Boolean 商品是否應稅
msrp String 廠商建議價
brand String 品牌
length Int32 包裝完成後的商品長度
width Int32 包裝完成後的商品寬度
height Int32 包裝完成後的商品高度
weight Int32 包裝完成後的商品重量
preserveDays Int32 商品保存期限
catId String 商品目前的分類父類 ID, e.g. cat1610
catItemId String 商品目前的分類子類 ID, e.g. catItem21704
isSoftGame Boolean 是否為遊戲軟體
gameContents String[] 遊戲情節內容,若 isSoftGame = false 則此欄位為空
shipType ShipType 配送方式
availableCount Int32 商品可售數量

Errors #

Bad Request #

輸入的參數不符合 API 定義的 Pattern。
HTTP Status Code: 400

Error Code Description
0 Invalid input
40000011 Invalid ISO-8601 format
40000010 Multiple bad parameters
40000013 The field is unchangeable
40000023 Constraint violation validate error
40009073 Proposal model specification values must have only one value and pre-defined in structured data
40009104 Cannot PUT the proposal which review status isn’t composing and draft
40009127 Invalid listing ID
40009147 Invalid listing type
40009148 The listing does not allow to adjust the model
40009149 The product ID is invalid
40009150 The sku’s supplier ID is different from the listing’s
40009151 The sku’s cost is different from the listing’s
40009152 The sku’s ship type is different from the listing’s
40009153 The sku’s outright purchase status is different from the listing’s
40009154 The sku’s attribute spec name is different from the listing’s
40009155 The sku’s attribute item spec name is different from the listing’s
40009156 The sku’s sub station ID is different from the listing’s
40009157 The sku’s structure attribute cluster ID is different from the listing’s
40009158 The gift sku does not allow to be added to the listing model
40009159 Invalid product conditions
40009160 The sku hasn’t entered the warehouse
40009161 Invalid product conditions
40009162 Invalid sku abstract status
40009163 The listing with delivery type preOrder and customized could not be adjusted the model
40009164 The sku does not allow added in the normal delivery listing
40009165 The sku does not allow added in the appointment delivery listing
40009166 The sku does not allow added in the express delivery listing
40009167 Duplicate sku ID in listing
40009168 Mismatch product and listing attribute layer
40009169 The sku ID not in listing models
40009170 Duplicate spec value in listing models
40009171 Duplicate item spec value in listing models
40009172 Least contain one spec in listing models
40009173 Least contain one item spec in listing models
40009174 Mismatch proposal and listing attribute layer
40009175 Invalid model quantity
40009176 Invalid model’s item quantity
40009177 Duplicate sku ID in proposal
40009178 Invalid product conditions
40009179 Invalid product conditions
40009180 The model’s attribute spec name is different from the listing’s
40009181 The model’s attribute item spec name is different from the listing’s
40009182 The structure data attribute cluster ID inconsistent in listing
40009183 The structure data attribute cluster ID inconsistent in proposal
40009185 Must retain one visible model in a listing or item in a model
40009201 There are inconsistent spec name in the proposal
40009202 Duplicate SKU with the main product of the listing
40009203 The SKU not in listing complimentaries
40009204 Invalid gift cost
40009205 Invalid gift category
40009206 Cannot validate gift and additional purchase simultaneously
40009207 Invalid gift select minimum quantity
40009208 Invalid gift specification selected value length
40009209 Invalid listing attribute count
40009210 Invalid additional purchase cost
40009211 Invalid additional purchase price
40009223 Duplicate product name
40009224 Invalid proposal structure
40009230 The sku’s tax type is different from the listing’s

Unauthorized #

身分認證不通過,請檢查您的 Cookiewssid
HTTP Status Code: 401

Error Code Description
40100001 Missing or bad authentication
40100002 Invalid cookie
40100003 Missing or bad authentication
40100004 Check wssid failed
40100006 Cookie has expired

Forbidden #

權限驗證不通過,請確認您有權操作更新賣場屬性調整提案,且為您所提案的賣場的擁有者。
HTTP Status Code: 403

Error Code Description
40304001 No permission

Unprocessable Entity #

提案單狀態驗證不通過,請確認提案單狀態。
HTTP Status Code: 422

Error Code Description
42209002 Invalid state flow of proposal review status

Internal Server Error #

API 端發生錯誤,若持續發生請洽您的業務窗口。
HTTP Status Code: 500

Examples #

更新提案單號為 427984 的提案單

以雙層屬性賣場為例

商品屬性 6645992 為賣場既有屬性僅需填寫 sku,而灰色為新增的屬性則僅需填寫 spec

PUT /api/spa/v1/proposal/updateListingModels/427984 HTTP/1.1
HOST: tw.supplier.yahoo.com
Content-Type: application/json; charset=UTF-8
{
  "applicant": "applicant-name",
  "listing": {
    "id": 3401834
  },
  "models": [
    {
      "sku": 6645992,
      "items": [
        {
          "id": 6645985,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "S"
          },
          "isVisible": true,
          "name": "屬性名稱",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "S"
              ]
            }
          ]
        },
        {
          "id": 6645986,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "M"
          },
          "isVisible": true,
          "name": "屬性名稱M",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "M"
              ]
            }
          ]
        },
        {
          "id": 6645987,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "L"
          },
          "isVisible": true,
          "name": "白色L",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "L"
              ]
            }
          ]
        }
      ],
      "isVisible": true
    },
    {
      "spec": {
        "name": "顏色",
        "selectedValue": "灰色"
      },
      "items": [
        {
          "id": 6645988,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "S"
          },
          "isVisible": true,
          "name": "灰色S",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "灰色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "S"
              ]
            }
          ]
        }
      ],
      "isVisible": true
    }
  ],
  "reviewStatus": "pendingReview",
  "note": "proposal-note"
}

欄位說明:

  • diff 部份可得知
    • 白色屬性
      • 新增商品尺寸 S 的屬性商品 (6645985)
      • 移除商品尺寸 XL (6645991)
      • 既有的商品尺寸 L 號 (6645987)
        • 更改屬性名稱為 L
        • 更改商品名稱為 白色L
        • 更改屬性項目規格表 商品尺寸 選項為 L
    • 灰色屬性則於此提案新增,包含 1 個商品尺寸 S (6645988)。
  • product 可得到此提案賣場的 4 個屬性商品 (即 6645985、6645986、6645987、6645988) 與移除的屬性商品 (6645991) 的商品詳細資訊。
  • models 為賣場最後呈現的屬性內容,即此賣場白色屬性有 S、M 與 L 的屬性商品,而灰色屬性有 S 的屬性商品。
{
  "id": 427984,
  "supplierId": 99999,
  "listing": {
    "id": 3401834,
    "origLayer": 2
  },
  "subStationId": "sub10",
  "subStationName": "sub-station-name",
  "models": [
    {
      "spec": {
        "name": "顏色",
        "selectedValue": "白色"
      },
      "sku": 6645992,
      "items": [
        {
          "id": 6645985,
          "sku": 6645985,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "S"
          },
          "isVisible": true,
          "name": "屬性名稱",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "S"
              ]
            }
          ]
        },
        {
          "id": 6645986,
          "sku": 6645986,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "M"
          },
          "isVisible": true,
          "name": "屬性名稱M",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "M"
              ]
            }
          ]
        },
        {
          "id": 6645987,
          "sku": 6645987,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "L"
          },
          "isVisible": true,
          "name": "白色L",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "L"
              ]
            }
          ]
        }
      ],
      "isVisible": true
    },
    {
      "spec": {
        "name": "顏色",
        "selectedValue": "灰色"
      },
      "sku": 6645993,
      "items": [
        {
          "id": 6645988,
          "sku": 6645988,
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "S"
          },
          "isVisible": true,
          "name": "灰色S",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "灰色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "S"
              ]
            }
          ]
        }
      ],
      "isVisible": true
    }
  ],
  "diff": {
    "added": [
      {
        "spec": {
          "name": "顏色",
          "selectedValue": "白色"
        },
        "sku": 6645992,
        "items": [
          {
            "id": 6645985,
            "sku": 6645985,
            "spec": {
              "name": "商品尺寸",
              "selectedValue": "S"
            },
            "isVisible": true,
            "name": "屬性名稱",
            "attributes": [
              {
                "name": "顏色",
                "values": [
                  "白色"
                ]
              },
              {
                "name": "商品尺寸",
                "values": [
                  "S"
                ]
              }
            ]
          }
        ],
        "isVisible": true
      }
    ],
    "removed": [
      {
        "spec": {
          "name": "顏色",
          "selectedValue": "白色"
        },
        "sku": 6645992,
        "items": [
          {
            "id": 6645991,
            "spec": {
              "name": "商品尺寸",
              "selectedValue": "XL"
            },
            "isVisible": true,
            "name": "屬性名稱",
            "attributes": [
              {
                "name": "顏色",
                "values": [
                  "白色"
                ]
              },
              {
                "name": "商品尺寸",
                "values": [
                  "XL"
                ]
              }
            ]
          }
        ],
        "isVisible": true
      }
    ],
    "updated": [
      {
        "origin": {
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "L號"
          },
          "parentSku": 6645993,
          "name": "屬性名稱L",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "其他"
              ]
            }
          ]
        },
        "outcome": {
          "spec": {
            "name": "商品尺寸",
            "selectedValue": "L"
          },
          "parentSku": 6645992,
          "name": "白色L",
          "attributes": [
            {
              "name": "顏色",
              "values": [
                "白色"
              ]
            },
            {
              "name": "商品尺寸",
              "values": [
                "L"
              ]
            }
          ]
        },
        "sku": 6645987
      }
    ]
  },
  "products": [
    {
      "cost": "80.00",
      "id": 6645985,
      "images": [
        {
          "height": 1000,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/876984D7CB-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/247B558373-SP-484183.jpg",
          "width": 400
        },
        {
          "height": 250,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/B6C4A9754D-SP-484183.jpg",
          "width": 250
        },
        {
          "height": 135,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/93D1DB3A3A-SP-484183.jpg",
          "width": 135
        },
        {
          "height": 80,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/9D119726D1-SP-484183.jpg",
          "width": 80
        },
        {
          "height": 1000,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/7D92C6556F-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/8D938FA040-SP-484183.jpg",
          "width": 400
        }
      ],
      "name": "屬性名稱",
      "sku": 6677904,
      "stock": 10,
      "availableCount": 10,
      "structuredData": {
        "attributes": [
          {
            "name": "商品品牌",
            "values": [
              "5th STREET"
            ]
          },
          {
            "name": "顏色",
            "values": [
              "白色"
            ]
          },
          {
            "name": "商品尺寸",
            "values": [
              "S"
            ]
          }
        ],
        "struDataAttrClusterId": "000003414671"
      },
      "isExpiringItem": false,
      "isInstallRequired": false,
      "isNeedRecycle": false,
      "minPackingCount": 1,
      "taxable": true,
      "msrp": "100.00",
      "brand": "品牌",
      "catId": "cat430",
      "catItemId": "catItem10070",
      "isSoftGame": false,
      "shipType": {
        "id": 1,
        "type": "Home"
      }
    },
    {
      "cost": "80.00",
      "id": 6645986,
      "images": [
        {
          "height": 1000,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/876984D7CB-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/247B558373-SP-484183.jpg",
          "width": 400
        },
        {
          "height": 250,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/B6C4A9754D-SP-484183.jpg",
          "width": 250
        },
        {
          "height": 135,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/93D1DB3A3A-SP-484183.jpg",
          "width": 135
        },
        {
          "height": 80,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/9D119726D1-SP-484183.jpg",
          "width": 80
        },
        {
          "height": 1000,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/7D92C6556F-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/8D938FA040-SP-484183.jpg",
          "width": 400
        }
      ],
      "name": "屬性名稱M",
      "sku": 6645986,
      "stock": 10,
      "availableCount": 10,
      "structuredData": {
        "attributes": [
          {
            "name": "商品品牌",
            "values": [
              "5th STREET"
            ]
          },
          {
            "name": "顏色",
            "values": [
              "白色"
            ]
          },
          {
            "name": "商品尺寸",
            "values": [
              "M"
            ]
          }
        ],
        "struDataAttrClusterId": "000003414671"
      },
      "isExpiringItem": false,
      "isInstallRequired": false,
      "isNeedRecycle": false,
      "minPackingCount": 1,
      "taxable": true,
      "msrp": "100.00",
      "brand": "品牌",
      "catId": "cat430",
      "catItemId": "catItem10070",
      "isSoftGame": false,
      "shipType": {
        "id": 1,
        "type": "Home"
      }
    },
    {
      "cost": "80.00",
      "id": 6645987,
      "images": [
        {
          "height": 1000,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/876984D7CB-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/247B558373-SP-484183.jpg",
          "width": 400
        },
        {
          "height": 250,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/B6C4A9754D-SP-484183.jpg",
          "width": 250
        },
        {
          "height": 135,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/93D1DB3A3A-SP-484183.jpg",
          "width": 135
        },
        {
          "height": 80,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/9D119726D1-SP-484183.jpg",
          "width": 80
        },
        {
          "height": 1000,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/7D92C6556F-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/8D938FA040-SP-484183.jpg",
          "width": 400
        }
      ],
      "name": "屬性名稱L",
      "sku": 6645987,
      "stock": 10,
      "availableCount": 10,
      "structuredData": {
        "attributes": [
          {
            "name": "商品品牌",
            "values": [
              "5th STREET"
            ]
          },
          {
            "name": "顏色",
            "values": [
              "白色"
            ]
          },
          {
            "name": "商品尺寸",
            "values": [
              "L"
            ]
          }
        ],
        "struDataAttrClusterId": "000003414671"
      },
      "isExpiringItem": false,
      "isInstallRequired": false,
      "isNeedRecycle": false,
      "minPackingCount": 1,
      "taxable": true,
      "msrp": "100.00",
      "brand": "品牌",
      "catId": "cat430",
      "catItemId": "catItem10070",
      "isSoftGame": false,
      "shipType": {
        "id": 1,
        "type": "Home"
      }
    },
    {
      "cost": "80.00",
      "id": 6645988,
      "images": [
        {
          "height": 1000,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/876984D7CB-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/247B558373-SP-484183.jpg",
          "width": 400
        },
        {
          "height": 250,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/B6C4A9754D-SP-484183.jpg",
          "width": 250
        },
        {
          "height": 135,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/93D1DB3A3A-SP-484183.jpg",
          "width": 135
        },
        {
          "height": 80,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/9D119726D1-SP-484183.jpg",
          "width": 80
        },
        {
          "height": 1000,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/7D92C6556F-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/8D938FA040-SP-484183.jpg",
          "width": 400
        }
      ],
      "name": "灰色S",
      "sku": 6645988,
      "stock": 10,
      "availableCount": 10,
      "structuredData": {
        "attributes": [
          {
            "name": "商品品牌",
            "values": [
              "5th STREET"
            ]
          },
          {
            "name": "顏色",
            "values": [
              "灰色"
            ]
          },
          {
            "name": "商品尺寸",
            "values": [
              "S"
            ]
          }
        ],
        "struDataAttrClusterId": "000003414671"
      },
      "isExpiringItem": false,
      "isInstallRequired": false,
      "isNeedRecycle": false,
      "minPackingCount": 1,
      "taxable": true,
      "msrp": "100.00",
      "brand": "品牌",
      "catId": "cat430",
      "catItemId": "catItem10070",
      "isSoftGame": false,
      "shipType": {
        "id": 1,
        "type": "Home"
      }
    },
    {
      "cost": "80.00",
      "id": 6645991,
      "images": [
        {
          "height": 1000,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/876984D7CB-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/247B558373-SP-484183.jpg",
          "width": 400
        },
        {
          "height": 250,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/B6C4A9754D-SP-484183.jpg",
          "width": 250
        },
        {
          "height": 135,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/93D1DB3A3A-SP-484183.jpg",
          "width": 135
        },
        {
          "height": 80,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/9D119726D1-SP-484183.jpg",
          "width": 80
        },
        {
          "height": 1000,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/7D92C6556F-SP-484183.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/8D938FA040-SP-484183.jpg",
          "width": 400
        }
      ],
      "name": "屬性名稱",
      "sku": 6645991,
      "stock": 10,
      "availableCount": 10,
      "structuredData": {
        "attributes": [
          {
            "name": "商品品牌",
            "values": [
              "5th STREET"
            ]
          },{
            "name": "顏色",
            "values": [
              "白色"
            ]
          },
          {
            "name": "商品尺寸",
            "values": [
              "XL"
            ]
          }
        ],
        "struDataAttrClusterId": "000003414671"
      },
      "isExpiringItem": false,
      "isInstallRequired": false,
      "isNeedRecycle": false,
      "minPackingCount": 1,
      "taxable": true,
      "msrp": "100.00",
      "brand": "品牌",
      "catId": "cat430",
      "catItemId": "catItem10070",
      "isSoftGame": false,
      "shipType": {
        "id": 1,
        "type": "Home"
      }
    }
  ],
  "applicant": "applicant-name",
  "appliedTs": "2020-09-18T11:32:00Z",
  "expiredTs": "2020-10-02T16:00:00Z",
  "contactWindow": "contact-windows-id",
  "createdTs": "2020-09-18T11:31:53Z",
  "creator": "creator-id",
  "modifiedTimes": 0,
  "modifiedTs": "2020-09-18T11:32:00Z",
  "modifier": "modifier-id",
  "executeStatus": "idle",
  "reviewStatus": "pendingReview",
  "note": "proposal-note"
}