Import

The Import API can be used to create or update a number of entities in bulk. This includes branches (companies), users, bookable staff (people) and their schedules.

Payload

{
  meta: {
    feed_name: "My import"
  },
  settings: {},
  data: {
    companies: [<Company>],
    people: [<Person>],
    users: [<User>]
  }
}

        "data": {
            "companies": [
                {
                    "external_id": "bank_branch1",
                    "object_type": "company",
                    "name": "Bank Branch 1",
                    "created_at": "{{env_yesterday}}",
                    "last_modified": "2023-09-15T08:35:38.218Z",
                    "status": "live",
                    "telephone": "+61 8 8203 7973",
                    "parent_external_id": "bank_parent",
                    "base_company_ref": "bank_parent",
                    "member_company_ref": "bank_parent",
                    "address": {
                        "address1": "re Terrace",
                        "address4": "NORTH ADELAIDE",
                        "address5": "SA",
                        "postcode": "5006",
                        "country": "Australia"
                    },
                    "timezone": "Australia/Adelaide",
                    "opening_hours": {
                        "days": [
                            {
                                "day": "Monday",
                                "start": "10:00",
                                "end": "19:00"
                            },
                            {
                                "day": "Tuesday",
                                "start": "10:00",
                                "end": "19:00"
                            },
                            {
                                "day": "Wednesday",
                                "start": "10:00",
                                "end": "19:00"
                            },
                            {
                                "day": "Thursday",
                                "start": "10:00",
                                "end": "19:00"
                            },
                            {
                                "day": "Friday",
                                "start": "10:00",
                                "end": "19:00"
                            },
                            {
                                "day": "Saturday",
                                "start": "10:00",
                                "end": "19:00"
                            },
                            {
                                "day": "Sunday",
                                "start": "12:00",
                                "end": "18:00"
                            }
                        ]
                    }
                }
            ],
            "people": [
                {
                    "external_id": "teller_1",
                    "object_type": "person",
                    "name": "Teller 1",
                    "email": "[email protected]",
                    "telephone": "08 9999-1234",
                    "status": "enabled",
                    "created_at": "{{env_yesterday}}",
                    "last_modified": "2023-09-15T08:35:38.218Z",
                    "bookables": [
                        {
                            "company_external_id": "bank_branch1",
                            "assignments": [
                                {
                                    "service_external_id": "mortgage_advice"
                                },
                                {
                                    "service_external_id": "open_an_account"
                                }
                            ]
                        }
                    ],
                    "company_external_ids": [
                        "bank_branch1"
                    ],
                    "schedules": {
                        "schedules_type": "shifts",
                        "shifts": [
                            {
                                "when": "2023-03-01",
                                "where": [
                                    "bank_branch1"
                                ],
                                "shift": [
                                    {
                                        "start_time": "11:00",
                                        "end_time": "17:00"
                                    }
                                ]
                            },
                            {
                                "when": "2023-03-02",
                                "where": [
                                    "bank_branch1"
                                ],
                                "shift": [
                                    {
                                        "start_time": "09:00",
                                        "end_time": "18:00"
                                    }
                                ]
                            }
                        ]
                    }
                },
                {
                    "external_id": "teller_2",
                    "object_type": "person",
                    "name": "Teller 2",
                    "email": "[email protected]",
                    "telephone": "08 9999-1234",
                    "status": "enabled",
                    "created_at": "{{env_yesterday}}",
                    "last_modified": "2023-09-15T08:35:38.218Z",
                    "bookables": [
                        {
                            "company_external_id": "bank_branch2",
                            "assignments": [
                                {
                                    "service_external_id": "mortgage_advice"
                                },
                                {
                                    "service_external_id": "open_an_account"
                                }
                            ]
                        }
                    ],
                    "company_external_ids": [
                        "bank_branch2"
                    ],
                    "schedules": {
                        "schedules_type": "shifts",
                        "shifts": [
                            {
                                "when": "2023-03-01",
                                "where": [
                                    "bank_branch2"
                                ],
                                "shift": [
                                    {
                                        "start_time": "11:00",
                                        "end_time": "17:00"
                                    }
                                ]
                            },
                            {
                                "when": "2023-03-02",
                                "where": [
                                    "bank_branch2"
                                ],
                                "shift": [
                                    {
                                        "start_time": "09:00",
                                        "end_time": "18:00"
                                    }
                                ]
                            }
                        ]
                    }
                }
            ],
            "users": [
                {
                    "company_external_ids": [
                        "bank_parent"
                    ],
                    "name": "Teller 1",
                    "email": "[email protected]",
                    "roles": [
                        "user"
                    ],
                    "status": "live",
                    "external_id": "teller_1",
                    "object_type": "user",
                    "created_at": "{{env_yesterday}}",
                    "last_modified": "2023-09-15T08:35:38.218Z"
                }
            ]
        }
    }

Company

The hierarchy of an organisation can be represented using company objects. Companies can represent individual branches (where appointments, events or queuing services take place), departments or regions.

Settings associated with companies drive the available options throughout the system, such as whether events or services are available, if prices are used and what languages are available for translating the customer and / or Studio administration journey user interfaces.

Sample Company only payload

The Import API allows you to send separate payloads for each of the objects. Below is a sample locations payload demonstrating the creation of a Parent and Child location.

{  
"meta": {
        "version": "0.0.1",
        "created_at": "{{now}}",
        "callback_url": "http://example.com/something.system",
        "feed_name": "customer_import_{{now}}"
    },
    "settings": {
        "actions": [
            "create",
            "update",
            "activate"
        ]
    },
    "data": {
        "companies": [
            {
                "external_id": "physical_parent",
                "object_type": "company",
                "name": "Physical Parent",
                "company_type": "physical",
                "status": "live",
                "created_at": "{{env_now}}",
                "last_modified": "{{env_now}}",
                "is_parent": true,
                "parent_external_id": "GrandParent",
                "base_company_ref": "physical_parent",
                "member_company_ref": "physical_parent",
                "address": {
                    "line_1": " ",
                    "line_2": null,
                    "locality": null,
                    "region": null,
                    "postal_code": null,
                    "country": "United Kingdom"
                },
                "currency_code": "GBP",
                "timezone": "Europe/London",
                "country_code": "gb"
                "resources": [
                  {
                      "description": "The one with beautiful windows",
                      "name": "Video Conference",
                      "telephone": "0207 432 5439",
                      "external_id": "436b:6258:81fa:b1b4:284c:99e8:8fe9:19b",
                      "object_type": "resource",
                      "status": "live",
                      "created_at": "2018-11-11T15:31:49Z",
                      "last_modified": "2018-11-27T15:31:49Z"
                  },
                  {
                      "description": "The one with the whiteboard",
                      "name": "Meeting Room A",
                      "telephone": "0207 432 5439",
                      "external_id": "6ee2:afc3:2f91:cf8c:4d3f:14e:6ea8:1cfe",
                      "object_type": "resource",
                      "status": "live",
                      "created_at": "2018-11-15T15:31:49Z",
                      "last_modified": "2018-11-22T15:31:49Z"
                  }
              ]
            },
            {
                "external_id": "physical_store_1",
                "object_type": "company",
                "name": "Physical Store for Appointments",
                "company_type": "physical",
                "status": "live",
                "telephone": null,
                "created_at": "{{env_yesterday}}",
                "last_modified": "{{env_now}}",
                "is_parent": false,
                "parent_external_id": "physical_parent",
                "base_company_ref": "physical_parent",
                "member_company_ref": "physical_parent",
                "address": {
                    "line_1": "10 Downing Street ",
                    "line_2": null,
                    "locality": null,
                    "region": "LONDON",
                    "postal_code": "EC1A 1BB",
                    "country": "United Kingdom"
                },
                "currency_code": "GBP",
                "timezone": "Europe/London",
                "country_code": "gb",
                "opening_hours": {
                    "days": [
                        {
                            "day": "Tuesday",
                            "start": "09:30",
                            "end": "16:30"
                        },
                        {
                            "day": "Wednesday",
                            "start": "09:30",
                            "end": "16:30"
                        },
                        {
                            "day": "Thursday",
                            "start": "09:30",
                            "end": "16:30"
                        },
                        {
                            "day": "Friday",
                            "start": "09:30",
                            "end": "16:30"
                        },
                        {
                            "day": "Saturday",
                            "start": "09:30",
                            "end": "13:30"
                            
                    ]
                }
            }
        ]
    }
}
Property nameRequired on creationTypeDescription
object_typeTrueString"company"
nameTrueStringName of branch / location
descriptionFalseStringDescription of branch
address.line1TrueStringAddress line 1
address.localityFalseStringAddress locality
address.stateFalseStringAddress state
address.postal_codeFalseStringAddress postal code
address.countryTrueStringAddress Country
e.g.
United States,
United Kingdom,
France,
Germany
timezoneTrueStringTime zone
e.g.
CET - ‘Europe/Paris’
GMT - ‘Europe/London’
EST- ‘America/New_York’
CST- ‘America/Chicago’
MST- ‘America/Denver’
PST- ‘America/Los_Angeles’
AKST - ‘America/Anchorage’
HST- ‘Pacific/Honolulu’
statusFalseStringWhether the location is Disabled. There are 3 possible values. live, disabled, delete.
created_atFalseDatetimeThis will be automatically set if not provided
external_idTrueStringUsed to find the object model within JRNI. This is a primary key field. Adding the same records with a different key will result in duplicate records.
last_modifiedTrueDatetimeUsed to determine if an object should be updated
is_parentTrueBooleanUsed to create a Parent company to house child bookable branches / locations. Set to false when creating child locations. Set to true when creating a Parent company
parent_external_idTrueStringUsed to associate a child location to a specific parent company where there is a Grandparent / Parent / Child company configuration. Set the external id of the Grandparent company when creating a Parent company. Set to the Parent company when creating a child location under a specific parent.
base_company_refFalseString
member_company_refFalseStringSets where to store end customer data in JRNI

User

Your internal staff who will administer data in the JRNI platform, manage the bookable staff within the JRNI platform and / or staff who make or take bookings on behalf of customers, eg Call Centre / Counter staff making bookings. Essentially a user login to the JRNI platform.

Refer to JRNI User roles and permissions

Property nameRequired on creationTypeDescription
object_typeTrueString"user"
nameTrueStringName associated with user
emailTrueStringEmail associated with user
rolesTrueArray[String]A role associated with the user. The possible values are: admin, user, and owner.
company_external_idsTrueArray[String]A list of companies the user has access to.
created_atFalseDatetimeThis will be automatically set if not provided.
external_idTrueStringUsed to find the object model within JRNI. This is a primary key field. Adding the same records with a different key will result in duplicate records.
last_modifiedTrueDatetimeUsed to decide if an object should be updated.
statusTrueStringThere are 3 possible values. live, disabled, delete.
person_external_idFalseStringID of associated bookable person

Person

A person in JRNI is a bookable staff member who conducts appointments, hosts events or serves customers in a queue.

Refer to:-JRNI - Creating staff members

Sample Staff only payload with examples of Schedules upload

{
    "meta": {
        "version": "0.0.1",
        "created_at": "{{env_now}}",
        "callback_url": "http://example.com/something.system",
        "feed_name": "example_staff_only_import_{{env_now}}"
    },
    "settings": {
        "actions": [
            "create",
            "update",
            "activate"
        ]
    },
    "data": {
        "people": [
            {
                "external_id": "shop4genstaff",
                "object_type": "person",
                "name": "Unassigned - Shop4",
                "status": "live",
                "group": "Online Bookings",
                "never_booked": true,
                "created_at": "{{env_yesterday}}",
                "last_modified": "{{env_now}}",
                "bookables": [
                    {
                        "company_external_id": "Shop4",
                        "assignments": [
                            {
                                "service_external_id": "MMU"
                            },
                            {
                                "service_external_id": "personal_shopper"
                            }
                        ]
                    }
                ],
                "company_external_ids": [
                    "Shop4"
                ],
                "schedules": {
                    "schedules_type": "custom",
                    "shift_patterns": [
                        {
                            "company_external_id": [
                                "Shop4"
                            ],
                            "start_date": "2023-01-01",
                            "end_date": "2030-12-31",
                            "start_time": "10:00",
                            "end_time": "12:00",
                            "frequency": "weekly",
                            "interval": 1,
                            "by_day": [
                                "Monday"
                            ],
                            "except_date": [
                                "2024-12-25",
                                "2025-12-25",
                                "2026-12-25",
                                "2027-12-25",
                                "2028-12-25",
                                "2029-12-25",
                                "2030-12-25"
                            ],
                            "shift_pattern_condition_id": "default"
                        },
                        {
                            "company_external_id": [
                                "Shop4"
                            ],
                            "start_date": "2023-01-01",
                            "end_date": "2030-12-31",
                            "start_time": "13:00",
                            "end_time": "17:00",
                            "frequency": "weekly",
                            "interval": 2,
                            "by_day": [
                                "Tuesday","Wednesday","Thursday"
                            ],
                            "except_date": [
                                "2024-12-25",
                                "2025-12-25",
                                "2026-12-25",
                                "2027-12-25",
                                "2028-12-25",
                                "2029-12-25",
                                "2030-12-25"
                            ],
                            "shift_pattern_condition_id": "default"
                        }
                    ]
                }
            },
            {
                "external_id": "dmimieux",
                "object_type": "person",
                "name": "Dan Mimieux",
                "email": "[email protected]",
                "telephone": "44 99999-1234",
                "status": "disabled",
                "group": null,
                "created_at": "{{env_yesterday}}",
                "last_modified": "{{env_now}}",
                "bookables": [
                    {
                        "company_external_id": "Shop4",
                        "assignments": [
                            {
                                "service_external_id": "MMU"
                            },
                            {
                                "service_external_id": "personal_shopper"
                            }
                        ]
                    }
                ],
                "company_external_ids": [
                    "Shop4"
                ],
                "schedules": {
                    "schedules_type": "shifts",
                    "shifts": [
                        {
                            "when": "2023-05-01",
                            "where": [
                                "Shop4"
                            ],
                            "shift": [
                                {
                                    "start_time": "11:00",
                                    "end_time": "17:00"
                                }
                            ]
                        },
                        {
                            "when": "2023-05-02",
                            "where": [
                                "Shop4"
                            ],
                            "shift": [
                                {
                                    "start_time": "09:00",
                                    "end_time": "18:00"
                                }
                            ]
                        },
                        {
                            "when": "2023-05-06",
                            "where": [
                                "Shop4"
                            ],
                            "shift": [
                                {
                                    "start_time": "09:00",
                                    "end_time": "18:00"
                                }
                            ]
                        },
                        {
                            "when": "2023-05-07",
                            "where": [
                                "Shop4"
                            ],
                            "shift": [
                                {
                                    "start_time": "09:00",
                                    "end_time": "18:00"
                                }
                            ]
                        },
                        {
                            "when": "2023-05-10",
                            "where": [
                                "Shop4"
                            ],
                            "shift": [
                                {
                                    "start_time": "09:00",
                                    "end_time": "18:00"
                                }
                            ]
                        },
                        {
                            "when": "2023-05-11",
                            "where": [
                                "Shop4"
                            ],
                            "shift": [
                                {
                                    "start_time": "09:00",
                                    "end_time": "15:00"
                                }
                            ]
                        }
                    ]
                }
            }
        ]
    }
}
Property nameRequired on creationTypeDescriptionVisible in journey
object_typeTrueString"person"No
nameTrueStringUsed to display name of personYes
descriptionFalseStringA description of the personNo
created_atFalseDatetimeThis will be automatically set if not providedNo
company_external_idsFalseArray[String]A list of companies related to the personNo
groupFalseStringAssign the person to a staff group.Yes
emailFalseStringAn email associated with the personNo
telephoneFalseStringA phone number associated with the personNo
extrasFalseArray[Extra]See ExtraNo
scheduleFalseArray[Schedule]See ScheduleDetermines when a person can take appointments
last_modifiedTrueDatetimeUsed to determine whether an object should be updatedNo
statusTrueStringThere are 3 possible values. live, disabled, deletedNo
ewsFalseObjectEmail address for an Exchange Integration mailbox
e.g.
"ews": { "email": "[email protected]", "enabled": true },
eocFalseObjectEmail address for an Exchange Online Integration mailbox
e.g.
"eoc": { "email": "[email protected]", "enabled": true },
bookablesFalseArray[Bookable]See Bookable
groupFalseStringName of group the person belongs to. If it does not already exist, it will be created.

Bookable

Determines which services the person can deliver at a particular location.

"bookables": [
                    {
                        "company_external_id": "bank_branch1",
                        "assignments": [
                            {
                                "service_external_id": "mortgage_advice"
                            },
                            {
                                "service_external_id": "open_an_account"
                            }
                        ]
                    }
Property nameRequired on creationTypeDescription
company_external_idTrueStringThe external reference for the location the assignments apply to
assignmentsTrueArray[Service]See Service

Service

Property nameRequired on creationTypeDescription
service_external_idTrueStringThe service external reference

Schedule

Indicates the periods of time when the person will be available to be booked.

Property nameRequired on creationTypeDescription
schedule_typeFalseStringThe format used for the schedule. Can be default, custom or shift.
shiftsFalseArray[Shift]Only include if using the shift schedule type
shift_patternsFalseArray[ShiftPattern]Only include if using the shift_pattern schedule type

ShiftPattern

A schedule can be formed with 1 or many shift patterns to allow for varying staff work rotas. A standard shift pattern could be Monday to Friday 09:00 to 17:00 and repeats weekly.

Sample shift pattern payload array

"schedules": {
                    "schedules_type": "custom",
                    "shift_patterns": [
                        {
                            "company_external_id": [
                                "Shop4"
                            ],
                            "start_date": "2023-01-01",
                            "end_date": "2030-12-31",
                            "start_time": "10:00",
                            "end_time": "12:00",
                            "frequency": "weekly",
                            "interval": 1,
                            "by_day": [
                                "Monday"
                            ],
                            "except_date": [
                                "2024-12-25",
                                "2025-12-25",
                                "2026-12-25",
                                "2027-12-25",
                                "2028-12-25",
                                "2029-12-25",
                                "2030-12-25"
                            ],
                            "shift_pattern_condition_id": "default"
                        },
Property nameRequired on creationTypeDescription
frequencyTrueStringThe allowed values are: weekly, daily
start_dateTrueStringFormat: YYYY-MM-DD
start_timeTrueStringFormat: HH:mm
The hours must have two digits. For example, use “09:00”.
end_timeTrueStringFormat: HH:mm
The hours must have two digits. For example, use “09:00”.
by_dayTrueArray[String]Possible values: monday, tuesday, wednesday, thursday, friday, saturday and sunday.
except_dateFalseArray[String]Format: YYYY-MM-DD
company_external_idsTrueArray[String]Represents the locations to which the schedule applies. The locations are identified using the external_id
methods_of_appointmentFalseArray[String]Possible values: In-person, Phone, Video

Shift

A shift is a individual or specific date of availability

Sample Schedule using Shifts

"schedules": {
                    "schedules_type": "shifts",
                    "shifts": [
                        {
                            "when": "2023-03-01",
                            "where": [
                                "bank_branch2"
                            ],
                            "shift": [
                                {
                                    "start_time": "11:00",
                                    "end_time": "17:00"
                                }
                            ]
                        },
                        {
                            "when": "2023-03-02",
                            "where": [
                                "bank_branch2"
                            ],
                            "shift": [
                                {
                                    "start_time": "09:00",
                                    "end_time": "18:00"
                                }
                            ]
                        }
                    ]
Property nameRequired on creationTypeDescription
whenTrueStringFormat: YYYY-MM-DD
whereTrueArray[String]Represents the locations to which the schedule applies. The locations are identified using the external_id
howFalseArray[String]Possible values: In-person, Phone, Video
shiftsTrueArray[ShiftTimes]

ShiftTimes

Property nameRequired on creationTypeDescription
start_timeTrueStringFormat: HH:mm
The hours must have two digits. For example, use “09:00”.
end_timeTrueStringFormat: HH:mm
The hours must have two digits. For example, use “09:00”.

Errors

ObjectStatusError messageCause/Resolution
CompanyFailedlast_modified must be in ISO-8601 format
CompanySkippedUnable to create due to missing action 'create'
CompanySkippedUnable to update due to missing action 'update'
CompanySkippedlast_modified: this object is older than the one in BookingBugThe updated date in JRNI is newer than that last modified date in the import payload. Update the last modified date in the import file to the current date and time.
CompanyFailedobject to import is missing required key: name
CompanyFailedobject to import is missing required key: status
CompanyFailedobject to import is missing required key: object_type
CompanyFailedobject to import has object_type 'x' but we were expecting 'company'
CompanyFailedparent_external_id was specified but the company could not be found
CompanyFailedbase_company_ref was specified but the company could not be found
CompanyFailedmember_company_ref was specified but the company could not be found
CompanyFailedinvalid currency code supplied for company
CompanyFailedinvalid name, cannot be blank
PersonFailedlast_modified must be in ISO-8601 format
PersonSkippedUnable to create due to missing action 'create'
PersonSkippedUnable to update due to missing action 'update'
PersonSkippedlast_modified: this object is older than the one in BookingBugThe updated date in JRNI is newer than that last modified date in the import payload. Update the last modified date in the import file to the current date and time.
PersonFailedobject to import is missing required key: object_type
PersonFailedobject to import has object_type 'x' but we were expecting 'person'
PersonFailedcompany to add person to does not exist.Check the company has imported into JRNI and is not disabled or deleted. Check that a company with that external ID was included in the company section of the import file and successfully imported.
PersonFailedUnrecognised 'schedules_type'. We only currently support 'default'; 'shifts' or 'custom'.
PersonFailedEmail is not a valid email addressCheck email address is valid
PersonFailedFailed to create object mapping for <email_address>. The requested user is invalid.Failed to create calendar connection due to invalid email account in customer side calendar configuration
PersonFailedFailed to create object mapping for <email_address>. User with email address <email_address> already exists.Calendar connection already exists in JRNI for this staff member email account.
ScheduleFailedInvalid date: . Date format is 'YYYY-MM-DD'
ScheduleFailedMalformed: by_dayEnsure the values for by_day are in the list monday, tuesday, wednesday, thursday, friday
ScheduleFailedMissing: by_dayIf the shift pattern is recurring weekly, by_day must be included.
ScheduleFailedMalformed times: start_time(<start_time>) is passed or equal the end_time(<end_time>)Check the start and end times for the shift.
ScheduleFailedMalformed or missing: start_date
ScheduleFailedMalformed or missing: frequency
ScheduleFailedMalformed methods_of_appointment: <bad_value>Ensure the values for methods_of_appointment are in the list In-person, Phone, Video
ScheduleFailedThe shift pattern is colliding with the . The overlap is between <start_time> and <end_time> on the Ensure the shifts are not overlapping
UserFailedlast_modified must be in ISO-8601 format
UserSkippedUnable to create due to missing action 'create'
UserSkippedUnable to update due to missing action 'update'
UserSkippedlast_modified: this object is older than the one in BookingBugThe updated date in JRNI is newer than that last modified date in the import payload. Update the last modified date in the import file to the current date and time.
UserFailedobject to import is missing required key: name
UserFailedobject to import is missing required key: email
UserFailedobject to import is missing required key: roles
UserFailedobject to import is missing required key: object_type
UserFailedobject to import has object_type 'x' but we were expecting 'user'
UserFailedNo companies to assign the user to
UserFailedOne of the companies has not been imported yet
UserFailedE-mail already in use by another user
UserFailedInvalid e-mail
UserFailedInvalid name
UserFailedUser objects can currently only have 1 role. The Array is for future proofing
UserFailedInvalid roles
UserFailedCould not find associated person object for user