REST API v3
Refills
Request a refill on a finished order and follow it until it completes or is rejected.
The refill object
A request to restore units that dropped after an order finished.
Before you request one, order.refill.available and order.refill.reason tell you whether it would be accepted. The rules are in Refills and cancellations.
idintegeraction=refill returns.objectstringrefill.refillorderintegerstatusstringpending → in_progress → completed, or rejected when there was nothing to restore.pendingin_progresscompletedrejecteddroppedintegerrestoredintegerreasonstring or nullsourcestringAPI v2, API v3 or the API playground.created_atISO 8601 stringstarted_atISO 8601 string or nullcompleted_atISO 8601 string or null{
"id": 9038,
"object": "refill",
"order": 184607,
"status": "pending",
"dropped": 15,
"restored": 0,
"reason": null,
"source": "API v3",
"created_at": "2026-11-15T23:52:10.776Z",
"started_at": null,
"completed_at": null
}Request a refill
/api/v3/orders/{id}/refillsAsks us to restore units that dropped since the order finished. Only for services with a refill window, one request per 24 hours per order.
Needs the refills:write scope (request refills). About scopes
Path parameters
idintegerRequest
curl -X POST https://ultrasmm.io/api/v3/orders/184607/refills \
-H 'Authorization: Bearer tk_live_your_key_here'<?php
$ch = curl_init('https://ultrasmm.io/api/v3/orders/184607/refills');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer tk_live_your_key_here',
],
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
// $body['error']['code'] is stable; switch on it.
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body);import requests
res = requests.post(
"https://ultrasmm.io/api/v3/orders/184607/refills",
headers={
"Authorization": "Bearer tk_live_your_key_here",
},
timeout=30,
)
body = res.json()
if not res.ok:
# body["error"]["code"] is stable; switch on it.
raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]}')
print(body)const res = await fetch("https://ultrasmm.io/api/v3/orders/184607/refills", {
method: "POST",
headers: {
Authorization: "Bearer tk_live_your_key_here",
},
})
const body = await res.json()
if (!res.ok) {
// body.error.code is stable; switch on it.
throw new Error(`${body.error.code}: ${body.error.message}`)
}
console.log(body)Response
201 with the refill object.
{
"id": 9038,
"object": "refill",
"order": 184607,
"status": "pending",
"dropped": 15,
"restored": 0,
"reason": null,
"source": "API v3",
"created_at": "2026-11-15T23:52:10.776Z",
"started_at": null,
"completed_at": null
}Errors
Plus the errors every endpoint can return.
List refills for an order
/api/v3/orders/{id}/refillsEvery refill requested on one order, newest first.
Needs the orders:read scope (read orders and services). About scopes
Path parameters
idintegerRequest
curl https://ultrasmm.io/api/v3/orders/184607/refills \
-H 'Authorization: Bearer tk_live_your_key_here'<?php
$ch = curl_init('https://ultrasmm.io/api/v3/orders/184607/refills');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer tk_live_your_key_here',
],
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
// $body['error']['code'] is stable; switch on it.
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body);import requests
res = requests.get(
"https://ultrasmm.io/api/v3/orders/184607/refills",
headers={
"Authorization": "Bearer tk_live_your_key_here",
},
timeout=30,
)
body = res.json()
if not res.ok:
# body["error"]["code"] is stable; switch on it.
raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]}')
print(body)const res = await fetch("https://ultrasmm.io/api/v3/orders/184607/refills", {
headers: {
Authorization: "Bearer tk_live_your_key_here",
},
})
const body = await res.json()
if (!res.ok) {
// body.error.code is stable; switch on it.
throw new Error(`${body.error.code}: ${body.error.message}`)
}
console.log(body)Response
200 with a list of refill objects.
{
"object": "list",
"order": 184607,
"data": [
{
"id": 9038,
"object": "refill",
"order": 184607,
"status": "pending",
"dropped": 15,
"restored": 0,
"reason": null,
"source": "API v3",
"created_at": "2026-11-15T23:52:10.776Z",
"started_at": null,
"completed_at": null
}
]
}Errors
Plus the errors every endpoint can return.
Retrieve a refill
/api/v3/refills/{id}One refill and its progress.
Needs the orders:read scope (read orders and services). About scopes
Path parameters
idintegerRequest
curl https://ultrasmm.io/api/v3/refills/9038 \
-H 'Authorization: Bearer tk_live_your_key_here'<?php
$ch = curl_init('https://ultrasmm.io/api/v3/refills/9038');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer tk_live_your_key_here',
],
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
// $body['error']['code'] is stable; switch on it.
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body);import requests
res = requests.get(
"https://ultrasmm.io/api/v3/refills/9038",
headers={
"Authorization": "Bearer tk_live_your_key_here",
},
timeout=30,
)
body = res.json()
if not res.ok:
# body["error"]["code"] is stable; switch on it.
raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]}')
print(body)const res = await fetch("https://ultrasmm.io/api/v3/refills/9038", {
headers: {
Authorization: "Bearer tk_live_your_key_here",
},
})
const body = await res.json()
if (!res.ok) {
// body.error.code is stable; switch on it.
throw new Error(`${body.error.code}: ${body.error.message}`)
}
console.log(body)Response
200 with the refill object.
{
"id": 9038,
"object": "refill",
"order": 184607,
"status": "pending",
"dropped": 15,
"restored": 0,
"reason": null,
"source": "API v3",
"created_at": "2026-11-15T23:52:10.776Z",
"started_at": null,
"completed_at": null
}Errors
Plus the errors every endpoint can return.
Something unclear or out of date? Write to [email protected] and quote the page.