Get current account
curl --request GET \
--url https://api.interchange.io/api/v2/accounts/current \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/accounts/current"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/accounts/current', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 100,
"company": "Acme Inc",
"name": "Acme",
"customerDomain": "acme.com",
"role": "ADMIN",
"standing": {
"creditLimit": 500000,
"currency": "USD"
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Account
Get current account
Get the authenticated user’s current customer account context.
GET
/
accounts
/
current
Get current account
curl --request GET \
--url https://api.interchange.io/api/v2/accounts/current \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/accounts/current"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/accounts/current', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 100,
"company": "Acme Inc",
"name": "Acme",
"customerDomain": "acme.com",
"role": "ADMIN",
"standing": {
"creditLimit": 500000,
"currency": "USD"
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Response
Get current account
Current customer account context
Customer ID
Required range:
-9007199254740991 <= x <= 9007199254740991Example:
100
Company name
Example:
"Acme Inc"
Display name
Example:
"Acme"
Registered domain on the account
Example:
"acme.com"
User role on this customer
Example:
"ADMIN"
Customer standing (credit limit). ADMIN-only: present only when the caller is ADMIN or above; omitted otherwise.
Show child attributes
Show child attributes