Navbar

CampManagement api

CampManagement api

shell 904-621-5339

Introduction

API Reference

The CampManagement API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.

To make the API as explorable as possible, accounts have test mode and live mode API keys. There is no "switch" for changing between modes, just use the appropriate key to perform a live or test transaction. Requests made with test mode credentials never hit the banking networks and incur no cost.

Be sure to subscribe to CampManagement's API announce mailing list to receive information on new additions and changes to CampManagement's API and language libraries.

Authentication



Test user for login: username: [email protected] password: 1234

HTTP Request

POST /api.campmanagement.io/login

  {
     "email":"[email protected]",
      "password":"12345678"

  }

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjIzMmU0YjA2Yjk3ZmY3ZGUyZGFiNzc2ZmM5MDY5NDQ1MDcxMDRiNmI2MmYzOTUzOTU3MTAxZTQ4NmM3MjgzZTEyMWZiZGRjMjI1NzFkOTk0In0

Registration

Register Individuals

[
  {
    "user":
     {
                "email": "[email protected]",
                "first_name": "Granit",
                "last_name": "Hoda",
                "password": "12345678",
                "birth_date": "1990-01-15"

            }
    }
]
[
  {
    "user":
     {
                "email": "[email protected]",
                "first_name": "Granit",
                "last_name": "Hoda",
                "password": "12345678",
                "birth_date": "1990-01-15"

     }
  }
]

The above command returns JSON response structured like this:

[
  "user":
   {
        "email": "[email protected]",
        "first_name": "Granit",
        "last_name": "Hoda",
        "password": "12345678",
        "birth_date": "1990-01-15",
        "updated_at": "2018-11-06 12:52:47",
        "created_at": "2018-11-06 12:52:47",
        "id": 244
    }  

]

This endpoint retrieves all Individuals.

HTTP Request

POST /api.campmanagement.io/users

Query Parameters

Parameter Default Description
email string Email of the User
fist_name string First name of the User
last_name string Last name of the User
password string(min:8) Password of User
birth_date data(yyyy-mm-dd) Birth date of User

Get a Specific Individual

curl /api.campmanagement.io/v1/individual/9930\
   -u sk_test_4eC39HqLyjWDarjtT1zdp7dc:
require 'CampManagement'

\CampManagement\CampManagement::setApiKey("sk_test_4eC39HqLyjWDarjtT1zdp7dc");

\CampManagement\Individual::retrieve("9930");

The above command returns JSON response structured like this:

{
  "id": 1,
  "name": "Test",
  "last_name": "TestUser",
  "birth_date": 9/30/1970,
  "entity_id": 9930
}

This endpoint retrieves a specific individual.

HTTP Request

GET /api.campmanagement.io/v1/individual/9930

URL Parameters

Parameter Description
entity_id The entity ID of the individual to retrieve

People Management

HTTP Request get all users

Get /api.campmanagement.io/users

{
  / Json response list of users
    "users": [
      {
            "id": 1,
            "email": "[email protected]",
            "created_at": "2018-11-06 12:03:03",
            "updated_at": "2018-11-06 12:03:03",
            "first_name": "Granit",
            "last_name": "Hoda",
            "birth_date": "1990-01-15"
        },
        {
            "id": 2,
            "email": "[email protected]",
            "created_at": "2018-11-06 12:09:55",
            "updated_at": "2018-11-06 12:09:55",
            "first_name": "Antonina",
            "last_name": "Nikolaus",
            "birth_date": "1942-03-31"
        }
    ],
    "totalData": 2
}

HTTP Request user with family

Get /api.campmanagement.io/users/?includes[]=family or

{
    /Json response list of user inlcude family
      "users": [
          {
              "id": 1,
              "email": "[email protected]",
              "created_at": "2018-11-06 12:03:03",
              "updated_at": "2018-11-06 12:03:03",
              "first_name": "Granit",
              "last_name": "Hoda",
              "birth_date": "1990-01-15",
              "family": [
                  {
                      "id": 1,
                      "name": "Hoda",
                      "created_at": "2018-11-06 13:24:35",
                      "updated_at": "2018-11-06 13:28:24"
                  }
              ]
          },
          {
              "id": 2,
              "email": "[email protected]",
              "created_at": "2018-11-06 12:09:55",
              "updated_at": "2018-11-06 12:09:55",
              "first_name": "Antonina",
              "last_name": "Nikolaus",
              "birth_date": "1942-03-31",
              "family": [
                  {
                      "id": 1,
                      "name": "Hoda",
                      "created_at": "2018-11-06 13:24:35",
                      "updated_at": "2018-11-06 13:28:24"
                  }
              ]
          }
    ],
    "totalData": 2
}

HTTP Request get family with users

Get /api.campmanagement.io/family/?includes[]=users

{

    /Json response list of family inlcude users
    "family": [
        {
            "id": 1,
            "name": "Hoda",
            "created_at": "2018-11-06 13:24:35",
            "updated_at": "2018-11-06 13:28:24",
            "users": [
                {
                    "id": 1,
                    "email": "[email protected]",
                    "created_at": "2018-11-06 12:03:03",
                    "updated_at": "2018-11-06 12:03:03",
                    "first_name": "Granit",
                    "last_name": "Hoda",
                    "birth_date": "1990-01-15"
                },
                {
                    "id": 2,
                    "email": "[email protected]",
                    "created_at": "2018-11-06 12:09:55",
                    "updated_at": "2018-11-06 12:09:55",
                    "first_name": "Antonina",
                    "last_name": "Nikolaus",
                    "birth_date": "1942-03-31"
                }
            ]
        }
    ]
}

I added includes so you can call this endpoint and include family only when needed.

Experiences

HTTP Request get all experiences

Get /api.campmanagement.io/experience or

{
  / Json response list of experiences
  "experience": [
          {
              "id": 1,
              "name": "Overnight Camp",
              "created_at": "2018-11-12 02:02:10",
              "updated_at": "2018-11-12 03:08:15"
          },
          {
              "id": 2,
              "name": "Day Camp",
              "created_at": "2018-11-13 00:00:00",
              "updated_at": "2018-11-13 00:00:00"
          },
          {
              "id": 3,
              "name": "Family weekends",
              "created_at": "2018-11-13 00:00:00",
              "updated_at": "2018-11-13 00:00:00"
          }
      ]
}

HTTP Request get all experiences with programs

Get /api.campmanagement.io/experience/?includes[]=programs or

{
    / Json response list of experiences inlcude programs
    "experience": [
          {
              "id": 1,
              "name": "Overnight Camp",
              "created_at": "2018-11-12 02:02:10",
              "updated_at": "2018-11-12 03:08:15",
              "programs": [
                  {
                      "id": 1,
                      "name": "Classic program",
                      "created_at": "2018-11-05 00:00:00",
                      "updated_at": "2018-11-13 05:20:16"
                  },
                  {
                      "id": 2,
                      "name": "Horses program",
                      "created_at": "2018-11-05 00:00:00",
                      "updated_at": "2018-11-13 05:20:16"
                  }
              ]
          },
          {
              "id": 2,
              "name": "Day Camp",
              "created_at": "2018-11-13 00:00:00",
              "updated_at": "2018-11-13 00:00:00",
              "programs": [
                  {
                      "id": 3,
                      "name": "High Adventure program",
                      "created_at": "2018-11-05 00:00:00",
                      "updated_at": "2018-11-13 05:20:16"
                  }
              ]
          }
        ]
}

HTTP Request get all programs

Get /api.campmanagement.io/programs or

{
  / Json response list of programs
  "programs": [
      {
          "id": 1,
          "name": "Classic program",
          "created_at": "2018-11-05 00:00:00",
          "updated_at": "2018-11-13 05:20:16"
      },
      {
          "id": 2,
          "name": "Horses program",
          "created_at": "2018-11-05 00:00:00",
          "updated_at": "2018-11-13 05:20:16"
      },
      {
          "id": 3,
          "name": "High Adventure program",
          "created_at": "2018-11-05 00:00:00",
          "updated_at": "2018-11-13 05:20:16"
      },
      {
          "id": 4,
          "name": "Paintball program",
          "created_at": "2018-11-05 00:00:00",
          "updated_at": "2018-11-13 05:20:16"
      }
  ]
}

HTTP Request get all programs with experiences

Get /api.campmanagement.io/programs/?includes[]=experience or

{
    / Json response list of programs include experiences
    "programs": [
         {
             "id": 1,
             "name": "Classic program",
             "created_at": "2018-11-05 00:00:00",
             "updated_at": "2018-11-13 05:20:16",
             "experiences": [
                 {
                     "id": 1,
                     "name": "Overnight Camp",
                     "created_at": "2018-11-12 02:02:10",
                     "updated_at": "2018-11-12 03:08:15"
                 },
                 {
                     "id": 3,
                     "name": "Family weekends",
                     "created_at": "2018-11-13 00:00:00",
                     "updated_at": "2018-11-13 00:00:00"
                 }
             ]
         },
         {
             "id": 2,
             "name": "Horses program",
             "created_at": "2018-11-05 00:00:00",
             "updated_at": "2018-11-13 05:20:16",
             "experiences": [
                 {
                     "id": 1,
                     "name": "Overnight Camp",
                     "created_at": "2018-11-12 02:02:10",
                     "updated_at": "2018-11-12 03:08:15"
                 }
             ]
         }
        ]
}

HTTP Request get all programs with events

Get /api.campmanagement.io/programs/?includes[]=events or

{
    / Json response list of programs include events
    "programs": [
           {
               "id": 1,
               "name": "Classic program",
               "created_at": "2018-11-22 00:00:00",
               "updated_at": "2018-11-23 12:48:19",
               "events": [
                   {
                       "id": 1,
                       "name": "Classic program",
                       "created_at": "2018-11-22 00:00:00",
                       "updated_at": "2018-11-23 12:44:14"
                   },
                   {
                       "id": 15,
                       "name": "Program 15 test change",
                       "created_at": "2018-11-22 00:00:00",
                       "updated_at": "2018-11-26 14:49:00"
                   }
               ]
           }
     ]
}

HTTP Request get all events

Get /api.campmanagement.io/events or

{
    / Json response list of events
    "events": [
       {
           "id": 1,
           "name": "Classic program",
           "created_at": "2018-11-22 00:00:00",
           "updated_at": "2018-11-23 12:44:14",
       },
       {
           "id": 2,
           "name": "Program 2",
           "created_at": "2018-11-22 00:00:00",
           "updated_at": "2018-11-22 00:00:00",
       }
     ]
}

HTTP Request get all events with programs

Get /api.campmanagement.io/events/?includes[]=programs

{
    / Json response list of events include programs
    "events": [
       {
           "id": 1,
           "name": "Classic program",
           "created_at": "2018-11-22 00:00:00",
           "updated_at": "2018-11-23 12:44:14",
           "programs": {
               "id": 1,
               "name": "Classic program",
               "created_at": "2018-11-22 00:00:00",
               "updated_at": "2018-11-23 12:48:19"
           }
       },
       {
           "id": 2,
           "name": "Program 2",
           "created_at": "2018-11-22 00:00:00",
           "updated_at": "2018-11-22 00:00:00",
           "programs": {
               "id": 2,
               "name": "Horses program",
               "created_at": "2018-11-22 00:00:00",
               "updated_at": "2018-11-22 00:00:00"
           }
       }
     ]
}

I added includes so you can call this endpoint only when needed.

Groups + Housing

Scheduling + Attendance

Transportation

Check-in + Check-out

Staffing + Resourcing

My Dashboard (Staff)

Health Center

Analytics and Reporting

Errors

The Springhill API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The url requested is hidden for administrators only.
404 Not Found -- The specified url could not be found.
405 Method Not Allowed -- You tried to access a url with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The url requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.