Get Credits
GET
/api/v1/organisations/{organisation_id}/credits
const url = 'https://example.com/api/v1/organisations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/credits?include_expired=false&limit=100&offset=0&order_by=created_at&order_by_direction=ASC';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/organisations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/credits?include_expired=false&limit=100&offset=0&order_by=created_at&order_by_direction=ASC' \ --header 'Authorization: Bearer <token>'Returns a paginated list of an organisation's allocated credits.
Expired allocations are excluded unless include_expired is true.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”organisation_id
required
Organisation Id
string format: uuid
Query Parameters
Section titled “Query Parameters”backend_type
Any of:
BackendType
string
null
include_expired
Include Expired
boolean
limit
Limit
integer
offset
Offset
integer
order_by
Order By
string
order_by_direction
SortDirection
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
HeaderPaginatedResponse[ProducedOrganisationCreditResponse]
object
status
JSendStatus
string
message
Message
string
code
Code
string
data
required
Data
Array<object>
ProducedOrganisationCreditResponseA credit allocation with the part not yet assigned to projects.
object
id
required
Id
string format: uuid
amount
required
Amount
number
backend_type
required
BackendType
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
unassigned_credits
required
Unassigned Credits
number
pagination
required
JSendPagination
Pagination information
object
total
required
Total
integer
start
required
Start
integer
end
required
End
integer
Example
{ "status": "success", "message": "OK.", "code": "200", "data": [ { "backend_type": "QPU" } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}