مرکز اسناد در حال تکمیل است — وضعیت حقوقی هر سند را پیش از استناد بررسی کنیدمشاهده اسناد
لوگوی رسمی ارث‌کوپ مرکز دانش ارث‌کوپشناخت · راهنما · اسناد بنیادین
فاتغییر زبان
فارسیفعال Englishراهنماهای انگلیسی العربيةترجمه موجود نیست
EarthCoop.ir

English Product Guides

EarthCoop API — Versioned Native Contract & Legacy Boundaries

EarthCoop now has a real versioned /api/v1 contract used for the first-party/native delivery boundary. This is materially different from the older unversioned /api surface, which still contains application routes, legacy compatibility paths, and domain endpoints that are not automatically part of the v1 contract.

Current /api/v1 scope

The current application mounts the versioned route set at:

/api/v1

At the current application baseline, that contract includes first-party/native endpoints for:

  • authentication login/logout;
  • bootstrap and current-member data;
  • notifications and unread counts;
  • marking notifications as read;
  • device push subscription/unsubscription;
  • basic geography lookups used by the native client;
  • NajmHoda messaging;
  • media URL delivery.

The exact route/controller implementation is the source of truth for payload details and authorization.

/api/v1 is a current versioned first-party/native-client contract. Its existence does not make every unversioned /api route a supported v1 endpoint or a general third-party public API. Domains such as support tickets may still live outside the current v1 surface.

Authentication

The current v1 authentication flow includes a password-based login endpoint that can issue a bearer token after validating the account and required agreement state. Protected v1 routes use the current bearer/Sanctum authorization boundary, and logout revokes the current token.

See Authentication for the verified current contract and limitations.

Legacy and internal /api routes

EarthCoop still has unversioned /api routes used by the web application, compatibility layers, or domains not yet promoted into v1. Those paths can be real and useful without being part of the durable v1 native contract.

Use this distinction:

/api/v1 route = current versioned native/client contract
unversioned /api route = inspect its own current implementation/status
route existence ≠ universal third-party support promise

Authorization and domain rules

Authentication establishes requester identity. It does not bypass domain authorization. A protected operation can still require ownership, role, policy, governance topology, monetary state, or other business rules.

For NajmHoda and other action-capable flows, browser/client context cannot grant mutation authority. Trusted server-side policy and domain services remain responsible for permission and execution.

Response contracts

Do not assume one universal JSON envelope for every EarthCoop API domain. The current v1 controllers define their own validated request/response contract, while legacy/internal routes can retain different shapes.

For client work, bind only to endpoints explicitly present in the current versioned contract and verify their current tests/controller behavior.

API sections

Authentication

Current v1 bearer-token login/logout and the distinction between native-client support and general third-party token policy.

NajmHoda API

Current v1 messaging path plus server-side action-authority boundaries.

Geographic API

Current v1 native geography lookups and the richer canonical location/governance model behind them.

Notifications API

Current v1 notification and push-device delivery contract.

Tickets API

Current support-ticket implementation notes; tickets are not part of the current v1 route set.

Public/third-party integration status

The current v1 boundary is evidence of a durable versioned first-party/native contract. It should not be broadened by documentation into an unrestricted public developer platform without an explicit product/API policy. Third-party consumers should use only contracts that EarthCoop explicitly designates for that purpose.