# Resolve a URL path

**Publié le** : 2026-05-12
**Catégorie** : Storefront API

## `GET /resolve`

**Resolve a URL path**

Resolve a path into either a content entry or a category, without
knowing which it is up-front. Returns a discriminated union keyed
on `type` (`content` or `category`). Useful for storefronts that
accept arbitrary slugs at the edge.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | number | No | Number |
| `limit` | query | number | No | Number <= 500 |
| `locale` | query | string | No | BCP 47 locale code (e.g. "en", "fr") |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |


> **Notes:** Envelope has no `data` wrap; the discriminated `type` field is at the
> top level. Cache: `Cache-Control: public, max-age=120`. Rate-limit
> bucket: general.

### Examples

```curl
curl "https://api.lynkow.com/public/{siteId}/resolve?path=/blog/engineering"
```

```javascript
const res = await fetch(`https://api.lynkow.com/public/${siteId}/resolve?path=/blog/engineering`)
const payload = await res.json()
if (payload.type === 'category') { /* category branch */ }
else { /* content branch */ }
```

### Response Example

```json
"{\n  \"type\": \"category\",\n  \"locale\": \"en\",\n  \"blogUrlMode\": \"with-categories\",\n  \"category\": {\n    \"id\": \"01J9PA0NZK7BX4HQ7M2DC9V5T8\",\n    \"name\": \"Engineering\",\n    \"slug\": \"engineering\",\n    \"path\": \"/blog/engineering\"\n  },\n  \"contents\": {\n    \"data\": [\n      {\n        \"id\": \"01J9P1B5N4XZRWQEKM2H6A3T8C\",\n        \"title\": \"How we set our pricing\",\n        \"slug\": \"how-we-set-our-pricing\",\n        \"locale\": \"en\"\n      }\n    ],\n    \"meta\": { \"page\": 1, \"perPage\": 10, \"total\": 12, \"lastPage\": 2 }\n  }\n}\n"
```

---