GROperator

Changelog

The first release of the LastMile Public API, under /api/public/v1.

Authentication

  • API key and secret (X-API-Key, X-API-Secret) with eight scopes: shipments:read, shipments:write, merchants:read, merchants:write, geography:read, pricing:read, branches:read, webhooks:manage.
  • Username and password sign-in with POST /auth/login, single-use refresh tokens with POST /auth/refresh, and merchant logins that see only their own data.
  • GET /auth/me to inspect the current credential.

Shipments

  • Create (for a merchant or a custom sender), list, get, track, update, cancel and print the label, plus the status catalogue.
  • Delivery, exchange and return service types; standard, express and sameDay tiers.
  • Optional Idempotency-Key on creates, with replay for 24 hours.

Places

  • Countries, cities and districts by id, code or name in Arabic or English, with tolerant matching and "did you mean" candidates.
  • GET /geography/resolve to validate an address and the coverage endpoints for the cities the company serves.

Merchants, pricing, branches and webhooks

  • Merchants and their saved pickup addresses, with duplicate detection.
  • POST /pricing/quote with a deliverable flag and a price breakdown.
  • Branches (read only).
  • Per-merchant webhook subscriptions signed with HMAC-SHA256, with test deliveries, secret rotation and automatic retries.

Platform

  • One error envelope for every non-2xx response, stable error codes, and a generated OpenAPI 3 document served at /api/public/v1/openapi.json.
  • Two-stage rate limiting: per client IP before authentication (600 requests per minute by default, IPv6 grouped by /64) and per verified caller after it (120 per minute by default).
  • A request that sends both a bearer token and an API key is refused with 400 ambiguous_credentials.
  • The company's suspended or expired state (tenant_blocked) is enforced on every request.
  • Exact dashboard permissions for password logins on shipment writes (orders:create, orders:update, orders:cancel); an API key cannot be created with scopes beyond its creator's own permissions.
  • Upper bounds on weight, dimensions, pieces, declared value and COD.
  • Places accept an id, a code or a name everywhere, and a shipment update may change only the district.