NAV
shell

Introduction

Welcome to the YouLi Travel API! You can use our API to access YouLi API endpoints, which can get information on various trips.

Authentication

To gain a token, use this code, replacing your_username and your_password appropriately:

curl -X POST \
  https://youli.io/token \
  -d 'grant_type=password&username=your_username&password=your_password'

The above command returns JSON structured like this:

{
    "access_token": "meowmeowmeow",
    "token_type": "bearer",
    "expires_in": 1209599,
    "userName": "your_username",
    ".issued": "Thu, 22 Feb 2018 00:22:59 GMT",
    ".expires": "Thu, 08 Mar 2018 00:22:59 GMT"
}

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "Authorization: bearer meowmeowmeow"

Make sure to replace meowmeowmeow with your token.

YouLi uses Bearer authentication (also called token authentication) to authorize access to the system.

To gain a token, send a POST request to (see example code for parameters):

POST https://youli.io/token

YouLi then expects the provided token to be included in all API requests to the server in a header that looks like the following:

Authorization: bearer meowmeowmeow

Tokens will expire after 1 hour, at which time a new token must be requested.

Pagination Headers

Additional pagination information is returned in the response headers.

The X-Paging-Per-Page and X-Paging-Total headers give the number of elements returned on each page and the total number of elements respectively.

Trips

Get All Trips

curl "https://youli.io/api/trip/gettrips"
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "Total": 2,
  "Results":
  [
    {
      "TripName": "Saturn In The Summertime",
      "TripLink": "https://youli.io/t/mystic-adventures/saturn-trip",
      "TripPrimaryLocation": "Paris, France",
      "TripBannerURL": "https://ylt-images.imgix.net/b25b6ceb-7b8c-47db-b403-8a5ff4b7988f%2F899e3c52-a676-ec11-94f6-00155d69ec04%2F2ae91d79-4681-4e55-8337-bf69a42d9351Epic Destination Wedding - 2016-05-14 22.54.28 (jenahmadwe...).jpeg?fit=crop&crop=entropy&h=525&w=1500&auto=format&dpr=2&q=40",
      "TripStartDateUTC": null, 
      "TripEndDateUTC": null, 
      "TripDates": "",
      "TripDuration": "1 Saturn Year",
      "TripCurrencyCode": "AUD",
      "TripCost": "A$1",
      "TripParticipantsCount": 2,
      "TripShareSummary": "Lorem ipsum dolor sit amet, consec tetur adipiscing elit.",
      "ShowItineraryLink": false,
      "ItineraryLabel": "Travel Itinerary",
      "CTAText": "YES",
      "PlannerProfileLinkURL": "https://web.youli.io/u/mystic-adventures",
      "PlannerFullName": "Mystic Adventures",
      "PlannerAvatarURL": "https://ylt-images.imgix.net/app/landscape-two@2x.jpg?fit=crop&crop=faces&h=150&w=150",
      "BusinessPrimaryColour": "#ff0000",
      "BusinessPrimaryTextColour": "#000000",
      "BusinessPrimaryFont": "Montserrat",
      "TripLastUpdateDateUTC": "2017-11-27T10:11:26.88",
      "TripID": "7749446b-f787-ec11-a507-0050f222899f",
      "TourSeries": null,
      "TripPackages": [
        {
          "Id": "ca7f107d-4202-4e74-87af-26af4b3d83d8",
          "Price": 1400.00,
          "IsPricePerNight": false,
          "FeesAndTaxesAmount": 0.00,
          "Label": "Suite",
          "MaxNumberBookings": 0,
          "RequiredGroupSize": 0,
          "NumTravellers": 0,
          "Visibility": "published",
          "Description": null,
          "UrgencyLabel": null,
          "Rooms": [
              {
                  "Id": "2c9b6a9a-aaa5-487e-8ce6-1dace84ffb4d",
                  "Name": "409"
              },
              {
                  "Id": "ab223421-785d-409a-9aef-c56a8f6e370c",
                  "Name": "410"
              },
              {
                  "Id": "4af16d49-122a-447f-93bc-9ffa59cb46c6",
                  "Name": "411"
              },
              {
                  "Id": "b61e9dc4-f634-4e83-bd4b-ff8d14a293f6",
                  "Name": "412"
              }
          ],
          "PerPersonPrice": 1400.00,
          "BookingNumbers": 0,
          "IsAvailable": true
        },
      ]
    },
    {
      "TripName": "Summer is the best",
      "TripLink": "https://youli.io/t/mystic-adventures/summer-is-the-best",
      "TripPrimaryLocation": "summer",
      "TripBannerURL": "https://ylt-images.imgix.net/b25b6ceb-7b8c-47db-b403-8a5ff4b7988f%2F899e3c52-a676-ec11-94f6-00155d69ec04%2F2ae91d79-4681-4e55-8337-bf69a42d9351Epic Destination Wedding - 2016-05-14 22.54.28 (jenahmadwe...).jpeg?fit=crop&crop=entropy&h=525&w=1500&auto=format&dpr=2&q=40",
      "TripStartDateUTC": "2022-03-11T13:00:00",
      "TripEndDateUTC": "2022-03-15T13:00:00",
      "TripDates": "Sat 12 Mar 2022 <span class=\"time\"> </span> - Fri 8 Apr  <span class=\"time\"></span>",
      "TripDuration": "28 days",
      "TripCurrencyCode": "JPY",
      "TripCost": "¥30,000",
      "TripParticipantsCount": 1,
      "TripShareSummary": null,
      "ShowItineraryLink": true,
      "ItineraryLabel": "Itinerary",
      "CTAText": "Yes please",
      "PlannerProfileLinkURL": "https://web.youli.io/u/mystic-adventures",
      "PlannerFullName": "Mystic Adventures",
      "PlannerAvatarURL": "https://ylt-images.imgix.net/app/landscape-two@2x.jpg?fit=crop&crop=faces&h=150&w=150",
      "BusinessPrimaryColour": "#ff0000",
      "BusinessPrimaryTextColour": "#000000",
      "BusinessPrimaryFont": "Montserrat",
      "TripLastUpdateDateUTC": "2017-11-07T07:21:35.573",
      "TripID": "7a32048e-9f88-ec11-a507-0050f222899f",
      "TourSeries": {
        "Id": "0d005ac6-48a6-ec11-8716-c4236085fe66",
        "Name": "Season Tours"
      },
      "TripPackages": [
        {
          "Id": "e4eac556-7d35-4f7c-acc5-636b62139357",
          "Price": 800.00,
          "IsPricePerNight": false,
          "FeesAndTaxesAmount": 0.00,
          "Label": "Standard package",
          "MaxNumberBookings": 4,
          "RequiredGroupSize": 0,
          "NumTravellers": 0,
          "Visibility": "published",
          "Description": null,
          "UrgencyLabel": null,
          "Rooms": [],
          "PerPersonPrice": 800.00,
          "BookingNumbers": 4,
          "IsAvailable": false
        },
      ]
    }
  ]
}

This authenticated endpoint retrieves all public + listed (not archived) trips, which have have a start date in the future or have estimated dates, based on the provided query parameters.

HTTP Request

GET https://youli.io/api/trip/gettrips

URL Parameters

Parameter Default Is Optional Description
start_date One day ago Yes Start date in UTC time zone (UTC). Will match +/- 1 day
end_date Yes End date in UTC time zone (UTC). Will match +/- 1 day
location Yes Direct match against primary location
price_start 0 Yes Lower limit on price range to search. If provided, will only return trips with final prices (not ranges)
price_end no limit Yes Upper limit on price range to search. If provided, will only return trips with final prices (not ranges)
tag Yes Comma separated list of trip tags - ALL of them must match for a trip to be returned (ie., "AND" logic)
currency Yes If provided, will only return trips priced in the chosen currency (e.g. AUD, USD, GBP)
page 1 Yes Page number to retrieve
page_size 10 Yes Number of items per page

Results

Returns a list of Trip objects.

Visibility on TripPackage objects returns the following values:

Visibility Description
published Published
disabled Disabled
hiddenfrompublic Hidden From Travellers

Get Trip Invitees

curl "https://youli.io/api/trip/getinvitees"
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "Total": 2,
  "Results":
  [
    {
        "Id": "dbc0945e-43fe-e611-82bb-985fd335920c",
        "FullName": "Example Invitee",
        "FirstName": "Example",
        "LastName": "Invitee",
        "Email": "example@example.com",
        "PhoneNumber": "44443333",
        "BillToFirstName": "Example",
        "BillToLastName": "Invitee",
        "BillToStreetLine1": "100 Some Street",
        "BillToStreetLine2": null,
        "BillToCity": "Melbourne",
        "BillToCountry": "Australia",
        "BillToState": "Victoria",
        "BillToPostCode": "3000",
        "AvatarURL": "https://ylt-images.imgix.net/app/invitees-icon@2x.png?fit=crop&crop=faces&h=150&w=150",
        "MiniBio": "Bio sample",
        "RegistrationStatus": 1,
        "RegistrationDateReceivedUTC": "2022-06-02T03:16:44.6720722Z",
        "RegistrationNote": "Example registration note",
        "ResponseDietaryRequirement": "Vegetarian",
        "PlannerNote": "Planner notes may be here",
        "TransferredFromInviteeId": "26e5179e-4ea7-47ac-b53c-9bdcd61a38d3",
        "InvitationGroup": "groupname",
        "InvitationGroupMembers": [
          {
            "FullName": "Sample Friend",
            "FirstName": "Sample",
            "LastName": "Friend",
            "Email": "friend@example.com"
          },
          {
            "FullName": "Second Friend",
            "FirstName": "Second",
            "LastName": "Friend",
            "Email": "second@example.com"
          }
        ],
        "NumberInGroup": 2,
        "Category": "Invitee Category",
        "ReferenceCode": "TNSHYVC8Y6",
        "PackageName": "Standard Package",
        "PackageCode": "Deluxe",
        "PackageFeesAndTaxesAmount": 20.00,
        "BasePrice": 1256.25,
        "Room": null,
        "AmountOwing": 837.542,
        "TripId": "341e71a2-489f-e711-8305-985fd3437709",
        "TripName": "Saturn In The Summertime",
        "TripAlias": "saturn-trip",
        "TripRegistrationButtonLabel": "OK sure",
        "TripTags": [
          "Culinary",
          "Fundraising"
        ],
        "MagicLink": "https://youli.io/t/ahmad/saturn-trip/06826297-91eb-4e37-806b-70c1a08f657b",
        "TrackingSource": null,
        "TrackingMedium": null,
        "TrackingCampaign": null,
        "Payments": [
            {
                "Id": "8de4ef98-7821-497b-8a9d-916d893f67a2",
                "Amount": 100.0,
                "Currency": "USD",
                "Method": "offline",
                "Description": "Sample payment",
                "Status": "successful",
                "PaymentDateUTC": "2022-06-02T03:16:44.6720722Z",
                "YouLiFeeAmount": 0.0,
                "YouLiFeeCurrency": null,
                "CreditCardSurchargeAmount": 0.0,
                "CreditCardSurchargeCurrency": "USD",
                "RefundProtectSurchargeAmount": 0.0,
                "RefundProtectSurchargeCurrency": "USD",
                "Allocations": [
                    {
                        "Id": "00000000-0000-0000-0000-000000000000",
                        "FullName": "Example Invitee",
                        "FirstName": "Example",
                        "LastName": "Invitee",
                        "Amount": 100.0,
                        "Installment": null
                    }
                ]
            }
        ],
        "TaskResponses": [
            {
                "Id": "9d9d6b45-5156-ed11-8738-c4236085fe66",
                "TaskId": "c6a6ccc0-dc49-ed11-8735-c4236085fe66",
                "TaskName": "Give us more details",
                "TaskResponseType": 8,
                "ResponseValue": "",
                "HasFields": true,
                "FieldResponses": [
                    {
                        "APIFieldName": "AGE",
                        "FieldLabel": "How old are you?",
                        "FieldResponseValue": "34"
                    },
                    {
                        "APIFieldName": "DOCTOR_NAME",
                        "FieldLabel": "Who is your doctor?",
                        "FieldResponseValue": "Dr Bond"
                    }
                ]
            }
          ]
    }
  ]
}

This authenticated endpoint retrieves all invitees (people/travelers) on a specified trip. If an invitee ID is provided as well, then it will return just the specified invitee.

If the trip has been archived, a 400 (Bad Request) error will be returned.

HTTP Request

GET https://youli.io/api/trip/getinvitees

URL Parameters

Parameter Default Is Optional Description
tripid No Id of a given trip
inviteeid Yes Id of an invitee on the given trip
page 1 Yes Page number to retrieve
page_size 10 Yes Number of items per page

Results

Returns a list of TripRegistration objects.

RegistrationStatus returns the following values:

RegistrationStatus Description
0 Invited
1 Registered
3 Declined

Note: "2" is not currently a valid status.

TaskResponseType returns the following values:

TaskResponseType Description
0 Radio Button (Yes/No)
1 Checkbox (Done)
2 Select only one value
3 Date picker only
4 Date + time picker
5 Document(s) Upload
6 Input box (Comment)
7 Passport form + Upload
8 Custom form (build your own)
9 Select all that apply
10 Profile & Registration Form

Future Trips Lookup

curl "https://youli.io/api/trip/futuretripslookup"
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

[
  {
    "id": "341e71a2-489f-e711-8305-985fd3437709",
    "name": "Saturn In The Summertime"
  },
  {
    "id": "81421fbc-dfb9-e711-8309-985fd3437709",
    "name": "Summer is the best"
  }
]

This authenticated endpoint retrieves all future trips (public or private) for the authenticated user.

HTTP Request

GET https://youli.io/api/trip/futuretripslookup

Results

Returns a lookup style list of future trips, simply providing the Id and Name (for use in dropdowns and the like).

Recent Invitees

curl "https://youli.io/api/trip/getrecentinviteesorexample"
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

[
    {
        "Id": "dbc0945e-43fe-e611-82bb-985fd335920c",
        "FullName": "Example Invitee",
        "FirstName": "Example",
        "LastName": "Invitee",
        "Email": "example@example.com",
        "PhoneNumber": "44443333",
        "BillToFirstName": "Example",
        "BillToLastName": "Invitee",
        "BillToStreetLine1": "100 Some Street",
        "BillToStreetLine2": null,
        "BillToCity": "Melbourne",
        "BillToCountry": "Australia",
        "BillToState": "Victoria",
        "BillToPostCode": "3000",
        "AvatarURL": "https://ylt-images.imgix.net/app/invitees-icon@2x.png?fit=crop&crop=faces&h=150&w=150",
        "MiniBio": "Bio sample",
        "RegistrationStatus": 1,
        "RegistrationDateReceivedUTC": "2022-06-02T03:16:44.6720722Z",
        "RegistrationNote": "Example registration note",
        "ResponseDietaryRequirement": "Vegetarian",
        "PlannerNote": "Planner notes may be here",
        "TransferredFromInviteeId": null,
        "InvitationGroup": "groupname",
        "InvitationGroupMembers": [
          {
            "FullName": "Sample Friend",
            "FirstName": "Sample",
            "LastName": "Friend",
            "Email": "friend@example.com"
          },
          {
            "FullName": "Second Friend",
            "FirstName": "Second",
            "LastName": "Friend",
            "Email": "second@example.com"
          }
        ],
        "NumberInGroup": 2,
        "Category": "Invitee Category",
        "ReferenceCode": "TNSHYVC8Y6",
        "PackageName": "Standard Package",
        "PackageCode": "Deluxe",
        "PackageFeesAndTaxesAmount": 20.00,
        "BasePrice": 1256.25,
        "Room": null,
        "AmountOwing": 837.542,
        "TripId": "341e71a2-489f-e711-8305-985fd3437709",
        "TripName": "Saturn In The Summertime",
        "TripAlias": "saturn-trip",
        "TripRegistrationButtonLabel": "OK sure",
        "MagicLink": "https://youli.io/t/ahmad/saturn-trip/06826297-91eb-4e37-806b-70c1a08f657b",
        "TrackingSource": null,
        "TrackingMedium": null,
        "TrackingCampaign": null,
        "Payments": [
            {
                "Id": "8de4ef98-7821-497b-8a9d-916d893f67a2",
                "Amount": 100.0,
                "Currency": "USD",
                "Method": "offline",
                "Description": "Sample payment",
                "Status": "successful",
                "PaymentDateUTC": "2022-06-02T03:16:44.6720722Z",
                "YouLiFeeAmount": 0.0,
                "YouLiFeeCurrency": null,
                "CreditCardSurchargeAmount": 0.0,
                "CreditCardSurchargeCurrency": "USD",
                "RefundProtectSurchargeAmount": 0.0,
                "RefundProtectSurchargeCurrency": "USD",
                "Allocations": [
                    {
                        "Id": "00000000-0000-0000-0000-000000000000",
                        "FullName": "Example Invitee",
                        "FirstName": "Example",
                        "LastName": "Invitee",
                        "Amount": 100.0,
                        "Installment": null
                    }
                ]
            }
        ],
        "TaskResponses": [
            {
                "Id": "9d9d6b45-5156-ed11-8738-c4236085fe66",
                "TaskId": "c6a6ccc0-dc49-ed11-8735-c4236085fe66",
                "TaskName": "Give us more details",
                "TaskResponseType": 8,
                "ResponseValue": "",
                "HasFields": true,
                "FieldResponses": [
                    {
                        "APIFieldName": "AGE",
                        "FieldLabel": "How old are you?",
                        "FieldResponseValue": "34"
                    },
                    {
                        "APIFieldName": "DOCTOR_NAME",
                        "FieldLabel": "Who is your doctor?",
                        "FieldResponseValue": "Dr Bond"
                    }
                ]
            }
          ]
    }
]

This authenticated endpoint retrieves the last 10 invitees who registered for a given trip, or an example ("dummy") invitee if there are no invitees yet on the trip. If no Trip ID parameter is provided, it will return the last 10 invitees from the most recently updated trip. It can be used for testing other API endpoints (e.g. by Zapier).

HTTP Request

GET https://youli.io/api/trip/getrecentinviteesorexample

URL Parameters

Parameter Default Is Optional Description
tripid Yes Id of a given trip

Results

Returns a list of TripRegistration objects.

RegistrationStatus returns the following values:

RegistrationStatus Description
0 Invited
1 Registered
3 Declined

Note: "2" is not currently a valid status.

TaskResponseType returns the following values:

TaskResponseType Description
0 Radio Button (Yes/No)
1 Checkbox (Done)
2 Select only one value
3 Date picker only
4 Date + time picker
5 Document(s) Upload
6 Input box (Comment)
7 Passport form + Upload
8 Custom form (build your own)
9 Select all that apply
10 Profile & Registration Form

Recent Payments

curl "https://youli.io/api/trip/getpaymentsorexample"
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

[
    {
        "Id": "dbc0945e-43fe-e611-82bb-985fd335920c",
        "FullName": "Example Invitee",
        "FirstName": "Example",
        "LastName": "Invitee",
        "Email": "example@example.com",
        "PhoneNumber": "44443333",
        "BillToFirstName": "Example",
        "BillToLastName": "Invitee",
        "BillToStreetLine1": "100 Some Street",
        "BillToStreetLine2": null,
        "BillToCity": "Melbourne",
        "BillToCountry": "Australia",
        "BillToState": "Victoria",
        "BillToPostCode": "3000",
        "AvatarURL": "https://ylt-images.imgix.net/app/invitees-icon@2x.png?fit=crop&crop=faces&h=150&w=150",
        "MiniBio": "Bio sample",
        "RegistrationStatus": 1,
        "RegistrationDateReceivedUTC": "2022-06-02T03:16:44.6720722Z",
        "RegistrationNote": "Example registration note",
        "ResponseDietaryRequirement": "Vegetarian",
        "PlannerNote": "Planner notes may be here",
        "TransferredFromInviteeId": null,
        "InvitationGroup": "groupname",
        "InvitationGroupMembers": [
          {
            "FullName": "Sample Friend",
            "FirstName": "Sample",
            "LastName": "Friend",
            "Email": "friend@example.com"
          },
          {
            "FullName": "Second Friend",
            "FirstName": "Second",
            "LastName": "Friend",
            "Email": "second@example.com"
          }
        ],
        "NumberInGroup": 2,
        "Category": "Invitee Category",
        "ReferenceCode": "TNSHYVC8Y6",
        "PackageName": "Standard Package",
        "PackageCode": "Deluxe",
        "PackageFeesAndTaxesAmount": 20.00,
        "BasePrice": 1256.25,
        "Room": null,
        "AmountOwing": 837.542,
        "TripId": "341e71a2-489f-e711-8305-985fd3437709",
        "TripName": "Saturn In The Summertime",
        "TripAlias": "saturn-trip",
        "TripRegistrationButtonLabel": "OK sure",
        "MagicLink": "https://youli.io/t/ahmad/saturn-trip/06826297-91eb-4e37-806b-70c1a08f657b",
        "TrackingSource": null,
        "TrackingMedium": null,
        "TrackingCampaign": null,
        "Payment": {
            "Id": "8de4ef98-7821-497b-8a9d-916d893f67a2",
            "Amount": 100.0,
            "Currency": "USD",
            "Method": "offline",
            "Description": "Sample payment",
            "Status": "successful",
            "PaymentDateUTC": "2022-06-02T03:16:44.6720722Z",
            "YouLiFeeAmount": 0.0,
            "YouLiFeeCurrency": null,
            "CreditCardSurchargeAmount": 0.0,
            "CreditCardSurchargeCurrency": "USD",
            "RefundProtectSurchargeAmount": 0.0,
            "RefundProtectSurchargeCurrency": "USD",
            "Allocations": [
                {
                    "Id": "00000000-0000-0000-0000-000000000000",
                    "FullName": "Example Invitee",
                    "FirstName": "Example",
                    "LastName": "Invitee",
                    "Amount": 100.0,
                    "Installment": null
                }
            ]
        },
        "TaskResponses": [
            {
                "Id": "9d9d6b45-5156-ed11-8738-c4236085fe66",
                "TaskId": "c6a6ccc0-dc49-ed11-8735-c4236085fe66",
                "TaskName": "Give us more details",
                "TaskResponseType": 8,
                "ResponseValue": "",
                "HasFields": true,
                "FieldResponses": [
                    {
                        "APIFieldName": "AGE",
                        "FieldLabel": "How old are you?",
                        "FieldResponseValue": "34"
                    },
                    {
                        "APIFieldName": "DOCTOR_NAME",
                        "FieldLabel": "Who is your doctor?",
                        "FieldResponseValue": "Dr Bond"
                    }
                ]
            }
          ]
    }
]

This authenticated endpoint retrieves the last 10 invitee payments for a given trip, or an example ("dummy") invitee if there are no invitees yet on the trip. If no Trip ID parameter is provided, it will return the last 10 invitee payments from the most recently updated trip. It can be used for testing other API endpoints (e.g. by Zapier).

HTTP Request

GET https://youli.io/api/trip/getpaymentsorexample

URL Parameters

Parameter Default Is Optional Description
tripid Yes Id of a given trip

Results

Returns a list of TripRegistrationForSinglePayment objects.

RegistrationStatus returns the following values:

RegistrationStatus Description
0 Invited
1 Registered
3 Declined

Note: "2" is not currently a valid status.

TaskResponseType returns the following values:

TaskResponseType Description
0 Radio Button (Yes/No)
1 Checkbox (Done)
2 Select only one value
3 Date picker only
4 Date + time picker
5 Document(s) Upload
6 Input box (Comment)
7 Passport form + Upload
8 Custom form (build your own)
9 Select all that apply
10 Profile & Registration Form

Add Registration

curl "https://youli.io/api/trip/addregistration"
  -X POST
  -H "Authorization: bearer meowmeowmeow"
  -H "Content-Type: application/json"
  -d '{
    "tripid": "341e71a2-489f-e711-8305-985fd3437709",
    "firstname": "Sample",
    "lastname": "Addition",
    "email": "sample@example.com",
    "phoneNumber": "577376573",
    "registrationnote": "We will be there",
    "packageid": "4af5dbe5-9fd3-4c19-9cbb-5dfa9155f710",
    "room": 533,
    "source": "Website",
    "categoryname": "Teacher",
    "sendconfirmation": false,
    "taskresponses": [
      {
          "ApiFieldName": "AGE",
          "Value": 34
      },
      {
          "ApiFieldName": "DOCTOR_NAME",
          "Value": "Dr Bond"
      }
    ]
  }'

The above command returns JSON structured like this (warnings will be an array of strings if any warnings were raised):

{
  "Total": 1,
  "Results": {
    "Id": "7d6f4d61-7d7f-ea11-b276-2816a850d1f6",
    "FirstName": "Sample",
    "LastName": "Addition",
    "Email": "sample@example.com",
    "PhoneNumber": "577376573",
    "BillToFirstName": null,
    "BillToLastName": null,
    "BillToStreetLine1": null,
    "BillToStreetLine2": null,
    "BillToCity": null,
    "BillToCountry": null,
    "BillToState": null,
    "BillToPostCode": null,
    "AvatarURL": "https://ylt-images.imgix.net/app/invitees-icon@2x.png?fit=crop&crop=faces&h=150&w=150",
    "MiniBio": null,
    "RegistrationStatus": 1,
    "RegistrationDateReceivedUTC": "2020-09-11T01:47:41.605999Z",
    "RegistrationNote": "We will be there",
    "ResponseDietaryRequirement": "Vegetarian",
    "PlannerNote": null,
    "TransferredFromInviteeId": null,
    "InvitationGroup": null,
    "InvitationGroupMembers": [],
    "NumberInGroup": 1,
    "Category": "Invitee Category",
    "ReferenceCode": "TNSFJKC8Y6",
    "PackageName": "Sample Package",
    "PackageCode": "Deluxe",
    "PackageFeesAndTaxesAmount": 20.00,
    "BasePrice": 7650,
    "Room": 533,
    "AmountOwing": 7650,
    "TripId": "341e71a2-489f-e711-8305-985fd3437709",
    "TripName": "Saturn In The Summertime",
    "TripAlias": "saturn-trip",
    "TripRegistrationButtonLabel": "Yes please",
    "MagicLink": "https://youli.io/t/ahmad/saturn-trip",
    "TrackingSource": "Website",
    "TrackingMedium": "uploaded",
    "TrackingCampaign": null,
    "TaskResponses": [
      {
          "Id": "9d9d6b45-5156-ed11-8738-c4236085fe66",
          "TaskId": "c6a6ccc0-dc49-ed11-8735-c4236085fe66",
          "TaskName": "Give us more details",
          "TaskResponseType": 8,
          "ResponseValue": "",
          "HasFields": true,
          "FieldResponses": [
              {
                  "APIFieldName": "AGE",
                  "FieldLabel": "How old are you?",
                  "FieldResponseValue": "34"
              },
              {
                  "APIFieldName": "DOCTOR_NAME",
                  "FieldLabel": "Who is your doctor?",
                  "FieldResponseValue": "Dr Bond"
              },
              {
                  "ApiFieldName": "RICH_TEXT",
                  "Value": "<p>test<p/>"
              },
              {
                  "ApiFieldName": "SOCIAL_MEDIA",
                  "Value": "facebook-https://www.facebook.com/somepage|instagram-https://www.instagram.com/somepage"
              }
          ]
      }
    ],
  },
  "Warnings": []
}

This authenticated endpoint can be called to add a registration to a given trip. If a registration with the given email already exists, then the first name, last name, phone number, package and room will be updated on the existing registration (if they have changed).

Note that the package can never be cleared via the API. If no Package Id is provided for an update, the package will not be changed.

HTTP Request

POST https://youli.io/api/trip/addregistration

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
tripid No Id of trip to add registration to
firstname No First name of registration
lastname Yes Last name of registration
email No Email of registration
phonenumber Yes Phone number of registration
registrationnote Yes Registration Note
packageid Yes Id of trip package to add registration to.
If the specified package requires a change to the number of people in the invitee's group, placeholders will be added/removed correct, as would be done via the Trip Page when changing package
room Yes Free text room to set against invitee.
If a rooming map is installed for the trip, this value will be ignored
categoryname No If enabled, optionally provide a single category name as a string for this registration.
If provided, it must be a valid category configured on the trip owner’s account, a 400 will be returned if an invalid value is provided. Parameter will be ignored if the trip owner does not have Traveler Categories enabled. Learn More
source API Yes Can be used to track the source of an added registration
sendconfirmation false Yes If set to true, a normal confirmation email will be sent to the registration email regarding their addition in YouLi
taskresponses Yes Array of task responses. If provided, tasks responses will be add for the new registration, see below for details

The TaskResponses array, if provided, must contain a JSON array in the following format:

Field Default Is Optional Description
apifieldname No API Field Name for a custom form field.
value Yes Value for the response.

The API Field Name must match the "API Field Name" on a field for one of the "Custom Form Builder" tasks on the given trip. If no such field is found, a warning will be given.

A task response will be created for every "Custom Form Builder" task for which one or more field value responses have been given.

If the API FIELD NAME is provided but the value is empty, and the associated task field is not required, the field response for that custom form field will be set to an empty string. traveler task response will have a field set for that an empty string. However, if the associated field is required, then the task response will not be added at all, and a warning will be given in the response.

Any tasks that do not have a full set of "required" fields provided in this request will not have a response created/updated. A warning will be given in the response.

The value provided for a given task response field must match the given field type. For example:

For date values, the components are:

For more information about the "API Field Name", refer to the help documentation available at https://help.youlivetotravel.com/hc/en-us/articles/4415398752911-API-Field-Name

Results

Returns a TripRegistration object.

RegistrationStatus returns the following values:

RegistrationStatus Description
0 Invited
1 Registered
3 Declined

Note: "2" is not currently a valid status.

TaskResponseType returns the following values:

TaskResponseType Description
0 Radio Button (Yes/No)
1 Checkbox (Done)
2 Select only one value
3 Date picker only
4 Date + time picker
5 Document(s) Upload
6 Input box (Comment)
7 Passport form + Upload
8 Custom form (build your own)
9 Select all that apply
10 Profile & Registration Form

Webhooks

Webhooks can be used to get automatic notifications when certain events occur within YouLi. Learn more about use cases here.

Subscribe to Trip Invitees

curl "https://youli.io/api/webooks/subscribe"
  -X POST
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "id": "e05a4ff9-d2f3-ea11-b29f-2816a850d1f6"
}

This authenticated endpoint can be called to add a subscription to a webhook.

The webhook which will trigger every time an invitee is added to the specified trip with a registration status of "registered". It will also trigger whenever an existing invitee is changed to that state.

The structure of the data sent when the event triggers will be the same as the data returned from the "Recent Invitees" endpoint.

HTTP Request

POST https://youli.io/api/webhook/subscribe

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
hookUrl No Url to be called when a certain given event triggers
tripid No Id of trip for which to subscribe for events

Results

Returns an Id of the webhook which can be used by external systems, such as for use with the unsubscribe endpoint.

Unsubscribe (Trip Invitees)

curl "https://youli.io/api/webooks/unsubscribe"
  -X DELETE
  -H "Authorization: bearer meowmeowmeow"

The above command returns text structured like this:

OK

This authenticated endpoint can be called to delete a subscription to a webhook.

HTTP Request

DELETE https://youli.io/api/webhook/unsubscribe

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
HookId No Id of webhook, previously provided on subscribe

Results

Deletes the given webook.

Subscribe to User Trips Invitees

curl "https://youli.io/api/webooks/subscribeusertripinvitee"
  -X POST
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "id": "e05a4ff9-d2f3-ea11-b29f-2816a850d1f6"
}

This authenticated endpoint can be called to add a subscription to a webhook.

The webhook which will trigger every time an invitee (registration) is added to any "current" trip for the authenticated user (or their team owner), with a registration status of "registered". It will also trigger whenever an existing invitee is changed to that state.

The structure of the data sent when the event triggers will be the same as the data returned from the "Recent Invitees" endpoint.

HTTP Request

POST https://youli.io/api/webhook/subscribeusertripinvitee

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
hookUrl No Url to be called when a certain given event triggers

Results

Returns an Id of the webhook which can be used by external systems, such as for use with the unsubscribe endpoint.

Unsubscribe (User Trip Invitees)

curl "https://youli.io/api/webooks/unsubscribeusertripinvitee"
  -X DELETE
  -H "Authorization: bearer meowmeowmeow"

The above command returns text structured like this:

OK

This authenticated endpoint can be called to delete a webhook.

HTTP Request

DELETE https://youli.io/api/webhook/unsubscribeusertripinvitee

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
HookId No Id of webhook, previously provided on subscribe

Results

Deletes the given webook.

Subscribe to Trip Payments

curl "https://youli.io/api/webooks/subscribetrippayments"
  -X POST
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "id": "e05a4ff9-d2f3-ea11-b29f-2816a850d1f6"
}

This authenticated endpoint can be called to add a subscription to a webhook.

The webhook which will trigger every time an invitee payment is added to the specified trip. The structure of the data sent when the event triggers will be the same as the data returned from the "Recent Payments" endpoint.

HTTP Request

POST https://youli.io/api/webhook/subscribetrippayments

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
hookUrl No Url to be called when a certain given event triggers
tripid No Id of trip for which to subscribe for events

Results

Returns an Id of the webhook which can be used by external systems, such as for use with the unsubscribe endpoint.

Unsubscribe (Trip Payments)

curl "https://youli.io/api/webooks/unsubscribetrippayments"
  -X DELETE
  -H "Authorization: bearer meowmeowmeow"

The above command returns text structured like this:

OK

This authenticated endpoint can be called to delete a webhook.

HTTP Request

DELETE https://youli.io/api/webhook/unsubscribetrippayments

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
HookId No Id of webhook, previously provided on subscribe

Results

Deletes the given webook.

Subscribe to User Trip Payments

curl "https://youli.io/api/webooks/subscribeusertrippayments"
  -X POST
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "id": "e05a4ff9-d2f3-ea11-b29f-2816a850d1f6"
}

This authenticated endpoint can be called to add a subscription to a webhook.

The webhook which will trigger every time an invitee payment is added to any trip for the authenticated user (or their team owner). The structure of the data sent when the event triggers will be the same as the data returned from the "Recent Payments" endpoint.

HTTP Request

POST https://youli.io/api/webhook/subscribeusertrippayments

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
hookUrl No Url to be called when a certain given event triggers

Results

Returns an Id of the webhook which can be used by external systems, such as for use with the unsubscribe endpoint.

Unsubscribe (User Trip Payments)

curl "https://youli.io/api/webooks/unsubscribeusertrippayments"
  -X DELETE
  -H "Authorization: bearer meowmeowmeow"

The above command returns text structured like this:

OK

This authenticated endpoint can be called to delete a webhook.

HTTP Request

DELETE https://youli.io/api/webhook/unsubscribeusertrippayments

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
HookId No Id of webhook, previously provided on subscribe

Results

Deletes the given webook.

Subscribe to Trip Task Responses

curl "https://youli.io/api/webooks/subscribetriptaskresponses"
  -X POST
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "id": "e05a4ff9-d2f3-ea11-b29f-2816a850d1f6"
}

This authenticated endpoint can be called to add a subscription to a webhook.

The webhook which will trigger every time an invitee task response is added to the specified trip. The structure of the data sent when the event triggers will be the same as the data returned from the "Recent Invitees" endpoint, but with just the single task response, and without any payments.

HTTP Request

POST https://youli.io/api/webhook/subscribetriptaskresponses

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
hookUrl No Url to be called when a certain given event triggers
tripid No Id of trip for which to subscribe for events

Results

Returns an Id of the webhook which can be used by external systems, such as for use with the unsubscribe endpoint.

Unsubscribe (Trip Task Responses)

curl "https://youli.io/api/webooks/unsubscribetriptaskresponses"
  -X DELETE
  -H "Authorization: bearer meowmeowmeow"

The above command returns text structured like this:

OK

This authenticated endpoint can be called to delete a webhook.

HTTP Request

DELETE https://youli.io/api/webhook/unsubscribetriptaskresponses

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
HookId No Id of webhook, previously provided on subscribe

Results

Deletes the given webook.

Subscribe to User Trip Task Responses

curl "https://youli.io/api/webooks/subscribeusertriptaskresponses"
  -X POST
  -H "Authorization: bearer meowmeowmeow"

The above command returns JSON structured like this:

{
  "id": "e05a4ff9-d2f3-ea11-b29f-2816a850d1f6"
}

This authenticated endpoint can be called to add a subscription to a webhook.

The webhook which will trigger every time an invitee task response is added to any trip for the authenticated user (or their team owner). The structure of the data sent when the event triggers will be the same as the data returned from the "Recent Invitees" endpoint, but with just the single task response, and without any payments.

HTTP Request

POST https://youli.io/api/webhook/subscribeusertriptaskresponses

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
hookUrl No Url to be called when a certain given event triggers

Results

Returns an Id of the webhook which can be used by external systems, such as for use with the unsubscribe endpoint.

Unsubscribe (User Trip Task Responses)

curl "https://youli.io/api/webooks/unsubscribeusertriptaskresponses"
  -X DELETE
  -H "Authorization: bearer meowmeowmeow"

The above command returns text structured like this:

OK

This authenticated endpoint can be called to delete a webhook.

HTTP Request

DELETE https://youli.io/api/webhook/unsubscribeusertriptaskresponses

Request Body

Accepts JSON data with the following content:

Field Default Is Optional Description
HookId No Id of webhook, previously provided on subscribe

Results

Deletes the given webook.