-
Notifications
You must be signed in to change notification settings - Fork 0
Model objects | First class
These objects act as entry points when processing a feed. In general, they require at least 4 properties that are used when syncing.
| Property Name | Required | Type | Description |
|---|---|---|---|
| external_id | True | string | Used to find the object model within BookingBug |
| object_type | True | string | For example "company" |
| last_modified | True | datetime | Used to detemine if an object should be updated |
| status | True | string | There are 3 possible values. live, disabled, delete |
First class objects can contain second class objects which you can read about here. They can also contain other first class objects when there is a One to Many relationships. This relationship exists between Companies and Resources.
This property on an object is used to identify the object within its type in the BookingBug environment. It should be unique with that object type.
last_modified is used to compare objects in the BookingBug environment and the feed. An object will only be imported if the feed objects last_modified is greater (not equal) than the one in BookingBug.
status is used to determine what to do with the Object.
| Status | Description |
|---|---|
| live | Object should exist in BookingBug in an active state |
| disabled | Object should exist in BookingBug but in an inactive state |
| deleted | Object is removed from the BookingBug environmen. Potentially soft deleted |
- First class object
- Responses to last_modified
- Has an external reference
- Many to many relationships with Person
- One to many relationships with Resources
| Property Name | Required on creation | Type | Description |
|---|---|---|---|
| object_type | True | string | "company" . |
| name | True | string | This is used to display the name of a company |
| created_at | False | datetime | This will be automatically set if not provided |
| address | False | Address | See second class address object |
| description | False | string | The description added to the company |
| timezone | False | string | A timezone in the country/city format |
| telephone | False | string | Phone number that is stored against the company |
| currency_code | False | string | A standard currency code. eg GBP |
| extras | False | extra property | See Extra Properties (Business questions) |
- First class object
- Responses to last_modified
- Has an external reference
- Many to many relationships with Company
| Property Name | Required on creation | Type | Description |
|---|---|---|---|
| object_type | True | string | "person" |
| name | True | string | This is used to display the name of a company |
| description | False | string | The description added to a person |
| created_at | False | datetime | This will be automatically set if not provided |
| company_external_ids | False | Array (string) | A list of companies related to the person |
| False | string | An email associated with the person | |
| telephone | False | string | A phone number associated with the person |
| extras | False | extra property | See Extra Properties (Business questions) |
- First class object
- Responses to last_modified
- Has an external reference
- Many to One relationship with Company
| Property Name | Required on creation | Type | Description |
|---|---|---|---|
| object_type | True | string | "resource" |
| name | True | string | Name associated with user |
| description | False | string | The description added to a resource |
| address | False | Address | See second class address object |
| telephone | False | string | Telephone assoicated with the resource |
| created_at | False | datetime | This will be automatically set if not provided |
- First class object
- Responses to last_modified
- Has an external reference
- Many to many relationships with Company
| Property Name | Required on creation | Type | Description |
|---|---|---|---|
| object_type | True | string | "user" |
| name | True | string | Name associated with user |
| True | string | Email associated with user | |
| roles | True | Array (string) | An email associated with the person |
| company_external_ids | True | Array (string) | A list of companies the user has access to |
| created_at | False | datetime | This will be automatically set if not provided |