NAV
php

Introduction

Welcome to the Swoogo API! You can use our API to access Swoogo API endpoints, which can get information on events, registrations, sessions and more. Swoogo uses API keys to allow access to the API. You can generate or re-generate your API key for a particular account and user by logging in to the app and visiting Profile > API Credentials.

Authentication

Using Curl and PHP:

$consumerKey = urlencode('CONSUMER_KEY');
$consumerSecret = urlencode('CONSUMER_SECRET');
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERPWD, $consumerKey.':'.$consumerSecret);
curl_setopt($ch, CURLOPT_URL, 'https://www.swoogo.com/api/v1/oauth2/token.json');
curl_setopt($ch, CURLOPT_POSTFIELDS, 'grant_type=client_credentials');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch));
$accessToken = $result->access_token;

To use the Swoogo API class, simply include the class and use:

$api = new SwoogoApi('CONSUMER_KEY', 'CONSUMER_SECRET');

Make sure to replace CONSUMER_KEY AND CONSUMER_SECRET with your actual API credentials.

Step 1: Find your consumer key and secret

Your consumer key and secret can be found by logging in to Swoogo, and going to My Profile > API Credentials.

Step 2: Encode consumer key and secret

The steps to encode your consumer key and secret into a set of credentials to obtain a bearer token are:

1) URL encode the consumer key and the consumer secret according to RFC 1738.
2) Concatenate the encoded consumer key, a colon character “:”, and the encoded consumer secret into a single string.
3) Base64 encode the string from the previous step.

Consumer Key:
xvz1evFS4wEEPTGEFPHBog

Consumer Secret:
L8qq9PZyRg6ieKGEKhZolGC0vJWLw8iEJ88DRdyOg

Concatenated:
xvz1evFS4wEEPTGEFPHBog:L8qq9PZyRg6ieKGEKhZolGC0vJWLw8iEJ88DRdyOg

Base 64 Encoded:
eHZ6MWV2RlM0d0VFUFRHRUZQSEJvZzpMOHFxOVBaeVJnNmllS0dFS2hab2xHQzB2SldMdzhpRUo4OERSZHlPZw==


Step 3: Obtain a bearer token

The value calculated in step 1 must be exchanged for a bearer token by issuing a request to POST /api/v1/oauth2/token.json:

Example request:

POST /api/v1/oauth2/token.json HTTP/1.1
Host: www.swoogo.com
Authorization: Basic YOUR_BASE_64_ENCODED_TOKEN
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Content-Length: 29

grant_type=client_credentials


Step 4: Authenticate API requests with the bearer token

The bearer token may be used to issue requests to Swoogo API endpoints. To use the bearer token, construct a normal HTTPS request and include an Authorization header with the value of your bearer token from step 2.

Example request:

GET /api/v1/events.json HTTP/1.1
Host: www.swoogo.com
Authorization: Bearer YOUR_BEARER_TOKEN

Contacts

Get All Contacts

$response = $api->request('https://www.swoogo.com/api/v1/contacts.json', array(
     'fields' => 'id,first_name,last_name'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "first_name": "Aleshia",
            "last_name": "Tomkiewicz"
        },
        {
            "id": 2,
            "first_name": "Evan",
            "last_name": "Zigomalas"
        }
    ],
    "_links": {
        "self": {
            "href": "contacts.json?event_id=1&fields=id%2Cfirst_name%2Clast_name&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 20
    }
}

This endpoint retrieves all contacts.

HTTP Request

GET https://www.swoogo.com/api/v1/contacts.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional id,first_name,last_name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return (see available fields for details)
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Contact

$response = $api->request('https://www.swoogo.com/api/v1/contacts/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "event_id": 1,
    "email": "atomkiewicz@hotmail.com",
    "prefix": "",
    "first_name": "Aleshia",
    "middle_name": "",
    "last_name": "Tomkiewicz",
    "suffix": "",
    "company": "Alan D Rosenburg Cpa Pc",
    "job_title": "",
    "work_phone": "+44 1835 703597",
    "mobile_phone": "",
    "profile_picture": "",
    "twitter_handle": "",
    "gender": {
        "id": 1,
        "value": "Female"
    },
    "birth_date": "",
    "cc_email": "",
    "bio": "",
    "created_at": "2015-10-12 13:48:03",
    "updated_at": "2015-10-12 13:48:15"
}

This endpoint retrieves a specific Contact.

HTTP Request

GET https://www.swoogo.com/api/v1/contacts/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return (see available fields for details)

Create A New Contact

$response = $api->request('https://www.swoogo.com/api/v1/contacts/create.json', array(
     'first_name' => 'Aleshia',
     'last_name' => 'Tomkiewicz',
     'email' => 'atomkiewicz@hotmail.com'
), 'post');

The above command returns JSON structured like this:

{
    "id": 3700,
    "account_id": 1,
    "email": "atomkiewicz@hotmail.com",
    "c_25": "",
    "c_30": "",
    "c_71": {
        "id": null,
        "value": null
    },
    "c_72": [],
    "prefix": "",
    "first_name": "",
    "middle_name": "",
    "last_name": "",
    "suffix": "",
    "company": "",
    "job_title": "",
    "work_phone": "",
    "mobile_phone": "",
    "profile_picture": "",
    "twitter_handle": "",
    "gender": {
        "id": null,
        "value": null
    },
    "birth_date": "",
    "cc_email": "",
    "bio": "",
    "created_at": "2018-10-24 09:40:05",
    "updated_at": "2018-10-24 09:40:05"
}

This endpoint creates a new Contact.

HTTP Request

POST https://www.swoogo.com/api/v1/contacts/create.json

Parameters

Field Type Required? Default Description
first_name string Optional null The first name of contact
last_name string Optional null The last name of contact
email string Required null The email of contact

See available fields section for full list

Update An Existing Contact

$response = $api->request('https://www.swoogo.com/api/v1/contacts/update/1.json', array(
     'first_name' => 'Aleshia',
     'last_name' => 'Tomkiewicz',
     'email' => 'atomkiewicz@hotmail.com'
), 'put');

The above command returns JSON structured like this:

{
    "id": 1,
    "account_id": 1,
    "email": "atomkiewicz@hotmail.com",
    "c_25": "",
    "c_30": "",
    "c_71": {
        "id": null,
        "value": null
    },
    "c_72": [],
    "prefix": "",
    "first_name": "",
    "middle_name": "",
    "last_name": "",
    "suffix": "",
    "company": "",
    "job_title": "",
    "work_phone": "",
    "mobile_phone": "",
    "profile_picture": "",
    "twitter_handle": "",
    "gender": {
        "id": null,
        "value": null
    },
    "birth_date": "",
    "cc_email": "",
    "bio": "",
    "created_at": "2018-10-24 09:40:05",
    "updated_at": "2018-10-24 09:40:05"
}

This endpoint updates an existing Contact.

HTTP Request

PUT https://www.swoogo.com/api/v1/contacts/update/ID.json

Parameters

Field Type Required? Default Description
id integer Required null The ID of the contact you want to update
first_name string Optional null The first name of contact
last_name string Optional null The last name of contact
email string Required null The email of contact

See available fields section for full list

Forget An Existing Contact

$response = $api->request('https://www.swoogo.com/api/v1/contact/forget/1.json', [
     'registrantIds' = [1,2],
     'deleteCreditCardName' => true,
], 'put');

The above command returns JSON structured like this:

null

This endpoint performs a GDPR “right to be forgotten” request for an existing Contact.

HTTP Request

PUT https://www.swoogo.com/api/v1/contacts/forget/ID.json

Parameters

Field Type Required? Default Description
id integer Required null The ID of the contact you want to “forget” per a GDPR request
registrantIds array Optional null Array of registration ids to overwrite the registrations. If null, it will overwrite all the contacts registrations.
deleteCreditCardName boolean Optional false Overwrite the “name on card” for any credit card payments

Available Contact Fields

These are the standard fields that the API can return for contacts. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the contact. This field can only be returned, it can’t be updated.
created_at string When the contact was created.
updated_at string When the contact was last updated.
subscribe_status string Whether they are subscribed to emails (subscribed/unsubscribed)
notes string Any notes against the contact.
email string See description in All Registrant Fields
prefix string See description in All Registrant Fields
first_name string See description in All Registrant Fields
middle_name string See description in All Registrant Fields
last_name string See description in All Registrant Fields
suffix string See description in All Registrant Fields
company string See description in All Registrant Fields
job_title string See description in All Registrant Fields
work_phone string See description in All Registrant Fields
mobile_phone string See description in All Registrant Fields
gender string See description in All Registrant Fields
birth_date string See description in All Registrant Fields
twitter_handle string See description in All Registrant Fields
profile_picture string See description in All Registrant Fields
bio string See description in All Registrant Fields
cc_email string See description in All Registrant Fields

Extra fields

This is the extra information that can be returned if required by specifying what you need in the expand variable.

Name Type Description
workAddress object The work address of the contact
homeAddress object The home address of the contact
billingAddress object The billing address of the contact
registrants array The registrations for the contact

Events

Get All Events

$response = $api->request('https://www.swoogo.com/api/v1/events.json', array(
     'fields' => 'id,name,start_date'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "International Conference",
            "start_date": "2015-10-26"
        },
        {
            "id": 2,
            "name": "Member Meeting",
            "start_date": "2015-11-12"
        }
    ],
    "_links": {
        "self": {
            "href": "events.json?fields=id%2Cname%2Cstart_date&page=1&per-page=200"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 200
    }
}

This endpoint retrieves all events.

HTTP Request

GET https://www.swoogo.com/api/v1/events.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional id,name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Event

$response = $api->request('https://www.swoogo.com/api/v1/events/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "folder_id": 0,
    "status": "draft",
    "name": "International Conference",
    "url": "international-conference",
    "hashtag": "",
    "description": "",
    "organizer_id": 1,
    "start_date": "2016-02-10",
    "start_time": null,
    "end_date": null,
    "end_time": null,
    "timezone": "Europe\/London",
    "capacity": null,
    "target_attendance": null,
    "created_at": "2015-09-20 09:07:19",
    "updated_at": "2015-09-23 15:38:35"
}

This endpoint retrieves a specific Event.

HTTP Request

GET https://www.swoogo.com/api/v1/events/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return

Available Event Fields

These are the standard fields that the API can return for events. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer Unique ID for the event
folder_id integer The folder ID the event is in
status string The event’s status
name string The name of the event
url string The URL slug identifying this event
hashtag string The hashtag being used for the event
description string The event description
organizer_id integer The ID of the person organizing the event
start_date string The date the event starts
start_time string The time the event starts
end_date string The date the event ends
end_time string The time the event ends
timezone string The timezone the event is taking place in
capacity integer The maximum number of people who can register for the event
target_attendance integer The number of registrations the organizer was targeting
domain string The domain this event uses
currency string The event currency
created_at string The date and time the event was created
updated_at string The date and time the event was updated

Extra fields

This is the extra information that can be returned if required by specifying what you need in the expand variable.

Name Type Description
location object The location where the event is taking place

Event Questions

Get All Event Questions

$response = $api->request('https://www.swoogo.com/api/v1/event-questions.json', array(
     'event_id' => 1,
     'fields' => 'id,name,attribute'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "Email",
            "attribute": "email"
        },
        {
            "id": 2,
            "name": "First Name",
            "attribute": "first_name"
        }
    ],
    "_links": {
        "self": {
            "href": "event-questions.json?event_id=1&fields=id%2Cname%2Cattribute&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 20
    }
}

This endpoint retrieves the questions that your registrants will be asked to answer whilst registering for a certain event.

HTTP Request

GET https://www.swoogo.com/api/v1/event-questions.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve questions for
fields string Optional id,name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Event Question

$response = $api->request('https://www.swoogo.com/api/v1/event-questions/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "event_id": 1,
    "name": "Email Address",
    "attribute": "email",
    "created_at": "2016-09-06 18:32:59",
    "updated_at": "2016-09-06 18:32:59"
}

This endpoint retrieves a specific Event Question.

HTTP Request

GET https://www.swoogo.com/api/v1/event-questions/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return

Available Event Question Fields

These are the standard fields that the API can return for event questions. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the event question
event_id integer The ID of the event the question is being asked for
page_id integer The ID of the page the question is being asked on
name string The name of the question as it appears on forms
attribute string The name of the attribute in the database
type string The type of question input
sort integer The position of the question in the form on a specific page
created_at string The date the question was created (YYYY-MM-DD HH:MM:SS)
updated_at string The date the question was updated (YYYY-MM-DD HH:MM:SS)

Extra fields

This is the extra information that can be returned if required by specifying what you need in the expand variable.

Name Type Description
choices object The available choices for the question (only for multiple choice questions)
page object The page that the question appears on

Packages

Get All Packages

$response = $api->request('https://www.swoogo.com/api/v1/packages.json', array(
     'event_id' => 1,
     'fields' => 'id,name'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "Gold Package"
        },
        {
            "id": 2,
            "name": "Silver Package"
        }
    ],
    "_links": {
        "self": {
            "href": "packages.json?event_id=1&fields=id%2Cname%2Ccreated_at&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 20
    }
}

This endpoint retrieves all packages.

HTTP Request

GET https://www.swoogo.com/api/v1/packages.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve packages for
fields string Optional id,name Comma separated list of fields you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Package

$response = $api->request('https://www.swoogo.com/api/v1/packages/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "name": "Gold Package",
    "public_short_name": "",
    "admin_short_name": "",
    "description": "",
    "capacity": null,
    "sold_out_message": "Sold Out",
    "min_group_size": null,
    "max_group_size": null,
    "created_at": "2017-01-20 09:59:39",
    "updated_at": "2017-05-26 14:44:05"
}

This endpoint retrieves a specific Package.

HTTP Request

GET https://www.swoogo.com/api/v1/packages/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return

Available Package Fields

These are the standard fields that the API can return for packages. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer Unique ID for the package
name string The name of the package
public_short_name string The short name of the package used on the website
admin_short_name string The short name of the package used in reports
description string The description of the package
capacity integer The maximum number of people who can select the package
sold_out_message string The message that appears when the capacity is reached
min_group_size integer The minimum size of the group when this package is the first selected
max_group_size integer The maximum size of the group when this package is the first selected
created_at string The date and time the package was created (YYYY-MM-DD HH:MM:SS)
updated_at string The date and time the package was last updated (YYYY-MM-DD HH:MM:SS)

Pages

Get All Pages

$response = $api->request('https://www.swoogo.com/api/v1/pages.json', array(
     'event_id' => 1,
     'fields' => 'id,name,slug'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "Begin Registration",
            "slug": "begin"
        },
        {
            "id": 2,
            "name": "Personal Information",
            "slug": "personal_info"
        }
    ],
    "_links": {
        "self": {
            "href": "pages.json?event_id=1&fields=id%2Cname%2Cattribute&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 20
    }
}

This endpoint retrieves all pages.

HTTP Request

GET https://www.swoogo.com/api/v1/pages.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve pages for
fields string Optional id,name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Page

$response = $api->request('https://www.swoogo.com/api/v1/pages/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "event_id": 1,
    "name": "Begin Registration",
    "slug": "begin",
    "type": "registration",
    "created_at": "2016-09-06 18:32:59",
    "updated_at": "2016-09-06 18:32:59"
}

This endpoint retrieves a specific Page.

HTTP Request

GET https://www.swoogo.com/api/v1/pages/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return

Available Page Fields

These are the standard fields that the API can return for pages. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the page
parent_id integer The parent page if the page is part of a dropdown menu
event_id integer The ID of the event
name string The name of the page
slug string The page slug (if empty the page ID is used instead)
fullUrl string The full URL to the page
type string The type of the page (website, registration, other)
sort integer The sort order of the pages
icon integer The icon used on the page
created_at string The date the page was created (YYYY-MM-DD HH:MM:SS)
updated_at string The date the page was updated (YYYY-MM-DD HH:MM:SS)

Extra fields

This is the extra information that can be returned if required by specifying what you need in the expand variable.

Name Type Description
eventQuestions object The event questions that appear on the page

Registrants

Get All Registrants

$response = $api->request('https://www.swoogo.com/api/v1/registrants.json', array(
     'event_id' => 1,
     'fields' => 'id,first_name,last_name'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "first_name": "Aleshia",
            "last_name": "Tomkiewicz"
        },
        {
            "id": 2,
            "first_name": "Evan",
            "last_name": "Zigomalas"
        }
    ],
    "_links": {
        "self": {
            "href": "registrants.json?event_id=1&fields=id%2Cfirst_name%2Clast_name&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 20
    }
}

This endpoint retrieves all registrants.

HTTP Request

GET https://www.swoogo.com/api/v1/registrants.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve registrants for
fields string Optional id,first_name,last_name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return (see available fields for details)
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Registrant

$response = $api->request('https://www.swoogo.com/api/v1/registrants/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "event_id": 1,
    "email": "atomkiewicz@hotmail.com",
    "prefix": "",
    "first_name": "Aleshia",
    "middle_name": "",
    "last_name": "Tomkiewicz",
    "suffix": "",
    "company": "Alan D Rosenburg Cpa Pc",
    "job_title": "",
    "work_phone": "+44 1835 703597",
    "mobile_phone": "",
    "profile_picture": "",
    "twitter_handle": "",
    "gender": {
        "id": 1,
        "value": "Female"
    },
    "birth_date": "",
    "cc_email": "",
    "bio": "",
    "created_at": "2015-10-12 13:48:03",
    "updated_at": "2015-10-12 13:48:15"
}

This endpoint retrieves a specific Registrant.

HTTP Request

GET https://www.swoogo.com/api/v1/registrants/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return (see available fields for details)

Update An Existing Registrant

$response = $api->request('https://www.swoogo.com/api/v1/registrants/update/1.json', array(
     'first_name' => 'Aleshia',
     'last_name' => 'Tomkiewicz',
     'email' => 'atomkiewicz@hotmail.com'
), 'put');

The above command returns JSON structured like this:

{
    "id": 1,
    "event_id": 1,
    "group_id": 1,
    "email": "atomkiewicz@hotmail.com",
    "prefix": "",
    "first_name": "Aleshia",
    "package_id": {
        "id": 7,
        "value": "package-1-waitlist"
    },
    "discount_code": {
        "id": null,
        "value": ""
    },
    "middle_name": "",
    "reg_type_id": {
        "id": 39,
        "value": "reg-type-2"
    },
    "last_name": "Tomkiewicz",
    "suffix": "",
    "c_185": "",
    "company": "",
    "sq_137": [
        {
            "id": "94",
            "value": "second-waitlist"
        },
        {
            "id": "95",
            "value": "network table 1 featuring"
        }
    ],
    "sq_207": [],
    "job_title": "",
    "work_phone": "",
    "c_201": "",
    "mobile_phone": "",
    "profile_picture": "",
    "twitter_handle": "",
    "gender": {
        "id": null,
        "value": null
    },
    "cc_email": "",
    "bio": "",
    "c_143": "",
    "c_144": "",
    "c_145": "",
    "c_146": "test",
    "c_150": [],
    "c_151": {
        "id": "",
        "value": null
    },
    "c_152": {
        "id": "",
        "value": null
    },
    "c_156": "",
    "c_157": "",
    "c_149": "",
    "c_204": "August 28, 2019",
    "c_205": "",
    "c_206": "",
    "c_209": [],
    "session_ids": [
        "95",
        "94"
    ],
    "notes": "",
    "reference": "",
    "ip_address": "192.168.56.1",
    "individual_net": "0.00",
    "individual_tax": "0.00",
    "individual_gross": "0.00",
    "group_net": "0.00",
    "group_tax": "0.00",
    "group_gross": "0.00",
    "group_paid": "2.00",
    "created_at": "2017-12-27 18:31:33",
    "updated_at": "2019-10-28 10:19:38",
    "cancelled_at": null,
    "checked_in_at": "2019-09-18 11:18:27",
    "ext_token": "R9KF5lE5vzslqEMux01C7ABFuqDp8wvz_1516963464",
    "registration_status": "attended",
    "group_balance_due": -2
}

This endpoint updates an existing Registrant.

HTTP Request

PUT https://www.swoogo.com/api/v1/registrants/update/ID.json

Parameters

Field Type Required? Default Description
first_name string Optional null The first name of contact
last_name string Optional null The last name of contact
email string Optional null The email of contact
override_capacity_errors boolean Optional false If an item is sold out, an error will be shown and the registrant will not be updated. If this flag is enabled, the data will be updated

See available fields section for full list

Check In A Specific Registrant

$response = $api->request('https://www.swoogo.com/api/v1/registrants/checkin.json', array(
'id' => 1,
'status' => 'Attended'
), 'post');

The above command returns JSON structured like this:

{
    "id": 1,
    "status": "Attended",
    "updated_at": "2015-09-28 10:35:21"
}

This endpoint checks in a specific Registrant.

HTTP Request

POST https://www.swoogo.com/api/v1/registrants/checkin.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
id integer Required null The ID of the registrant you want to check-in
status string Optional attended Allows a registrant to be set to “attended”, “confirmed” or “no_show”
timestamp timestamp Optional now() Allows a timestamp to be set, only valid when marking someone as “Attended”

Create Registrant Token

$response = $api->request('http://www.swoogo.com/api/v1/registrants/token.json', array(
'event_id' => 49,
'fields' => array(
 'email'=>'atomkiewicz@hotmail.com',
 'first_name'=>'Aleshia',
 'last_name'=>'Tomkiewicz',
 'package_id' => 11,
 'reg_type_id' => 20,
),
), 'post');

The above command returns JSON structured like this:

{
    "event_id": 49,
    "token": "nXGTJ-SfjLbOWNXwh6xXQDuUYFhZ5puH_1482142194",
    "url": "https://client.swoogo.com/event/resume?i=nXGTJ-SfjLbOWNXwh6xXQDuUYFhZ5puH_1482142194",
    "id": "123"
}

This endpoint creates a token to allow Registrant details to be populated in the confines of an end-user registration. The returned token can be used in a link of the format https://client.swoogo.com/event/resume?i=XXXX to pre-populate registration details.

HTTP Request

POST https://www.swoogo.com/api/v1/registrants/token.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to process a registrant for
fields array Optional null Array of fields you want to set for the registrant (see available fields for details)

Available Registrant Fields

These are the standard fields that the API can return for registrants. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the registrant
event_id integer The ID of the event they registered for
group_id integer The ID of the registrant they are in a group with
session_ids array The sessions the registrant selected
notes string Any notes against the registrant
reference string Any reference code passed in when the person registered
ip_address string The IP address the registrant registered from
individual_net string How much this individual registration cost, net of tax
individual_tax string How much tax this individual registration paid
individual_gross string How much this individual registration paid, including tax
group_net string How much the group booking cost, net of tax
group_tax string How much the group booking paid in tax
group_gross string How much the group booking cost, including tax
group_paid string How much the group has paid towards their registration
created_at string When the registration was created
updated_at string When the registration was last updated
cancelled_at string When the registration was cancelled (if applicable)
checked_in_at string When the registration was checked in (if applicable)
ext_token string Token for SSO usage by third parties
registration_status string The status of their registration
group_balance_due string How much the group has to pay
reg_type_id integer Their registrant type
package_id integer Their package selection
discount_id integer Their discount code
payment_plan_id integer Their payment plan
email string The email address
prefix string The prefix, for example Mr, Mrs, Dr
first_name string The first name
middle_name string The middle name
last_name string The last name
suffix string The suffix, for example Jr
company string The company they work for
job_title string The job title
work_phone string The work phone number
mobile_phone string The mobile phone number
gender string The gender
birth_date string The date of birth
twitter_handle string The twitter handle
profile_picture string The URL for the profile picture
bio string Their bio, usually used for speakers
cc_email string The email address that should be copied on emails

Extra fields

This is the extra information that can be returned if required by specifying what you need in the expand variable.

Name Type Description
workAddress object The work address of the registrant
homeAddress object The home address of the registrant
billingAddress object The billing address of the registrant
sessions object The sessions chosen by the registrant
paymentPlan object The payment plan chosen by the registrant

Registrant Types

Get All Registrant Types

$response = $api->request('https://www.swoogo.com/api/v1/reg-types.json', array(
     'event_id' => 1,
     'fields' => 'id,name'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "Attendee"
        },
        {
            "id": 2,
            "name": "Exhibitor"
        }
    ],
    "_links": {
        "self": {
            "href": "reg-types.json?event_id=1&fields=id%2Cname%2Ccreated_at&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 20
    }
}

This endpoint retrieves all registrant types.

HTTP Request

GET https://www.swoogo.com/api/v1/reg-types.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve registrant types for
fields string Optional id,name Comma separated list of fields you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Registrant Type

$response = $api->request('https://www.swoogo.com/api/v1/reg-types/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "name": "Attendee",
    "public_short_name": "",
    "admin_short_name": "",
    "description": "",
    "capacity": null,
    "sold_out_message": "Sold Out",
    "min_group_size": null,
    "max_group_size": null,
    "created_at": "2017-01-20 09:59:39",
    "updated_at": "2017-05-26 14:44:05"
}

This endpoint retrieves a specific Registrant Type.

HTTP Request

GET https://www.swoogo.com/api/v1/reg-types/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return

Available Registrant Type Fields

These are the standard fields that the API can return for registrant types. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer Unique ID for the reg type
name string The name of the reg type
public_short_name string The short name of the reg type used on the website
admin_short_name string The short name of the reg type used in reports
description string The description of the reg type
capacity integer The maximum number of people who can select the reg type
sold_out_message string The message that appears when the capacity is reached
min_group_size integer The minimum size of the group when this registrant type is the first selected
max_group_size integer The maximum size of the group when this registrant type is the first selected
created_at string The date and time the reg type was created (YYYY-MM-DD HH:MM:SS)
updated_at string The date and time the reg type was last updated (YYYY-MM-DD HH:MM:SS)

Sessions

Get All Sessions

$response = $api->request('https://www.swoogo.com/api/v1/sessions.json', array(
     'event_id' => 1,
     'fields' => 'id,name,date'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "Symposium",
            "date": "2015-08-08"
        },
        {
            "id": 2,
            "name": "Class",
            "date": "2015-08-08"
        }
    ],
    "_links": {
        "self": {
            "href": "sessions.json?event_id=3&fields=id%2Cname%2Cdate&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 200
    }
}

This endpoint retrieves all sessions.

HTTP Request

GET https://www.swoogo.com/api/v1/sessions.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve sessions for
fields string Optional id,name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Session

$response = $api->request('https://www.swoogo.com/api/v1/sessions/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "name": "Symposium",
    "description": null,
    "date": "2015-08-08",
    "start_time": "11:30:00",
    "end_time": "12:45:00",
    "capacity": "20",
    "notes": null,
    "type_id": null,
    "location": null,
    "created_at": "2015-09-28 09:20:03",
    "updated_at": "2015-09-28 09:20:03"
}

This endpoint retrieves a specific Session.

HTTP Request

GET https://www.swoogo.com/api/v1/sessions/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return

Create A New Session

$response = $api->request('https://www.swoogo.com/api/v1/sessions/create.json', array(
     'event_id' => 1,
     'name' => 'Sample Session',
     'date' => '2016-01-22'
), 'post');

The above command returns JSON structured like this:

{
    "id": 10,
    "name": "Sample Session",
    "description": null,
    "date": "2016-01-22",
    "start_time": null,
    "end_time": null,
    "capacity": null,
    "notes": null,
    "type_id": null,
    "location": null,
    "created_at": "2015-09-28 10:35:21",
    "updated_at": "2015-09-28 10:35:21"
}

This endpoint creates a new Session.

HTTP Request

POST https://www.swoogo.com/api/v1/sessions/create.json

Parameters

Field Type Required? Default Description
event_id integer Required null The ID of the event you want to create a session for
name string Required null The name of the session
date date Optional null The date of the session, formatted YYYY-MM-DD
start_time time Optional null The start time of the session, formatted HH:MM:SS
end_time time Optional null The end time of the session, formatted HH:MM:SS
capacity integer Optional null The maximum number of people who can register for the session

Available Session Fields

These are the standard fields that the API can return for sessions. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the session
event_id integer The ID of the event the session belongs to
name string The name of the session
badge_name string The name of the session for the badge
description string The session description
date string The session date
start_time string The session start time
end_time string The session end time
capacity string The number of people who can register for the session
notes string Any notes entered about the session
location string Location where the session takes place
track string Track the session is in
session_included string True - if session is included, No - if session is optional
direct_link string Direct link to session (read only)
created_at string The date the session was created (YYYY-MM-DD HH:MM:SS)
updated_at string The date the session was updated (YYYY-MM-DD HH:MM:SS)

Extra fields

This is the extra information that can be returned if required by specifying what you need in the expand variable.

Name Type Description
speakers object The speakers who are speaking at the session
location object The location where the session is taking place
track object The track the session is in

Speakers

Get All Speakers

$response = $api->request('https://www.swoogo.com/api/v1/speakers.json', array(
     'event_id' => 1,
     'fields' => 'id,first_name,last_name,company'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "first_name": "Joel",
            "last_name": "Abrahamson",
            "company": "Stinson Leonard Street"
        },
        {
            "id": 2,
            "first_name": "Jeffrey",
            "last_name": "Ackerman",
            "company": "Western Area Power Administration"
        }
    ],
    "_links": {
        "self": {
            "href": "speakers.json?event_id=1&fields=id%2Cfirst_name%2Clast_name%2Ccompany&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 20
    }
}

This endpoint retrieves all speakers.

HTTP Request

GET https://www.swoogo.com/api/v1/speakers.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve sessions for
fields string Optional id,name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Speaker

$response = $api->request('https://www.swoogo.com/api/v1/speakers/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "event_id": 1,
    "email": "joel.abrahamson@stinsonleonard.com",
    "first_name": "Joel",
    "last_name": "Abrahamson",
    "job_title": null,
    "company": "Stinson Leonard Street",
    "profile_picture": "",
    "bio": null,
    "created_at": "2016-09-06 18:32:59",
    "updated_at": "2016-09-06 18:32:59"
}

This endpoint retrieves a specific Speaker.

HTTP Request

GET https://www.swoogo.com/api/v1/speakers/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return

Available Speaker Fields

These are the standard fields that the API can return for speakers. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the speaker
event_id integer The ID of the event the speaker is speaking at
created_at string When the speaker was created (YYYY-MM-DD HH:MM:SS)
direct_link string Direct link to speaker (read only)
updated_at string When the speaker was updated (YYYY-MM-DD HH:MM:SS)
email string The email of the speaker
first_name string The first name of the speaker
last_name string The last name of the speaker
job_title string The job title of the speaker
company string The company of the speaker
profile_picture string The URL of the profile picture of the speaker
bio string The bio of the speaker

Extra fields

This is the extra information that can be returned if required by specifying what you need in the expand variable.

Name Type Description
sessions object The sessions this speaker is speaking at

Sponsors

Get All Sponsors

$response = $api->request('https://www.swoogo.com/api/v1/sponsors.json', array(
     'event_id' => 1,
     'fields' => 'id,name'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "Sponsor 1"
        },
        {
            "id": 2,
            "name": "Sponsor 2"
        }
    ],
    "_links": {
        "self": {
            "href": "sponsors.json?event_id=1&fields=id%2Cname&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 200
    }
}

This endpoint retrieves all sponsors.

HTTP Request

GET https://www.swoogo.com/api/v1/sponsors.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
event_id integer Required null The ID of the event you want to retrieve sponsors for
fields string Optional id,name Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Sponsor

$response = $api->request('https://www.swoogo.com/api/v1/sponsors/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "event_id": 1,
    "name": "Sample Sponsor",
    "website": null,
    "description": "Sample description",
    "logo_id": null,
    "level": {
        "id": 2,
        "value": "Gold"
    },
    "notes": null,
    "created_at": "2015-09-28 09:20:03",
    "updated_at": "2015-09-28 09:20:03"
}

This endpoint retrieves a specific Sponsor.

HTTP Request

GET https://www.swoogo.com/api/v1/sponsors/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return

Available Sponsor Fields

These are the standard fields that the API can return for sponsors. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the session
event_id integer The ID of the event the sponsor belongs to
notes string Any notes about the sponsor
created_at string Date the sponsor was created (YYYY-MM-DD HH:MM:SS)
updated_at string Date the sponsor was last updated (YYYY-MM-DD HH:MM:SS)
direct_link string Direct link to sponsor (read only)
name string The name of the sponsor
website string The website of the sponsor
description string The description of the sponsor
logo_id string The logo uploaded for the sponsor
level integer The sponsorship level of the sponsor

Webhooks

Get All Webhooks

$response = $api->request('https://www.swoogo.com/api/v1/webhooks.json', array(
     'fields' => 'id,name,url'
));

The above command returns JSON structured like this:

{
    "items": [
        {
            "id": 1,
            "name": "Registration Webhook",
            "url": "https:\/\/www.example.com\/new_registration_webhook"
        },
        {
            "id": 2,
            "name": "Event Webhook",
            "url": "https:\/\/www.example.com\/new_event_webhook"
        }
    ],
    "_links": {
        "self": {
            "href": "webhooks.json?fields=id%2Cname%2Curl&page=1"
        }
    },
    "_meta": {
        "totalCount": 2,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 200
    }
}

This endpoint retrieves the webhooks that are running in your account.

HTTP Request

GET https://www.swoogo.com/api/v1/webhooks.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional id,name,url Comma separated list of fields you want to return
expand string Optional null Comma separated list of related info you want to return
search string Optional null Comma separated list of search filters you want to apply (see “Searching” below for more details)
page integer Optional null The page of results you want to view
per-page integer Optional null The number of results per page (to a max of 200)

Get A Specific Webhook

$response = $api->request('https://www.swoogo.com/api/v1/webhooks/1.json');

The above command returns JSON structured like this:

{
    "id": 1,
    "name": "Registration Webhook",
    "trigger_object": "registrant",
    "url": "https:\/\/www.example.com\/new_registration_webhook",
    "trigger_on_insert": "true",
    "trigger_on_update": "true",
    "trigger_on_delete": "true",
    "all_fields": "true",
    "fields": null,
    "public_user": "true",
    "admin_user": "true",
    "api_call": "true",
    "any_event": "true",
    "event_ids": null,
    "created_at": "2015-09-28 09:20:03",
    "updated_at": "2015-09-28 09:20:03"
}

This endpoint retrieves a specific Webhook.

HTTP Request

GET https://www.swoogo.com/api/v1/webhooks/ID.json

Parameters

These are the parameters you can pass to the API when calling this function.

Parameter Type Required? Default Description
fields string Optional null Comma separated list of fields you want to return

Create A New Webhook

$response = $api->request('https://www.swoogo.com/api/v1/webhooks/create.json', array(
     'name' => 'Sample Webhook',
     'url' => 'https://www.example.com/new_webhook'
     'triggers' => ['registrant_updated'],
), 'post');

The above command returns JSON structured like this:

{
    "id": 3,
    "name": "Sample Webhook",
    "trigger_object": "registrant",
    "url": "https:\/\/www.example.com\/new_webhook",
    "notes": null,
    "trigger_on_insert": "true",
    "trigger_on_update": "true",
    "trigger_on_delete": "true",
    "all_fields": "true",
    "fields": null,
    "public_user": "true",
    "admin_user": "true",
    "api_call": "true",
    "any_event": "true",
    "event_ids": null,
    "created_at": "2015-09-28 10:35:21",
    "updated_at": "2015-09-28 10:35:21"
}

This endpoint creates a new Webhook.

HTTP Request

POST https://www.swoogo.com/api/v1/webhooks/create.json

Parameters

Field Type Required? Default Description
name string Required null The name of the webhook
trigger_object string Required null Changes to this object will trigger the webhook, eg event, registrant
url string Required null The URL for the webhook
notes string Optional null The notes for the webhook
trigger_on_insert boolean Optional true Should this run for inserts?
trigger_on_update boolean Optional true Should this run for updates?
trigger_on_delete boolean Optional true Should this run for deletes?
all_fields boolean Optional true Should this run for changes to all fields?
fields array Optional null Array of fields which, when changed, will cause the webhook to run
public_user boolean Optional true Should this run when the update is by a public user?
admin_user boolean Optional true Should this run when the update is by an admin user?
api_call boolean Optional true Should this run when the update is through the api?
any_event boolean Optional true Should this apply for all events?
event_ids array Optional null Array of event IDs for which the webhook should run

Update An Existing Webhook

// Get webhook with ID of 3
$response = $api->request('https://www.swoogo.com/api/v1/webhooks/3.json', [], 'get');
// Decode the JSON
$response = json_decode($response, true);
// Change the URL value
$response['url'] = 'https://www.example.com/updated_webhook';
// Pass the updated data back
$response = $api->request('https://www.swoogo.com/api/v1/webhooks/update/3.json', $response, 'put');

The above command returns JSON structured like this:

{
    "id": 3,
    "name": "Sample Webhook",
    "trigger_object": "registrant",
    "url": "https:\/\/www.example.com\/updated_webhook",
    "notes": null,
    "trigger_on_insert": "true",
    "trigger_on_update": "true",
    "trigger_on_delete": "true",
    "all_fields": "true",
    "fields": null,
    "public_user": "true",
    "admin_user": "true",
    "api_call": "true",
    "any_event": "true",
    "event_ids": null,
    "created_at": "2015-09-28 10:35:21",
    "updated_at": "2015-09-28 10:35:21"
}

This endpoint updates an existing Webhook.

HTTP Request

PUT https://www.swoogo.com/api/v1/webhooks/update/ID.json

Parameters

Field Type Required? Default Description
name string Required null The name of the webhook
trigger_object string Required null Changes to this object will trigger the webhook, eg event, registrant
url string Required null The URL for the webhook
notes string Optional null The notes for the webhook
trigger_on_insert boolean Optional true Should this run for inserts?
trigger_on_update boolean Optional true Should this run for updates?
trigger_on_delete boolean Optional true Should this run for deletes?
all_fields boolean Optional true Should this run for changes to all fields?
fields array Optional null Array of fields which, when changed, will cause the webhook to run
public_user boolean Optional true Should this run when the update is by a public user?
admin_user boolean Optional true Should this run when the update is by an admin user?
api_call boolean Optional true Should this run when the update is through the api?
any_event boolean Optional true Should this apply for all events?
event_ids array Optional null Array of event IDs for which the webhook should run

Delete An Existing Webhook

$response = $api->request('https://www.swoogo.com/api/v1/webhooks/delete/3.json', [], 'delete');

The above command returns JSON structured like this:

null

This endpoint deletes an existing Webhook.

HTTP Request

DELETE https://www.swoogo.com/api/v1/webhooks/delete/ID.json

Available Webhook Fields

These are the standard fields that the API can return for webhooks. Please note that custom fields added for specific accounts or events are not listed here.

Name Type Description
id integer The ID of the webhook
name string The name of the webhook
url string The URL that data should be sent to
trigger_object string The object that will cause the webhook to run
trigger_on_insert boolean Trigger when the object is inserted
trigger_on_update boolean Trigger when the object is updated
trigger_on_delete boolean Trigger when the object is deleted
fields array Array of fields which, when changed, will cause the webhook to run
public_user boolean Run the webhook for a public user
admin_user boolean Run the webhook for an admin user
api_call boolean Run the webhook on an API call
any_event boolean Run the webhook for any events (only applicable for some objects such as registrants)
event_ids array Array of event IDs to run the webhook for (if $any_event is false)
created_at string When the webhook was created (YYYY-MM-DD HH:MM:SS)
created_by integer The user who created the webhook
updated_at string When the webhook was last updated (YYYY-MM-DD HH:MM:SS)
updated_by integer The user who updated the webhook
boolean all_fields Should this run for changes to all fields?

Searching

When querying the API for all of an object type - for example querying for all events - you can optionally provide a “search” parameter to narrow down the result set. This takes the form of the attribute you are searching on, the search operator and the value to search for.

Available search operators:

Operator Meaning Example
= equal to name=Test Event
!= not equal to name!=Test Event
>= greater than or equal to id>=100
<= less than or equal to id<=100
> greater than id>100
< less than id<100
%contains% contains name%contains%Test Event
%beginswith% begins with name%beginswith%Test Event
%endswith% ends with name%endswith%Test Event

To specify multiple search operators, simply comma separate them. For example to search for events where name is equal to “Test Event” and id is not equal to 100, you would pass the following string as the search parameter: “name=Test Event,id!=100”

Errors

The Swoogo API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request is wrong
401 Unauthorized – Your API credentials are wrong
403 Forbidden – You don’t have permissions to view the resource you requested
404 Not Found – The specified resource could not be found
405 Method Not Allowed – You tried to access a resource with an invalid method
418 I’m a teapot
429 Too Many Requests – You’re requesting too many resources! Slow down!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.
php