Describe the current host

Embed
Preview of the card
<a href="https://referalli.com/docs/ref-getv1hostscurrent"><img src="https://referalli.com/docs/_api/public/orgs/07f432f4-34b9-46a7-aaad-c0e395d2e4f9/spaces/2bf4f614-3630-4fbf-85f9-5ecafa6b7d97/pages/b81441c9-1c35-4f0b-82e8-48ab52ae94be/social-card.svg?v=3e7ae33eec8b" alt="Describe the current host" width="600" height="315"></a>
GET https://referalli.com/v1/hosts/current

What the request's host is: a merchant's verified portal domain (with the org's name, branding and public programs), a merchant link domain, or Referalli's own app. Used by the web app before anyone signs in.

Auth: none.

Parameters

themePreview
string
query

Code samples

cURL
curl -X GET "https://referalli.com/v1/hosts/current"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{
  "kind": "string",
  "orgId": "string",
  "orgName": "string",
  "branding": {
    "logoUrl": "string",
    "theme": {}
  },
  "programs": [
    {
      "handle": "string",
      "name": "string"
    }
  ],
  "portalTheme": {},
  "consent": {
    "mode": "cookiemunch",
    "provider": "string",
    "tags": [
      {
        "tag": "string",
        "attrs": {},
        "inline": "string"
      }
    ],
    "settingsLink": {
      "call": "string",
      "attrs": {}
    },
    "builtin": {
      "policyUrl": "string",
      "text": {}
    }
  },
  "chat": {
    "provider": "string",
    "tags": [
      {
        "tag": "string",
        "attrs": {},
        "inline": "string"
      }
    ]
  },
  "csp": "string"
}
Option 1
kind
string
required
A merchant's verified partner-portal domain.
orgId
string
required
orgName
string
required
branding
object
required
Show child parameters
logoUrl
string
required
theme
object
required
programs
object[]
required
The org's active programs with a public signup page (/join/:handle).
Show child parameters
handle
string
required
name
string
required
portalTheme
object
required
Portal design: colour scheme, brand lockup, font stylesheet, announcement, header and footer, home and navigation layout, string overrides, embed switches (the look itself is /v1/hosts/current/theme.css).
consent
object
required
Show child parameters
mode
string
required
cookiemunch | cmp | builtin | none
provider
string
required
tags
object[]
required
Show child parameters
tag
string
required
attrs
object
required
inline
string
settingsLink
object
required
Show child parameters
call
string
attrs
object
builtin
object
Show child parameters
policyUrl
string
required
text
object
chat
object
required
Show child parameters
provider
string
required
tags
object[]
required
Show child parameters
tag
string
required
attrs
object
required
inline
string
csp
string
required
The Content-Security-Policy for this host's pages, built from the enabled adapters.
{
  "kind": "string",
  "orgId": "string",
  "orgName": "string",
  "branding": {
    "logoUrl": "string",
    "theme": {}
  },
  "programs": [
    {
      "handle": "string",
      "name": "string"
    }
  ],
  "portalTheme": {},
  "consent": {
    "mode": "cookiemunch",
    "provider": "string",
    "tags": [
      {
        "tag": "string",
        "attrs": {},
        "inline": "string"
      }
    ],
    "settingsLink": {
      "call": "string",
      "attrs": {}
    },
    "builtin": {
      "policyUrl": "string",
      "text": {}
    }
  },
  "chat": {
    "provider": "string",
    "tags": [
      {
        "tag": "string",
        "attrs": {},
        "inline": "string"
      }
    ]
  },
  "csp": "string"
}
Option 2
kind
string
required
A merchant's verified link domain.
csp
string
required
{
  "kind": "string",
  "csp": "string"
}
Option 3
kind
string
required
Referalli's own app.
{
  "kind": "string"
}
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
Retry-After
integer
Seconds until a retry can succeed.
RateLimit-Limit
integer
The quota bucket's size (the burst).
RateLimit-Remaining
integer
Requests that can be made right now.
RateLimit-Reset
integer
Seconds until the bucket is full again.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Updated