Code examples
Start from the same verified HTTPS + bearer-token contract in the language your integration service uses.
Verified behavior
- Examples use the slabs read endpoint because it is safe to demonstrate without inventing a write payload
- Keep the operational token on a trusted server
- Retain filters while following next_after_id for pagination
- Writes additionally require Content-Type application/json and a stable UUID Idempotency-Key
cURL
curl 'https://your-company.example/api/slab/v1/operations/slabs?per_page=30' -H 'Authorization: Bearer YOUR_OPERATIONAL_TOKEN' -H 'Accept: application/json'
JavaScript (server-side)
const response = await fetch('https://your-company.example/api/slab/v1/operations/slabs?per_page=30', {
headers: {
Authorization: 'Bearer ' + process.env.STONEWARE_TOKEN,
Accept: 'application/json'
}
});
const payload = await response.json();PHP
$ch = curl_init('https://your-company.example/api/slab/v1/operations/slabs?per_page=30');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('STONEWARE_TOKEN'),
'Accept: application/json'
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);Python
import os, requests
response = requests.get(
'https://your-company.example/api/slab/v1/operations/slabs',
params={'per_page': 30},
headers={
'Authorization': f"Bearer {os.environ['STONEWARE_TOKEN']}",
'Accept': 'application/json',
},
timeout=30,
)
payload = response.json()C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));
var response = await client.GetAsync(
"https://your-company.example/api/slab/v1/operations/slabs?per_page=30");Important
All example hostnames, IDs and tokens are placeholders. Test against staging first. The installed runtime services and exact OpenAPI contract remain authoritative for state transitions, nested schemas and additional permission checks.