The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Requires resource_feedbacks access scope.

The ResourceFeedback resource lets your app report the status of shops and their resources. For example, if your app is a marketplace channel, then you can use resource feedback to alert merchants that they need to connect their marketplace account by signing in.

Resource feedback notifications are displayed to the merchant on the home screen of their Shopify admin, and in the product details view for any products that are published to your app.

This resource should be used only in cases where you're describing steps that a merchant is required to complete. If your app offers optional or promotional set-up steps, or if it makes recommendations, then don't use resource feedback to let merchants know about them.

Sending feedback on a shop

You can send resource feedback on a shop to let the merchant know what steps they need to take to make sure that your app is set up correctly. Feedback can have one of two states: requires_action or success. You need to send a requires_action feedback request for each step that the merchant is required to complete.

If there are multiple set-up steps that require merchant action, then send feedback with a state of requires_action as merchants complete prior steps. And to remove the feedback message from the Shopify admin, send a success feedback request.

Important

Sending feedback replaces previously sent feedback for the Shop. Unlike REST-style APIs, you don't need to make a PATCH or PUT request to update any previously sent feedback. Send a new POST request to push the latest state of a shop or its resources to Shopify.

Formatting the resource feedback message field

If the feedback state is requires_action, then you can send a string message that communicates the action to be taken by the merchant.

The string must be a single message up to 100 characters long and must end with a period. You need to adhere to the message formatting rules or your requests will fail:

  • [Explanation of the problem]. [Suggested action].

  • Examples:

  • [Your app name] is not connected. Connect your account to use this sales channel. [Learn more]
  • [Your app name] is not configured. Agree to the terms and conditions to use this app. [Learn more]

  • Both Your app name and Learn more (a button which directs merchants to your app) are automatically populated in the Shopify admin.

    Setting feedback permissions

    Add the write_resource_feedbacks permission to your requested scopes.

    Was this section helpful?

    Properties

    created_at
    deprecated
    DateTime when the resource feedback record was stored by Shopify. Type: ISO 8601 UTC DateTime as string with year, month (or week), day, hour, minute, second, time zone.

    updated_at
    deprecated
    DateTime when the resource feedback record was last updated by Shopify. Type: ISO 8601 UTC DateTime as string with year, month (or week), day, hour, minute, second, time zone.

    resource_id
    read-only
    ->id
    Unique id of the resource.

    resource_type
    read-only
    ->id
    Type of resource for which feedback is returned. eg. Shop, Product.

    state
    Indicates the state that the Shop or resource is in, from the perspective of your app. Valid values are requires_action, or success.

    messages

    A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app encounters when trying to make use of their Shop and its resources.

    Required only when state is requires_action. Disallowed when state is success.

    Content restrictions for Shop feedback: one message up to 100 characters long.


    feedback_generated_at

    The time at which the payload is constructed. Used to help determine whether incoming feedback is outdated compared to feedback already received, and if it should be ignored upon arrival. Type: ISO 8601 UTC datetime as string with year, month [or week], day, hour, minute, second, millisecond, and time zone.

    Note

    If you queue a Feedback API payload for delivery at a later time, do not update this value when the API call is actually made; ensure that the current time is set when building the payload.


    Was this section helpful?
    {}The ResourceFeedback resource
    {
      "created_at": "2024-09-19 14:10:56 UTC",
      "updated_at": "2024-09-19 14:10:56 UTC",
      "resource_id": 321,
      "resource_type": "Shop",
      "state": "requires_action",
      "messages": [
        "is not connected. Connect your account to use this sales channel."
      ],
      "feedback_generated_at": "2024-09-19T14:10:56.723839Z"
    }

    Creates shop resource feedback.

    api_version
    string
    required

    feedback_generated_at
    required
    An ISO 8601 date and time indicating when the feedback was generated by your app.

    messages
    required
    An array containing a single message. See Formatting the resource feedback message field for formatting requirements.

    state
    required
    Must be one of the following values:

    Was this section helpful?
    Request body
    resourcefeedback
    Resource_feedback resource
    Was this section helpful?
    post
    /admin/api/2024-10/resource_feedback.json
    Copy
    curl -d '{"resource_feedback":{"state":"requires_action","messages":["is not connected. Connect your account to use this sales channel."],"feedback_generated_at":"2024-09-19T14:13:32.253844Z"}}' \
    -X POST "https://your-development-store.myshopify.com/admin/api/2024-10/resource_feedback.json" \
    -H "X-Shopify-Access-Token: {access_token}" \
    -H "Content-Type: application/json"
    
    {}Response
    JSON
    HTTP/1.1 202 Accepted
    {
      "resource_feedback": {
        "created_at": "2024-09-19T10:13:32-04:00",
        "updated_at": "2024-09-19T10:13:32-04:00",
        "resource_id": 548380009,
        "resource_type": "Shop",
        "resource_updated_at": null,
        "messages": [
          "is not connected. Connect your account to use this sales channel."
        ],
        "feedback_generated_at": "2024-09-19T10:13:32-04:00",
        "state": "requires_action"
      }
    }

    Returns a list (zero or one) of resource feedback objects.

    Important

    Note that ids are not returned as part of this request. Records are immutable except when POST replaces them.


    api_version
    string
    required

    Was this section helpful?
    Was this section helpful?
    get
    /admin/api/2024-10/resource_feedback.json
    Copy
    curl -X GET "https://your-development-store.myshopify.com/admin/api/2024-10/resource_feedback.json" \
    -H "X-Shopify-Access-Token: {access_token}"
    
    {}Response
    JSON
    HTTP/1.1 200 OK
    {
      "resource_feedback": [
        {
          "created_at": "2024-09-19T10:13:29-04:00",
          "updated_at": "2024-09-19T10:13:29-04:00",
          "resource_id": 548380009,
          "resource_type": "Shop",
          "resource_updated_at": null,
          "messages": [
            "is not connected. Connect your account to use this sales channel."
          ],
          "feedback_generated_at": "2024-09-19T09:13:29-04:00",
          "state": "requires_action"
        }
      ]
    }