openapi: 3.2.0 info: title: Consumer connectivity Recurring purchases 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: Recurring purchases paths: /recurring-purchases/{company-id}/{subscription-id-type}/{subscription-id}/pause: put: tags: - Recurring purchases summary: Pause or resume a recurring purchase of a subscription description: Pauses or resumes a recurring purchase of a subscription. operationId: pauseRecurringPurchase parameters: - name: company-id in: path description: Company ID of the subscription. required: true schema: type: string - name: subscription-id-type in: path description: Subscription ID type required: true schema: $ref: '#/components/schemas/SubscriptionIdTypeEnum' - name: subscription-id in: path description: Subscription ID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PauseRecurringPurchaseRequestModel' application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/PauseRecurringPurchaseRequestModel' responses: 200: description: Recurring purchase allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/RecurringPurchaseModel' 401: $ref: '#/components/responses/Unauthorized' 404: description: Company, subscription or recurring purchase 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 /recurring-purchases/{company-id}/{subscription-id-type}/{subscription-id}/free: put: tags: - Recurring purchases summary: Set free recurring purchases for a subscription description: Sets free recurring purchases for a subscription. operationId: freeRecurringPurchases parameters: - name: company-id in: path description: Company ID of the subscription. required: true schema: type: string - name: subscription-id-type in: path description: Subscription ID type required: true schema: $ref: '#/components/schemas/SubscriptionIdTypeEnum' - name: subscription-id in: path description: Subscription ID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/FreeRecurringPurchasesRequestModel' application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/FreeRecurringPurchasesRequestModel' responses: 200: description: Recurring purchase allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/RecurringPurchaseModel' 401: $ref: '#/components/responses/Unauthorized' 404: description: Company, subscription or recurring purchase 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 /recurring-purchases/{company-id}/{subscription-id-type}/{subscription-id}: get: tags: - Recurring purchases summary: List active recurring purchases of a subscription description: Lists active recurring purchases of a subscription. operationId: getRecurringPurchasesBySubscription parameters: - name: company-id in: path description: Company ID of the subscription. required: true schema: type: string - name: subscription-id-type in: path description: Subscription ID type required: true schema: $ref: '#/components/schemas/SubscriptionIdTypeEnum' - name: subscription-id in: path description: Subscription ID required: true schema: type: string responses: 200: description: Recurring purchases allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: type: array items: $ref: '#/components/schemas/RecurringPurchaseModel' 401: $ref: '#/components/responses/Unauthorized' 404: description: Company or subscription 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 /recurring-purchases/{company-id}/{subscription-id-type}/{subscription-id}/{purchase-id}: delete: tags: - Recurring purchases summary: Cancel recurring purchase of a subscription description: Cancels recurring purchases of a subscription. Data bucket will not be deleted operationId: deleteRecurringPurchase parameters: - name: company-id in: path description: Company ID of the subscription. required: true schema: type: string - name: subscription-id-type in: path description: Subscription ID type required: true schema: $ref: '#/components/schemas/SubscriptionIdTypeEnum' - name: subscription-id in: path description: Subscription ID required: true schema: type: string - name: purchase-id in: path description: Purchase ID required: true schema: type: string format: uuid responses: 200: description: Delete response allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/DeleteResponse' 401: $ref: '#/components/responses/Unauthorized' 404: description: Company, subscription or recurring purchase 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 components: schemas: 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 RecurrenceStateModel: type: object properties: state: type: string enum: - ACTIVE - PAUSED - FINAL_RENEW_COMPLETED - CANCELED timestamp: type: string format: date-time description: Recurrence state FreeRecurringPurchasesRequestModel: type: object properties: purchase_id: type: string format: uuid free_purchases: type: integer format: int32 description: Free recurring purchases request ErrorResponse: type: object properties: code: type: integer format: int32 http_status: type: integer format: int32 default: 500 message: type: string description: Error response DeleteResponse: type: object properties: success: type: boolean description: Delete response SubscriptionIdTypeEnum: type: string description: Subscription ID type enum: - IMSI - MSISDN PauseRecurringPurchaseRequestModel: type: object properties: purchase_id: type: string format: uuid paused: type: boolean description: Pause recurring purchase request TimePeriodModel: type: object properties: unit: type: string enum: - NONE - DAYS - WEEKS - MONTHS - YEARS value: type: integer format: int64 description: Time period RecurringPurchaseModel: type: object properties: company_id: type: string imsi: type: string msisdn: type: string initial_purchase_id: type: string format: uuid purchase_id: type: string format: uuid product_id: type: string bucket_end_date: type: string format: date-time renew: type: string format: date-time recurrence_interval: $ref: '#/components/schemas/TimePeriodModel' recurrence_end_date: type: string format: date-time free_purchases: type: integer format: int32 recurrence_state: $ref: '#/components/schemas/RecurrenceStateModel' renew_completed_count: type: integer format: int32 prices: type: array items: $ref: '#/components/schemas/PriceModel' created: type: string format: date-time updated: type: string format: date-time description: Recurring purchase headers: X-RateLimit-Remaining-Minute: description: The number of requests remaining in a minute. 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-Limit-Minute: description: The maximum number of requests allowed in a minute. schema: type: integer format: int32 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 responses: InternalError: description: Internal error 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' Response_429: description: Too Many Requests allOf: - $ref: '#/components/responses/RateLimitedResponse' content: application/vnd.dcp-v1+json: schema: $ref: '#/components/schemas/ErrorResponse' Unauthorized: description: Unauthorized 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