Rylix Fleet API

Create deliveries from your own website, POS or ERP, follow them, and receive a signed webhook each time an order's status changes. For stores and partners that are not on Shopify.

This documentation is in English. An Arabic version is planned.

Getting started

The business owner creates an API key in the Rylix dashboard: Settings > Developers. Choose only the scopes the integration needs. The key is shown once.

Call the API from your server over HTTPS. Never put a key in a browser, a mobile app or a public repository. Revoke a key in Settings > Developers as soon as it may have leaked.

Every request and answer is JSON. Times are ISO 8601 in UTC; amounts are decimal strings.

Base URL
https://connect.rylixfleet.com

Authentication and scopes

Send the key in the Authorization header: Authorization: Bearer rxk_… . A missing, malformed, unknown or revoked key answers 401. A key without the scope an operation needs answers 403 insufficient_scope. While a business is suspended every write answers 403 suspended, and while it is read-only every write answers 403 read_only; reads keep working in both.

ScopeAllows
orders:readList orders, read one order, its status and tracking link.
orders:writeCreate and cancel orders.
locations:readList pickup locations.
locations:writeAdd pickup locations.
webhooks:manageList, register, change and delete webhook endpoints, send test events and read the option catalog.

Rate limits

Each key may make 120 requests per minute. Every answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds). Over the limit the API answers 429 rate_limited with Retry-After.

Errors

Every error has the same shape. `code` is stable and safe to branch on; `message` is for people; `fields` names the request fields that were refused; `requestId` (also in the Request-Id header) helps Rylix support find the request.

JSON
{
  "error": {
    "code": "invalid_request",
    "message": "The request is not valid. See `fields` for details.",
    "fields": {
      "customer.phone": "invalid"
    },
    "requestId": "req_3kTq0yXzv1n5aB2c"
  }
}
CodeHTTPMeaning
invalid_request400A field or filter is missing or not valid; see fields.
unauthorized401No valid API key.
insufficient_scope403The key lacks the scope; fields.scope names it.
feature_off403The developer API is not on the business's plan.
suspended403The business is suspended: writes are refused.
read_only403The business is read-only: writes are refused, reads keep working.
plan_limit403The plan allows no more orders now.
not_found404No such resource in this business.
method_not_allowed405The path does not take this method.
duplicate_reference409An order with this reference exists.
client_paused422Delivery agencies: the client is paused and takes no new orders.
not_served422Delivery agencies: the client's rate card does not serve this order.
invalid_state409The order is already finished.
idempotency_in_progress409The first request with this key is still running.
idempotency_key_reused422The key was used with a different request.
rate_limited429Too many requests; retry after Retry-After seconds.
internal_error500A problem on our side; retry later.

Idempotency

Send an Idempotency-Key header (a UUID) with every POST. If the network fails, send the same request with the same key: you get the first answer back, with Idempotent-Replayed: true, and nothing is done twice. A key is kept 24 hours. Reusing it with a different body answers 422.

Pagination

Lists are newest first. Ask for up to 100 items with limit (25 by default). When hasMore is true, pass nextCursor as cursor to get the next page.

Order statuses

Orders use these public statuses. pending: waiting for a driver. assigned: a driver holds it before pickup. picked_up, on_the_way, arrived: on its way to the customer. delivered, failed, returned, cancelled: finished. returning: being brought back to the store.

Endpoints

GET /api/v1/orders

List orders

Newest first. Cursor pagination: pass `nextCursor` as `cursor`.

Scope: orders:read

Parameters
NameInAbout
statusqueryComma-separated statuses: pending, assigned, picked_up, on_the_way, arrived, delivered, failed, returning, returned, cancelled.
created_fromqueryISO 8601 date-time, or YYYY-MM-DD (a calendar day in the business's time zone).
created_toqueryISO 8601 date-time (inclusive), or YYYY-MM-DD (the whole day).
referencequeryYour own order reference, exact match.
limitquery
cursorquery
curl
curl -X GET "https://connect.rylixfleet.com/api/v1/orders" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/orders", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "object": "list",
  "data": [
    {
      "id": "cm4w5r2xk0001s8z0a1b2c3d4",
      "object": "order",
      "reference": "WEB-10042",
      "orderName": "WEB-10042",
      "trackingNumber": "RX1234567",
      "trackingUrl": "https://track.rylixfleet.com/t/Zx8k2mQ4pL9vB7nR",
      "status": "pending",
      "kind": "delivery",
      "source": "api",
      "customer": {
        "name": "Rana Haddad",
        "phone": "+96170123456"
      },
      "address": {
        "text": "Hamra St, Bldg 12, 3rd floor",
        "lat": 33.8959,
        "lng": 35.4787
      },
      "pickupLocationId": "cm4w5q9yz0000s8z0l0c4t1on",
      "note": "Call on arrival",
      "cashOnDelivery": {
        "amount": "25.00",
        "currency": "USD"
      },
      "items": [
        {
          "title": "Running shoes",
          "quantity": 1,
          "unitPrice": "25.00"
        }
      ],
      "pieces": 1,
      "failureCategory": null,
      "etaMinutes": null,
      "createdAt": "2026-11-29T09:30:00.000Z",
      "updatedAt": "2026-11-29T09:30:00.000Z",
      "terminalAt": null,
      "rescheduled": {
        "active": false,
        "until": null,
        "count": 0,
        "lastAt": null
      }
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Answers: 200 A page of orders. · 400 A filter is not valid. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 429 Rate limit reached for this key.

POST /api/v1/orders

Create an order

Creates a delivery exactly as the dashboard's order form does: the customer is saved, dispatch starts at once. Coordinates are required. Without `pickupLocationId` the business's default pickup location is used.

Scope: orders:write

Parameters
NameInAbout
Idempotency-KeyheaderAny unique string (a UUID). Replaying the same request with the same key returns the first answer without doing anything again. Kept 24 hours.
curl
curl -X POST "https://connect.rylixfleet.com/api/v1/orders" \
  -H "Authorization: Bearer $RYLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"reference":"WEB-10042","customer":{"name":"Rana Haddad","phone":"+96170123456"},"address":{"text":"Hamra St, Bldg 12, 3rd floor","lat":33.8959,"lng":35.4787},"cashOnDelivery":{"amount":"25.00","currency":"USD"},"note":"Call on arrival","items":[{"title":"Running shoes","quantity":1,"unitPrice":"25.00"}]}'
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/orders", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "reference": "WEB-10042",
    "customer": {
      "name": "Rana Haddad",
      "phone": "+96170123456"
    },
    "address": {
      "text": "Hamra St, Bldg 12, 3rd floor",
      "lat": 33.8959,
      "lng": 35.4787
    },
    "cashOnDelivery": {
      "amount": "25.00",
      "currency": "USD"
    },
    "note": "Call on arrival",
    "items": [
      {
        "title": "Running shoes",
        "quantity": 1,
        "unitPrice": "25.00"
      }
    ]
  }),
});
const data = await response.json();

Answers: 200 An earlier request with the same Idempotency-Key created this order. · 201 The order was created. · 400 A field is missing or not valid (see `fields`). · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 409 An order with this reference exists. · 422 The Idempotency-Key was used with another request (idempotency_key_reused), the pickup location is inactive (location_inactive), or — delivery agencies — the client is paused (client_paused) or its rate card does not serve the order (not_served, with `fields.reason`). · 429 Rate limit reached for this key.

GET /api/v1/orders/{id}

Get an order

Scope: orders:read

Parameters
NameInAbout
id (required)pathThe order id.
curl
curl -X GET "https://connect.rylixfleet.com/api/v1/orders/cm4w5r2xk0001s8z0a1b2c3d4" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/orders/cm4w5r2xk0001s8z0a1b2c3d4", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "id": "cm4w5r2xk0001s8z0a1b2c3d4",
  "object": "order",
  "reference": "WEB-10042",
  "orderName": "WEB-10042",
  "trackingNumber": "RX1234567",
  "trackingUrl": "https://track.rylixfleet.com/t/Zx8k2mQ4pL9vB7nR",
  "status": "pending",
  "kind": "delivery",
  "source": "api",
  "customer": {
    "name": "Rana Haddad",
    "phone": "+96170123456"
  },
  "address": {
    "text": "Hamra St, Bldg 12, 3rd floor",
    "lat": 33.8959,
    "lng": 35.4787
  },
  "pickupLocationId": "cm4w5q9yz0000s8z0l0c4t1on",
  "note": "Call on arrival",
  "cashOnDelivery": {
    "amount": "25.00",
    "currency": "USD"
  },
  "items": [
    {
      "title": "Running shoes",
      "quantity": 1,
      "unitPrice": "25.00"
    }
  ],
  "pieces": 1,
  "failureCategory": null,
  "etaMinutes": null,
  "createdAt": "2026-11-29T09:30:00.000Z",
  "updatedAt": "2026-11-29T09:30:00.000Z",
  "terminalAt": null,
  "rescheduled": {
    "active": false,
    "until": null,
    "count": 0,
    "lastAt": null
  }
}

Answers: 200 The order. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such order in this business. · 429 Rate limit reached for this key.

POST /api/v1/orders/{id}/cancel

Cancel an order

Cancels an order that is not delivered, failed, returned or cancelled yet.

Scope: orders:write

Parameters
NameInAbout
id (required)pathThe order id.
Idempotency-KeyheaderAny unique string (a UUID). Replaying the same request with the same key returns the first answer without doing anything again. Kept 24 hours.
curl
curl -X POST "https://connect.rylixfleet.com/api/v1/orders/cm4w5r2xk0001s8z0a1b2c3d4/cancel" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/orders/cm4w5r2xk0001s8z0a1b2c3d4/cancel", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "id": "cm4w5r2xk0001s8z0a1b2c3d4",
  "object": "order",
  "reference": "WEB-10042",
  "orderName": "WEB-10042",
  "trackingNumber": "RX1234567",
  "trackingUrl": "https://track.rylixfleet.com/t/Zx8k2mQ4pL9vB7nR",
  "status": "cancelled",
  "kind": "delivery",
  "source": "api",
  "customer": {
    "name": "Rana Haddad",
    "phone": "+96170123456"
  },
  "address": {
    "text": "Hamra St, Bldg 12, 3rd floor",
    "lat": 33.8959,
    "lng": 35.4787
  },
  "pickupLocationId": "cm4w5q9yz0000s8z0l0c4t1on",
  "note": "Call on arrival",
  "cashOnDelivery": {
    "amount": "25.00",
    "currency": "USD"
  },
  "items": [
    {
      "title": "Running shoes",
      "quantity": 1,
      "unitPrice": "25.00"
    }
  ],
  "pieces": 1,
  "failureCategory": null,
  "etaMinutes": null,
  "createdAt": "2026-11-29T09:30:00.000Z",
  "updatedAt": "2026-11-29T09:30:00.000Z",
  "terminalAt": null,
  "rescheduled": {
    "active": false,
    "until": null,
    "count": 0,
    "lastAt": null
  }
}

Answers: 200 The cancelled order. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such order in this business. · 409 The order is already finished. · 429 Rate limit reached for this key.

GET /api/v1/orders/{id}/tracking

Order status and tracking link

Scope: orders:read

Parameters
NameInAbout
id (required)pathThe order id.
curl
curl -X GET "https://connect.rylixfleet.com/api/v1/orders/cm4w5r2xk0001s8z0a1b2c3d4/tracking" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/orders/cm4w5r2xk0001s8z0a1b2c3d4/tracking", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "id": "cm4w5r2xk0001s8z0a1b2c3d4",
  "object": "tracking",
  "status": "on_the_way",
  "trackingNumber": "RX1234567",
  "trackingUrl": "https://track.rylixfleet.com/t/Zx8k2mQ4pL9vB7nR",
  "etaMinutes": 12,
  "failureCategory": null,
  "updatedAt": "2026-11-29T10:05:00.000Z",
  "events": [
    {
      "type": "order.created",
      "at": "2026-11-29T09:30:00.000Z"
    },
    {
      "type": "order.assigned",
      "at": "2026-11-29T09:31:10.000Z"
    },
    {
      "type": "order.picked_up",
      "at": "2026-11-29T09:52:40.000Z"
    },
    {
      "type": "order.on_the_way",
      "at": "2026-11-29T09:53:00.000Z"
    }
  ]
}

Answers: 200 The status, the customer's tracking link and the status timeline. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such order in this business. · 429 Rate limit reached for this key.

GET /api/v1/locations

List pickup locations

Scope: locations:read

curl
curl -X GET "https://connect.rylixfleet.com/api/v1/locations" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/locations", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "object": "list",
  "data": [
    {
      "id": "cm4w5q9yz0000s8z0l0c4t1on",
      "object": "location",
      "name": "Main store",
      "address": "Mar Mikhael, Armenia St",
      "lat": 33.8969,
      "lng": 35.5226,
      "isDefault": true,
      "kind": "branch",
      "active": true,
      "phone": "+9611234567",
      "hours": {
        "week": {
          "mon": [
            [
              "09:00",
              "23:00"
            ]
          ]
        }
      },
      "parentBranchId": null,
      "createdAt": "2026-11-01T08:00:00.000Z"
    }
  ]
}

Answers: 200 Every pickup location of the business. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 429 Rate limit reached for this key.

POST /api/v1/locations

Create a pickup location

The business's first location becomes its default, so it must be an active branch. Branch fields (`kind`, `active`, `phone`, `hours`, `parentBranchId`) are optional: without them the location is an active branch. API keys are organization-wide: a key reads and creates every branch.

Scope: locations:write

Parameters
NameInAbout
Idempotency-KeyheaderAny unique string (a UUID). Replaying the same request with the same key returns the first answer without doing anything again. Kept 24 hours.
curl
curl -X POST "https://connect.rylixfleet.com/api/v1/locations" \
  -H "Authorization: Bearer $RYLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"name":"Main store","address":"Mar Mikhael, Armenia St","lat":33.8969,"lng":35.5226,"phone":"01 234 567","hours":{"week":{"mon":[["09:00","23:00"]]}}}'
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/locations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "name": "Main store",
    "address": "Mar Mikhael, Armenia St",
    "lat": 33.8969,
    "lng": 35.5226,
    "phone": "01 234 567",
    "hours": {
      "week": {
        "mon": [
          [
            "09:00",
            "23:00"
          ]
        ]
      }
    }
  }),
});
const data = await response.json();
Example answer
{
  "id": "cm4w5q9yz0000s8z0l0c4t1on",
  "object": "location",
  "name": "Main store",
  "address": "Mar Mikhael, Armenia St",
  "lat": 33.8969,
  "lng": 35.5226,
  "isDefault": true,
  "kind": "branch",
  "active": true,
  "phone": "+9611234567",
  "hours": {
    "week": {
      "mon": [
        [
          "09:00",
          "23:00"
        ]
      ]
    }
  },
  "parentBranchId": null,
  "createdAt": "2026-11-01T08:00:00.000Z"
}

Answers: 201 The location was created. · 400 A field is missing or not valid (`fields` names each one). Branch fields: `kind`, `active`, `phone`, `hours` or `parentBranchId` is `invalid` (a parent must be a branch of this business and is only for a `client_pickup`); the business's first location answers `kind: first_location_must_be_branch` or `active: default_must_be_active`. Nothing is created. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 429 Rate limit reached for this key.

GET /api/v1/webhook-endpoints

List webhook endpoints

Scope: webhooks:manage

curl
curl -X GET "https://connect.rylixfleet.com/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-endpoints", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "object": "list",
  "data": [
    {
      "id": "cm4w5s7ab0002s8z0w3bh00k1",
      "object": "webhook_endpoint",
      "url": "https://example.com/rylix/webhooks",
      "description": "Order status to our ERP",
      "events": [
        "order.delivered",
        "order.failed"
      ],
      "enabled": true,
      "disabledReason": null,
      "consecutiveFailures": 0,
      "lastSuccessAt": null,
      "lastFailureAt": null,
      "createdAt": "2026-11-29T09:00:00.000Z",
      "conditions": [
        {
          "field": "order.payment",
          "op": "eq",
          "value": "cod"
        }
      ],
      "fields": {},
      "headers": [
        {
          "name": "X-Api-Key",
          "preview": "••••9f3a"
        }
      ],
      "timeoutMs": 10000,
      "filteredToday": 0
    }
  ]
}

Answers: 200 The business's webhook endpoints (never their secrets). · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 429 Rate limit reached for this key.

POST /api/v1/webhook-endpoints

Register a webhook endpoint

HTTPS on a public host only. The signing `secret` is in this answer only: store it. Options (conditions, fields, headers, timeoutMs) are optional; left out, the endpoint receives every subscribed event with the default fields, no custom headers and a 10-second timeout.

Scope: webhooks:manage

Parameters
NameInAbout
Idempotency-KeyheaderAny unique string (a UUID). Replaying the same request with the same key returns the first answer without doing anything again. Kept 24 hours.
curl
curl -X POST "https://connect.rylixfleet.com/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $RYLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"url":"https://example.com/rylix/webhooks","description":"Order status to our ERP","events":["order.delivered","order.failed"]}'
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-endpoints", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "url": "https://example.com/rylix/webhooks",
    "description": "Order status to our ERP",
    "events": [
      "order.delivered",
      "order.failed"
    ]
  }),
});
const data = await response.json();
Example answer
{
  "id": "cm4w5s7ab0002s8z0w3bh00k1",
  "object": "webhook_endpoint",
  "url": "https://example.com/rylix/webhooks",
  "description": "Order status to our ERP",
  "events": [
    "order.delivered",
    "order.failed"
  ],
  "enabled": true,
  "disabledReason": null,
  "consecutiveFailures": 0,
  "lastSuccessAt": null,
  "lastFailureAt": null,
  "createdAt": "2026-11-29T09:00:00.000Z",
  "conditions": [
    {
      "field": "order.payment",
      "op": "eq",
      "value": "cod"
    }
  ],
  "fields": {},
  "headers": [
    {
      "name": "X-Api-Key",
      "preview": "••••9f3a"
    }
  ],
  "timeoutMs": 10000,
  "filteredToday": 0,
  "secret": "whsec_…"
}

Answers: 201 The endpoint, with its signing secret (shown once). · 400 The URL or the events are not valid. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 409 The business has the most endpoints allowed. · 422 invalid_condition, invalid_fields, invalid_header or invalid_timeout (see fields). · 429 Rate limit reached for this key.

GET /api/v1/webhook-endpoints/{id}

Read a webhook endpoint

Scope: webhooks:manage

Parameters
NameInAbout
id (required)pathThe endpoint id.
curl
curl -X GET "https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "id": "cm4w5s7ab0002s8z0w3bh00k1",
  "object": "webhook_endpoint",
  "url": "https://example.com/rylix/webhooks",
  "description": "Order status to our ERP",
  "events": [
    "order.delivered",
    "order.failed"
  ],
  "enabled": true,
  "disabledReason": null,
  "consecutiveFailures": 0,
  "lastSuccessAt": null,
  "lastFailureAt": null,
  "createdAt": "2026-11-29T09:00:00.000Z",
  "conditions": [
    {
      "field": "order.payment",
      "op": "eq",
      "value": "cod"
    }
  ],
  "fields": {},
  "headers": [
    {
      "name": "X-Api-Key",
      "preview": "••••9f3a"
    }
  ],
  "timeoutMs": 10000,
  "filteredToday": 0,
  "warnings": []
}

Answers: 200 The endpoint with its options and never-match warnings (never its secret or a header value). · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such endpoint in this business. · 429 Rate limit reached for this key.

PATCH /api/v1/webhook-endpoints/{id}

Change a webhook endpoint

Only the keys you send change. A new `url` is checked like a new endpoint and keeps the signing secret. Headers: `set` adds or replaces values, `remove` drops names; values are never returned.

Scope: webhooks:manage

Parameters
NameInAbout
id (required)pathThe endpoint id.
curl
curl -X PATCH "https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4" \
  -H "Authorization: Bearer $RYLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conditions":[{"field":"order.payment","op":"eq","value":"cod"},{"field":"order.branch","op":"in","value":["cm4w5r2xk0009s8z0loc00001"]}],"fields":{"order_status":["order.status","order.trackingNumber","order.cashOnDelivery"]},"headers":{"set":[{"name":"X-Api-Key","value":"your-receiver-key"}],"remove":[]},"timeoutMs":15000}'
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "conditions": [
      {
        "field": "order.payment",
        "op": "eq",
        "value": "cod"
      },
      {
        "field": "order.branch",
        "op": "in",
        "value": [
          "cm4w5r2xk0009s8z0loc00001"
        ]
      }
    ],
    "fields": {
      "order_status": [
        "order.status",
        "order.trackingNumber",
        "order.cashOnDelivery"
      ]
    },
    "headers": {
      "set": [
        {
          "name": "X-Api-Key",
          "value": "your-receiver-key"
        }
      ],
      "remove": []
    },
    "timeoutMs": 15000
  }),
});
const data = await response.json();
Example answer
{
  "id": "cm4w5s7ab0002s8z0w3bh00k1",
  "object": "webhook_endpoint",
  "url": "https://example.com/rylix/webhooks",
  "description": "Order status to our ERP",
  "events": [
    "order.delivered",
    "order.failed"
  ],
  "enabled": true,
  "disabledReason": null,
  "consecutiveFailures": 0,
  "lastSuccessAt": null,
  "lastFailureAt": null,
  "createdAt": "2026-11-29T09:00:00.000Z",
  "conditions": [
    {
      "field": "order.payment",
      "op": "eq",
      "value": "cod"
    }
  ],
  "fields": {},
  "headers": [
    {
      "name": "X-Api-Key",
      "preview": "••••9f3a"
    }
  ],
  "timeoutMs": 15000,
  "filteredToday": 0,
  "warnings": []
}

Answers: 200 The endpoint after the change, with never-match warnings. · 400 The URL, events or description are not valid. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such endpoint in this business. · 409 The stored header values can no longer be read: set every header again. · 422 invalid_condition, invalid_fields, invalid_header or invalid_timeout (see fields). · 429 Rate limit reached for this key.

DELETE /api/v1/webhook-endpoints/{id}

Delete a webhook endpoint

Scope: webhooks:manage

Parameters
NameInAbout
id (required)pathThe endpoint id.
curl
curl -X DELETE "https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
if (!response.ok) throw await response.json();

Answers: 204 Deleted, with its pending deliveries. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such endpoint in this business. · 429 Rate limit reached for this key.

POST /api/v1/webhook-endpoints/{id}/test

Send a test event

Sends the fixture event of `type` (never your real data) to the endpoint now, signed with its secret, with its custom headers and timeout, marked `"test": true` and `Rylix-Test: 1`. One attempt, never retried, never counted toward auto-disable. 10 per endpoint and 30 per business per rolling hour.

Scope: webhooks:manage

Parameters
NameInAbout
id (required)pathThe endpoint id.
curl
curl -X POST "https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4/test" \
  -H "Authorization: Bearer $RYLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"type":"order.delivered"}'
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "type": "order.delivered"
  }),
});
const data = await response.json();
Example answer
{
  "object": "webhook_test",
  "id": "cm4w5u9ef0004s8z0t3s7x8y9",
  "eventId": "evt_test_4fJk2LmN8pQr5sTu7vWx9yZa",
  "type": "order.delivered",
  "statusCode": 200,
  "durationMs": 184,
  "errorCode": null
}

Answers: 200 What your endpoint answered (the test is logged as a test delivery). · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such endpoint in this business. · 409 The endpoint is disabled. · 422 The endpoint is not subscribed to this type. · 429 Too many test sends in the last hour (Retry-After), or the key's rate limit.

GET /api/v1/webhook-endpoints/{id}/preview

Preview an event body

The exact JSON body a test send of `type` would carry for this endpoint (fixture data, after its field selection). No network call, no signature.

Scope: webhooks:manage

Parameters
NameInAbout
id (required)pathThe endpoint id.
type (required)queryThe event type to preview.
curl
curl -X GET "https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4/preview" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-endpoints/cm4w5r2xk0001s8z0a1b2c3d4/preview", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();
Example answer
{
  "object": "webhook_preview",
  "body": {
    "id": "evt_test_4fJk2LmN8pQr5sTu7vWx9yZa",
    "type": "order.delivered",
    "createdAt": "2026-11-30T09:00:00.000Z",
    "test": true,
    "data": {
      "order": {
        "id": "ord_test_000000000000000000",
        "object": "order",
        "status": "delivered"
      }
    }
  },
  "warnings": []
}

Answers: 200 The body, and conditions that can never match this type. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 404 No such endpoint in this business. · 422 Not a webhook event type. · 429 Rate limit reached for this key.

GET /api/v1/webhook-catalog

The webhook option catalog

Event groups, event families and their approved fields, condition fields and operators, header rules, timeout bounds and test limits: everything needed to build an endpoint editor.

Scope: webhooks:manage

curl
curl -X GET "https://connect.rylixfleet.com/api/v1/webhook-catalog" \
  -H "Authorization: Bearer $RYLIX_API_KEY"
JavaScript
const apiKey = "rxk_…"; // From Settings > Developers. Keep it on your server.
const response = await fetch("https://connect.rylixfleet.com/api/v1/webhook-catalog", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const data = await response.json();

Answers: 200 The catalog. · 401 Missing, malformed, unknown or revoked API key. · 403 insufficient_scope, feature_off, or (writes) suspended or read_only. · 429 Rate limit reached for this key.

GET /api/v1/openapi.json

This document

Public, no key

curl
curl -X GET "https://connect.rylixfleet.com/api/v1/openapi.json"
JavaScript
const response = await fetch("https://connect.rylixfleet.com/api/v1/openapi.json", {
  method: "GET",
});
const data = await response.json();

Answers: 200 The OpenAPI 3.1 document.

Webhooks

Register an HTTPS endpoint in Settings > Developers (or with POST /api/v1/webhook-endpoints) and choose its events. Rylix POSTs one JSON event per change to each enabled endpoint subscribed to it, for every order of the business, whichever way it was created.

Answer with any 2xx status within the endpoint's timeout (10 seconds unless you set 1–15), counted from the start of the request; the response body is not read. Anything else, a timeout or a redirect is retried up to 8 times with exponential backoff starting at 30 seconds. After 5 events in a row fail every attempt, the endpoint is switched off and the business owner is emailed; switch it back on in Settings > Developers. Each delivery and attempt is in the delivery log there, with a Resend button.

Events can arrive more than once and out of order: deduplicate by id and use data.order.status and data.order.updatedAt.

Each endpoint receives only the events it lists. No event carries customer personal data: never the customer's name, phone number, address, coordinates or order note, and never a comment or a driver location. The order status events carry data.order with the order's ids and facts (id, reference, order name, tracking number, status, kind, source, pickup location id, cash on delivery, pieces, failure category, ETA, createdAt, updatedAt, terminalAt). Every other event carries data.order as a summary (id, reference, order name, tracking number, status, kind, updatedAt) when it is about an order, plus its own fields. To get the customer and address, fetch GET /api/v1/orders/{id} with a key that has orders:read.

Order status
EventSent when
order.createdAn order is created (API, dashboard, CSV import or Shopify).
order.assignedA driver is assigned.
order.picked_upThe driver picked the order up.
order.on_the_wayThe driver is on the way to the customer.
order.arrivedThe driver arrived at the address.
order.deliveredThe order was delivered.
order.failedDelivery failed; data.failureCategory says why.
order.returnedThe order is back at the store.
order.cancelledThe order was cancelled.
order.rescheduledThe delivery time changed; data.dateOnly is true when it is now a whole day with no time window.
order.address_changedThe delivery address changed.
Order lifecycle
EventSent when
order.unassignedThe order lost its driver (the office removed them or the driver gave it back); data.by says who.
order.reassignedAnother driver took over the order from the previous one.
order.attempt_failedThe driver could not deliver and is bringing the goods back; data.failureCategory says why. The order is not finished yet.
order.redelivery_scheduledA failed or returned order was prepared for another delivery attempt.
order.pieces_scannedA piece label was scanned at pickup (data.via is scan, data.piece its number) or the office marked every piece collected (data.via is office).
order.proof_addedProof was added to the order: photos (data.proof.kind is photo, data.proof.count says how many) or the customer's signature at handover (data.proof.kind is signature). No image, link or signer name is sent.
Customer actions
EventSent when
order.change_requestedAn address or delivery time change was requested; data.parts and data.by say what and who.
order.change_declinedA requested change was declined by the customer or the office; data.by says who.
order.phone_updatedThe customer changed their phone number. The number is not sent: fetch the order with your key.
order.ratedThe customer rated the driver; data.rating.stars is 1 to 5. Comments are never sent.
Money
EventSent when
order.cash_collectedThe driver recorded the cash of a delivered order; data.cash has the amount and currency.
settlement.submittedA driver submitted a cash hand-over; data.settlement has its id, the driver id and the amounts.
settlement.confirmedThe office confirmed a cash hand-over; data.settlement has the confirmed amounts and difference.
settlement.rejectedThe office rejected a cash hand-over. The reason is not sent.
Returns, exchanges and linked orders
EventSent when
return.startedA return was approved and its pickup order created; data.return names the original order.
return.receivedThe returned goods are back at the store.
order.exchange_createdAn exchange order was created from a delivered order; data.originalOrderId names it.
order.linked_createdA linked order (missing items or exchange) was created; data.linkType says which.
Agency cash boxes
EventSent when
remittance.readyAgencies: a cash box for a client is ready to hand over; data.remittance has its number, currency and totals.
remittance.confirmedAgencies: the client confirmed receiving a cash box (code, signature or transfer); data.remittance.receiptMethod says how.
remittance.disputedAgencies: the amount handed over differs from the cash box's net; data.remittance.amountHanded has it.
Locations and drivers
EventSent when
location.createdA pickup location was added; data.location is the location.
location.updatedA pickup location changed; data.location is the location.
driver.shift_startedA driver started a shift; data.shift has the shift and driver ids.
driver.shift_endedA driver ended a shift. Driver locations are never sent.
Request headers
Rylix-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256>
Rylix-Event-IdThe event id (the same on retries and resends).
Rylix-Event-TypeThe event type, e.g. order.delivered.
Rylix-Delivery-IdThis delivery attempt's log id.
Rylix-Test1 on a test send only (the body then has "test": true).
Payload
{
  "id": "evt_cm4w5t1cd0003s8z0e7v3n4t5",
  "type": "order.failed",
  "createdAt": "2026-11-29T11:02:00.000Z",
  "data": {
    "order": {
      "id": "cm4w5r2xk0001s8z0a1b2c3d4",
      "object": "order",
      "reference": "WEB-10042",
      "orderName": "WEB-10042",
      "trackingNumber": "RX1234567",
      "status": "failed",
      "kind": "delivery",
      "source": "api",
      "pickupLocationId": "cm4w5q9yz0000s8z0l0c4t1on",
      "cashOnDelivery": {
        "amount": "25.00",
        "currency": "USD"
      },
      "pieces": 1,
      "failureCategory": "no_answer",
      "etaMinutes": null,
      "createdAt": "2026-11-29T09:30:00.000Z",
      "updatedAt": "2026-11-29T09:30:00.000Z",
      "terminalAt": null
    },
    "failureCategory": "no_answer"
  }
}

Endpoint options

Each endpoint can be tuned in Settings > Developers (Edit options) or with PATCH /api/v1/webhook-endpoints/{id}. GET /api/v1/webhook-catalog lists every choice below, so your own tools can offer the same editor.

Conditions
Send only the events that match every condition, for example only cash-on-delivery orders of one branch. Conditions are picked from a fixed list of fields (payment, cash on delivery amount, branch, pickup location, client, account, service, order kind, source, urgent, failure reason, order status, driver group, cash currency) with rules for their type: is, is not, is one of, is none of; more than, at least, less than, at most, between (money, compared in one currency); is (yes/no). Up to 10 conditions, up to 50 values each. There is no free text, no template and no code. Ids must be records of the business. A condition on something an event does not have never matches (for example an order condition on a settlement event); create and update answers list those as warnings. Filtered events are not logged; the endpoint shows how many were filtered today.
Fields to include
Each event family (order status, other order events, settlements, locations, driver shifts) sends every field by default. You may choose the fields of the subject resource per family; an empty list sends only its id and object. The envelope (id, type, createdAt, test) and the event's own fields are always sent. Customer personal data is never offered.
Custom headers
Up to 5 headers sent with every delivery and test, for example your receiver's API key (Authorization is allowed). Names: letters, digits and hyphens, up to 64. Values: printable characters, up to 1024. Refused names: Host, Content-Length, Content-Type, Content-Encoding, Transfer-Encoding, Connection, Keep-Alive, Upgrade, TE, Trailer, Expect, Forwarded, Via, User-Agent, Cookie, Set-Cookie, Date and every Proxy-*, X-Forwarded-* and Rylix-* name. Values are stored encrypted and never returned: the API shows each name with its last four characters (values of 12 characters or more). Rylix's own headers always win.
Timeout
How long Rylix waits for your answer's status, from 1 to 15 seconds (timeoutMs 1000–15000); 10 seconds by default. One deadline covers the whole request, connecting included.
Test events and preview
POST /api/v1/webhook-endpoints/{id}/test sends a sample event of a type the endpoint receives, signed with its secret and sent with its headers and timeout, marked "test": true with the header Rylix-Test: 1 and an id starting evt_test_. It uses fixed sample data, never your orders. One attempt, never retried, never resendable, never counted toward switching the endpoint off. Up to 10 tests per endpoint and 30 per business per rolling hour (429 rate_limited with Retry-After). GET /api/v1/webhook-endpoints/{id}/preview?type= returns the exact body without sending it.

Verifying signatures

Each endpoint has its own secret (whsec_…), shown once when it is created. The v1 signature is the hex HMAC-SHA256 of the timestamp, a dot and the raw request body, with the secret as the key.

Compute it over the raw body exactly as received (before parsing JSON), compare in constant time, and refuse timestamps more than 300 seconds from your clock so a captured request cannot be replayed.

Node.js
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyRylixSignature(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = Object.fromEntries(
    String(header ?? "").split(",").map((part) => {
      const at = part.indexOf("=");
      return [part.slice(0, at).trim(), part.slice(at + 1).trim()];
    }),
  );
  const timestamp = Number(parts.t);
  const signature = parts.v1 ?? "";
  if (!Number.isInteger(timestamp) || !/^[0-9a-f]{64}$/.test(signature)) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false;
  const expected = createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest();
  return timingSafeEqual(expected, Buffer.from(signature, "hex"));
}
Receiving events (Express)
import express from "express";

const app = express();
const webhookSecret = "whsec_…"; // The endpoint's signing secret, shown once.

app.post("/rylix/webhooks", express.text({ type: "application/json" }), (req, res) => {
  if (!verifyRylixSignature(req.body, req.get("Rylix-Signature"), webhookSecret)) {
    return res.status(400).end();
  }
  const event = JSON.parse(req.body);
  // Deduplicate by event.id: a retry or a resend carries the same id.
  console.log(event.type, event.data.order.id, event.data.order.status);
  res.status(200).end();
});

OpenAPI

The full OpenAPI 3.1 definition is at https://connect.rylixfleet.com/api/v1/openapi.json. Import it into Postman, Insomnia or a client generator.