|
| 1 | +--- |
| 2 | +title: Account |
| 3 | +nav_order: 12 |
| 4 | +--- |
| 5 | + |
| 6 | +Information and settings for your account. |
| 7 | + |
| 8 | +## Attributes |
| 9 | + |
| 10 | +<table> |
| 11 | + <tr><th>Name</th><th>Type</th><th>Description</th></tr> |
| 12 | + <tr><td>id</td><td>Integer</td><td>Automatically set</td></tr> |
| 13 | + <tr><td>created_at</td><td>Datetime</td><td>Automatically set</td></tr> |
| 14 | + <tr><td>updated_at</td><td>Datetime</td><td>Automatically set</td></tr> |
| 15 | + <tr><td>subdomain</td><td>String</td><td>Required</td></tr> |
| 16 | + <tr><td>email</td><td>String</td><td>Required</td></tr> |
| 17 | + <tr><td>name</td><td>String</td><td>Required</td></tr> |
| 18 | + <tr><td>google_analytics</td><td>String</td><td></td></tr> |
| 19 | + <tr><td>css_url</td><td>String</td><td></td></tr> |
| 20 | + <tr><td>time_zone</td><td>String</td><td>Required</td></tr> |
| 21 | + <tr><td>verification_method</td><td>Integer</td><td></td></tr> |
| 22 | + <tr><td>address</td><td>String</td><td></td></tr> |
| 23 | + <tr><td>country_code</td><td>String</td><td>Required. ISO 3166-1 alpha-2.</td></tr> |
| 24 | + <tr><td>google_merchant_id</td><td>String</td><td></td></tr> |
| 25 | + <tr><td>google_merchant_key</td><td>String</td><td></td></tr> |
| 26 | + <tr><td>logo</td><td>File</td><td></td></tr> |
| 27 | + <tr><td>template</td><td>Integer</td><td>Required</td></tr> |
| 28 | + <tr><td>service_template</td><td>String</td><td></td></tr> |
| 29 | + <tr><td>locale</td><td>String</td><td>Required. Supported locales: 'en', 'sv' and 'nb'. Default: 'en'.</td></tr> |
| 30 | + <tr><td>currency</td><td>String</td><td>ISO4217 currency code</td></tr> |
| 31 | + <tr><td>email_notification</td><td>Boolean</td><td></td></tr> |
| 32 | + <tr><td>mail_notification_recipient</td><td>Email</td><td></td></tr> |
| 33 | + <tr><td>sms_notification</td><td>Boolean</td><td></td></tr> |
| 34 | + <tr><td>phone_number</td><td>String</td><td></td></tr> |
| 35 | + <tr><td>confirm_manually</td><td>Boolean</td><td></td></tr> |
| 36 | + <tr><td>settings</td><td>Array</td><td></td></tr> |
| 37 | + <tr><td>public_access</td><td>Boolean</td><td></td></tr> |
| 38 | + <tr><td>interval_rounding</td><td>Integer</td><td>Default setting for all services for rounding to next available time. '15' will round 10:07 to become 10:15 as next available slot time.</td></tr> |
| 39 | + <tr><td>slot_generation_type</td><td>Integer</td><td>Default: 2. 1=fixed. 2=next available.</td></tr> |
| 40 | + <tr><td>future_bookable_period</td><td>String</td><td>Natural language date/time relative to current time.</td></tr> |
| 41 | + <tr><td>first_bookable_period</td><td>String</td><td>Natural language date/time relative to current time.</td></tr> |
| 42 | + <tr><td>payment_provider</td><td>String</td><td></td></tr> |
| 43 | + <tr><td>footer</td><td>Text</td><td></td></tr> |
| 44 | + <tr><td>verification_methods</td><td>String</td><td></td></tr> |
| 45 | + <tr><td>reminder_sms</td><td>Boolean</td><td></td></tr> |
| 46 | + <tr><td>closed_for_holidays</td><td>Boolean</td><td></td></tr> |
| 47 | + <tr><td>new_user_text</td><td>Liquid-Text</td><td>Above booking form.</td></tr> |
| 48 | + <tr><td>new_booking_text</td><td>Liquid-Text</td><td>Booking confirmation page.</td></tr> |
| 49 | + <tr><td>booking_form</td><td>Liquid-Text</td><td>Custom booking form.</td></tr> |
| 50 | + <tr><td>person_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr> |
| 51 | + <tr><td>resource_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr> |
| 52 | + <tr><td>service_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr> |
| 53 | + <tr><td>event_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr> |
| 54 | + <tr><td>appointment_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr> |
| 55 | + <tr><td>category_form</td><td>Liquid-Text</td><td>For custom data in administration system.</td></tr> |
| 56 | + <tr><td>sms_verification</td><td>Liquid-Text</td><td></td></tr> |
| 57 | + <tr><td>sms_confirmation</td><td>Liquid-Text</td><td></td></tr> |
| 58 | + <tr><td>sms_modification</td><td>Liquid-Text</td><td></td></tr> |
| 59 | + <tr><td>sms_cancellation</td><td>Liquid-Text</td><td></td></tr> |
| 60 | + <tr><td>sms_reminder</td><td>Liquid-Text</td><td></td></tr> |
| 61 | + <tr><td>mail_verification</td><td>Liquid-Text</td><td></td></tr> |
| 62 | + <tr><td>mail_confirmation</td><td>Liquid-Text</td><td></td></tr> |
| 63 | + <tr><td>mail_modification</td><td>Liquid-Text</td><td></td></tr> |
| 64 | + <tr><td>mail_cancellation</td><td>Liquid-Text</td><td></td></tr> |
| 65 | + <tr><td>mail_verification_subject</td><td>String</td><td></td></tr> |
| 66 | + <tr><td>mail_confirmation_subject</td><td>String</td><td></td></tr> |
| 67 | + <tr><td>mail_modification_subject</td><td>String</td><td></td></tr> |
| 68 | + <tr><td>mail_cancellation_subject</td><td>String</td><td></td></tr> |
| 69 | + <tr><td>allow_cancellation</td><td>Boolean</td><td></td></tr> |
| 70 | + <tr><td>cancellation_period</td><td>String</td><td>Natural language date/time relative to start of booking.</td></tr> |
| 71 | +</table> |
| 72 | + |
| 73 | +### Additional parameters |
| 74 | + |
| 75 | +<table> |
| 76 | + <tr><th>Name</th><th>Type</th><th>Description</th></tr> |
| 77 | + <tr><td>remove_logo</td><td>Boolean</td><td></td></tr> |
| 78 | +</table> |
| 79 | + |
| 80 | +## Get account |
| 81 | + |
| 82 | +`GET /client` will get the account. |
| 83 | + |
| 84 | +## Update account |
| 85 | + |
| 86 | +`PUT /client` will update the account. |
| 87 | + |
| 88 | +## Holidays |
| 89 | + |
| 90 | +Who doesn't like a holiday? |
| 91 | + |
| 92 | +### Listing |
| 93 | + |
| 94 | +`GET /client/holidays` will get holidays for account country. |
| 95 | + |
| 96 | +Response |
| 97 | + |
| 98 | +```json |
| 99 | +[ |
| 100 | + { |
| 101 | + "holiday": { |
| 102 | + "date": "2016-01-01", |
| 103 | + "name": "New Year's Day" |
| 104 | + } |
| 105 | + }, |
| 106 | + { |
| 107 | + "holiday": { |
| 108 | + "date": "2016-05-01", |
| 109 | + "name": "International Workers' Day" |
| 110 | + } |
| 111 | + } |
| 112 | +] |
| 113 | +``` |
| 114 | + |
| 115 | +#### Query Parameters |
| 116 | + |
| 117 | +<table> |
| 118 | + <tr><th>Name</th><th>Type</th><th>Description</th></tr> |
| 119 | + <tr><td>from</td><td>Date</td><td></td></tr> |
| 120 | + <tr><td>to</td><td>Date</td><td></td></tr> |
| 121 | +</table> |
| 122 | + |
| 123 | +## Users |
| 124 | + |
| 125 | +Users who can login into the account. |
| 126 | + |
| 127 | +### Attributes for user role on the account |
| 128 | + |
| 129 | +<table> |
| 130 | + <tr><th>Name</th><th>Type</th><th>Description</th></tr> |
| 131 | + <tr><td>id</td><td>Integer</td><td>Automatically set</td></tr> |
| 132 | + <tr><td>created_at</td><td>Datetime</td><td>Automatically set</td></tr> |
| 133 | + <tr><td>updated_at</td><td>Datetime</td><td>Automatically set</td></tr> |
| 134 | + <tr><td>user_id</td><td>Integer</td><td>Automatically set</td></tr> |
| 135 | + <tr><td>role</td><td>String</td><td>admin, manager or staff</td></tr> |
| 136 | + <tr><td>user</td><td>Object</td><td>See attributes for a user</td></tr> |
| 137 | +</table> |
| 138 | + |
| 139 | +### Attributes for user |
| 140 | + |
| 141 | +<table> |
| 142 | + <tr><th>Name</th><th>Type</th><th>Description</th></tr> |
| 143 | + <tr><td>id</td><td>Integer</td><td>Automatically set</td></tr> |
| 144 | + <tr><td>created_at</td><td>Datetime</td><td>Automatically set</td></tr> |
| 145 | + <tr><td>updated_at</td><td>Datetime</td><td>Automatically set</td></tr> |
| 146 | + <tr><td>name</td><td>String</td><td>Required</td></tr> |
| 147 | + <tr><td>email</td><td>String</td><td>Required</td></tr> |
| 148 | + <tr><td>phone_number</td><td>String</td><td>Also available as phonenumber (deprecated).</td></tr> |
| 149 | +</table> |
| 150 | + |
| 151 | +### Listing |
| 152 | + |
| 153 | +`GET /client/users` will list all users with access to the account. |
| 154 | + |
| 155 | +Response |
| 156 | + |
| 157 | +```json |
| 158 | +[ |
| 159 | + { |
| 160 | + "client_user_link": { |
| 161 | + "id": 1337, |
| 162 | + "created_at": "2016-11-07T07:26:32+01:00", |
| 163 | + "updated_at": "2016-11-07T07:27:42+01:00", |
| 164 | + "role": "admin", |
| 165 | + "user_id": 1, |
| 166 | + "user": { |
| 167 | + "id": 1, |
| 168 | + "email": "maestro@example.org", |
| 169 | + "phone_number": "180", |
| 170 | + "name": "Espen Antonsen", |
| 171 | + "created_at": "2016-11-07T07:26:32+01:00", |
| 172 | + "updated_at": "2016-11-07T07:27:42+01:00" |
| 173 | + } |
| 174 | + } |
| 175 | + } |
| 176 | +] |
| 177 | +``` |
| 178 | + |
| 179 | +## Get user |
| 180 | + |
| 181 | +`GET /client/users/{user_link_id}` will get a user with id `{user_link_id}`. |
| 182 | + |
| 183 | +### Add new user |
| 184 | + |
| 185 | +`GET /client/users` will create a new user. An email is sent to the user so the user can specify their password. |
0 commit comments