openapi: 3.0.0 info: title: Schematic accesstokens credits API version: '0.1' description: Schematic API x-rules-engine-schema-version: v97288f60 servers: - url: https://api.schematichq.com security: - ApiKeyAuth: [] tags: - name: credits paths: /billing/credits: get: operationId: listBillingCredits summary: List billing credits tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: name in: query schema: type: string maxLength: 255 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditResponseData' title: ListBillingCreditsResponseData maxItems: 250 params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: '0' title: ListBillingCreditsParams required: - data - params title: ListBillingCreditsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' post: operationId: createBillingCredit summary: Create billing credit tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingCreditRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditResponseData' params: type: object description: Input parameters title: CreateBillingCreditParams required: - data - params title: CreateBillingCreditResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/{credit_id}: get: operationId: getSingleBillingCredit summary: Get single billing credit tags: - credits parameters: - name: credit_id in: path description: credit_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditResponseData' params: type: object description: Input parameters title: GetSingleBillingCreditParams required: - data - params title: GetSingleBillingCreditResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateBillingCredit summary: Update billing credit tags: - credits parameters: - name: credit_id in: path description: credit_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateBillingCreditRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditResponseData' params: type: object description: Input parameters title: UpdateBillingCreditParams required: - data - params title: UpdateBillingCreditResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' delete: operationId: softDeleteBillingCredit summary: Soft delete billing credit tags: - credits parameters: - name: credit_id in: path description: credit_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: SoftDeleteBillingCreditParams required: - data - params title: SoftDeleteBillingCreditResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/balance: get: operationId: listCompanyCreditBalances summary: List company credit balances tags: - credits parameters: - name: company_id in: query required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyCreditBalanceResponseData' title: ListCompanyCreditBalancesResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string title: ListCompanyCreditBalancesParams required: - data - params title: ListCompanyCreditBalancesResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/bundles: get: operationId: listCreditBundles summary: List credit bundles tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: credit_id in: query schema: type: string - name: status in: query schema: $ref: '#/components/schemas/BillingCreditBundleStatus' - name: bundle_type in: query schema: $ref: '#/components/schemas/BillingCreditBundleType' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditBundleResponseData' title: ListCreditBundlesResponseData maxItems: 250 params: type: object description: Input parameters properties: bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' status: $ref: '#/components/schemas/BillingCreditBundleStatus' title: ListCreditBundlesParams required: - data - params title: ListCreditBundlesResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' post: operationId: createCreditBundle summary: Create credit bundle tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCreditBundleRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditBundleResponseData' params: type: object description: Input parameters title: CreateCreditBundleParams required: - data - params title: CreateCreditBundleResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/bundles/{bundle_id}: get: operationId: getCreditBundle summary: Get credit bundle tags: - credits parameters: - name: bundle_id in: path description: bundle_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditBundleResponseData' params: type: object description: Input parameters title: GetCreditBundleParams required: - data - params title: GetCreditBundleResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateCreditBundleDetails summary: Update credit bundle details tags: - credits parameters: - name: bundle_id in: path description: bundle_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCreditBundleDetailsRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditBundleResponseData' params: type: object description: Input parameters title: UpdateCreditBundleDetailsParams required: - data - params title: UpdateCreditBundleDetailsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' delete: operationId: deleteCreditBundle summary: Delete credit bundle tags: - credits parameters: - name: bundle_id in: path description: bundle_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteCreditBundleParams required: - data - params title: DeleteCreditBundleResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/bundles/count: get: operationId: countCreditBundles summary: Count credit bundles tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: credit_id in: query schema: type: string - name: status in: query schema: $ref: '#/components/schemas/BillingCreditBundleStatus' - name: bundle_type in: query schema: $ref: '#/components/schemas/BillingCreditBundleType' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' status: $ref: '#/components/schemas/BillingCreditBundleStatus' title: CountCreditBundlesParams required: - data - params title: CountCreditBundlesResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/count: get: operationId: countBillingCredits summary: Count billing credits tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: name in: query schema: type: string maxLength: 255 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: '0' title: CountBillingCreditsParams required: - data - params title: CountBillingCreditsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/grants/{grant_id}/zero-out: put: operationId: zeroOutGrant summary: Zero out grant tags: - credits parameters: - name: grant_id in: path description: grant_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ZeroOutGrantRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditGrantResponseData' params: type: object description: Input parameters title: ZeroOutGrantParams required: - data - params title: ZeroOutGrantResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/grants/company: post: operationId: grantBillingCreditsToCompany summary: Grant billing credits to company tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCompanyCreditGrant' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditGrantResponseData' params: type: object description: Input parameters title: GrantBillingCreditsToCompanyParams required: - data - params title: GrantBillingCreditsToCompanyResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/grants/company/count: get: operationId: countCompanyGrants summary: Count company grants tags: - credits parameters: - name: company_id in: query schema: type: string - name: order in: query schema: $ref: '#/components/schemas/CreditGrantSortOrder' - name: dir in: query schema: $ref: '#/components/schemas/SortDirection' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: company_id: type: string dir: $ref: '#/components/schemas/SortDirection' limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' order: $ref: '#/components/schemas/CreditGrantSortOrder' title: CountCompanyGrantsParams required: - data - params title: CountCompanyGrantsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/grants/company/list: get: operationId: listCompanyGrants summary: List company grants tags: - credits parameters: - name: company_id in: query schema: type: string - name: order in: query schema: $ref: '#/components/schemas/CreditGrantSortOrder' - name: dir in: query schema: $ref: '#/components/schemas/SortDirection' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditGrantResponseData' title: ListCompanyGrantsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string dir: $ref: '#/components/schemas/SortDirection' limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' order: $ref: '#/components/schemas/CreditGrantSortOrder' title: ListCompanyGrantsParams required: - data - params title: ListCompanyGrantsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/grants/count: get: operationId: countBillingCreditsGrants summary: Count billing credits grants tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' title: CountBillingCreditsGrantsParams required: - data - params title: CountBillingCreditsGrantsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/grants/list: get: operationId: listGrantsForCredit summary: List grants for credit tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditGrantResponseData' title: ListGrantsForCreditResponseData maxItems: 250 params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' title: ListGrantsForCreditParams required: - data - params title: ListGrantsForCreditResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/ledger: get: operationId: getEnrichedCreditLedger summary: Get enriched credit ledger tags: - credits parameters: - name: company_id in: query required: true schema: type: string - name: billing_credit_id in: query schema: type: string - name: feature_id in: query schema: type: string - name: period in: query required: true schema: $ref: '#/components/schemas/CreditLedgerPeriod' - name: start_time in: query schema: type: string - name: end_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CreditLedgerEnrichedEntryResponseData' title: GetEnrichedCreditLedgerResponseData maxItems: 250 params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' period: $ref: '#/components/schemas/CreditLedgerPeriod' start_time: type: string title: GetEnrichedCreditLedgerParams required: - data - params title: GetEnrichedCreditLedgerResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/ledger/count: get: operationId: countCreditLedger summary: Count credit ledger tags: - credits parameters: - name: company_id in: query required: true schema: type: string - name: billing_credit_id in: query schema: type: string - name: feature_id in: query schema: type: string - name: period in: query required: true schema: $ref: '#/components/schemas/CreditLedgerPeriod' - name: start_time in: query schema: type: string - name: end_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' period: $ref: '#/components/schemas/CreditLedgerPeriod' start_time: type: string title: CountCreditLedgerParams required: - data - params title: CountCreditLedgerResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/plan-grants: get: operationId: listBillingPlanCreditGrants summary: List billing plan credit grants tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_id in: query schema: type: string - name: plan_ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_version_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' title: ListBillingPlanCreditGrantsResponseData maxItems: 250 params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_id: type: string plan_ids: type: array items: type: string maxItems: 100 plan_version_id: type: string title: ListBillingPlanCreditGrantsParams required: - data - params title: ListBillingPlanCreditGrantsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' post: operationId: createBillingPlanCreditGrant summary: Create billing plan credit grant tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingPlanCreditGrantRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' params: type: object description: Input parameters title: CreateBillingPlanCreditGrantParams required: - data - params title: CreateBillingPlanCreditGrantResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/plan-grants/{plan_grant_id}: get: operationId: getSingleBillingPlanCreditGrant summary: Get single billing plan credit grant tags: - credits parameters: - name: plan_grant_id in: path description: plan_grant_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' params: type: object description: Input parameters title: GetSingleBillingPlanCreditGrantParams required: - data - params title: GetSingleBillingPlanCreditGrantResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateBillingPlanCreditGrant summary: Update billing plan credit grant tags: - credits parameters: - name: plan_grant_id in: path description: plan_grant_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateBillingPlanCreditGrantRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' params: type: object description: Input parameters title: UpdateBillingPlanCreditGrantParams required: - data - params title: UpdateBillingPlanCreditGrantResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' delete: operationId: deleteBillingPlanCreditGrant summary: Delete billing plan credit grant tags: - credits parameters: - name: plan_grant_id in: path description: plan_grant_id required: true schema: type: string - name: apply_to_existing in: query schema: type: boolean responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters properties: apply_to_existing: type: boolean title: DeleteBillingPlanCreditGrantParams required: - data - params title: DeleteBillingPlanCreditGrantResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /billing/credits/plan-grants/count: get: operationId: countBillingPlanCreditGrants summary: Count billing plan credit grants tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_id in: query schema: type: string - name: plan_ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_version_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_id: type: string plan_ids: type: array items: type: string maxItems: 100 plan_version_id: type: string title: CountBillingPlanCreditGrantsParams required: - data - params title: CountBillingPlanCreditGrantsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /v2/billing/credits/ledger: get: operationId: listCreditEventLedger summary: List credit event ledger tags: - credits parameters: - name: billing_credit_id in: query schema: type: string - name: company_id in: query required: true schema: type: string - name: end_time in: query schema: type: string - name: event_type in: query schema: $ref: '#/components/schemas/CreditEventType' - name: feature_id in: query schema: type: string - name: start_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CreditEventLedgerResponseData' title: ListCreditEventLedgerResponseData maxItems: 250 params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string event_type: $ref: '#/components/schemas/CreditEventType' feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' start_time: type: string title: ListCreditEventLedgerParams required: - data - params title: ListCreditEventLedgerResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /v2/billing/credits/ledger/count: get: operationId: countCreditEventLedger summary: Count credit event ledger tags: - credits parameters: - name: billing_credit_id in: query schema: type: string - name: company_id in: query required: true schema: type: string - name: end_time in: query schema: type: string - name: event_type in: query schema: $ref: '#/components/schemas/CreditEventType' - name: feature_id in: query schema: type: string - name: start_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string event_type: $ref: '#/components/schemas/CreditEventType' feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' start_time: type: string title: CountCreditEventLedgerParams required: - data - params title: CountCreditEventLedgerResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' components: schemas: BillingCreditRolloverPolicy: type: string enum: - expire - none - rollover CreditCurrencyPriceResponseData: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: CreditCurrencyPriceResponseData BillingPriceScheme: type: string enum: - per_unit - tiered CreditTransferResponseData: type: object properties: amount: type: number created_at: type: string format: date-time direction: type: string id: type: string reason: type: string related_grant_id: type: string required: - amount - created_at - direction - id - reason - related_grant_id title: CreditTransferResponseData FeatureLedgerResponseData: type: object properties: description: type: string nullable: true icon: type: string nullable: true id: type: string name: type: string required: - id - name title: FeatureLedgerResponseData BillingCreditBundleStatus: type: string enum: - active - inactive BillingPlanCreditGrantResetStart: type: string enum: - billing_period - first_of_month ApiError: type: object properties: error: type: string description: Error message required: - error BillingCreditBundleType: type: string enum: - fixed BillingCreditExpiryUnit: type: string enum: - billing_periods - days CreditGrantSortOrder: type: string enum: - created_at - expires_at - quantity - quantity_remaining BillingCreditExpiryType: type: string enum: - duration - end_of_billing_period - end_of_next_billing_period - end_of_trial - no_expiry CreditBundleCurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 price_per_unit: type: integer format: int64 nullable: true minimum: 0 price_per_unit_decimal: type: string nullable: true required: - currency title: CreditBundleCurrencyPriceRequestBody BillingCreditBundleResponseData: type: object properties: billing_invoice_id: type: string nullable: true bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' created_at: type: string format: date-time credit_description: type: string credit_icon: type: string nullable: true credit_id: type: string credit_name: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPriceResponseData' maxItems: 256 expiry_type: $ref: '#/components/schemas/BillingCreditExpiryType' expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' expiry_unit_count: type: integer format: int64 nullable: true has_grants: type: boolean id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceResponseData' quantity: type: integer format: int64 nullable: true singular_name: type: string nullable: true status: $ref: '#/components/schemas/BillingCreditBundleStatus' unit_price: $ref: '#/components/schemas/BillingPriceResponseData' updated_at: type: string format: date-time required: - id - credit_id - name - status - bundle_type - expiry_unit - expiry_type - credit_name - currency_prices - has_grants - created_at - updated_at title: BillingCreditBundleResponseData BillingProviderType: type: string enum: - orb - schematic - stripe BillingCreditGrantReason: type: string enum: - adjustment - billing_credit_auto_topup - free - plan - purchased BillingCreditResponseData: type: object properties: burn_strategy: $ref: '#/components/schemas/BillingCreditBurnStrategy' cost_editable: type: boolean created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPriceResponseData' maxItems: 256 default_expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' default_expiry_unit_count: type: integer format: int64 nullable: true default_rollover_policy: $ref: '#/components/schemas/BillingCreditRolloverPolicy' description: type: string icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceResponseData' product: $ref: '#/components/schemas/BillingProductResponseData' singular_name: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - default_expiry_unit - default_rollover_policy - burn_strategy - cost_editable - currency_prices - created_at - updated_at title: BillingCreditResponseData CreditCurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 price_per_unit: type: integer format: int64 nullable: true minimum: 0 price_per_unit_decimal: type: string nullable: true required: - currency title: CreditCurrencyPriceRequestBody BillingPlanCreditGrantResetType: type: string enum: - no_reset - plan_period BillingPlanCreditGrantResetCadence: type: string enum: - daily - monthly - weekly - yearly UpdateCreditBundleDetailsRequestBody: type: object properties: bundle_name: type: string maxLength: 256 currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPriceRequestBody' nullable: true maxItems: 50 expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 price_per_unit: type: integer format: int64 minimum: 0 price_per_unit_decimal: type: string nullable: true quantity: type: integer format: int64 nullable: true minimum: 1 status: allOf: - $ref: '#/components/schemas/BillingCreditBundleStatus' nullable: true required: - bundle_name - price_per_unit title: UpdateCreditBundleDetailsRequestBody BillingCreditBurnStrategy: type: string enum: - expiration_priority - first_in_first_out - last_in_first_out - plan_first_then_credit_bundles_first_in_first_out CreditLedgerPeriod: type: string enum: - daily - monthly - raw - weekly BillingPriceResponseData: type: object properties: currency: type: string external_price_id: type: string id: type: string interval: $ref: '#/components/schemas/BillingProductPriceInterval' nickname: type: string nullable: true price: type: integer format: int64 price_decimal: type: string nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' scheme: $ref: '#/components/schemas/BillingPriceScheme' required: - currency - external_price_id - id - interval - price - provider_type - scheme title: BillingPriceResponseData BillingCreditLedgerResponseData: type: object properties: description: type: string nullable: true icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true singular_name: type: string nullable: true required: - id - name title: BillingCreditLedgerResponseData CreditEventType: type: string enum: - grant - transfer - usage - zero_out BillingCreditGrantResponseData: type: object properties: company_id: type: string company_name: type: string created_at: type: string format: date-time credit_icon: type: string nullable: true credit_id: type: string credit_name: type: string currency: type: string nullable: true expires_at: type: string format: date-time nullable: true grant_reason: $ref: '#/components/schemas/BillingCreditGrantReason' id: type: string plan_id: type: string nullable: true plan_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceResponseData' quantity: type: integer format: int64 quantity_remaining: type: number quantity_used: type: number renewal_enabled: type: boolean renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true source_label: type: string transfers: type: array items: $ref: '#/components/schemas/CreditTransferResponseData' maxItems: 1000 updated_at: type: string format: date-time valid_from: type: string format: date-time nullable: true zeroed_out_date: type: string format: date-time nullable: true zeroed_out_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true required: - id - quantity - quantity_remaining - quantity_used - company_id - company_name - credit_id - credit_name - source_label - created_at - updated_at - grant_reason - renewal_enabled title: BillingCreditGrantResponseData UpdateBillingPlanCreditGrantRequestBody: type: object properties: apply_to_existing: type: boolean nullable: true auto_topup_amount: type: integer format: int64 nullable: true minimum: 1 auto_topup_amount_type: allOf: - $ref: '#/components/schemas/CreditAutoTopupAmountType' nullable: true auto_topup_enabled: type: boolean nullable: true auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 auto_topup_threshold_credits: type: integer format: int64 nullable: true minimum: 0 auto_topup_threshold_percent: type: integer format: int64 nullable: true maximum: 100 minimum: 1 credit_amount: type: integer format: int64 nullable: true maximum: 9999999999 minimum: 0 expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 reset_cadence: $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' reset_start: $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true required: - reset_cadence - reset_start title: UpdateBillingPlanCreditGrantRequestBody BillingPlanCreditGrantResponseData: type: object properties: auto_topup_amount: type: integer format: int64 nullable: true auto_topup_amount_type: type: string nullable: true auto_topup_enabled: type: boolean auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true auto_topup_threshold_credits: type: integer format: int64 nullable: true auto_topup_threshold_percent: type: integer format: int64 nullable: true created_at: type: string format: date-time credit: $ref: '#/components/schemas/BillingCreditResponseData' credit_amount: type: integer format: int64 credit_id: type: string credit_name: type: string description: Use credit.name from the nested credit object instead deprecated: true credit_plural_name: type: string description: Use plural_name from the nested credit object instead nullable: true deprecated: true credit_singular_name: type: string description: Use singular_name from the nested credit object instead nullable: true deprecated: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true id: type: string plan: $ref: '#/components/schemas/PreviewObjectResponseData' plan_id: type: string plan_name: type: string description: Use plan.name from the nested plan object instead deprecated: true plan_version_id: type: string nullable: true reset_cadence: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reset_start: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true updated_at: type: string format: date-time required: - id - credit_id - plan_id - plan_name - credit_amount - credit_name - auto_topup_enabled - created_at - updated_at title: BillingPlanCreditGrantResponseData CreditAutoTopupAmountType: type: string enum: - credit DeleteResponse: type: object properties: deleted: type: boolean description: Whether the delete was successful CreateCompanyCreditGrant: type: object properties: billing_periods_count: type: integer format: int64 nullable: true minimum: 1 company_id: type: string credit_id: type: string currency: type: string nullable: true maxLength: 3 expires_at: type: string format: date-time nullable: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 quantity: type: integer format: int64 minimum: 1 reason: $ref: '#/components/schemas/BillingCreditGrantReason' renewal_enabled: type: boolean nullable: true renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true required: - company_id - credit_id - quantity - reason title: CreateCompanyCreditGrant CreditBundleCurrencyPriceResponseData: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: CreditBundleCurrencyPriceResponseData BillingCreditGrantZeroedOutReason: type: string enum: - expired - manual - plan_change - plan_period_reset CreateBillingPlanCreditGrantRequestBody: type: object properties: apply_to_existing: type: boolean nullable: true auto_topup_amount: type: integer format: int64 nullable: true minimum: 1 auto_topup_amount_type: allOf: - $ref: '#/components/schemas/CreditAutoTopupAmountType' nullable: true auto_topup_enabled: type: boolean nullable: true auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 auto_topup_threshold_credits: type: integer format: int64 nullable: true minimum: 0 auto_topup_threshold_percent: type: integer format: int64 nullable: true maximum: 100 minimum: 1 credit_amount: type: integer format: int64 maximum: 9999999999 minimum: 0 credit_id: type: string expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 plan_id: type: string plan_version_id: type: string nullable: true reset_cadence: $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' reset_start: $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true required: - reset_cadence - reset_start - credit_id - plan_id - credit_amount title: CreateBillingPlanCreditGrantRequestBody CreateCreditBundleRequestBody: type: object properties: bundle_name: type: string maxLength: 256 bundle_type: allOf: - $ref: '#/components/schemas/BillingCreditBundleType' nullable: true credit_id: type: string currency: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPriceRequestBody' nullable: true maxItems: 50 expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 price_per_unit: type: integer format: int64 minimum: 0 price_per_unit_decimal: type: string nullable: true quantity: type: integer format: int64 nullable: true minimum: 1 status: allOf: - $ref: '#/components/schemas/BillingCreditBundleStatus' nullable: true required: - credit_id - currency - bundle_name - price_per_unit title: CreateCreditBundleRequestBody CreateBillingCreditRequestBody: type: object properties: burn_strategy: allOf: - $ref: '#/components/schemas/BillingCreditBurnStrategy' nullable: true currency: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPriceRequestBody' nullable: true maxItems: 50 default_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true default_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 default_rollover_policy: allOf: - $ref: '#/components/schemas/BillingCreditRolloverPolicy' nullable: true description: type: string maxLength: 1024 icon: type: string nullable: true maxLength: 64 name: type: string maxLength: 255 per_unit_price: type: integer format: int64 nullable: true per_unit_price_decimal: type: string nullable: true plural_name: type: string nullable: true maxLength: 512 singular_name: type: string nullable: true maxLength: 512 required: - name - description - currency title: CreateBillingCreditRequestBody CompanyCreditBalanceResponseData: type: object properties: credit_id: type: string remaining: type: number source: $ref: '#/components/schemas/BillingProviderType' total: type: number nullable: true required: - credit_id - remaining - source title: CompanyCreditBalanceResponseData BillingProductPriceInterval: type: string enum: - day - month - one-time - year BillingProductResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time currency: type: string description: Deprecated; currencies are associated with prices, not products nullable: true deprecated: true environment_id: type: string external_id: type: string is_active: type: boolean name: type: string price: type: number price_decimal: type: string nullable: true product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number updated_at: type: string format: date-time required: - account_id - created_at - environment_id - external_id - is_active - name - price - product_id - provider_type - quantity - updated_at title: BillingProductResponseData SortDirection: type: string enum: - asc - desc CreditLedgerEnrichedEntryResponseData: type: object properties: billing_credit_auto_topup_grant_count: type: integer format: int64 billing_credit_id: type: string company: $ref: '#/components/schemas/CompanyLedgerResponseData' company_id: type: string credit: $ref: '#/components/schemas/BillingCreditLedgerResponseData' expired_grant_count: type: integer format: int64 feature: $ref: '#/components/schemas/FeatureLedgerResponseData' feature_id: type: string nullable: true first_transaction_at: type: string format: date-time free_grant_count: type: integer format: int64 grant_count: type: integer format: int64 last_transaction_at: type: string format: date-time manually_zeroed_count: type: integer format: int64 net_change: type: number plan_grant_count: type: integer format: int64 purchased_grant_count: type: integer format: int64 time_bucket: type: string format: date-time total_consumed: type: number total_granted: type: number transaction_count: type: integer format: int64 usage_count: type: integer format: int64 zeroed_out_count: type: integer format: int64 required: - company_id - billing_credit_id - time_bucket - total_granted - total_consumed - net_change - transaction_count - grant_count - usage_count - zeroed_out_count - first_transaction_at - last_transaction_at - billing_credit_auto_topup_grant_count - expired_grant_count - free_grant_count - manually_zeroed_count - plan_grant_count - purchased_grant_count title: CreditLedgerEnrichedEntryResponseData CountResponse: type: object properties: count: type: integer description: The number of resources CreditEventLedgerResponseData: type: object properties: amount: type: number auto_topup_log_id: type: string nullable: true billing_credit_bundle_id: type: string nullable: true billing_credit_id: type: string company: $ref: '#/components/schemas/CompanyLedgerResponseData' company_id: type: string credit: $ref: '#/components/schemas/BillingCreditLedgerResponseData' credit_name: type: string environment_id: type: string event_at: type: string format: date-time event_id: type: string event_type: $ref: '#/components/schemas/CreditEventType' expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true feature: $ref: '#/components/schemas/FeatureLedgerResponseData' feature_id: type: string nullable: true from_grant_id: type: string nullable: true grant_expires_at: type: string format: date-time nullable: true grant_id: type: string nullable: true grant_quantity: type: integer format: int64 nullable: true grant_quantity_remaining: type: number nullable: true grant_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantReason' nullable: true grant_valid_from: type: string format: date-time nullable: true plan_id: type: string nullable: true quantity_consumed: type: number nullable: true quantity_remaining_at_zero_out: type: number nullable: true source_id: type: integer format: int64 to_grant_id: type: string nullable: true usage_event_id: type: string nullable: true zeroed_out_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true required: - amount - credit_name - event_at - event_id - event_type - source_id - billing_credit_id - company_id - environment_id title: CreditEventLedgerResponseData PreviewObjectResponseData: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: PreviewObjectResponseData ZeroOutGrantRequestBody: type: object properties: reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true title: ZeroOutGrantRequestBody CompanyLedgerResponseData: type: object properties: id: type: string logo_url: type: string nullable: true name: type: string required: - id - name title: CompanyLedgerResponseData UpdateBillingCreditRequestBody: type: object properties: burn_strategy: allOf: - $ref: '#/components/schemas/BillingCreditBurnStrategy' nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPriceRequestBody' nullable: true maxItems: 50 default_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true default_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 default_rollover_policy: allOf: - $ref: '#/components/schemas/BillingCreditRolloverPolicy' nullable: true description: type: string maxLength: 1024 icon: type: string nullable: true maxLength: 64 name: type: string maxLength: 255 per_unit_price: type: integer format: int64 nullable: true minimum: 1 per_unit_price_decimal: type: string nullable: true plural_name: type: string nullable: true maxLength: 512 singular_name: type: string nullable: true maxLength: 512 required: - name - description title: UpdateBillingCreditRequestBody responses: Forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ApiError' ServerError: description: Server error content: application/json: schema: $ref: '#/components/schemas/ApiError' NotFound: description: Not found content: application/json: schema: $ref: '#/components/schemas/ApiError' Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ApiError' BadRequest: description: Bad request content: application/json: schema: $ref: '#/components/schemas/ApiError' securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Schematic-Api-Key