Locations REST API

Locations REST API

Overview

The Locations REST API services allows you to get Locations information and manage Locations for your company.

Base URL
https://fieldconnect.field2base.com/v2/api

Header (Required)
Authorization: Basic {CompanyID}:{Username}:{Password}:{API Sync Key}
Content-Type: application/json
Note: Authorization Header above is the same as all other Mobile Forms REST API calls. 
Note: API Developers can use OAuth 2.0 Authentication instead of the Basic Authentication. The OAuth 2.0 Authentication uses the Client Credentials Grant Type and requires the Company have a Client ID and a Client Secret generated in the Mobile Forms Portal to make web service calls to the REST API Endpoints. You can contact the Professional Services team at f2bps@field2base.com to implement OAuth 2.0 Authentication.


Supported Operations

Append to the Base URL: https://fieldconnect.field2base.com/v2/api

Locations

  1. GET locations/     
    1. Get list of all locations
  2. GET locations/{locationID}   
    1. Get details of a single Location
  3. POST locations/create 
    1. Create a new location with JSON in body of request
  4. PUT locations/update/{locationID}     
    1. Update a Location with JSON in body of request
  5. DELETE locations/delete/{locationID}
    1. Delete a Location

Location Requirements

  1. GET locations/requirements 
    1. Get list of Requirements for all Locations
  2. GET locations/requirement/{LocationRequirementID}
    1. Get Requirements for a single Location
  3. POST locations/create/requirement 
    1. Create a new requirement
  4. PUT locations/update/requirement/{LocationRequirementID}
    1. Update an existing requirement
  5. DELETE locations/delete/requirement/{LocationRequirementID}
    1. Delete an existing requirement


JSON Definitions

Locations

  1.  {
  2.         "LocationID": 6,
  3.         "Name": "F2B Office",
  4.         "Type": "office",
  5.         "ContactName": "ABC",
  6.         "ContactPhone": "123-456-7890",
  7.         "ContactEmail": "fake@email.com",
  8.         "GroupID": 1095,
  9.         "LocationRequirementsAssigned": [
  10.             "Gifts",
  11.             "Mask"
  12.         ]
  13.  }

Requirements

  1. [
  2.     {
  3.         "LocationRequirementID": 7,
  4.         "Requirement": "Gifts"
  5.     },
  6.     {
  7.         "LocationRequirementID": 8,
  8.         "Requirement": "Mask"
  9.     }
  10. ]