canonical: https://jentic.com/apis/afosto.com/afosto

# Afosto API

Jentic publishes the only available OpenAPI specification for Afosto API, keeping it validated and agent-ready. Afosto is a Dutch commerce platform whose API exposes three core capabilities: OAuth-based identity and session management, an Instant Search service for indexing and querying product or content documents, and QuicQ CDN proxy configuration for asset delivery. Use it to authenticate end users, build search experiences over commerce indexes, and manage cached proxy routes from automation pipelines.

## For AI agents

Authenticate Afosto users via OAuth, manage instant search indexes and documents, and configure QuicQ CDN proxies for a Dutch commerce stack.

## Scope

Does not handle order management, inventory, or payment capture - use for OAuth sessions, search indexing, and CDN proxy configuration only.

## Capabilities

- Initiate OAuth authorization sessions and exchange authorization codes for access tokens
- Create and manage instant search indexes with configurable analyzers and settings
- Bulk-upsert documents into search indexes for product and content discovery
- Run instant search queries against an index alias with relevance and filtering
- Configure QuicQ CDN proxies to route asset traffic with custom rules
- Maintain index aliases so live search traffic can be repointed without downtime

## Use cases

### Headless Commerce Search

Power product and content search on a headless Afosto storefront by uploading catalog documents to an Instant Search index and querying it from the frontend. Index aliases let you rebuild indexes in the background and atomically swap them in, keeping search latency stable. Typical merchants run thousands of products through a small number of indexes with locale-specific settings.

Example prompt: Create an instant search index named 'products-nl', bulk upsert 500 product documents, then run a search for 'fietshelm' against the index alias and return the top 10 hits

### OAuth Identity for Storefront Apps

Use Afosto's OAuth endpoints to authorize storefront and back-office users, obtain bearer tokens, and call the rest of the platform on their behalf. The session authorize flow supports SPA and mobile clients that need short-lived sessions, while the standard authorize endpoint covers server-side exchanges. All subsequent index and proxy calls reuse the same bearer token.

Example prompt: Exchange an authorization code at POST /oauth/authorize for a bearer token, then call GET /instant/indexes with that token to confirm the session is active

### CDN Proxy Automation

Manage QuicQ CDN proxy configurations from infrastructure-as-code pipelines instead of the Afosto dashboard. The Proxies endpoints let an agent enumerate existing routes, register new ones for media subdomains, and update cache settings without manual UI work. Useful when spinning up new locales or campaign sites.

Example prompt: List all Afosto QuicQ proxies, then add a new proxy for the subdomain 'cdn-promo.example.com' pointing at the campaign asset bucket

### AI Agent Storefront Operations

Through Jentic, an agent can run end-to-end Afosto storefront tasks - refreshing search indexes, rotating aliases, and adjusting CDN proxies - by searching for the operation it needs and executing the call without storing the merchant's bearer token in its context. Jentic handles the OAuth secret in the vault and returns scoped credentials per call.

Example prompt: Search Jentic for 'reindex afosto products', load the documents upsert schema, and execute a refresh of the live product index

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /oauth/authorize | Authorize a user and obtain an access token |
| POST | /oauth/session/authorize | Start an OAuth session authorization flow |
| GET | /instant/indexes | List instant search indexes |
| POST | /instant/indexes/{id}/documents | Upsert documents into a search index |
| POST | /instant/search/{id} | Run a search query against an index |
| GET | /instant/search/indexes/{alias} | Resolve an index alias for live search |

## Key resources

- **OAuth** — Authorize users and exchange codes for bearer tokens
- **Indexes** — Create and configure instant search indexes
- **Documents** — Upsert searchable documents into an index
- **Search** — Run queries against indexes and aliases
- **Proxies** — Manage QuicQ CDN proxy configurations

## Why Jentic

- **Setup:** Wiring the Afosto API by hand means running its OAuth flow to mint bearer tokens and coding calls across its search index and CDN operations. Through Jentic you install once, import the Afosto API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Afosto puts the index id in the URL path for document and search operations (/instant/indexes/{id}/documents), so a rule can pin the agent to one index. You choose which operations it may call, such as reading indexes or searching, so the OAuth authorize operations are not included unless you add them.
- **Credential handling:** Your Afosto OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. The long-lived token never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'reindex Afosto products', and Jentic returns the matching Afosto operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Shopify Admin API** — Larger headless commerce platform with built-in search, orders, and payments - broader scope than Afosto.
- **Algolia Search API** — Dedicated hosted search service often used alongside commerce platforms for richer relevance tuning.
- **Meilisearch API** — Open-source instant search engine with a similar developer ergonomics to Afosto's Instant Search.
- **Bunny.net CDN API** — General-purpose CDN with pull zones and edge rules - alternative to QuicQ for non-Afosto assets.

## FAQ

### Why is there no official OpenAPI spec for Afosto API?

Afosto does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Afosto API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Afosto API use?

The Afosto API uses HTTP bearer tokens. Obtain a token by exchanging an authorization code at POST /oauth/authorize, then send it as Authorization: Bearer <token> on every subsequent call. Through Jentic, the bearer token is stored encrypted in the credential vault and never enters the agent's context.

### Can I run product search against an Afosto index with this API?

Yes. Use POST /instant/search/{id} to query a specific index by id, or GET /instant/search/indexes/{alias} to resolve and search through a stable alias. Documents are loaded via POST /instant/indexes/{id}/documents in batches.

### What are the rate limits for the Afosto API?

Afosto does not document fixed rate limits in the public spec. Treat the API as standard SaaS - back off on HTTP 429 responses and inspect Retry-After. For high-volume reindex jobs, batch document upserts rather than one-by-one calls.

### How do I reindex an Afosto product catalog through Jentic?

Search Jentic for 'upsert afosto documents', load the schema for POST /instant/indexes/{id}/documents, and execute the call with your batch of product records. After indexing, repoint the alias via the indexes endpoint so live search traffic switches over.

### Can I manage Afosto QuicQ CDN proxies from code?

Yes. The Proxies group exposes endpoints to list, create, and update CDN proxy routes, so you can manage QuicQ from CI/CD or an agent rather than the Afosto dashboard.

### Can I limit what my agent is allowed to do with the Afosto API?

Yes. Because you self-host Jentic One, your own rules decide which Afosto operations and credentials the agent may use. Afosto puts the index id directly in the URL path for document and search operations, such as POST /instant/indexes/{id}/documents and POST /instant/search/{id}, so you can pin the agent to a single index and to read-only actions like listing indexes or running searches. You choose which operations are exposed, so the OAuth authorize endpoints and CDN proxy changes stay off-limits unless you explicitly add them.
