Xentral Credit API

Get information about your current current and monthly credits regarding Report usage.

OpenAPI Specification

xentral-credit-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Xentral Account Credit API
  version: v0.1
  description: Xentral is an ERP platform.
  contact:
    name: Xentral
    url: https://xentral.com
    email: api@xentral.com
servers:
- url: https://{xentralId}.xentral.biz
  description: Your Xentral Instance
  variables:
    xentralId:
      default: xentral
- url: https://{domain}
  description: Xentral at a custom domain
  variables:
    domain:
      default: xentral.com
security:
- BearerAuth: []
tags:
- name: Credit
  description: Get information about your current current and monthly credits regarding Report usage.
paths:
  /api/v1/analytics/credit:
    get:
      tags:
      - Credit
      operationId: analytics.credit.get
      summary: Get credit information
      description: Get credit information regarding Report module usage.
      responses:
        '200':
          description: Shows the amount of used credits for this month as well as the total amount of credits available
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - data
                example:
                  data:
                  - totalCredits: 30
                    usedCredits: 5
                properties:
                  data:
                    type: array
                    nullable: true
                    items:
                      type: object
                      additionalProperties: false
                      required:
                      - usedCredits
                      - totalCredits
                      properties:
                        totalCredits:
                          type: number
                          example: 1
                          description: Total amount of credits available
                        usedCredits:
                          type: number
                          example: 1
                          description: Amount of used credits for this month
        '400':
          description: Error response with message
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                - message
                properties:
                  message:
                    description: Error message
                    type: string
                    example: SQL statement is invalid
        '401':
          description: Unable to authenticate the client
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the request failed.
                    example: 'Missing required scopes: customer:create.'
              example:
                message: 'Missing required scopes: customer:create.'
            text/html:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Unable to authorize the client
        '404':
          description: Resource was not found or not enough access privileges
        '415':
          description: Resource representation send in the request is not supported.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained in POST /tokens endpoint or pregenerated in the system.
x-readme:
  samples-languages: []