Skip to content

Summary of plans​

GET
/users/plans/summary

Gets a summary of plans for a user (already purchased or allocated)
This can list unused, and used plans with the consumed query parameter

Authorizations​

ApiKeyAuth

API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.

Type
API Key (header: Authorization)
Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Parameters​

Query Parameters

consumed

Filter by plans that have already been consumed by devices or not

Type
boolean

Request example

Responses​

OK

application/json
JSON
[
  
{
  
  
"count": 0,
  
  
"plan": {
  
  
  
"description": "string",
  
  
  
"displayName": "string",
  
  
  
"features": "string",
  
  
  
"id": 0,
  
  
  
"name": "string",
  
  
  
"onoWhitelistId": 0,
  
  
  
"prices": {
  
  
  
  
"eur": [
  
  
  
  
  
[
  
  
  
  
  
]
  
  
  
  
],
  
  
  
  
"gbp": [
  
  
  
  
  
[
  
  
  
  
  
]
  
  
  
  
],
  
  
  
  
"tax": "[Circular Reference]",
  
  
  
  
"usd": [
  
  
  
  
  
[
  
  
  
  
  
]
  
  
  
  
]
  
  
  
},
  
  
  
"sku": "string",
  
  
  
"sleepLimit": 0,
  
  
  
"wakeLimit": 0
  
  
},
  
  
"subscriptions": 0
  
}
]
Try this endpoint

Playground​

Authorization
Variables
Key
Value

OpenAPI definition ​

References are expanded below, except recursive definitions and references with sibling fields. Documentation overrides are included. Full original OpenAPI spec (JSON).

View endpoint OpenAPI definition
yaml
info:
  title: Lightbug API
  version: '2'
externalDocs:
  description: ''
  url: ''
openapi: 3.1.0
servers:
  - url: https://api.lightbug.cloud/v2
security:
  - ApiKeyAuth: []
tags: []
paths:
  /users/plans/summary:
    get:
      description: |-
        Gets a summary of plans for a user (already purchased or allocated)
        This can list unused, and used plans with the `consumed` query parameter
      parameters:
        - description: Filter by plans that have already been consumed by devices or not
          in: query
          name: consumed
          schema:
            type: boolean
      responses:
'200':
yaml
          content:
            application/json:
              schema:
                items:
                  properties:
                    count:
                      description: Number of these plans that have either been consumed, or are available for use by devices.
                      type: integer
                    plan:
                      description: Details of the plan.
                      properties:
                        description:
                          type: string
                        displayName:
                          type: string
                        features:
                          type: string
                        id:
                          type: integer
                        name:
                          type: string
                        onoWhitelistId:
                          description: |-
                            Connectivity *string `json:"connectivity"`
                            Group        string  `json:"group"`
                            ResellerID *int32 `json:"resellerId"`
                            ResellerPlanID *int32  `json:"resellerPlanId"`
                            Archived *int32 `json:"archived"`
                            PlanType       string  `json:"planType"`
                          type: integer
                        prices:
                          properties:
                            eur:
                              description: 'breaks:  example:"[0,1.99],[10,1.89]"` // Array of quantity to price in EUR'
                              items:
                                items:
                                  type: number
                                type: array
                              type: array
                              uniqueItems: false
                            gbp:
                              description: 'breaks:   example:"[1,2.34],[10,2.22]"` // Array of quantity to price in GBP'
                              items:
                                items:
                                  type: number
                                type: array
                              type: array
                              uniqueItems: false
                            tax:
                              $ref: '#/components/schemas/ProductPricing'
                            usd:
                              description: 'breaks:   example:"[1,4.35],[10,4.26]"` // Array of quantity to price in USD'
                              items:
                                items:
                                  type: number
                                type: array
                              type: array
                              uniqueItems: false
                          type: object
                        sku:
                          type: string
                        sleepLimit:
                          type: integer
                        wakeLimit:
                          description: |-
                            Term           string  `json:"term"`
                            Price          float64 `json:"price"`
                            Currency       string  `json:"currency"`
                            OwnerID        int32   `json:"ownerId"`
                          type: integer
                      type: object
                    subscriptions:
                      description: Number of devices that have an active subscription to this plan.
                      type: integer
                  type: object
                type: array
          description: OK
'400':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Bad Request
'401':
yaml
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: 400
                    type: integer
                  message:
                    example: status bad request
                    type: string
                type: object
          description: Unauthorized
'429':
yaml
          content:
            application/json:
              schema:
                type: string
          description: Limit exceeded
          headers:
            X-Ratelimit-Limit:
              schema:
                type: integer
            X-Ratelimit-Remaining:
              schema:
                type: integer
            X-Ratelimit-Reset:
              schema:
                type: integer
yaml
      security:
        - ApiKeyAuth: []
      summary: Summary of plans
      tags:
        - plans
      operationId: get-users-plans-summary
components:
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey
      description: API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See <a href='/apis/authentication'>Authentication</a> for more details.
      example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
  schemas:
    ProductPricing:
      properties:
        eur:
          description: 'breaks:  example:"[0,1.99],[10,1.89]"` // Array of quantity to price in EUR'
          items:
            items:
              type: number
            type: array
          type: array
          uniqueItems: false
        gbp:
          description: 'breaks:   example:"[1,2.34],[10,2.22]"` // Array of quantity to price in GBP'
          items:
            items:
              type: number
            type: array
          type: array
          uniqueItems: false
        tax:
          $ref: '#/components/schemas/ProductPricing'
        usd:
          description: 'breaks:   example:"[1,4.35],[10,4.26]"` // Array of quantity to price in USD'
          items:
            items:
              type: number
            type: array
          type: array
          uniqueItems: false
      type: object