openapi: 3.2.0 info: version: v2.222.1 title: Corva Purchase Subscriptions API description: 'The Corva API is a powerful interface providing great flexibility and extensibility with Corva. Whether your needs are simple UI visualizations, data entry, replication/sync tasks, real-time stream processing, or complex machine learning CPU-intensive apps, the Corva API is the way to make it happen. Our concepts are split into three distinct silos: data apps, visualization apps, and a REST API' termsOfService: https://www.corva.ai/terms-and-conditions/ contact: name: Corva API Team email: support@corva.ai security: - api_key: [] tags: - name: PurchaseSubscriptions paths: /v2/purchase_subscriptions: get: summary: List Purchase Subscriptions tags: - PurchaseSubscriptions responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '200': type: object description: Successful response content: application/json: schema: $ref: '#/components/schemas/PurchaseSubscriptionList' parameters: - in: query name: status description: Filter Purchase Subscriptions by status schema: type: string enum: - unapproved - active - cancelled - denied - all - in: query name: company_id description: Filter Purchase Subscriptions by company_id schema: type: integer format: int64 - in: query name: asset_name description: Filter Purchase Subscriptions by asset name schema: type: string - in: query name: name description: Filter Purchase Subscriptions by subscription name or apps name schema: type: string - in: query name: page description: Number of page schema: type: integer - in: query name: per_page description: Number of items to list per page schema: type: integer - in: query name: sort description: 'One or more fields to sort by. Prefix with a - for descending order. Ex: name,-updated_at' schema: type: string enum: - name - price - created_at - updated_at - in: query name: order description: A sorting direction schema: type: string enum: - asc - desc default: asc operationId: getV2PurchaseSubscriptions x-operation-id-source: derived /v2/purchase_subscriptions/{uuid}/cancel: post: summary: Cancel a Purchase Subscription tags: - PurchaseSubscriptions responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '200': description: Purchase Subscription's status after cancellation parameters: - in: path name: uuid description: Purchase Subscription UUID required: true schema: type: string operationId: postV2PurchaseSubscriptionsByUuidCancel x-operation-id-source: derived /v2/purchase_subscriptions/{uuid}: get: summary: Show Purchase Subscription tags: - PurchaseSubscriptions responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '200': type: object description: Successful response content: application/json: schema: $ref: '#/components/schemas/PurchaseSubscription' parameters: - in: path name: uuid description: Purchase Subscription UUID required: true schema: type: string operationId: getV2PurchaseSubscriptionsByUuid x-operation-id-source: derived patch: summary: Update a Purchase Subscription tags: - PurchaseSubscriptions responses: '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' '403': description: Authorization error content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '200': description: Updated Purchase Subscription content: application/json: schema: $ref: '#/components/schemas/PurchaseSubscription' parameters: - in: path name: uuid description: Purchase Subscription UUID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PurchaseSubscriptionUpdatePayload' description: Purchase Subscription Payload required: true operationId: patchV2PurchaseSubscriptionsByUuid x-operation-id-source: derived components: schemas: AuthorizationError: required: - code - message properties: code: type: integer format: int32 message: type: string example: code: 403 message: Access denied PurchaseSubscriptionUpdatePayload: properties: purchase_subscription: type: object properties: name: type: string asset_type: type: string enum: - company - program - rig - frac_fleet - drillout_unit billing_period: type: string enum: - monthly - daily - annually billing_calc_method: type: string enum: - well_afe_day - well_afe_month - corva_active_day - corva_active_month billing_contact: type: string billing_email: type: string billing_phone: type: string account_manager: type: string price: type: float asset_ids: type: array items: type: integer apps: type: array items: type: integer example: purchase_subscription: price: 19.95 name: Product Name asset_type: rig billing_period: monthly billing_calc_method: well_afe_day billing_contact: Billing contact billing_email: example@email.com billing_phone: +1-415 652 0000 account_manager: Manager name asset_ids: - 1 - 2 - 3 app_ids: - 1 - 2 - 3 AuthenticationError: required: - code - message properties: code: type: integer format: int32 message: type: string example: code: 401 message: Missing authentication. Please try again. NotFoundError: required: - code - message properties: code: type: integer format: int32 message: type: string example: code: 404 message: Not found PurchaseSubscription: properties: id: type: integer format: int64 type: type: string attributes: type: object properties: id: type: integer format: int64 price: type: float company_id: type: integer format: int64 name: type: string segment: type: string enum: - drilling - completion status: type: string enum: - unapproved - active - cancelled - denied asset_type: type: string enum: - company - program - rig - frac_fleet - drillout_unit billing_period: type: string enum: - monthly - daily - annually billing_calc_method: type: string enum: - well_afe_day - well_afe_month - corva_active_day - corva_active_month billing_contact: type: string billing_email: type: string billing_phone: type: string account_manager: type: string provider_company_id: type: integer format: int64 new_subscription_version_id: type: integer format: int64 uuid: type: string activated_at: type: string format: date-time cancelled_at: type: string format: date-time created_at: type: string format: date-time updated_at: type: string format: date-time relationships: type: object properties: apps: type: object properties: data: type: array properties: id: type: integer format: int64 app_key: type: string app_type: type: string category: type: string name: type: string segment: type: string visibility: type: string assets: type: object properties: data: type: array properties: id: type: integer format: int64 asset_id: type: integer format: int64 old_asset_id: type: integer format: int64 asset_type: type: string asset_name: type: string company: type: object properties: data: type: array properties: name: type: string example: id: 12345 type: purchase_subscription attributes: id: 12345 price: 19.95 name: Product Name segment: drilling status: active asset_type: company billing_period: monthly billing_calc_method: well_afe_day billing_contact: Billing contact billing_email: example@email.com billing_phone: +1-415 652 0000 account_manager: Manager name provider_company_id: 10001 company_id: 12345 new_subscription_version_id: 10002 uuid: a628bd6c-2c2c-479f-a38c-48cc47b360f1 activated_at: '2010-01-01T00:00:00.000Z' cancelled_at: '2010-01-02T00:00:00.000Z' created_at: '2010-01-01T00:00:00.000Z' updated_at: '2010-01-01T00:00:00.000Z' relationships: apps: - id: '1' type: app assets: - id: '3' type: product_subscription_asset PurchaseSubscriptionList: properties: data: type: array items: $ref: '#/components/schemas/PurchaseSubscription' securitySchemes: api_key: type: apiKey name: authorization in: header