A category packet contains the ID to filter entities, and also the name to render. Typically they are sorted by their priority integer which defaults at 99 if not set. The lower this number the higher in the list. After priority they are alphabatised (case insensitive). An 'All' category is never required as the app surfaces create this. Holiday home sales categories also should include a banner image url, as they are also rendered as banners on the home sales section landing page.
{
"id": 42,
"name": "Caravans",
"slug": "caravans",
"priority": 5,
"imgUrl": "https://link-to-homesales-caravans-banner.jpg?v=12345",
"locales": [
"cy" : "Name Translation"
]
}Type : Integer - Required
Category ID used for filtering entities. This should be unique to the specific entity category, however does not need to be unique within scope of other entities and data.
Type : String - Required
Name of category which is rendered in various places in the app surfaces
Type : String - Optional
Currently optional as unused by categories. Filtering uses IDs, but slug is stored to potentially be referenced by future
Type : Integer - Optional
Defaults to 99 if not set. The lower the priority, the higher this category will be sorted before alphabetisation.
Type : Image Url String - Optional
Currently only used by holiday home sales categories. This image is used as the banner on the holiday homes sales section landing page.
Type : Array of String - Optional
An array of localisable name translations for this category. This can include multiple translated names with the array should be keyed with the locale code which are supported by your holidaymaker install
Our app surfaces talk to an image engine on our infrastructure to process and resize images for different smart phone screen densities. Because of this the size of images are less relevant as they are delivered at optimum sizes anyway. However due to processing power and speed we do recommend that image urls are all 3000 pixels or below. The app surfaces will never need an image this large, so it gives you the option of still having a large quality image, but can be loaded in the apps and our infrastructure efficiently. We support both png, jpeg, and webp images. You can optionally include a '?v=' version integer so this can be used for versioning. If you do include this you can ensure images are reprocessed if the source image is changed on your servers.
{
"imgUrl": "https://your-wordpress-site.com/wp-content/uploads/2023/08/a-large-image-3000x2100.jpg?v=1691481892",
"image": "https://your-wordpress-site.com/wp-content/uploads/2023/08/a-smaller-image.png"
}Standard JSON Integer - 0 is commonly considered to be a default value, unless it is an valid ID when -1 is used. For sort priorities 99 is used as the default.
{
"key1": 9,
"key2": 42,
"arrayOfInts": [
2,
3,
5,
8
]
}Standard JSON String - Often will have certain characters escaped depending what system is writing the JSON packet, however our parser only requires to have double quotes (") escaped. UTF-8 encoding is our standard, but others may be accepted if required. If line breaks are required in the text then the Rich Text / Multiline String type is used instead.
{
"key1": "A string value",
"key2": "Another string with an some \"quotes\" that need escaping",
"arrayOfStrings": [
"Item one as a string",
"Item two as a string",
"Item three as a string",
]
}Added 'locales' property for translational holidaymaker installs
Added 'imgUrl' property for home sales categories