How to obtain an office list

Office locations can be retrieved by using the following URL and specifying a starting record number and ending record number.  If left blank, this will default to the first 50 records.  Offices are returned in order of name.

 

 Method URL
 GET  https://api.fairwarningsoftware.com/v1.1.1/offices/[start]/[limit]

 

 Status Response
 200

 {"offices":[
    {
        "office_id": <office_id>,
        "company_id": <company_id>,
        "office_active": <office_active>,
        "officey_name": <office_name>,
        "officey_email": <office_email>,
        "officey_phone": <office_phone>,
        "officey_fax": <office_fax>,
        "officey_address": <office_address>,
        "officey_address2": <office_address2>,
        "officey_city": <office_city>,
        "officey_state": <office_state>,
        "officey_zip": <office_zip>,
        "officey_country": <office_country>
    },
    "record_count" : <record_count>
]}

401  {"error":"The API keys provided are invalid."}
403  {"error":"API keys are missing."}
500  {"error": <custom error>}

 

 Field  Type Description
office_id int The unique identifier for the category
company_id int The ID for your company
office_active bool Whether the category is active or not
office_name string The name of the category
office_email string The email address for the primary contact at that office.
office_phone string The phone number for the office.
office_fax string The fax number for the office.
office_address string The street address for the office.
office_address2 string The unit or suit for the office.
office_city string The city the office is in.
office_state string The state the office is in.
office_zip string The zip code of the office.
office_country string The country of the office.
record_count int The total number of records matching the search results

 

You may search on any of the office fields by passing your search query in JSON format like the following:

{ "office_state": { "operator" : "equals", "value": "OH" } }

By passing this data string as raw post data, you will receive all offices that are located in Ohio.