public_apis.billing.app (0.1.0)
Download OpenAPI specification:Download
Response samples
- 200
- 422
Content type
application/json
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
- "created_at": "2019-08-24T14:15:22Z",
- "contract_end_date": "2019-08-24T14:15:22Z",
- "total_credits": 0,
- "remaining_credits": 0,
- "qpu_credits": 0,
- "remaining_qpu_credits": 0,
- "remaining_qpu_units": 0,
- "emu_credits": 0,
- "remaining_emu_credits": 0,
- "remaining_emu_units": 0,
- "qpu_pricing": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metric": "shot",
- "price": 0
}, - "emulator_pricing": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "metric": "shot",
- "price": 0
}
}
}
Update Contract
path Parameters
project_id required | string <uuid> (Project Id) |
Request Body schema: application/jsonrequired
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
- Payload
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
- 200
- 422
Content type
application/json
{- "data": [
- { }
]
}
Response samples
- 200
- 422
Content type
application/json
{- "status": "success",
- "message": "OK.",
- "code": "200",
- "data": [
- {
- "consumed_credits": 0,
- "deduction_status": "SOFT_DEDUCTION",
- "is_qpu": true,
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "pagination": {
- "total": 0,
- "start": 0,
- "end": 0
}
}
Create Deduction
Get contract for an incoming project_id create a batch of soft deductions, ready for applied deduction later
Request Body schema: application/jsonrequired
project_id required | string <uuid> (Project Id) |
batch_id required | string <uuid> (Batch Id) |
required | Array of objects (Deductions) |
Responses
Request samples
- Payload
Content type
application/json
{- "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
- "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20",
- "deductions": [
- {
- "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
- "device_type": "EMU_FREE",
- "runs": 0
}
]
}
Response samples
- 200
- 422
Content type
application/json
{- "status": "success",
- "message": "OK.",
- "code": "200",
- "data": [
- {
- "consumed_credits": 0,
- "deduction_status": "SOFT_DEDUCTION",
- "is_qpu": true,
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "pagination": {
- "total": 0,
- "start": 0,
- "end": 0
}
}
Apply Deduction
Request Body schema: application/jsonrequired
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
- Payload
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": {
- "start_timestamp": "2019-08-24T14:15:22Z",
- "end_timestamp": "2019-08-24T14:15:22Z"
}, - "cancel_deduction": false
}
Response samples
- 200
- 422
Content type
application/json
{- "data": [
- { }
]
}
Cancel Deductions
path Parameters
project_id required | string <uuid> (Project Id) |
Request Body schema: application/jsonrequired
jobs required | Array of strings <uuid> (Jobs) [ items <uuid > ] |
Responses
Request samples
- Payload
Content type
application/json
{- "jobs": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
Response samples
- 200
- 422
Content type
application/json
{- "data": {
- "errors": {
- "property1": "string",
- "property2": "string"
}, - "success": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
}
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
- 200
- 422
Content type
application/json
{- "data": [
- { }
]
}
Update Pricing
Request Body schema: application/jsonrequired
id required | string <uuid> (Id) |
price required | number (Price) |
metric required | string (PricingMetric) Enum: "shot" "hour" An enumeration. |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "price": 0,
- "metric": "shot"
}
Response samples
- 200
- 422
Content type
application/json
{- "data": [
- { }
]
}
Response samples
- 200
- 422
Content type
application/json
{- "status": "success",
- "message": "OK.",
- "code": "200",
- "data": [
- {
- "consumed_credits": 0,
- "deduction_status": "SOFT_DEDUCTION",
- "is_qpu": true,
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "pagination": {
- "total": 0,
- "start": 0,
- "end": 0
}
}
Create Deduction
Get contract for an incoming project_id create a batch of soft deductions, ready for applied deduction later
Request Body schema: application/jsonrequired
project_id required | string <uuid> (Project Id) |
batch_id required | string <uuid> (Batch Id) |
required | Array of objects (Deductions) |
Responses
Request samples
- Payload
Content type
application/json
{- "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
- "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20",
- "deductions": [
- {
- "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
- "device_type": "EMU_FREE",
- "runs": 0
}
]
}
Response samples
- 200
- 422
Content type
application/json
{- "status": "success",
- "message": "OK.",
- "code": "200",
- "data": [
- {
- "consumed_credits": 0,
- "deduction_status": "SOFT_DEDUCTION",
- "is_qpu": true,
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "pagination": {
- "total": 0,
- "start": 0,
- "end": 0
}
}
Apply Deduction
Request Body schema: application/jsonrequired
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
- Payload
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": {
- "start_timestamp": "2019-08-24T14:15:22Z",
- "end_timestamp": "2019-08-24T14:15:22Z"
}, - "cancel_deduction": false
}
Response samples
- 200
- 422
Content type
application/json
{- "data": [
- { }
]
}
Cancel Deductions
path Parameters
project_id required | string <uuid> (Project Id) |
Request Body schema: application/jsonrequired
jobs required | Array of strings <uuid> (Jobs) [ items <uuid > ] |
Responses
Request samples
- Payload
Content type
application/json
{- "jobs": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
Response samples
- 200
- 422
Content type
application/json
{- "data": {
- "errors": {
- "property1": "string",
- "property2": "string"
}, - "success": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
}