---
title: "资源反馈"
description: "关联销售渠道与商品的状态"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/sales-channels/resources-feedback'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/sales-channels/resources-feedback.md'
---
# 资源反馈

关联销售渠道与商品的状态

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_products`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
POST /products/:product_id/resource_feedback.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `write_products`

## Request

### Path Parameters

* `product_id`

  string (required)

  商品ID

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

### Request Body

* `resource_feedback`

  object

  资源反馈内容

  * `resource_updated_at`

    string

    等同于updated_at时间戳。updated_at时间戳会根据商家的操作而更改。当需要时，与feedback_generated_at一起使用，以帮助确定传入的反馈与已经收到的反馈相比是否过时，以及是否应该在到达时忽略它

  * `state`

    string

    反馈状态：require_actions，success

  * `feedback_generated_at`

    string

    构建有效负载的时间。用于帮助确定传入的反馈与已收到的反馈相比是否过时，以及是否应在到达时忽略它

  * `messages`

    array<string>

    反馈信息，仅state=require_actions生效

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `resource_feedback`

  object

  资源反馈内容

  * `state`

    string

    反馈状态：require_actions，success

  * `updated_at`

    string

    SL系统自动生成的反馈更新时间

  * `created_at`

    string

    SL系统收到反馈后的创建时间

  * `feedback_generated_at`

    string

    构建有效负载的时间。用于帮助确定传入的反馈与已收到的反馈相比是否过时，以及是否应在到达时忽略它

  * `messages`

    array<string>

    反馈信息

  * `resource_id`

    string

    商品ID

  * `resource_type`

    string

    固定：Product

  * `resource_updated_at`

    string

    SL系统自动生成的反馈更新时间，值等同于updated_at


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "description": "关联销售渠道与商品的状态",
  "externalDocs": {
    "description": "接口使用的权限点: `write_products` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "dHWK4nNN",
  "parameters": [
    {
      "name": "product_id",
      "in": "path",
      "description": "商品ID",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "product_id",
        "description": "商品ID",
        "type": "string",
        "example": "16057476865495856634490282"
      },
      "example": "16057476865495856634490282",
      "examples": {
        "发起商品反馈": {
          "value": "16060878916899800731963144"
        },
        "解决反馈问题": {
          "value": "16060878916899800731963144"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。请参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "resource_feedback": {
              "name": "resource_feedback",
              "description": "资源反馈内容",
              "type": "object",
              "properties": {
                "resource_updated_at": {
                  "name": "resource_updated_at",
                  "description": "等同于updated_at时间戳。updated_at时间戳会根据商家的操作而更改。当需要时，与feedback_generated_at一起使用，以帮助确定传入的反馈与已经收到的反馈相比是否过时，以及是否应该在到达时忽略它",
                  "type": "string",
                  "example": "2023-01-12T15:20:08+08:00"
                },
                "state": {
                  "name": "state",
                  "description": "反馈状态：require_actions，success",
                  "type": "string",
                  "example": "require_actions"
                },
                "feedback_generated_at": {
                  "name": "feedback_generated_at",
                  "description": "构建有效负载的时间。用于帮助确定传入的反馈与已收到的反馈相比是否过时，以及是否应在到达时忽略它",
                  "type": "string",
                  "example": "2023-01-12T15:20:08+08:00"
                },
                "messages": {
                  "name": "messages",
                  "description": "反馈信息，仅state=require_actions生效",
                  "type": "array",
                  "items": {
                    "name": "messages",
                    "description": "反馈信息，仅state=require_actions生效",
                    "type": "string",
                    "example": "[This is a question]"
                  },
                  "example": [
                    "[This is a question]"
                  ]
                }
              },
              "required": [
                "feedback_generated_at",
                "state"
              ],
              "example": {
                "messages": [
                  "[This is a question]"
                ],
                "resource_updated_at": "2023-01-12T15:20:08+08:00",
                "state": "require_actions",
                "feedback_generated_at": "2023-01-12T15:20:08+08:00"
              }
            }
          },
          "required": [
            "resource_feedback"
          ],
          "example": {
            "resource_feedback": {
              "state": "require_actions",
              "feedback_generated_at": "2023-01-12T15:20:08+08:00",
              "messages": [
                "[This is a question]"
              ],
              "resource_updated_at": "2023-01-12T15:20:08+08:00"
            }
          }
        },
        "examples": {
          "发起商品反馈": {
            "value": {
              "resource_feedback": {
                "messages": [
                  "This is a question"
                ],
                "resource_updated_at": "2023-08-29T15:20:08+08:00",
                "state": "requires_action",
                "feedback_generated_at": "2023-08-29T15:20:08+08:00"
              }
            }
          },
          "解决反馈问题": {
            "value": {
              "resource_feedback": {
                "state": "success",
                "feedback_generated_at": "2023-08-29T16:25:08+08:00",
                "resource_updated_at": "2023-08-29T16:46:08+08:00"
              }
            }
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "resource_feedback": {
                "name": "resource_feedback",
                "description": "资源反馈内容",
                "type": "object",
                "properties": {
                  "state": {
                    "name": "state",
                    "description": "反馈状态：require_actions，success",
                    "type": "string",
                    "example": "require_actions"
                  },
                  "updated_at": {
                    "name": "updated_at",
                    "description": "SL系统自动生成的反馈更新时间",
                    "type": "string",
                    "example": "2023-01-12T15:20:08+08:00"
                  },
                  "created_at": {
                    "name": "created_at",
                    "description": "SL系统收到反馈后的创建时间",
                    "type": "string",
                    "example": "2023-01-12T15:20:08+08:00"
                  },
                  "feedback_generated_at": {
                    "name": "feedback_generated_at",
                    "description": "构建有效负载的时间。用于帮助确定传入的反馈与已收到的反馈相比是否过时，以及是否应在到达时忽略它",
                    "type": "string",
                    "example": "2023-01-12T15:20:08+08:00"
                  },
                  "messages": {
                    "name": "messages",
                    "description": "反馈信息",
                    "type": "array",
                    "items": {
                      "name": "messages",
                      "description": "反馈信息",
                      "type": "string",
                      "example": "[This is a question]"
                    },
                    "example": [
                      "[This is a question]"
                    ]
                  },
                  "resource_id": {
                    "name": "resource_id",
                    "description": "商品ID",
                    "type": "string",
                    "example": "16057476865495856634490282"
                  },
                  "resource_type": {
                    "name": "resource_type",
                    "description": "固定：Product",
                    "type": "string",
                    "example": "Product"
                  },
                  "resource_updated_at": {
                    "name": "resource_updated_at",
                    "description": "SL系统自动生成的反馈更新时间，值等同于updated_at",
                    "type": "string",
                    "example": "2023-01-12T15:20:08+08:00"
                  }
                },
                "example": {
                  "resource_updated_at": "2023-01-12T15:20:08+08:00",
                  "state": "require_actions",
                  "updated_at": "2023-01-12T15:20:08+08:00",
                  "created_at": "2023-01-12T15:20:08+08:00",
                  "feedback_generated_at": "2023-01-12T15:20:08+08:00",
                  "messages": [
                    "[This is a question]"
                  ],
                  "resource_id": "16057476865495856634490282",
                  "resource_type": "Product"
                }
              }
            },
            "example": {
              "resource_feedback": {
                "resource_type": "Product",
                "resource_updated_at": "2023-01-12T15:20:08+08:00",
                "state": "require_actions",
                "updated_at": "2023-01-12T15:20:08+08:00",
                "created_at": "2023-01-12T15:20:08+08:00",
                "feedback_generated_at": "2023-01-12T15:20:08+08:00",
                "messages": [
                  "[This is a question]"
                ],
                "resource_id": "16057476865495856634490282"
              }
            }
          },
          "examples": {
            "解决反馈问题": {
              "value": {
                "resource_feedback": {
                  "messages": [
                    "This is a question"
                  ],
                  "resource_id": "16060878916899800731963144",
                  "resource_type": "Product",
                  "resource_updated_at": "2023-08-29T16:46:40+08:00",
                  "state": "success",
                  "updated_at": "2023-08-29T16:46:40+08:00",
                  "created_at": "2023-08-29T16:32:13+08:00",
                  "feedback_generated_at": "2023-08-29T15:20:08+08:00"
                }
              }
            },
            "发起商品反馈": {
              "value": {
                "resource_feedback": {
                  "resource_type": "Product",
                  "resource_updated_at": "2023-08-29T16:32:13+08:00",
                  "state": "requires_action",
                  "updated_at": "2023-08-29T16:32:13+08:00",
                  "created_at": "2023-08-29T16:32:13+08:00",
                  "feedback_generated_at": "2023-08-29T15:20:08+08:00",
                  "messages": [
                    "This is a question"
                  ],
                  "resource_id": "16060878916899800731963144"
                }
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "post",
  "path": "/products/:product_id/resource_feedback.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "资源反馈",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_products"
  ]
}
```