openapi: 3.2.0 info: title: Consumer connectivity Products API description: '#### Copyright © Aeris Communications, Inc.' version: 2.0.1 x-api-id: 7d04b81f-0545-4c01-9d81-244fda13b6c8 x-audience: external-public servers: - url: https://iot-api.aeris.com/iot/api/consumer-connectivity description: API server security: - Oauth2_auth: [] tags: - name: Products paths: /products: put: tags: - Products summary: Update product for a company description: Updates a product for a company. operationId: updateProduct parameters: - name: update_recurring_purchases in: query description: Apply changes in prices to the existing recurring purchases. schema: type: boolean default: false requestBody: description: Product to be updated. content: application/json: schema: $ref: '#/components/schemas/ProductModel' application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ProductModel' required: true responses: 200: description: Product allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ProductModel' 400: description: Invalid product content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' 401: $ref: '#/components/responses/Unauthorized' 404: description: Product not found content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' 429: $ref: '#/components/responses/Response_429' 500: $ref: '#/components/responses/InternalError' security: - Oauth2_auth: - cc.write post: tags: - Products summary: Create a new product for a company description: Creates a new product for a company. operationId: createProduct requestBody: description: Product to be created. content: application/json: schema: $ref: '#/components/schemas/ProductModel' application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ProductModel' required: true responses: 200: description: Product allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ProductModel' 400: description: Invalid product content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' 401: $ref: '#/components/responses/Unauthorized' 429: $ref: '#/components/responses/Response_429' 500: $ref: '#/components/responses/InternalError' security: - Oauth2_auth: - cc.write /products/{company-id}: get: tags: - Products summary: List products of a company description: Lists products of a company. operationId: getProductsByCompany parameters: - name: company-id in: path description: Company ID whose products are to be fetched. required: true schema: type: string - name: product_id in: query description: Product ID schema: type: string default: '' - name: product_id_match in: query description: Product ID match type schema: $ref: '#/components/schemas/MatchTypeEnum' - name: state in: query description: Product states required: false explode: true schema: uniqueItems: true type: array default: - ACTIVE items: $ref: '#/components/schemas/ProductStateFilterEnum' - name: tag in: query description: Product tag required: false schema: type: string default: '' - name: tag_match in: query description: Product tag match type required: false schema: $ref: '#/components/schemas/MatchTypeEnum' - name: page in: query description: Page number or offset required: false schema: $ref: '#/components/schemas/Page' - name: per_page in: query description: Items per page required: false schema: $ref: '#/components/schemas/PerPage' responses: 200: description: Product list allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ProductList' 401: $ref: '#/components/responses/Unauthorized' 404: description: Company not found content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' 429: $ref: '#/components/responses/Response_429' 500: $ref: '#/components/responses/InternalError' security: - Oauth2_auth: - cc.read /products/{company-id}/{product-id}: get: tags: - Products summary: Get a product of a company description: Returns a product of a company. operationId: getProductById parameters: - name: company-id in: path description: Company ID whose products are to be fetched. required: true schema: type: string - name: product-id in: path description: Product ID required: true schema: type: string responses: 200: description: Product allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ProductModel' 401: $ref: '#/components/responses/Unauthorized' 404: description: Company or product not found content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' 429: $ref: '#/components/responses/Response_429' 500: $ref: '#/components/responses/InternalError' security: - Oauth2_auth: - cc.read /products/{company-id}/properties/values: get: tags: - Products summary: Get product property values of a company description: Returns valid product property values of a company. operationId: getProductPropertyValues parameters: - name: company-id in: path description: Company ID whose product property values is to be fetched. required: true schema: type: string responses: 200: description: Product property values response allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ProductPropertyValuesResponse' 401: $ref: '#/components/responses/Unauthorized' 404: description: Company not found content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' 429: $ref: '#/components/responses/Response_429' 500: $ref: '#/components/responses/InternalError' security: - Oauth2_auth: - cc.read components: schemas: ProductPropertyValuesResponse: type: object properties: bucket_types: uniqueItems: true type: array items: $ref: '#/components/schemas/BucketTypeModel' ProductList: type: object properties: page: type: integer format: int32 pages: type: integer format: int32 total: type: integer format: int64 count_limit_reached: type: boolean products: type: array items: $ref: '#/components/schemas/ProductModel' description: Product list ProductStateFilterEnum: type: string description: Product state filter enum: - ALL - DRAFT - ACTIVE - OBSOLETE BucketTypeModel: type: object properties: bucket_type: type: string instance_types: uniqueItems: true type: array items: type: string description: Bucket type ErrorResponse: type: object properties: code: type: integer format: int32 http_status: type: integer format: int32 default: 500 message: type: string description: Error response ProductModel: type: object properties: company_id: type: string product_id: type: string state: $ref: '#/components/schemas/ProductStateEnum' descriptions: type: array items: $ref: '#/components/schemas/ProductDescriptionModel' description: $ref: '#/components/schemas/ProductDescriptionModel' tags: type: array items: type: string bucket_type: type: string instance_type: type: string volume: type: integer format: int64 validity_period: $ref: '#/components/schemas/TimePeriodModel' recurrence_interval: $ref: '#/components/schemas/TimePeriodModel' free_purchases: type: integer format: int32 prices: type: array items: $ref: '#/components/schemas/PriceModel' low_bucket_volume_limit: type: integer format: int32 created: type: string format: date-time updated: type: string format: date-time description: Product PriceModel: type: object properties: price: type: number format: double currency_code: type: string vat: type: number format: float validity_period: $ref: '#/components/schemas/TimePeriodModel' description: Price ProductStateEnum: type: string description: Product state enum: - DRAFT - ACTIVE - OBSOLETE ProductDescriptionModel: type: object properties: language: type: string name: type: string description: type: string description: Product description PerPage: type: integer format: int32 default: 20 description: Items per page Page: type: integer format: int32 description: Page number or offset MatchTypeEnum: type: string description: Match type default: EQUALS enum: - EQUALS - CONTAINS TimePeriodModel: type: object properties: unit: type: string enum: - NONE - DAYS - WEEKS - MONTHS - YEARS value: type: integer format: int64 description: Time period headers: Content-Type: description: Handle Content-Type schema: type: string X-RateLimit-Remaining-Second: description: The number of requests remaining in a second. schema: type: integer format: int32 X-RateLimit-Limit-Second: description: The maximum number of requests allowed in a second. schema: type: integer format: int32 X-RateLimit-Remaining-Minute: description: The number of requests remaining in a minute. schema: type: integer format: int32 X-RateLimit-Limit-Minute: description: The maximum number of requests allowed in a minute. schema: type: integer format: int32 responses: Unauthorized: description: Unauthorized content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' Response_429: description: Too Many Requests allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' RateLimitedResponse: headers: X-RateLimit-Limit-Second: $ref: '#/components/headers/X-RateLimit-Limit-Second' X-RateLimit-Limit-Minute: $ref: '#/components/headers/X-RateLimit-Limit-Minute' X-RateLimit-Remaining-Second: $ref: '#/components/headers/X-RateLimit-Remaining-Second' X-RateLimit-Remaining-Minute: $ref: '#/components/headers/X-RateLimit-Remaining-Minute' Content-Type: $ref: '#/components/headers/Content-Type' InternalError: description: Internal error content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' securitySchemes: Oauth2_auth: flows: password: tokenUrl: https://iot-api.aeris.com/iot/api/auth/token scopes: cc.read: Access right needed to read from Consumer Connectivity service. cc.write: Access right needed to write to Consumer Connectivity service. type: oauth2