> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Resolve a URL path

**Published**: 2026-11-30
**Category**: Content

## `GET /resolve`

**Resolve a URL path**

Resolves a URL path to a content entry, a category or a commerce
page; `type` says which. A commerce page matches only at its exact
public URL, and a product hidden in that locale misses.

A commerce hit is a pointer (`id`, `slug`, `path`), or with
`include=record` and a key in `X-Lynkow-Pk`, the record.

With `locale`, a path missing in its locale is served from the next
locale of the chain. When nothing resolves but a redirect covers the
path, the response is a 200 with `type: redirect`.

Errors: 400 `VALIDATION_FIELD_REQUIRED` without `path`, 401
`STOREFRONT_KEY_REQUIRED` for a record without a valid key, 404
`PATH_NOT_FOUND`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | number (min 1, default 1) | No | When `path` resolves to a category, the page of its contents, starting at 1 |
| `limit` | query | number (1 to 500, default 500) | No | When `path` resolves to a category, the number of its contents per page |
| `locale` | query | string | No | BCP 47 locale code (e.g. "en", "fr") |
| `fallback` | query | boolean (default true) | No | With `locale`, `false` makes a page not translated into the locale of `path` a miss. Single-language sites ignore it |
| `path` | query | string | Yes | The URL path to resolve, such as `/fr/guides/article`. Only a non-default locale carries a prefix. A leading slash is implied. |
| `include` | query | string | No | Set to `record` to get a commerce page's full record and its `structuredData.graph`. Requires `X-Lynkow-Pk`. Other values are ignored. |
| `market` | query | string | No | Market identifier (mkt_ prefixed id). A product hidden there misses and is left out of a record's structured data. Unusable values are ignored. |
| `country` | query | string | No | Buyer's country (ISO 3166-1 alpha-2) for the VAT in a product record's prices. An unusable value falls back to the merchant's country. |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `402` | The site subscription does not currently permit this operation |
| `422` | Validation error |


> **Notes:** A 200 carries `public, max-age=0, s-maxage=300`, and a cached copy
> is served to any caller of the URL. The 401 is `no-store`.

### SDK

```typescript
import { renderJsonLdGraph } from 'lynkow'

const lynkow = createClient({ siteId: '...', publishableKey: 'lkw_pk_...' })
const result = await lynkow.paths.resolve('/products/blue-mug')

switch (result.type) {
  case 'content':
    console.log(result.content.title)
    break
  case 'category':
    console.log(result.category.name, result.contents.data.length)
    break
  case 'product':
    if ('structuredData' in result) {
      const jsonLd = renderJsonLdGraph(result.structuredData.graph)
    }
    break
  case 'redirect':
    console.log(result.redirect.target, result.redirect.statusCode)
    break
}
```

### Examples

```curl
curl "https://api.lynkow.com/storefront/{siteId}/resolve?path=/blog/engineering"
curl -H "X-Lynkow-Pk: lkw_pk_..." "https://api.lynkow.com/storefront/{siteId}/resolve?path=/products/linen-shirt&include=record"
```

```javascript
const res = await fetch(`https://api.lynkow.com/storefront/${siteId}/resolve?path=/blog/engineering`)
const { data } = await res.json()
if (data.type === 'category') { /* category branch */ }
else if (data.type === 'content') { /* content branch */ }
else { /* product, product_category or product_collection pointer */ }

// With the publishable key: the record and its JSON-LD graph in one call.
const keyed = await fetch(
  `https://api.lynkow.com/storefront/${siteId}/resolve?path=/products/linen-shirt&include=record`,
  { headers: { 'X-Lynkow-Pk': publishableKey } }
)
const { data: page } = await keyed.json()
// page.product.title, page.product.availability, page.structuredData.graph
```

### Response Example

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

---