Skip to content
Get started

Get one experience

client.Experiences.Get(ctx, experience) (*ExperienceGetResponse, error)
GET/v3/experiences/{experience}

Get one experience

ParametersExpand Collapse
experience string
ReturnsExpand Collapse
type ExperienceGetResponse struct{…}

What an experience offers you. Deliberately a projection: where its templates live and how they are built is not yours to depend on, so it is not here.

Actions []ExperienceGetResponseActionOptional
Fields map[string, ExperienceGetResponseActionField]Optional

Fields you may send in params, keyed by the exact name to use.

Max int64Optional

Maximum length, for strings.

Required boolOptional
Type stringOptional
One of the following:
const ExperienceGetResponseActionFieldTypeString ExperienceGetResponseActionFieldType = "string"
const ExperienceGetResponseActionFieldTypeCents ExperienceGetResponseActionFieldType = "cents"
const ExperienceGetResponseActionFieldTypeInt ExperienceGetResponseActionFieldType = "int"
const ExperienceGetResponseActionFieldTypeURL ExperienceGetResponseActionFieldType = "url"
Name stringOptional
Summary stringOptional
DisplayName stringOptional
Experience stringOptional

Get one experience

package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  experience, err := client.Experiences.Get(context.TODO(), "experience")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", experience.Actions)
}
{
  "actions": [
    {
      "fields": {
        "foo": {
          "max": 0,
          "required": true,
          "type": "string"
        }
      },
      "name": "attach_card",
      "summary": "Ask the customer to add a card to their wallet."
    }
  ],
  "display_name": "Agentcard",
  "experience": "agentcard"
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2001/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
  },
  "success": false
}
Returns Examples
{
  "actions": [
    {
      "fields": {
        "foo": {
          "max": 0,
          "required": true,
          "type": "string"
        }
      },
      "name": "attach_card",
      "summary": "Ask the customer to add a card to their wallet."
    }
  ],
  "display_name": "Agentcard",
  "experience": "agentcard"
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2001/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
  },
  "success": false
}