R Relay Docs
API v1 · Public reference

Build reliable logistics workflows with Relay.

Production contracts, secure authentication patterns and practical examples for tenant integrations.

Base URLhttps://api.relay.techminemw.com/api/v1
01 · Start

Quickstart

Check service health, authenticate a tenant user and send the bearer token with subsequent requests. Relay returns an X-Correlation-ID on every response.

curl https://api.relay.techminemw.com/api/v1/health

curl -X POST https://api.relay.techminemw.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com","password":"…","device_name":"integration"}'
02 · Identity

Authentication

Protected endpoints use scoped bearer tokens. Store tokens server-side or in platform secure storage, revoke them on logout and never place credentials in URLs or logs.

Authorization: Bearer <access-token>
Accept: application/json
X-Correlation-ID: your-request-id
03 · Context

Tenant and branch context

Relay resolves a user’s tenant from authenticated membership. Clients cannot assign arbitrary tenant IDs. Authorized multi-tenant users may select a membership using X-Tenant-ID; branch scope remains permission-controlled.

04 · Reliability

Idempotency

Commands that create external side effects require stable idempotency identifiers. Reuse the same identifier when retrying an uncertain request; never generate a new identifier for the same business action.

{
  "idempotency_key": "3a531b34-0e4f-4a60-a94c-5024c5c37930",
  "method": "mobile_money"
}
05 · Collections

Pagination and filtering

Collection endpoints accept page and per_page (maximum 100). Resource-specific filters use explicit query parameters documented in the OpenAPI contract.

06 · Recovery

Consistent errors

Use HTTP status codes to choose recovery behavior: 401 re-authenticates, 403 requests permission, 409 refreshes stale state and 422 presents field-level validation feedback. Retain the response correlation ID for support.

07 · Events

Webhook verification

Read the raw request body, verify the HMAC signature using the endpoint secret, reject stale delivery timestamps and persist event IDs before applying changes. Successful handlers must be idempotent.

// PHP
$expected = hash_hmac('sha256', $rawBody, $signingSecret);
if (! hash_equals($expected, $signature)) {
    http_response_code(401);
}
08 · Languages

Request examples

PHPHttp::withToken($token)->get($url);
TypeScriptfetch(url, { headers });
Dartdio.get('/shipments');