Prices for all resources

Supported Formats

json

GET /open_api/v1/prices
Prices index

Index of prices, with optional pagination. Order by created_at descendant.

Supported Formats

json

Examples

# /open_api/v1/prices?priceable_type=Space&page=1&per_page=3
{
  "prices": [
    {
      "id": 502,
      "priceable_id": 1,
      "priceable_type": "Space",
      "group_id": 4,
      "plan_id": 5,
      "amount": 1800,
      "updated_at": "2021-06-21T09:40:40.467277+01:00",
      "created_at": "2021-06-21T09:40:40.467277+01:00",
    },
    {
      "id": 503,
      "priceable_id": 1,
      "priceable_type": "Space",
      "group_id": 2,
      "plan_id": 1,
      "amount": 1600,
      "updated_at": "2021-06-21T09:40:40.470904+01:00",
      "created_at": "2021-06-21T09:40:40.470904+01:00",
    },
    {
      "id": 504,
      "priceable_id": 1,
      "priceable_type": "Space",
      "group_id": 3,
      "plan_id": 3,
      "amount": 2000,
      "updated_at": "2021-06-21T09:40:40.470876+01:00",
      "created_at": "2021-06-21T09:40:40.470876+01:00",
    }
  ]
}

Params

Param name Description
page
optional

Page number

Validations:

  • Must be a Integer

per_page
optional

Number of objects per page. Default is 20.

Validations:

  • Must be a Integer

plan_id
optional

Scope the request to one or various plans. Provide “null” to this parameter to get prices not associated with any plans (prices that applies to users without subscriptions).

Validations:

  • Must be one of: Integer, Array, null.

group_id
optional

Scope the request to one or various groups.

Validations:

  • Must be one of: Integer, Array.

priceable_type
optional

Scope the request to a specific type of resource.

Validations:

  • Must be one of: Machine, Space.

priceable_id
optional

Scope the request to one or various resources.

Validations:

  • Must be one of: Integer, Array.