List credits for an organization
GET
/organizations/{oid}/credits
const url = 'https://apisandbox.puurk.com/organizations/example/credits';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://apisandbox.puurk.com/organizations/example/credits \ --header 'Authorization: Bearer <token>'Returns the credits defined by an organization
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”oid
required
string
Organization ID
Responses
Section titled “Responses”Successful operation
Media typeapplication/json
Array<object>
object
id
string
oid
Organization ID
string
name
string
description
string
default_amount
Default credit amount in cents
integer
max_amount
Maximum credit amount in cents
integer
default_percentage
number
max_percentage
number
Examplegenerated
[ { "id": "example", "oid": "example", "name": "example", "description": "example", "default_amount": 1, "max_amount": 1, "default_percentage": 1, "max_percentage": 1 }]Unauthorized