To sync data with Frederick, you must be issued a Data Source Name.

Some marketing communications will only be sent following a data sync, so it is recommended you send updated data daily.

We also recommend all data syncs happen between 9am and 7pm (in the business’ timezone). This allows us to deliver all automated communications during the day. Text messages will not be delivered after 9PM or before 9AM.

External IDs

Many Frederick objects require you to specify an “external_id” attribute. This is designed so that you can use your own ID when referencing data instead of having to keep track of object IDs issued by Frederick.

  • DO use the external_id fields instead of Frederick’s id fields whenever possible
  • DO use unique IDs (per object type, per Location)
  • DO NOT pass both an External ID and a Frederick ID when using the “sync” API methods. Use either the external_id or id fields.

List of Data Sync Methods

/locations/{location_id}/update_management_system – Set the data source for a location and indicate a data sync is in progress, or that a data sync has finished

/locations/{location_id}/calendars/batch_sync_calendars – Sync Calendars (employees who provide services) with Frederick

/locations/{location_id}/service_categories/batch_sync_service_categories – Sync Service Categories (for categorizing types of services)

/locations/{location_id}/services/batch_sync_services – Sync Services (your menu of available services)

/locations/{location_id}/contact_details/batch_create_or_update – Create or Update Contact Details (customer details)

/locations/{location_id}/vehicles/batch_create_or_update – Create or Update Vehicles (for Automotive businesses)

/locations/{location_id}/appointments/batch_sync_appointments – Sync Appointments (customer visits)

/locations/{location_id}/openings/batch_sync_openings – Sync Near Term Openings (available time slots to promote)

Data Sync Job Example

1. Set Sync In Progress

This lets Frederick know to expect new data. You will use this method again when you’re done syncing.

PUT https://api.staging.hirefrederick.com/v1/locations/{location_id}/update_management_system
{
 "management_system": "YOUR_DATA_SOURCE_NAME",
 "management_system_sync_in_progress": true
}

2. Sync Calendars (optional)

  • You should always send ALL calendars. This method will automatically update any that have changed and remove any you do not include in a subsequent sync.
POST https://api.staging.hirefrederick.com/v1/locations/{location_id}/calendars/batch_sync_calendars
{
 "data": [{
 "external_id": "1",
 "name": "Jane D."
 }]
}

3. Sync Service Categories (optional)

POST https://api.staging.hirefrederick.com/v1/locations/{location_id}/service_categories/batch_sync_service_categories
{
 "data": [{
 "external_id": "1",
 "name": "Massage",
 "list_order": 0
 }]
}

4. Sync Services (optional)

POST https://api.staging.hirefrederick.com/v1/locations/{location_id}/services/batch_sync_services
{
 "data": [{
 "external_id": "1",
 "name": "Women's Cut and Style",
 "description": "Our famous cut + style!",
 "available": true,
 "price_cents": 13500,
 "service_category_external_id": "1",
 "calendar_external_ids": ["1"],
 "list_order": 0
 }]
}

5. Create or Update Contacts

  • If feasible, we recommended that you sync only new and updated contacts since the last sync
  • This method is designed to process large amounts of bulk data in the background. For this type of API, you will send the data via a subsequent PUT request to a URL given to you by Frederick.
POST https://api.staging.hirefrederick.com/v1/locations/{location_id}/contact_details/batch_create_or_update
=> {"put_data_url":"https://s3.amazon.com/some_url_and_id.json"}
PUT https://s3.amazon.com/some_url_and_id.json
[{
 "external_id": "1",
 "email": "me@example.com",
 "email_subscribed": true,
 "text_message_subscribed": true,
 "first_name": "Jane",
 "last_name": "Doe",
 "address_line_1": "1 Elm St",
 "address_line_2": "Apt 4",
 "city": "San Francisco",
 "postal_code": "94105",
 "mobile_phone_number": "+15555555555",
 "birthdate": "1981-07-14",
 "gender": "female",
 "active_membership": false
}]

6. Sync Appointments

  • On the first sync, you should sync all historical appointments for the Location.
  • You may want to break this up into multiple imports by date range, such as one request per month.
  • On subsequent imports, it is recommended you sync only dates with changed appointments, if feasible. Otherwise, you may want to sync up to 6 months of future appointment data to ensure Frederick has a complete picture.
  • For each import you will specify a start_date and end_date. Please include ALL valid appointments (exclude canceled, no-shows, etc) for that timeframe. Frederick will automatically update it’s appointment data for the range provided.
POST https://api.staging.hirefrederick.com/v1/locations/{location_id}/appointments/batch_sync_appointments
{"start_date":"2015-01-01", "end_date":"2015-02-01"}
=> {"put_data_url":"https://s3.amazon.com/some_url_and_id.json"}
PUT https://s3.amazon.com/some_url_and_id.json
[{
 "start_at": "2015-01-01T08:00:00Z-04:00",
 "end_at": "2015-01-01T09:00:00Z-04:00",
 "external_id": "1",
 "contact_detail_external_id": "1",
 "service_external_id": "1",
 "calendar_external_id": "1",
 "price_cents": 13500
}]

7. Sync Near Term Openings

  • You will specify a start_date and end_date for openings. There is no need to send more than the next 72 hours of availability.
  • You must send openings PER SERVICE, so if you have 50 services with openings, you will make 50 calls to the API.
POST https://api.staging.hirefrederick.com/v1/locations/{location_id}/openings/batch_sync_openings
{"start_date":"2016-07-14", "end_date":"2016-07-16", "service_external_id":"1"}
=> {"put_data_url":"https://s3.amazon.com/some_url_and_id.json"}
PUT https://s3.amazon.com/some_url_and_id.json
[{
 "start_at": "2016-07-15T08:00:00Z-04:00",
 "calendar_external_id": "1"
}]

8. Set Sync Complete

This lets Frederick know that you have finished sending data for this session. Campaigns will be sent once Frederick has finished processing all the new data provided.

PUT https://api.staging.hirefrederick.com/v1/locations/{location_id}/update_management_system
{
 "management_system": "YOUR_DATA_SOURCE_NAME",
 "management_system_sync_in_progress": false
}