复制一个商品

接口描述:

  • 复制一个商品。

请求 URL:

  • http|https://host/api/v1/goods/method/copy.goods.item/

请求方式:

  • GET
  • POST

是否授权:

  • 需要授权

业务参数:

参数名 类型 是否必须 范围值 默认值 示例值 描述
goods_id integer gt:0 5 商品编号

响应参数:

参数名 类型 是否返回 示例值 描述
status integer 200 状态码
message string success 消息信息
data object [] 返回对象

响应示例:

  1. {
  2. "status": 200,
  3. "message": "success",
  4. "data": {
  5. "goods_category_id": 1,
  6. "name": "MateBook",
  7. "short_name": "MateBook",
  8. "product_name": "XXX促销",
  9. "goods_spu": "123456",
  10. "goods_sku": "654321",
  11. "bar_code": "123456",
  12. "brand_id": 1,
  13. "store_qty": 200,
  14. "measure": 3,
  15. "measure_type": 0,
  16. "is_postage": 1,
  17. "market_price": 7000,
  18. "shop_price": 5400,
  19. "integral_type": 0,
  20. "give_integral": 540,
  21. "is_integral": 1000,
  22. "least_sum": 1,
  23. "purchase_sum": 2,
  24. "keywords": "华为",
  25. "description": "笔记本",
  26. "content": "详情页",
  27. "attachment": [
  28. "//image_1.jpg"
  29. ],
  30. "video": "//video.mp4",
  31. "unit": "件",
  32. "is_recommend": 1,
  33. "is_new": 1,
  34. "is_hot": 1,
  35. "goods_type_id": 1,
  36. "sort": 50,
  37. "status": 1,
  38. "goods_attr_item": [
  39. {
  40. "goods_attribute_id": 1,
  41. "parent_id": 0,
  42. "is_important": 1,
  43. "attr_value": "I5 I7",
  44. "sort": 50
  45. },
  46. {
  47. "goods_attribute_id": 2,
  48. "parent_id": 0,
  49. "is_important": 1,
  50. "attr_value": "8G 16G",
  51. "sort": 40
  52. }
  53. ],
  54. "goods_spec_item": [
  55. {
  56. "key_name": "1_3",
  57. "key_value": "颜色:黑色 CPU:I5",
  58. "price": 5400,
  59. "store_qty": 100,
  60. "bar_code": "",
  61. "goods_sku": ""
  62. },
  63. {
  64. "key_name": "1_4",
  65. "key_value": "颜色:黑色 CPU:I7",
  66. "price": 5900,
  67. "store_qty": 100,
  68. "bar_code": "",
  69. "goods_sku": ""
  70. }
  71. ],
  72. "spec_image": [
  73. {
  74. "spec_item_id": 1,
  75. "image": "//image_1.jpg"
  76. },
  77. {
  78. "spec_item_id": 2,
  79. "image": "//image_2.jpg"
  80. }
  81. ],
  82. "goods_code": "CS38491916",
  83. "create_time": "2018-05-23 14:35:41",
  84. "update_time": "2018-05-23 14:35:41",
  85. "goods_id": 13
  86. }
  87. }

备注:

  1. 返回的数据结构可参见「添加一个商品」