Experiences
POST /experiences/{experienceId}/route
Find appropriate sequence for a consumer
POST
/
experiences
/
{experienceId}
/
route
cURL
curl --request POST \
--url https://consumer.fanfare.io/api/experiences/{experienceId}/route \
--header 'Content-Type: application/json' \
--data '
{
"accessCode": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({accessCode: '<string>'})
};
fetch('https://consumer.fanfare.io/api/experiences/{experienceId}/route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://consumer.fanfare.io/api/experiences/{experienceId}/route"
payload = { "accessCode": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://consumer.fanfare.io/api/experiences/{experienceId}/route"
payload := strings.NewReader("{\n \"accessCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"experienceId": "<string>",
"offers": [
{
"gates": [
{
"reason": {
"code": "AUTH_REQUIRED",
"detail": "<string>"
},
"status": "required",
"type": "authentication"
}
],
"reasons": [
{
"code": "NO_SEQUENCES",
"detail": "<string>"
}
],
"sequence": {
"color": "<string>",
"experienceId": "<string>",
"id": "<string>",
"name": "<string>",
"priority": 123,
"availability": "open"
},
"status": "gated",
"sequenceCapabilityGrant": "<string>",
"sequenceCapabilityGrantExpiresAt": "<string>"
}
],
"outcome": "routed",
"outcomeReasons": [
{
"code": "NO_SEQUENCES",
"detail": "<string>"
}
],
"schemaVersion": 1,
"selected": {
"gates": [
{
"reason": {
"code": "AUTH_REQUIRED",
"detail": "<string>"
},
"status": "required",
"type": "authentication"
}
],
"reasons": [
{
"code": "NO_SEQUENCES",
"detail": "<string>"
}
],
"sequence": {
"color": "<string>",
"experienceId": "<string>",
"id": "<string>",
"name": "<string>",
"priority": 123,
"availability": "open"
},
"status": "admissible",
"sequenceCapabilityGrant": "<string>",
"sequenceCapabilityGrantExpiresAt": "<string>"
}
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Path Parameters
Body
application/json
⌘I
cURL
curl --request POST \
--url https://consumer.fanfare.io/api/experiences/{experienceId}/route \
--header 'Content-Type: application/json' \
--data '
{
"accessCode": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({accessCode: '<string>'})
};
fetch('https://consumer.fanfare.io/api/experiences/{experienceId}/route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://consumer.fanfare.io/api/experiences/{experienceId}/route"
payload = { "accessCode": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://consumer.fanfare.io/api/experiences/{experienceId}/route"
payload := strings.NewReader("{\n \"accessCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"experienceId": "<string>",
"offers": [
{
"gates": [
{
"reason": {
"code": "AUTH_REQUIRED",
"detail": "<string>"
},
"status": "required",
"type": "authentication"
}
],
"reasons": [
{
"code": "NO_SEQUENCES",
"detail": "<string>"
}
],
"sequence": {
"color": "<string>",
"experienceId": "<string>",
"id": "<string>",
"name": "<string>",
"priority": 123,
"availability": "open"
},
"status": "gated",
"sequenceCapabilityGrant": "<string>",
"sequenceCapabilityGrantExpiresAt": "<string>"
}
],
"outcome": "routed",
"outcomeReasons": [
{
"code": "NO_SEQUENCES",
"detail": "<string>"
}
],
"schemaVersion": 1,
"selected": {
"gates": [
{
"reason": {
"code": "AUTH_REQUIRED",
"detail": "<string>"
},
"status": "required",
"type": "authentication"
}
],
"reasons": [
{
"code": "NO_SEQUENCES",
"detail": "<string>"
}
],
"sequence": {
"color": "<string>",
"experienceId": "<string>",
"id": "<string>",
"name": "<string>",
"priority": 123,
"availability": "open"
},
"status": "admissible",
"sequenceCapabilityGrant": "<string>",
"sequenceCapabilityGrantExpiresAt": "<string>"
}
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}