> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lomadee.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Deep link

> Redirects a visitor to a partner store page through an affiliate channel

Redirects to `url` through the affiliate channel `channel`. The first request for a channel and destination creates the link; later requests reuse it. No API key is needed: the URL is meant to be shared.

```http theme={null}
GET https://lmdee.link/deep/{channel}?url={destination}&mdasc={sub-id}
```

The same route answers on every Lomadee link domain: `lmdee.link`, `compre.vc` and `oferta.vc`.

For a step-by-step guide, see [Deep link](https://docs.lomadee.com.br/docs/affiliates/deep-link.md).

### Path parameters

**channel** `string` *required*

The channel address (slug) or the channel ID (UUID). Case-insensitive. The channel must be active.

### Query parameters

**url** `string` *required*

The destination page, an absolute `http` or `https` URL on a domain registered by a brand on the channel's program. Percent-encode it. A raw value is accepted only as the last parameter.

**mdasc** `string`

The click sub-ID. Stored with the click and returned on the order. See [Click sub-ID](https://docs.lomadee.com.br/docs/affiliates/click-sub-id.md).

### Responses

| Status | Body `error` | Returned when |
| - | - | - |
| `302` | — | The link is valid. `Location` is the store page with the tracking parameters |
| `400` | `invalid_deep_link` | `channel` or `url` is missing or malformed |
| `404` | `channel_not_found` | No active channel has that address or ID |
| `404` | `domain_not_found` | The host of `url` (or a parent domain) is not registered by a brand on the channel's program |
| `404` | `channel_not_approved` | The brand requires channel approval and the channel is not approved |
| `404` | `channel_rejected` | The brand rejected the channel |
| `404` | `channel_blocked` | The brand blocked the channel |
| `404` | — | The link was disabled, or the brand is inactive or not approved. The body is plain text |
| `503` | `deep_link_unavailable` | The link could not be created right now. Retry later |

The other error bodies are JSON: `{ "message": "...", "error": "..." }`.

### Example

```bash theme={null}
curl -i "https://lmdee.link/deep/blog-da-ana?url=https%3A%2F%2Fwww.loja.com.br%2Ftenis&mdasc=stories"
```

```http theme={null}
HTTP/1.1 302 Found
Location: https://www.loja.com.br/tenis?...
```

### Caching

* Valid links are cached for 24 hours per channel and destination.
* Refusals are cached for a few minutes (at most 15), so a new approval can take that long to apply.
* Tracking parameters in `url` (`utm_source`, `utm_medium`, `utm_campaign`, `lmdeeTracking`) are ignored when matching an existing link.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.