Creating a Checkin

The Nearby New Checkin API is organized around REST. JSON will be returned in all responses from the API, including errors.

Endpoint


https://api.sidebox.com/checkin/location

Authentication

All calls made to the Nearby Now Review Checkin Location API require authentication.

You authenticate to the Nearby Now API by providing your Agency API key, and one of your client’s Account API keys in the request. Your agency API keys, and customer account API keys carry many privileges, so be sure to keep them secret.

Authentication to the API occurs via HTTP Basic Auth. Provide your agency API key as the basic auth username, and your client’s Account API key as the basic auth password.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Parameters

  • latitude: (required)
  • longitude: (required)
  • reference: (optional) The checkin message to create
  • userEmail: (required) The email of the user you want to create the Checkin on behalf of. Must be a verified active user on the Storefront. Use the Users List Endpoint to retrieve a list of StoreFront Users that can publish a checkin.
  • photo: (optional) The photo to attach to the checkin. Please note, if sending a photo, you’ll need to send a request of type multipart/form-data

Errors

The Nearby Now API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, authentication information was missing, etc.), and codes in the 5xx range indicate an error with Nearby Now’s servers.

All requests, success or failure, will return a JSON response with a Checkin Location Object and a success flag. A failed request will contain an error message string describing the problem.

Examples

Here’s an example cURL request that shows how simple it is to call the Nearby Now API, as well as an example success and error response:


curl https://api.sidebox.com/checkin/location \
   -u 'agency_api_token:account_api_token' \
   -F latitude=33.290527 \
   -F longitude=-111.843502 \
   -F reference=Installation \
   -F userEmail=user@company.com \
   -F photo="multipart/form-data"

Example Response:

{
  "obj": "checkin location",
  "success": true,
  "createdAt": 1423073174,
  "latitude": "-111.843502",
  "longitude": "33.290527",
  "Reference": "Installing a new System",
  "id": "49b10682-b6cf-4351-82be-a1ba089056f7",
  "image": "image_url",
  "user": "John Q. User"
}

Latest Blog Posts

Contact