API reference

Reviews

Knox answers these operations with the same requests and responses as Stripe's API. Authenticate with your secret key, Authorization: Bearer sk_test_..., from your server, and send form-encoded bodies. Test mode only: live processing is currently disabled.

List all open reviews

GET/v1/reviews

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Query parameters

  • createdobject | integer

    Only return reviews that were created during the given date interval.

    Show 4 child parameters
    • gtinteger
    • gteinteger
    • ltinteger
    • lteinteger
  • ending_beforestring

    A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • starting_afterstring

    A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Returns

A list of review objects.

GET /v1/reviews
curl -G https://api.knoxapi.com/v1/reviews \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  --data-urlencode limit=3
Response
{
  "object": "list",
  "url": "/v1/reviews",
  "has_more": false,
  "data": [
    {
      "billing_zip": null,
      "charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
      "created": 1234567890,
      "id": "prv_1Pgc79B7WZ01zgkWT6khp5C3",
      "ip_address": null,
      "ip_address_location": {
        "city": null,
        "country": null,
        "latitude": null,
        "longitude": null,
        "region": null
      },
      "livemode": false,
      "object": "review",
      "open": true,
      "opened_reason": "rule",
      "session": {
        "browser": null,
        "device": null,
        "platform": null,
        "version": null
      },
      "closed_reason": null,
      "reason": "reason"
    }
  ]
}

Retrieve a review

GET/v1/reviews/{review}

Retrieves a Review object.

Path parameters

  • reviewstringRequired

Query parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The review object.

GET /v1/reviews/{review}
curl https://api.knoxapi.com/v1/reviews/prv_1Pgc79B7WZ01zgkWT6khp5C3 \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "billing_zip": null,
  "charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
  "created": 1234567890,
  "id": "prv_1Pgc79B7WZ01zgkWT6khp5C3",
  "ip_address": null,
  "ip_address_location": {
    "city": null,
    "country": null,
    "latitude": null,
    "longitude": null,
    "region": null
  },
  "livemode": false,
  "object": "review",
  "open": true,
  "opened_reason": "rule",
  "session": {
    "browser": null,
    "device": null,
    "platform": null,
    "version": null
  },
  "closed_reason": null,
  "reason": "reason"
}

Approve a review

POST/v1/reviews/{review}/approve

Approves a Review object, closing it and removing it from the list of reviews.

Path parameters

  • reviewstringRequired

Body parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The review object.

POST /v1/reviews/{review}/approve
curl -X POST https://api.knoxapi.com/v1/reviews/prv_1Pgc79B7WZ01zgkWT6khp5C3/approve \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "billing_zip": null,
  "charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
  "created": 1234567890,
  "id": "prv_1Pgc79B7WZ01zgkWT6khp5C3",
  "ip_address": null,
  "ip_address_location": {
    "city": null,
    "country": null,
    "latitude": null,
    "longitude": null,
    "region": null
  },
  "livemode": false,
  "object": "review",
  "open": true,
  "opened_reason": "rule",
  "session": {
    "browser": null,
    "device": null,
    "platform": null,
    "version": null
  },
  "closed_reason": null,
  "reason": "reason"
}

Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.