IndieStore API policy
Versioning and deprecation
The /api/v1 discovery API is version 1. Backward-compatible fields may be added within v1; breaking changes require a new major URL version. Existing /api/public routes remain supported aliases. No version is currently deprecated. Before retiring a version, publish at least 180 days notice at /docs/api-policy, return the RFC 9745 Deprecation timestamp and a Link with rel=deprecation, and announce an RFC 8594 Sunset date at least 180 days later. No Sunset header is sent until retirement is scheduled.
Responses carry API-Version: 1. Additive fields may appear; clients should ignore fields they do not recognize. No endpoint is currently scheduled for retirement, so no artificial Deprecation or Sunset dates are advertised.
Rate limits
The REST discovery API allows 60 requests per 60-second fixed window per client address, shared between /api/v1/products and the supported /api/public aliases, including detail and invalid requests. Clients behind a shared address share a quota. Local development uses one shared local quota. These limits apply to the REST discovery routes; existing website APIs and MCP retain their existing behavior.
RateLimit-Policy identifies the policy and quota: "public-discovery";q=60;w=60. RateLimit reports the remaining requests and seconds until reset: "public-discovery";r=59;t=60. These two fields follow IETF draft-ietf-httpapi-ratelimit-headers-11, which is work in progress, not a finalized RFC. Compatibility fields RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset carry the same information; Reset is a delay in seconds. On 429, Retry-After supplies the number of seconds to wait. Reuse results, reduce concurrency and wait before retrying.
Quotas are enforced atomically through a shared MongoDB counter with expiry cleanup; they persist across application instances. Only a hashed client partition and expiring request counts are retained for this quota. Responses are private/no-store so a CDN cannot share one client’s quota with another. If the quota backend is unavailable, the API returns a typed 503 and does not invent remaining quota values.
Typed errors
The OpenAPI components Error and ErrorResponse describe the existing JSON envelope. Every documented 4xx/5xx response references ErrorResponse, with error.code, error.message, error.hint and error.docs. Consumers should use code for recovery decisions and display message as human-readable context.
IndieStore OpenAPI specification · IndieStore API documentation