Skip to main content

public_apis.billing.app (0.1.0)

Download OpenAPI specification:Download

billing

Get Contract

query Parameters
project_id
required
string <uuid> (Project Id)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create Contract

Create a contract to be associated with a project_id

path Parameters
project_id
required
string <uuid> (Project Id)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update Contract

path Parameters
project_id
required
string <uuid> (Project Id)
Request Body schema: application/json
required
qpu_credits
number (Qpu Credits)
remaining_qpu_credits
number (Remaining Qpu Credits)
emu_credits
number (Emu Credits)
remaining_emu_credits
number (Remaining Emu Credits)
contract_end_date
string <date-time> (Contract End Date)
credit_update
number (Credit Update)
qpu_credit_update
number (Qpu Credit Update)
emu_credit_update
number (Emu Credit Update)

Responses

Request samples

Content type
application/json
{
  • "qpu_credits": 0,
  • "remaining_qpu_credits": 0,
  • "emu_credits": 0,
  • "remaining_emu_credits": 0,
  • "contract_end_date": "2019-08-24T14:15:22Z",
  • "credit_update": 0,
  • "qpu_credit_update": 0,
  • "emu_credit_update": 0
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Contract Usage

Create a contract to be associated with a project_id

path Parameters
project_id
required
string <uuid> (Project Id)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Deductions

query Parameters
job_id
string <uuid> (Job Id)

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "OK.",
  • "code": "200",
  • "data": [
    ],
  • "pagination": {
    }
}

Create Deduction

Get contract for an incoming project_id create a batch of soft deductions, ready for applied deduction later

Request Body schema: application/json
required
project_id
required
string <uuid> (Project Id)
batch_id
required
string <uuid> (Batch Id)
required
Array of objects (Deductions)

Responses

Request samples

Content type
application/json
{
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20",
  • "deductions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "OK.",
  • "code": "200",
  • "data": [
    ],
  • "pagination": {
    }
}

Apply Deduction

Request Body schema: application/json
required
job_id
required
string <uuid> (Job Id)
device_type
required
string (DeviceTypeName)
Enum: "EMU_FREE" "EMU_SV" "EMU_TN" "EMU_C" "FRESNEL" "EMU_FRESNEL"

Enumeration of allowed and legacy device type names

runs
integer (Runs)
project_id
required
string <uuid> (Project Id)
object (TimeUsage)
cancel_deduction
boolean (Cancel Deduction)
Default: false

Responses

Request samples

Content type
application/json
{
  • "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
  • "device_type": "EMU_FREE",
  • "runs": 0,
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "timestamps": {
    },
  • "cancel_deduction": false
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Cancel Deductions

path Parameters
project_id
required
string <uuid> (Project Id)
Request Body schema: application/json
required
jobs
required
Array of strings <uuid> (Jobs) [ items <uuid > ]

Responses

Request samples

Content type
application/json
{
  • "jobs": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get All Pricing

Get all Pricing entries from database.

Args: contract_id: Id of the contract pricing belongs to.

Returns: QueryManyResults[PricingModel]: a list of PricingModel entries.

query Parameters
contract_id
string <uuid> (Contract Id)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update Pricing

Request Body schema: application/json
required
id
required
string <uuid> (Id)
price
required
number (Price)
metric
required
string (PricingMetric)
Enum: "shot" "hour"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "price": 0,
  • "metric": "shot"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

deductions

Get Deductions

query Parameters
job_id
string <uuid> (Job Id)

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "OK.",
  • "code": "200",
  • "data": [
    ],
  • "pagination": {
    }
}

Create Deduction

Get contract for an incoming project_id create a batch of soft deductions, ready for applied deduction later

Request Body schema: application/json
required
project_id
required
string <uuid> (Project Id)
batch_id
required
string <uuid> (Batch Id)
required
Array of objects (Deductions)

Responses

Request samples

Content type
application/json
{
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20",
  • "deductions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "OK.",
  • "code": "200",
  • "data": [
    ],
  • "pagination": {
    }
}

Apply Deduction

Request Body schema: application/json
required
job_id
required
string <uuid> (Job Id)
device_type
required
string (DeviceTypeName)
Enum: "EMU_FREE" "EMU_SV" "EMU_TN" "EMU_C" "FRESNEL" "EMU_FRESNEL"

Enumeration of allowed and legacy device type names

runs
integer (Runs)
project_id
required
string <uuid> (Project Id)
object (TimeUsage)
cancel_deduction
boolean (Cancel Deduction)
Default: false

Responses

Request samples

Content type
application/json
{
  • "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
  • "device_type": "EMU_FREE",
  • "runs": 0,
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "timestamps": {
    },
  • "cancel_deduction": false
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Cancel Deductions

path Parameters
project_id
required
string <uuid> (Project Id)
Request Body schema: application/json
required
jobs
required
Array of strings <uuid> (Jobs) [ items <uuid > ]

Responses

Request samples

Content type
application/json
{
  • "jobs": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

health_check

Health Check

Ping health check endpoint. If the service responds with a HTTP status 200, the application should be running as expected.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Metrics Endpoint

Endpoint to expose the metrics.

Responses

Response samples

Content type
application/json
null