Feedback

Feedback helps give your storefront more legitimacy by informing potential customers about your product quality and seller reputation. The better your feedback, the higher the likelihood visitors turn into customers.

On this page, we'll dive into the different feedback endpoints you can use to manage feedback programmatically. We'll look at how to query and reply to feedback.

The feedback model

The feedback model contains all the information about your store's feedback, including the feedback's message, reply, and rating.

Properties

  • Name
    id
    Type
    integer
    Description

    The unique identifier for the feedback.

  • Name
    feedback
    Type
    string
    Description

    The feedback sentiment, one of three:

    • POSITIVE
    • NEUTRAL
    • NEGATIVE
  • Name
    rating
    Type
    integer
    Description

    The feedback rating, from one to five.

  • Name
    deleted_at
    Type
    timestamp
    Description

    The time at which this feedback was deleted.

  • Name
    created_at
    Type
    timestamp
    Description

    The time at which this feedback was first created.

  • Name
    updated_at
    Type
    timestamp
    Description

    The time at which this feedback was last updated.

  • Name
    listing_id
    Type
    integer
    Description

    The ID of the product this feedback belongs to.

  • Name
    invoice_id
    Type
    integer
    Description

    The ID of the order this feedback belongs to.

  • Name
    store_id
    Type
    integer
    Description

    The ID of the store this feedback belongs to.

  • Name
    metadata
    Type
    array
    Description

    Array of metadata related to the feedback; shows whether the feedback was imported.

  • Name
    message
    Type
    string
    Description

    The message the customer left in this feedback.

  • Name
    reply
    Type
    string
    Description

    The reply to the feedback the storefront left.

  • Name
    is_automatic
    Type
    integer
    Description

    Whether the feedback was automatic or not, one of two:

    • 1: Feedback is automatically left
    • 0: Feedback is not automatically left

GET/v1/feedback

List all feedback

This endpoint allows you to retrieve a paginated list of all your feedback received. By default, a maximum of fifteen feedback are shown per page.

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of feedback returned

  • Name
    page
    Type
    integer
    Description

    The page number you are attempting to access.

  • Name
    with_trashed
    Type
    boolean
    Description

    Include deleted feedback in the results

  • Name
    only_trashed
    Type
    boolean
    Description

    Limit the results to only deleted feedback

Request

GET
/v1/feedback
$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://sell.app/api/v1/feedback');
$request->setRequestMethod('GET');
$request->setHeaders([
  'accept' => 'application/json',
  'Authorization' => 'Bearer {ApiKeyHere}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

Response

{
  "data": [
    {
      "id": 1,
      "feedback": "POSITIVE",
      "rating": 5,
      "deleted_at": null,
      "created_at": "2022-12-12T12:12:12.000000Z",
      "updated_at": "2022-12-12T12:12:12.000000Z",
      "listing_id": 1,
      "invoice_id": 1,
      "store_id": 1,
      "metadata": null,
      "message": "This product changed my life. My ex-wife wanted me back, my kids started talking to me, and my boss gave me a raise too!",
      "reply": "The power of selling your soul to the Illuminati!",
      "is_automatic": 1
    }
  ],
  "links": {
    // ...
  },
  "meta": {
    // ...
  }
}

GET/v1/feedback/:id

Retrieve specific feedback

This endpoint allows you to retrieve a specific feedback by providing the unique identifier. Refer to the list at the top of this page to see which properties are included with feedback objects.

Request

GET
/v1/feedback/:id
$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://sell.app/api/v1/feedback/1');
$request->setRequestMethod('GET');
$request->setHeaders([
  'accept' => 'application/json',
  'Authorization' => 'Bearer {ApiKeyHere}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

Response

{
  "data": {
    "id": 1,
    "feedback": "POSITIVE",
    "rating": 5,
    "deleted_at": null,
    "created_at": "2022-12-12T12:12:12.000000Z",
    "updated_at": "2022-12-12T12:12:12.000000Z",
    "listing_id": 1,
    "invoice_id": 1,
    "store_id": 1,
    "metadata": null,
    "message": "This product changed my life. My ex-wife wanted me back, my kids started talking to me, and my boss gave me a raise too!",
    "reply": "The power of selling your soul to the Illuminati!",
    "is_automatic": 1
  }
}

PATCH/v1/feedback/:id

Reply to feedback

This endpoint allows you to reply to a given feedback.

Required attributes

  • Name
    reply
    Type
    string
    Description

    The reply you want to add to this feedback.

Request

PATCH
/v1/feedback/:id
$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{
  "reply": "Do not sell your soul, kids!"
}');

$request->setRequestUrl('https://sell.app/api/v1/feedback/1');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'Content-Type' => 'application/json',
  'accept' => 'application/json',
  'Authorization' => 'Bearer {ApiKeyHere}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

Response

{
  "id": 1,
  "feedback": "POSITIVE",
  "rating": 5,
  "deleted_at": null,
  "created_at": "2022-12-12T12:12:12.000000Z",
  "updated_at": "2022-12-12T12:12:12.000000Z",
  "listing_id": 1,
  "invoice_id": 1,
  "store_id": 1,
  "metadata": null,
  "message": "This product changed my life. My ex-wife wanted me back, my kids started talking to me, and my boss gave me a raise too!",
  "reply": "Do not sell your soul, kids!",
  "is_automatic": 1
}