Skip to content

LocusVia

Technical documentation

Short-Link Resolution

Resolve a public URL already received by the SDK into a full route payload.

When to use#

Short-link resolution is an SDK-side API lookup. It turns a single-segment public URL (already received by the app via Universal Link or App Link) into a resolved route payload with pathname, params, and metadata.

Note

Short-link resolution is not public browser routing. It is an authenticated SDK lookup for a URL the app already has.

Request#

json
POST /api/v1/sdk/short-link/resolve
Authorization: Bearer pk_live_xxx

{
  "appID": "app_abc123",
  "url": "https://go.customer.com/summer"
}

Response#

json
{
  "processed": true,
  "link": {
    "type": "verified",
    "url": "https://go.customer.com/offers/summer",
    "pathname": "/offers/summer",
    "params": { "campaign": "summer" },
    "metadata": { "linkId": "link_123" },
    "referral": {
      "referralCode": "SUMMER10",
      "referrerId": null,
      "utmSource": "instagram",
      "utmMedium": "story",
      "utmCampaign": "summer",
      "utmTerm": null,
      "utmContent": null,
      "channel": null,
      "feature": null,
      "hasReferral": true
    }
  }
}

All keys are always present. type is verified for a resolved destination and deferred for a deferred-link resolution. referral is a fixed attribution object extracted from query params and link metadata (ref, referrer, and utm_* keys); hasReferral reports whether any attribution was found.

Note

A URL that does not match an active, unexpired link still resolves with { "processed": true, "link": null } — HTTP 200, no error. The SDK treats null as "no destination for this link".

Failures return an error envelope — { "error": { "code": "...", "message": "..." } } — with a non-2xx status, e.g. 400 VALIDATION_ERROR for a missing or malformed url. The SDK App ID determines which Link Target platform is selected.

Was this page helpful?