zplflow logo

Installation

1. Sign Up

Create an account at the Admin UI.

2. Get Your API Key

  1. Log in to the Admin UI
  2. Navigate to API Keys
  3. Click Create Key, give it a label
  4. Copy the key immediately — it is shown only once

Keys are prefixed lb_live_ for production and lb_test_ for testing.

3. Make Your First Request

curl -H "Authorization: Bearer lb_live_YOUR_KEY" \
  https://api.zplflow/v1/account/balance

Python

import requests

resp = requests.get(
    "https://api.zplflow/v1/account/balance",
    headers={"Authorization": "Bearer lb_live_YOUR_KEY"}
)
data = resp.json()
print(f"Balance: {data['balance']}")

Go

package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://api.zplflow/v1/account/balance", nil)
    req.Header.Set("Authorization", "Bearer lb_live_YOUR_KEY")
    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    var data struct {
        Balance  int `json:"balance"`
        Reserved int `json:"reserved"`
    }
    json.NewDecoder(resp.Body).Decode(&data)
    fmt.Printf("Balance: %d\n", data.Balance)
}

PHP

<?php
$ch = curl_init("https://api.zplflow/v1/account/balance");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer lb_live_YOUR_KEY"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
echo "Balance: {$data['balance']}\n";

AS400 / SQL Native (IBM i)

SELECT SYSTOOLS.HTTPGETCLOB(
    'https://api.zplflow/v1/account/balance',
    NULL,
    '{"Authorization":"Bearer lb_live_YOUR_KEY"}'
) AS response
FROM SYSIBM.SYSDUMMY1;

AS400 / HTTPAPI (RPG)

dcl-s response varchar(32000);
dcl-s rc int(10);

rc = http_req('GET'
    : 'https://api.zplflow/v1/account/balance'
    : *null
    : %trim(response)
    : 'Authorization: Bearer lb_live_YOUR_KEY'
    : *null
    : *null
    : 30000
    : *null);

AS400 / IWS

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <http:request xmlns:http="http://www.ibm.com/xmlns/prod/websphere/http">
      <http:method>GET</http:method>
      <http:url>https://api.zplflow/v1/account/balance</http:url>
      <http:header name="Authorization" value="Bearer lb_live_YOUR_KEY"/>
    </http:request>
  </soapenv:Body>
</soapenv:Envelope>

Response:

{
  "tenant_id": "your-company",
  "balance": 10000,
  "reserved": 0
}

4. Set Up in Production

Add the API key to your environment:

LABELOPS_API_KEY=lb_live_YOUR_KEY

Security notes:

  • Never expose the API key in client-side code
  • Rotate keys periodically from the dashboard
  • Use different keys for development and production

Next Steps