Overview
The Locations REST API services allow Customers the ability to get Locations information and manage Locations (create, edit, delete) in the Field2Base system.
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.
F2B API Prerequisites
To use the Locations REST API, you need the following:
- An API Sync Key for the Company
- A User Account with the ability to submit to the API (Mobile Forms Administrator role)
Supported Operations
The following operations are supported by the REST web service.
Locations Endpoints
locations/ (GET) - Get list of all locations
locations/{locationID} (GET) - Get details of a single Location
locations/create (POST) - Create a new location with JSON in body of request
locations/update/{locationID} (PUT) - Update a Location with JSON in body of request
locations/delete/{locationID} (DEL) - Delete a Location
Location Requirement Endpoints
locations/requirements (GET) - Get list of Requirements for all Locations
locations/requirement/{LocationRequirementID} (GET) - Get Requirements for a single Location
locations/create/requirement (POST) - Create a new requirement
locations/update/requirement/{LocationRequirementID} (PUT) - Update an existing requirement
locations/delete/requirement/{LocationRequirementID} (DEL) - Delete an existing requirement
JSON Definitions
Locations
- {
- "LocationID": 6,
- "Name": "F2B Office",
- "Type": "office",
- "ContactName": "ABC",
- "ContactPhone": "123-456-7890",
- "ContactEmail": "fake@email.com",
- "GroupID": 1095,
- "LocationRequirementsAssigned": [
- "Gifts",
- "Mask"
- ]
- }
Requirements
- [
- {
- "LocationRequirementID": 7,
- "Requirement": "Gifts"
- },
- {
- "LocationRequirementID": 8,
- "Requirement": "Mask"
- }
- ]