List accounts (internal)
GET
/api/v1/account
const url = 'https://app.prefactorai.com/api/v1/account';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://app.prefactorai.com/api/v1/account \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”idempotency_key
sorting
Sort order; a field name, optionally prefixed with - for descending (e.g. -id). Supported fields: id, name.
string
Sort order; a field name, optionally prefixed with - for descending (e.g. -id). Supported fields: id, name.
pagination[offset]
integer
Zero-based offset of the first item to return.
pagination[page_size]
integer
Number of items to return per page (1-100).
Responses
Section titled “Responses”Success
Media typeapplication/json
object
pagination
required
One of:
PaginationOutput
Pagination information
object
item_count
required
The total number of items
integer
item_end
required
The index of the last item in the page (one-based)
integer
item_start
required
The index of the first item in the page (one-based)
integer
next_page_offset
required
page_count
required
The total number of pages
integer
page_index
required
The index of the current page (one-based)
integer
page_offset
required
The offset of the first item in the page (zero-based)
integer
page_size
required
The number of items per page
integer
Null
Null
string
sorting
required
status
required
string
summaries
required
Array<object>
Account_Summaryobject
id
required
Account_Id
A valid account ID
string
name
required
Account name
string
type
required
Type of resource (always ‘account’)
string
Example
{ "pagination": { "item_count": 200, "item_end": 100, "item_start": 91, "next_page_offset": 110, "page_count": 20, "page_index": 10, "page_offset": 90, "page_size": 10, "previous_page_offset": 80 }, "sorting": null, "status": "success", "summaries": [ { "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "name": "My Account", "type": "account" } ]}default
Section titled “default”Error
Media typeapplication/json
One of:
object
code
required
string
message
required
string
status
required
string
object
code
required
string
errors
required
object
key
additional properties
object recursive
message
required
string
status
required
string
object
code
required
string
message
required
string
retry_after_ms
required
Milliseconds until the client may retry.
integer
status
required
string
Example
{ "code": "bad_request", "status": "error"}