Other

Returns Product and Price Lists, sorted from the product with the lowest price to highest <strong>This endpoint is cached for an amount of time determined by ENDPOINT_CACHE_DURATION</strong>

<pre class="prettyprint"> <b>GET</b> /api/v2/stripe/products/ </pre>

Example

  curl -X GET https://[kpi]/api/v2/stripe/products/

Response

  HTTP 200 Ok
   {
      "count": ...
      "next": ...
      "previous": ...
      "results": [
          {
              "id": string,
              "name": string,
              "type": string,
              "prices": [
                  {
                      "id": string,
                      "nickname": string,
                      "currency": string,
                      "type": string,
                      "recurring": {
                          "aggregate_usage": string ('sum', 'last_during_period`, `last_ever`, `max`)
                          "interval": string ('month', 'year', 'week', 'day')
                          "interval_count": int,
                          "usage_type": string ('metered', 'licensed')
                      },
                      "unit_amount": int (cents),
                      "human_readable_price": string,
                      "metadata": {},
                      "active": bool,
                      "product": string,
                      "transform_quantity": null | {'round': 'up'|'down', 'divide_by': int}
                  },
                  ...
              ],
              "metadata": {},
          },
          ...
      ]
   }

Note: unit_amount is price in cents (assuming currency is USD/AUD/CAD/etc.)

Current Endpoint

get/api/v2/stripe/products/

Request

  • The document declares no server URL.
  • Auth: one of:
    • HTTP basic
    • API key in header Authorization
    • none

Query parameters

limitinteger

Number of results to return per page. Use with start.

offsetinteger

Deprecated alias of start.

startinteger

The initial index from which to return the results. Use with limit.

Response

countinteger required
nextstring uri nullable
previousstring uri nullable

Example response

{
  "count": 123,
  "next": "https://kf.kobotoolbox.org/api-endpoint/?start=400&limit=100",
  "previous": "https://kf.kobotoolbox.org/api-endpoint/?start=200&limit=100"
}

Changes

    • breaking

      added subschema #2 to the //// response property oneOf list for the response status

    • breaking

      added subschema #1 subschema #2 to the //// response property oneOf list for the response status

    • breaking

      added subschema #1 subschema #2 to the //// response property oneOf list for the response status

    • info

      removed from the //// response property allOf list for the response status