Balance
Current account balance in US dollars. Purchasing a label deducts funds from this balance, which can be replenished in the dashboard or via a USDT top-up invoice through the API (POST /deposits).
GET /balance
- Key Permission:
balance:read - Key: test or live
Request example
curl https://api.shippickup.com/v1/balance \
-H "Authorization: Bearer $SHIPPICKUP_API_KEY"<?php
$ch = curl_init('https://api.shippickup.com/v1/balance');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SHIPPICKUP_API_KEY'),
],
]);
$response = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
print_r([$status, $response]);
import os
import requests
r = requests.get(
"https://api.shippickup.com/v1/balance",
headers={
"Authorization": "Bearer " + os.environ["SHIPPICKUP_API_KEY"],
},
timeout=30,
)
print(r.status_code, r.json())
const res = await fetch("https://api.shippickup.com/v1/balance", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.SHIPPICKUP_API_KEY}`,
},
});
console.log(res.status, await res.json());
Response example 200
JSON
{
"data": {
"currency": "USD",
"balance_cents": 124860,
"balance": "1248.60"
}
}Possible errors
| HTTP | Code | Description |
|---|---|---|
| 429 | rate_limited | Key request limit exceeded. Retry after the time specified in the Retry-After header. |