Introduction
Welcome to the Realhub API. You can use our API to access Realhub API endpoints, which will allow you to interact with our system in various ways depending on your account.
You can view code examples in the dark area to the right.
We recommend using Postman to test your API calls.
Base URLs
The base url for Staging (Testing) API calls is:
https://realhub.staging.realbase.io/api/v2
The base url for Production API calls is:
https://realhub.realbase.io/api/v2
Note
Each environment has a unique database so will require different API keys to function.
Identification
You must identify your system when making calls using the User-Agent header:
-H "User-Agent: MyCompanyName"
Authentication
Realhub currently has two ways of authenticating users/applications in our API.
API Key Authentication should be used when building a system that performs background tasks without user interaction e.g. server to server integrations.
User Authentication should be used when building a system that a user will interact with e.g. a print order manager or iPhone app.
Please see below:
API Key Authentication
Request:
curl -X GET "https://realhub.realbase.io/api/v2/campaigns.json" \
-H "x-api-token: API_KEY"
Applications can authenticate their requests by including their API key in the header of their requests.
x-api-token: API_KEY
Please contact Realhub to sign up for an API key.
User Authentication
Authenticate a user using their username and password.
HTTP Request
POST /users/auth.json
Request:
curl -X POST "https://realhub.realbase.io/api/v2/users/auth.json" \
-F "username=USERNAME" \
-F "password=PASSWORD"
Response:
{
"data": {
"auth_token": "6YsGAxkudwAJJyHaqHxW"
}
}
Query Parameters
Parameter | Required | Description |
---|---|---|
username | Yes | The username of the user e.g. USERNAME |
password | Yes | The password of the user e.g. PASSWORD |
Making Requests
Once you have received a token you can use it in the request header to start making calls.
x-auth-token: AUTH_TOKEN
Ad Copies
Ad copy represents the text used on specific pieces of marketing material. The API allows you to retrieve, create and update ad copies.
Get Ad Copies
Retrieves a list of ad copies.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/ad_copies.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "campaign_id=393" \
Response:
[
{
"id": 530,
"campaign_id": 393,
"copy_type": "default",
"description": "Default Description",
"tagline": "Default Tagline",
"dates": {
"updated": {
"date_time": "11/06/2021 11:23"
}
}
},
{
"id": 533,
"campaign_id": 393,
"copy_type": "digital",
"description": "Digital Description",
"tagline": "Digital Tagline",
"dates": {
"updated": {
"date_time": "22/07/2021 17:13"
}
}
}
]
HTTP Request
GET /ad_copies.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | No | The campaign ID to filter results by. |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 50. |
Returns
This endpoint returns a JSON array of ad copy objects.
Create or Update Ad Copy
Creates or updates ad copy based on campaign and copy type
Request:
curl -X GET "https://realhub.realbase.io/api/v2/ad_copies/create_or_update.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
--data-raw '{
"ad_copy": {
"campaign_id": 393,
"copy_type": "print",
"description": "Print Description",
"tagline": "Print Tagline"
}
}'
Response:
{
"id": 533,
"campaign_id": 393,
"copy_type": "print",
"description": "Print Description",
"tagline": "Print Tagline",
"dates": {
"updated": {
"date_time": "22/07/2021 17:13"
}
}
}
HTTP Request
GET /ad_copies.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | Yes | The campaign ID to filter results by. |
copy_type | null | Yes | Either default, digital, editorial, newspaper, print or signboards |
description | null | Yes | The description or body copy. |
tagline | null | Yes | The tagline or title copy. |
Returns
This endpoint returns an ad copy JSON object.
Agencies
An agency object represents a physical real estate agency e.g. First Realty Narrabeen. The API allows you to retrieve a list of agencies.
Get Agencies
Retrieves a list of agencies.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/agencies.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName"
Response:
[
{
"id": 1,
"active": true
"address_line_1": "52/49-51 Mitchell Road",
"address_line_2": "",
"address_postcode": "2100",
"address_region": "Brookvale",
"address_state": "NSW",
"brand_id": 1,
"business_number": "80 000 000 000",
"email": "admin@firstrealty.com",
"fax": "02 9999 9999",
"options": null,
"phone": "02 9999 9999",
"short_name": "Seaforth",
"title": "First Realty Brookvale",
"website": "www.firstrealty.com",
},
{...},
{...}
]
HTTP Request
GET /agencies.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
brand_id | null | No | Filter the records by Brand. |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 50. |
Returns
This endpoint returns a JSON array of agency objects.
Get Agency
Retrieves a single agency.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/agencies/:id.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName"
Response:
{
"id": 1,
"active": true
"address_line_1": "52/49-51 Mitchell Road",
"address_line_2": "",
"address_postcode": "2100",
"address_region": "Brookvale",
"address_state": "NSW",
"brand_id": 1,
"business_number": "80 000 000 000",
"email": "admin@firstrealty.com",
"fax": "02 9999 9999",
"options": null,
"phone": "02 9999 9999",
"short_name": "Seaforth",
"title": "First Realty Brookvale",
"website": "www.firstrealty.com",
}
HTTP Request
GET /agencies/:id.json
Returns
This endpoint returns a JSON object representing an agency.
Search Agencies
Search for an agency using their name or ID.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/agencies/search.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "string=first"
Response:
[
{
"id": 1,
"active": true
"address_line_1": "52/49-51 Mitchell Road",
"address_line_2": "",
"address_postcode": "2100",
"address_region": "Brookvale",
"address_state": "NSW",
"brand_id": 1,
"business_number": "80 000 000 000",
"email": "admin@firstrealty.com",
"fax": "02 9999 9999",
"options": null,
"phone": "02 9999 9999",
"short_name": "Seaforth",
"title": "First Realty Brookvale",
"website": "www.firstrealty.com",
},
{...},
{...}
]
HTTP Request
GET /agencies/search.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
string | null | No | The string that will be used to search the records. |
Returns
This endpoint returns a JSON array of agency objects.
Create Agency
Creates a new agency using the supplied details.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/agencies.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "address_line_1=41 Smith Street" \
-F "address_postcode=2001" \
-F "address_region=Springfield" \
-F "address_state=NSW" \
-F "brand_id=1" \
-F "email=welcome@ljhookerspringfield.com.au" \
-F "phone=02 9901 8642" \
-F "title=LJ Hooker Brookvale" \
-F "website=www.ljhookerspringfield.com.au"
Response:
{
"id": 338,
"active": true,
"address_line_1": "12",
"address_line_2": "41 Smith Street",
"address_postcode": "2001",
"address_region": "Springfield",
"address_state": "NSW",
"bank_account_bsb": "123 321",
"bank_account_name": "LJ Hooker Springfield",
"bank_account_number": "1234 5678",
"brand_id": 1,
"brand_theme_id": 2,
"business_name": "Springfield Property Group Pty Ltd",
"business_number": "12345678",
"cover_letter": "This is an agency cover letter",
"data": {
"support_team": {
"user_ids": [1369],
"assigned_ids": [1369, 1]
}
},
"email": "welcome@ljhookerspringfield.com.au",
"fax": "02 1234 5678",
"features": {
"alpha": true,
"business_process_management": true
"campaign_management": true,
"digital_signing": true,
"external_ticketing": true,
"marketing_dashboard": true,
"new_dashboard": true,
"presentation_mode": true,
},
"geo_country_id": 1,
"license_number": "12345678",
"options": {
"accounting_platform_api": "xero",
"crm_sync_api": "vault_re",
"skip_watermark_plans": false,
},
"phone": "02 9901 8642",
"pricing_plan_id": 1,
"principal_email": "johnsmith@ljhookerspringfield.com.au",
"principal_mobile": "0401 999 544",
"principal_name": "John Smith",
"shipping_address": "LJ Hooker Springfield\n12\n41 Smith Street\nSpringfield NSW 2001",
"short_name": "LJH Springfield",
"subscription_fee": 50.0,
"subscription_fee_period": "",
"subscription_user_limit": 20,
"title": "LJ Hooker Springfield",
"website": "www.ljhookerspringfield.com.au",
"contracts": null
}
HTTP Request
POST /agencies.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
address_line_1 | string | Yes | The first line of the Agency address. |
address_postcode | string | Yes | The Agency’s post code e.g. 2001 |
address_region | string | Yes | Name of the Agency's suburb. |
address_state | string | Yes | Can be NSW, VIC, QLD, SA, NT, TAS, ACT or WA (for Australia). |
string | Yes | The Agency's primary email address. | |
phone | string | Yes | The Agency's primary phone number. |
title | string | Yes | The display name of the Agency. Must be unique. |
website | string | Yes | The Agency website url. |
active | boolean | No | Agency status, defaults to true |
address_line_2 | string | No | The second line of the Agency address (if applicable). |
bank_account_bsb | string | No | The Agency's bank account BSB. |
bank_account_name | string | No | The Agency's bank account name. |
bank_account_number | string | No | The Agency's bank account number. |
brand_id | number | Yes | The Agency's brand_id e.g. 1 |
brand_theme_id | number | No | The Agency's brand theme id e.g. 2 |
business_name | string | No | The legal name of the business. |
business_number | string | No | The Agency's ABN/NZBN. |
campaign_fee | number | No | Realhub campaign fee e.g. 45 |
campaign_fee_cap | number | No | Realhub campaign fee cap e.g. 2000 |
data | json | No | Additional agency data. |
fax | string | No | The Agency's fax number. |
features | json | No | Agency toggleable features. |
geo_country_id | number | No | Geo Country Id (Australia: 1, New Zealand: 2) |
license_number | string | No | The Agency's license number. |
pricing_plan_id | number | No | Pricing plan id e.g. 1 |
principal_email | string | No | The Agency Principal's email address. |
principal_mobile | string | No | The Agency Principal's mobile number. |
principal_name | string | No | The Agency Principal's name. |
shipping_address | string | No | The Agency's shipping address (defaults to agency address). |
short_name | string | No | The Agency's short name e.g. LJH Springfield |
subscription_fee | number | No | Agency's subscription fee e.g. 30 |
subscription_fee_period | string | No | Agency's subscription fee period, can be weekly, monthly or yearly |
subscription_user_limit | number | No | Agency's user limit (leave blank for unlimited) e.g. 50 |
Returns
This endpoint returns a JSON object representing the agency created.
Agency Payment Methods
An agency payment method object represents the fee type, fee value and identity code of a particular payment method for an agency. The API allows you to retrieve a list of agency payment methods.
Agency Payment Method Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the associated payment method:
include_agency_payment_method_payment_method=true
Parameter | Default | Required | Description |
---|---|---|---|
include_agency_payment_method_payment_method | false | No | Include the payment method |
Get Agency Payment Methods
Retrieves a list of agency payment methods
Request:
curl -X GET "/api/v2/agency_payment_methods.json" \
-H "x-api-token: API_KEY" \
Response:
[
{
"id": 164,
"agency_id": 1,
"payment_method_id": 5,
"fee_type": 'fixed',
"fee_value": 15,
"is_default": false,
"identity_code": 'AAAA'
},
{...},
{...},
]
HTTP Request
GET /agency_payment_methods.json
Returns
This endpoint returns a JSON array of agency payment method objects.
Agency Provider
An agency provider object represents providers, services, and price lists for the authenticated agency. The API allows you to retrieve a list of agency providers.
Agency Provider Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the provider that created the agency provider:
include_agency_provider_provider=true
Parameter | Default | Required | Description |
---|---|---|---|
include_agency_provider_provider | No | No | Include the provider that created the agency provider |
include_agency_provider_service | No | No | Include the service that created the agency provider |
Get Agency Providers
Retrieves a list of agency providers
Request:
curl -X GET "/api/v2/agency_providers.json" \
-H "x-api-token: API_KEY" \
Response:
[
{
"id": 164,
"agency_id": 1,
"provider_id": 5,
"service_id": 1,
"identity_code": null,
"provider_price_list_id": 15
},
{...},
{...},
]
HTTP Request
GET /agency_providers.json
Returns
This endpoint returns a JSON array of agency provider objects.
Artworks
An artwork object represents a piece of artwork and its pages. The API allows you to manage artworks.
Artwork Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the artwork:
include_artwork_pages=true
Parameter | Default | Required | Description |
---|---|---|---|
include_artwork_pages | false | No | Include the pages that belong to the artwork |
include_artwork_page_data | false | No | Include the page data that is used when prefilling the PDF |
Get Artworks
Returns a list of artworks
Request:
curl -X GET "https://realhub.realbase.io/api/v2/artworks.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
Response:
[
{
"id": 1562,
"artwork_type": "template",
"campaign_id": 393,
"campaign_quote_item_id": null,
"order_item_id": 3193,
"service_product_id": 20,
"status_id": 1,
"template_page_category_id": null,
"cache_key": 1601508361,
"dates": {
"created": {
"date_time": "01/10/2020 09:24"
},
"updated": {
"date_time": "01/10/2020 09:26",
"integer": 1601508361
}
},
"links": {
"build_url": "https://realhubapp.com/agency/artworks/1562/build_pdf",
"download_url": "https://realhubapp.com/admin/artworks/1562/pdf?provider_id=1&token=gqx67y-xwZVeunShEQ3g",
"edit": "https://realhubapp.com/agency/artworks/builder#/orderItems/3193/artworks/1562",
"export_url": null,
"render_preview": "https://realhubapp.com/agency/order_items/3193/artwork_pages/1818/preview"
},
"pages": [],
"files": {}
}
]
HTTP Request
GET /artworks.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
artwork_ids | null | No | An array of ids to return |
limit | 10 | No | The number of records to return. Maximum 50. |
offset | 0 | No | The number of records to skip before returning. |
Returns
This endpoint returns an array of artwork JSON objects.
Get Artwork
Returns a single artwork
Request:
curl -X GET "https://realhub.realbase.io/api/v2/artworks/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
Response:
{
"id": 1562,
"artwork_type": "template",
"campaign_id": 393,
"campaign_quote_item_id": null,
"order_item_id": 3193,
"service_product_id": 20,
"status_id": 1,
"template_page_category_id": null,
"cache_key": 1601508361,
"dates": {
"created": {
"date_time": "01/10/2020 09:24"
},
"updated": {
"date_time": "01/10/2020 09:26",
"integer": 1601508361
}
},
"links": {
"build_url": "https://realhubapp.com/agency/artworks/1562/build_pdf",
"download_url": "https://realhubapp.com/admin/artworks/1562/pdf?provider_id=1&token=gqx67y-xwZVeunShEQ3g",
"edit": "https://realhubapp.com/agency/artworks/builder#/orderItems/3193/artworks/1562",
"export_url": null,
"render_preview": "https://realhubapp.com/agency/order_items/3193/artwork_pages/1818/preview"
},
"pages": [],
"files": {}
}
HTTP Request
GET /artworks/:id.json
Returns
This endpoint returns a single artwork JSON object.
Create Artwork
Creates a new artwork.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/artworks.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-data '{
"artwork": {
"order_item_id": 3163,
"campaign_id": 378,
"artwork_pages": [
{
"template_page_id": 32
}
]
},
"custom_data": {
"agents": {
"agent_name": "Agent Name"
}
}
}'
Response:
{
"id": 1576,
"artwork_type": "template",
"campaign_id": 378,
"campaign_quote_item_id": null,
"order_item_id": 3163,
"service_product_id": 17,
"status_id": 1,
"template_page_category_id": null,
"cache_key": 1603775442,
"dates": {
"created": {
"date_time": "27/10/2020 16:10"
},
"updated": {
"date_time": "27/10/2020 16:10",
"integer": 1603775442
}
},
"links": {
"build_url": "https://realhubapp.com/agency/artworks/1576/build_pdf",
"download_url": "https://realhubapp.com/admin/artworks/1576/pdf?provider_id=1&token=Ayzf6143B8syrbAkiyMi",
"edit": "https://realhubapp.com/agency/artworks/builder#/orderItems/3163/artworks/1576",
"export_url": null,
"render_preview": "https://realhubapp.com/agency/order_items/3163/artwork_pages/1832/preview"
},
"pages": [
{
"id": 1832,
"artwork_id": 1576,
"template_page_id": 32,
"data": {
"page_item_805": "Agent Name\n",
"render_conditions": []
},
"sort": 6
}
],
"files": {}
}
HTTP Request
POST /artworks.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
artwork | null | Yes | An artwork object |
custom_data | null | No | Custom data that is merged with default when auto populating artwork |
Artwork Object
Parameter | Default | Required | Description |
---|---|---|---|
order_item_id | null | Yes | An Order Item ID |
campaign_id | null | Yes | A Campaign ID |
artwork_pages | null | Yes | An array of artwork page objects |
Artwork Page Object
Parameter | Default | Required | Description |
---|---|---|---|
template_page_id | null | Yes | A Template Page ID |
Custom Data Object
Refer to JSON in right sidebar for available values.
Custom Data Object:
{
"campaign": {
"id": 2,
"address": "Suite 785/74431 Connelly Ridge",
"auction_date": "Tue, 27th Oct at 3:51pm",
"auction_date_full": "Tuesday 27th October at 3.51pm",
"auction_date_raw": "2020-10-27T15:51:49.401+11:00",
"auction_location": "On Site",
"bathrooms": "2",
"bedrooms": "3",
"car_spaces": "1",
"carparks": "1",
"carports": "1",
"council_rates": "$750 p/q",
"description": "Description",
"inspection_details": "Mon & Wed at 10am",
"living_areas": "1",
"pools": "1",
"price_guide": "Offers Over $2M",
"property_url": "www.propertywebsite.com",
"sale_method": "Auction",
"sold": false,
"sold_price": "$1,200,000",
"street_name": "Connelly Ridge",
"street_number": "74431",
"studies": "1",
"suburb": "1232 Malka Centers",
"tagline": "Tagline",
"unit_number": "Suite 785"
},
"agency": {
"id": 5,
"agency_name": "Deckow-Schaefer",
"agency_short_name": "DS",
"agency_phone": "02 9988 0000",
"agency_address_line_1": "1852",
"agency_address_line_2": "Lueilwitz Island",
"agency_address_region": "4716 Ramona Trail",
"agency_address_postcode": "2100",
"agency_address_state": "NSW",
"agency_email": "shaunte.abbott@predovic.co",
"agency_website": "http://douglas.biz/kendrick",
"agency_business_name": "Deckow-Schaefer Pty Ltd",
"agency_business_number": "80 000 000 000",
"agency_license_number": "RLA 55063813314"
},
"agents": {
"agent_business_name": "",
"agent_business_number": "80 000 000 001",
"agent_email": "carl.anderson@agency.com",
"agent_first_name": "Carl",
"agent_last_name": "Anderson",
"agent_license_number": "",
"agent_mobile": "0404 336 225",
"agent_name": "Carl Anderson",
"agent_phone": "(02) 8888 9999",
"agent_profile": "Agent Profile",
"agent_title": "Agent Title",
"second_agent_business_name": "",
"second_agent_business_number": "",
"second_agent_email": "",
"second_agent_first_name": "",
"second_agent_last_name": "",
"second_agent_license_number": "",
"second_agent_mobile": "",
"second_agent_name": "",
"second_agent_phone": "",
"second_agent_profile": "",
"second_agent_title": ""
}
}
Returns
This endpoint returns an artwork JSON object.
Duplicate Artwork
Duplicates an existing artwork and returns the new one
Request:
curl -X POST "https://realhub.realbase.io/api/v2/artworks/:id/duplicate.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
{
"id": 1576,
"artwork_type": "template",
"campaign_id": 378,
"campaign_quote_item_id": null,
"order_item_id": 3163,
"service_product_id": 17,
"status_id": 1,
"template_page_category_id": null,
"cache_key": 1603775442,
"dates": {
"created": {
"date_time": "27/10/2020 16:10"
},
"updated": {
"date_time": "27/10/2020 16:10",
"integer": 1603775442
}
},
"links": {
"build_url": "https://realhubapp.com/agency/artworks/1576/build_pdf",
"download_url": "https://realhubapp.com/admin/artworks/1576/pdf?provider_id=1&token=Ayzf6143B8syrbAkiyMi",
"edit": "https://realhubapp.com/agency/artworks/builder#/orderItems/3163/artworks/1576",
"export_url": null,
"render_preview": "https://realhubapp.com/agency/order_items/3163/artwork_pages/1832/preview"
},
"pages": [
{
"id": 1832,
"artwork_id": 1576,
"template_page_id": 32,
"data": {
"page_item_805": "Agent Name\n",
"render_conditions": []
},
"sort": 6
}
],
"files": {}
}
HTTP Request
POST /artworks/:id/duplicate.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | No | The ID of the campaign that the new artwork should be assigned to |
create_attached_item | false | No | Create a campaign item to attach the new artwork to |
Returns
This endpoint returns an artwork JSON object.
Build PDF
Queues a PDF build job for an artwork and sends a link to the completion URL once complete as a POST request.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/artworks/:id/build_pdf.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "completion_url=http://myurl.com/" \
-F "low_res=true"
Response:
{
"queued": true
}
After job has completed (Low Res):
{
"low_res_url": "https://realhub-dev.s3-ap-southeast-2.amazonaws.com/storage/development/artworks/low_res_files/000/001/638/artwork_1638_original.pdf?1623280463",
"low_res_updated_at": "2021-06-10T09:14:23+10:00"
}
After job has completed (High Res):
{
"url": "https://realhub-dev.s3-ap-southeast-2.amazonaws.com/storage/development/artworks/artwork_files/000/001/638/artwork_1638_original.pdf?1623280507",
"updated_at": "2021-06-10T09:15:07+10:00"
}
HTTP Request
POST /artworks/:id/build_pdf
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
artwork_page_id | null | No | The ID of an individual page of the artwork. All pages are returned if not supplied. |
completion_url | null | Yes | The URL that the system will send the payload to once completed |
low_res | null | No | Set as true to include a low-resolution version of the pdf. |
Returns
This endpoint returns a JSON object confirming that the job has been queued. When the job is completed, another JSON object with links to the PDF files is sent via a POST request to the completion url.
Build Image
Queues an image build job for an artwork and sends a link to the completion URL once complete as a POST request.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/artworks/:id/build_image.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "completion_url=http://myurl.com/" \
-F "image_type=JPG"
Response:
{
"queued": true
}
After job has completed:
{
"attachment_url":"https://realhub.s3-ap-southeast-2.amazonaws.com/storage/staging/attachments/files/000/003/635/artwork_3556_original.jpg?1651624233",
"updated_at":"2022-05-04T10:30:33+10:00"
}
HTTP Request
POST /artworks/:id/build_image
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
artwork_page_id | null | No | The ID of an individual page of the artwork. All pages are returned if not supplied. |
completion_url | null | Yes | The URL that the system will send the payload to once completed |
image_type | null | Yes | Either JPG or PNG |
Returns
This endpoint returns a JSON object confirming that the job has been queued. When the job is completed, another JSON object with links to the image file is sent via a POST request to the completion url.
Artwork Pages
An artwork page object represents a specific page of an artwork. The API allows you to manage artwork pages.
Artwork Page Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the artwork page:
include_artwork_page_data=true
Parameter | Default | Required | Description |
---|---|---|---|
include_artwork_page_data | false | No | Include the page data that is used when prefilling the PDF |
Update Artwork Page Data
Updates page data for a specific key.
Notes
Please ensure that you modify and return the data value in the same shape. Some fields require complex structures to render correctly.
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/artwork_pages/:id/update_data_key.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
-F "artwork_page[data]={"key":"page_item_2060","value":"updated object"}" \'
Response:
{
"id": 1820,
"artwork_id": 1564,
"template_page_id": 166,
"data": {
"page_item_2060": {
"fields": [
{
"id": "kft8hk7h",
"fonts": [],
"value": "LJ Hooker Aldinga | Seaforth",
"font_id": 10,
"editable": true,
"leadings": [],
"font_size": "18",
"linked_to": {
"actions": []
},
"trackings": [],
"font_sizes": [],
"placeholder": "Agency Names",
"suggestions": [],
"force_newline": "always",
"shortcode_key": "agency_name"
},
{
"id": "kft8hxjp",
"fonts": [],
"value": "(08) 8556 5248",
"font_id": 8,
"editable": true,
"leadings": [],
"font_size": "14",
"linked_to": {
"actions": []
},
"trackings": [],
"font_sizes": [],
"placeholder": "Agency Phone",
"suggestions": [],
"shortcode_key": "agency_phone"
}
]
},
"render_conditions": []
},
"sort": null
}
HTTP Request
PUT /artwork_pages/:id/update_data_key.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
artwork_page[data] | null | Yes | A json encoded string |
Example Data JSON Object
Refer to JSON in right sidebar for available values.
Example Data Object:
{
"key": "page_item_2060",
"value": {
"fields": [
{
"id": "kft8hk7h",
"fonts": [],
"value": "LJ Hooker Aldinga | Seaforth",
"font_id": 10,
"editable": true,
"leadings": [],
"font_size": "18",
"linked_to": { "actions": [] },
"trackings": [],
"font_sizes": [],
"placeholder": "Agency Names",
"suggestions": [],
"force_newline": "always",
"shortcode_key": "agency_name"
}
]
}
}
Returns
This endpoint returns an artwork page JSON object.
Bookings
A booking object represents a job or appointment with defined start and end times. The API allows you to retrieve a list of bookings.
Booking Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the order item:
include_booking_order_item=true
Parameter | Default | Required | Description |
---|---|---|---|
include_booking_order_item | false | No | Include the order item assigned to the booking |
Get Bookings
Retrieves a list of bookings.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/bookings.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 21,
"assignee_id": 13,
"campaign_id": 259,
"cancelled": false,
"client_id": 1,
"client_type": "Agency",
"confirmed": false,
"contact_email": "contact@agency.com.au",
"contact_name": "Contact Name",
"contact_phone": "0411 000 000",
"data": {
"buffer_after": 30,
"completed_at": "",
"buffer_before": 0
},
"instructions": "Please ensure you are at the shoot 15min prior for briefing.",
"latitude": null,
"location": "245 Underwood Street, Paddington",
"longitude": null,
"notes": null,
"order_item_id": 2570,
"owner_id": 1,
"owner_type": "Provider",
"service_product_id": 8,
"status_id": 2,
"time_zone": "Australia/Sydney",
"title": "Agency Name, Agent Name",
"dates": {
"start": {
"date_time": "25/02/2019 12:30",
"date": "25/02/2019",
"time": "12:30"
},
"end": {
"date_time": "25/02/2019 14:30",
"date": "25/02/2019",
"time": "14:30"
}
}
},
{...},
{...},
]
HTTP Request
GET /bookings.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
status | null | No | Filter the records by status (Approved, Complete) |
start_date | null | No | Filter bookings that are scheduled to start after date (ISO8601 format) |
end_date | null | No | Filter bookings that are scheduled to end before date (ISO8601 format) |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 50. |
modified_since | null | No | Filter the bookings that have been modified since date (ISO8601 format) provided. e.g. 2018-02-02T11:49:24 . Will be parsed as Australia/Sydney time. |
Returns
This endpoint returns a JSON array of booking objects.
Get Booking
Retrieves a single booking.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/bookings/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
{
"id": 21,
"assignee_id": 13,
"campaign_id": 259,
"cancelled": false,
"client_id": 1,
"client_type": "Agency",
"confirmed": false,
"contact_email": "contact@agency.com.au",
"contact_name": "Contact Name",
"contact_phone": "0411 000 000",
"data": {
"buffer_after": 30,
"completed_at": "",
"buffer_before": 0
},
"instructions": "Please ensure you are at the shoot 15min prior for briefing.",
"latitude": null,
"location": "245 Underwood Street, Paddington",
"longitude": null,
"notes": null,
"order_item_id": 2570,
"owner_id": 1,
"owner_type": "Provider",
"service_product_id": 8,
"status_id": 2,
"time_zone": "Australia/Sydney",
"title": "Agency Name, Agent Name",
"dates": {
"start": {
"date_time": "25/02/2019 12:30",
"date": "25/02/2019",
"time": "12:30"
},
"end": {
"date_time": "25/02/2019 14:30",
"date": "25/02/2019",
"time": "14:30"
}
}
}
HTTP Request
GET /bookings/:id.json
Returns
This endpoint returns a single JSON object.
Complete Booking
Completes a booking and marks the order item (if assigned) as Processing.
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/bookings/:id/complete.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
{
"id": 21,
"assignee_id": 13,
"campaign_id": 259,
"cancelled": false,
"client_id": 1,
"client_type": "Agency",
"confirmed": false,
"contact_email": "contact@agency.com.au",
"contact_name": "Contact Name",
"contact_phone": "0411 000 000",
"data": {
"buffer_after": 30,
"completed_at": "2019-02-26T14:04:52.063+11:00",
"buffer_before": 0
},
"instructions": "Please ensure you are at the shoot 15min prior for briefing.",
"latitude": null,
"location": "245 Underwood Street, Paddington",
"longitude": null,
"notes": null,
"order_item_id": 2570,
"owner_id": 1,
"owner_type": "Provider",
"service_product_id": 8,
"status_id": 8,
"time_zone": "Australia/Sydney",
"title": "Agency Name, Agent Name",
"dates": {
"start": {
"date_time": "25/02/2019 12:30",
"date": "25/02/2019",
"time": "12:30"
},
"end": {
"date_time": "25/02/2019 14:30",
"date": "25/02/2019",
"time": "14:30"
}
}
}
HTTP Request
PUT /bookings/:id/complete.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
notes | null | No | Notes for processing the order |
Returns
This endpoint returns a single JSON object.
Booking iCal Subscription
Returns a list of ical compliant bookings which can be subscribed to.
For instructions on how to add the endpoint to Apple Calendar see:
Setting up Calendar Subscription
Request:
curl -X GET "https://realhub.realbase.io/api/v2/bookings/ical/:api_token"
Response:
BEGIN:VCALENDAR
VERSION: 2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP: 20191022T060746Z
UID: 2d78dea2-91eb-43a8-be64-ef138a265011
DTSTART: 20191016T180000
DTEND: 20191016T190000
CLASS:PRIVATE
LOCATION: 2/192 Harbord Road\, Brookvale
SUMMARY:PENDING - Day Photography | Belle Property Noosa
END:VEVENT
END:VCALENDAR
HTTP Request
GET /bookings/ical/:api_token
Returns
This endpoint returns a list of calendar events.
Brands
A brand object represents the details for a brand. The API allows you to retrieve a list of brands.
Get Brands
Retrieves a list of brands.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/brands.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 3,
"address_line_1": "1 Smith St",
"address_line_2": null,
"address_postcode": "2000",
"address_region": "Sydney",
"address_state": "NSW",
"business_name": "Ray White Pty Ltd",
"colour_accent": null,
"colour_gradient_end": null,
"colour_gradient_start": null,
"colour_highlight": null,
"colour_primary": "ffffff",
"colour_secondary": null,
"options": {
"agency_importer_api": null,
"disable_artwork_download": false,
"disable_artwork_upload": false,
"disable_print_quality": false,
"enable_proposals": true,
"proposal_theme": "",
"template_page_fee": 1.0,
"template_page_monthly_allowance": 1
},
"title": "Ray White"
},
{...}
]
HTTP Request
GET /brands.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
string | null | No | Filters the brands list by title. |
offset | 0 | No | The number of brands to skip before returning. |
limit | 50 | No | The number of brands to return. Maximum 50. |
Returns
This endpoint returns a JSON array of brand objects.
Get Brand
Retrieves a single brand.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/brands/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
{
"id": 3,
"address_line_1": "1 Smith St",
"address_line_2": null,
"address_postcode": "2000",
"address_region": "Sydney",
"address_state": "NSW",
"business_name": "Ray White Pty Ltd",
"colour_accent": null,
"colour_gradient_end": null,
"colour_gradient_start": null,
"colour_highlight": null,
"colour_primary": "ffffff",
"colour_secondary": null,
"options": {
"agency_importer_api": null,
"disable_artwork_download": false,
"disable_artwork_upload": false,
"disable_print_quality": false,
"enable_proposals": true,
"proposal_theme": "",
"template_page_fee": 1.0,
"template_page_monthly_allowance": 1
},
"title": "Ray White"
}
HTTP Request
GET /brands/:id.json
Returns
This endpoint returns a JSON object of a brand.
Search Brands
Retrieves a list of brands which satisfy search criteria.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/brands/search.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "title=ray" \
-F "address=smith st"
Response:
[
{
"id": 3,
"address_line_1": "1 Smith St",
"address_line_2": null,
"address_postcode": "2000",
"address_region": "Sydney",
"address_state": "NSW",
"business_name": "Ray White Pty Ltd",
"colour_accent": null,
"colour_gradient_end": null,
"colour_gradient_start": null,
"colour_highlight": null,
"colour_primary": "ffffff",
"colour_secondary": null,
"options": {
"agency_importer_api": null,
"disable_artwork_download": false,
"disable_artwork_upload": false,
"disable_print_quality": false,
"enable_proposals": true,
"proposal_theme": "",
"template_page_fee": 1.0,
"template_page_monthly_allowance": 1
},
"title": "Ray White"
}
]
HTTP Request
GET /brands/search.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
title | null | No | The title of the brand you wish to search for. |
address | null | No | The address of the brand you wish to search for. |
offset | 0 | No | The number of brands to skip before returning. |
limit | 50 | No | The maximum number of brands to return. Maximum 50. |
Returns
This endpoint returns a JSON array of brand objects.
Create Brand
Creates a brand.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/brands.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "address_line_1=1 Smith St" \
-F "address_postcode=2000" \
-F "address_region=Sydney" \
-F "address_state=NSW" \
-F "business_name=Ray White Pty Ltd" \
-F "colour_primary": "ffffff" \
-F "title=Ray White" \
-F "template_page_fee=1.0"
-F "template_page_monthly_allowance=1"
Response:
{
"id": 3,
"address_line_1": "1 Smith St",
"address_line_2": null,
"address_postcode": "2000",
"address_region": "Sydney",
"address_state": "NSW",
"business_name": "Ray White Pty Ltd",
"colour_accent": null,
"colour_gradient_end": null,
"colour_gradient_start": null,
"colour_highlight": null,
"colour_primary": "ffffff",
"colour_secondary": null,
"options": {
"agency_importer_api": null,
"disable_artwork_download": false,
"disable_artwork_upload": false,
"disable_print_quality": false,
"enable_proposals": true,
"proposal_theme": "",
"template_page_fee": 1.0,
"template_page_monthly_allowance": 1
},
"title": "Ray White"
}
HTTP Request
POST /brands.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
title | string | Yes | The display name of the brand. Must be unique. |
address_line_1 | string | No | The first line of the brand address. |
address_line_2 | string | No | The second line of the brand address (if applicable). |
address_postcode | string | No | 4-digit post code e.g. 2100. |
address_region | string | No | Name of the property's suburb. |
address_state | string | No | Can be NSW, VIC, QLD, SA, NT, TAS, ACT or WA. |
business_name | string | No | The legal name of the business. |
colour_accent | string | No | The hex code of the brand's accent colour e.g. aaaaaa. |
colour_gradient_end | string | No | The hex code of the brand's gradient end colour e.g. bbbbbb. |
colour_gradient_start | string | No | The hex code of the brand's gradient start colour e.g. cccccc. |
colour_highlight | string | No | The hex code of the brand's highlight colour e.g. dddddd. |
colour_primary | string | No | The hex code of the brand's primary colour e.g. eeeeee. |
colour_secondary | string | No | The hex code of the brand's secondary colour e.g. ffffff. |
logo | file | No | A PNG logo image file. |
marketing_cover_image | file | No | A JPG image file. |
mono_logo | file | No | A PNG image file. |
options | json | No | Additional options for the brand. |
template_page_fee | float | No | The amount charged per template page. |
template_page_monthly_allowance | integer | No | The number of free monthly template pages. |
Returns
This endpoint returns a JSON object representing a brand.
Campaigns
A campaign object represents an individual property in Realhub. The API allows you to retrieve a list of campaigns.
Campaign Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the agency that created the campaign:
include_campaign_agency=true
Parameter | Default | Required | Description |
---|---|---|---|
include_campaign_agency | No | No | Include the agency that created the campaign |
include_campaign_agents | No | No | Include an array of campaign agents |
include_campaign_ad_copies | No | No | Include an array of ad copies |
include_campaign_images | No | No | Include an array of images |
include_campaign_media_links | No | No | Include an array of media links |
Agencies can retrieve all campaigns for their agency while Providers can retrieve all campaigns for agencies that they provide a service for.
Get Campaigns
Retrieves a list of current campaigns.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/campaigns.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "campaign_statuses[]=offmarket" \
-F "campaign_type=rental" \
-F "marketing_type=property_marketing"
Response:
[
{
"address": "3/625 Toorak Road",
"agency_id": 1,
"agency_marketing": false,
"auction_date": null,
"bathrooms": "1",
"bedrooms": "2",
"campaign_category_id": 3,
"campaign_commercial_category_id": null,
"campaign_duration": null,
"campaign_rural_category_id": null,
"campaign_sale_method_id": 2,
"campaign_status_id": 3,
"campaign_type_id": 12,
"car_spaces": 0,
"carparks": "0",
"carports": "1",
"council_rates": null,
"country_code": "AU",
"country_name": null,
"data": {
"portal": {
"id": 4,
"title": "Realhub"
},
"agent_id": "XAXAXA",
"unique_id": "reh_161_400089",
"modified_time": "2016-09-21-11:46:12"
},
"end_date": null,
"energy_rating": null,
"extra_fields": null,
"facilities": null,
"frontage": null,
"hidden": false,
"hide_address": false,
"hide_price": false,
"hide_sold_price": false,
"id": 138,
"inspection_details": null,
"land_area": null,
"land_area_units": null,
"land_details": null,
"land_zoning": null,
"latitude": null,
"legal_description": null,
"living_areas": null,
"longitude": null,
"lot_number": null,
"marketing_agency_id": null,
"municipality": null,
"other_features": null,
"post_code": "3142",
"price_guide": "$595.00 Per Week",
"property_url": null,
"provider_id": null,
"public_token": null,
"published": false,
"rental_bond": 2975.0,
"rental_period": "weekly",
"site_name": null,
"sold": false,
"sold_price": null,
"start_date": null,
"state_id": "2",
"state_name": "VIC",
"street_name": "Toorak Road",
"street_number": "625",
"studies": "1",
"suburb_id": "12030",
"suburb_name": "Toorak",
"team_id": null,
"under_offer": false,
"unit_number": "3",
"workflow_status_key": null,
"year_built": null,
"cache_key": 1474505749,
"dates": {
"auction": {
"date": "",
"date_time": ""
},
"created": {
"date_time": "22/09/2016 10:55"
},
"end": {
"date": ""
},
"sold": {
"date": ""
},
"start": {
"date": ""
},
"updated": {
"date_time": "22/09/2016 10:55"
}
}
},
{...},
{...}
]
HTTP Request
GET /campaigns.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
agency_id | null | No | Filter the campaigns by Agency. |
campaign_statuses | null | No | Filters campaigns by status. Can be proposal, current, offmarket, withdrawn, leased, sold. Multiple can be sent in one query and must be sent in an array e.g. campaign_statuses[]=proposal |
campaign_type | null | No | Filter campaigns by type. Currently only rental is supported. |
marketing_type | Property marketing | No | Filter campaigns by whether they are for agency or property marketing. Can be agency_marketing or property_marketing. |
offset | 0 | No | The number of campaigns to skip before returning. |
limit | 10 | No | The number of campaigns to return. Maximum 50. |
Returns
This endpoint returns a JSON array of campaign objects.
Get Campaign
Retrieves a single campaign.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/campaigns/:id.json" \
-H "x-api-token: API_KEY"
Response:
{
"id": 147,
"agency_id": 1,
"provider_id": null,
"lot_number": null,
"site_name": null,
"unit_number": "6",
"street_number": "89",
"street_name": "Portal Avenue",
"suburb_id": "724",
"suburb_name": "Newport",
"state_id": "1",
"state_name": "NSW",
"post_code": "2106",
"country_code": "AU",
"country_name": null,
"bedrooms": "4",
"bathrooms": "3",
"carparks": "2",
"carports": "1",
"car_spaces": 2,
"studies": "1",
"living_areas": "2",
"facilities": null,
"land_area": 740,
"land_area_units": "squareMeter",
"land_details": "680sqm Approx",
"campaign_type_id": 1,
"campaign_sale_method_id": 1,
"campaign_category_id": 7,
"campaign_commercial_category_id": null,
"campaign_status_id": 4,
"auction_date": "2016-10-18T12:00:00.000+11:00",
"hide_sold_price": false,
"hide_address": false,
"hide_price": false,
"hidden": false,
"inspection_details": "Inspect Wed & Sat",
"data": {
"portal": {
"id": 4,
"title": "Realhub"
},
"agent_id": "XAXAXA",
"unique_id": "RH147",
"modified_time": "2016-10-18-10:30:54"
},
"council_rates": "$1200 per annum",
"property_url": "www.propertymicrosite.com",
"other_features": null,
"rental_period": null,
"rental_bond": null,
"under_offer": false,
"published": false,
"address": "6/89 Portal Avenue",
"dates": {
"created": {
"date_time": "06/10/2016 15:50"
},
"auction": {
"date_time": "18/10/2016 12:00"
},
"sold": {
"date": "18/10/2016"
}
}
}
HTTP Request
GET /campaigns/:id.json
Returns
This endpoint returns a JSON object of the campaign.
Search Campaigns
Search for a campaign using street name or campaign ID
Request:
curl -X GET "/api/v2/campaigns/search.json" \
-H "x-api-token: API_KEY" \
-F "string=portal"
Response:
[
{
"id": 147,
"agency_id": 1,
"provider_id": null,
"lot_number": null,
"site_name": null,
"unit_number": "6",
"street_number": "89",
"street_name": "Portal Avenue",
"suburb_id": "724",
"suburb_name": "Newport",
"state_id": "1",
"state_name": "NSW",
"post_code": "2106",
"country_code": "AU",
"country_name": null,
"bedrooms": "4",
"bathrooms": "3",
"carparks": "2",
"carports": "1",
"car_spaces": 2,
"studies": "1",
"living_areas": "2",
"facilities": null,
"land_area": 740,
"land_area_units": "squareMeter",
"land_details": "680sqm Approx",
"campaign_type_id": 1,
"campaign_sale_method_id": 1,
"campaign_category_id": 7,
"campaign_commercial_category_id": null,
"campaign_status_id": 4,
"auction_date": "2016-10-18T12:00:00.000+11:00",
"hide_sold_price": false,
"hide_address": false,
"hide_price": false,
"hidden": false,
"inspection_details": "Inspect Wed & Sat",
"data": {
"portal": {
"id": 4,
"title": "Realhub"
},
"agent_id": "XAXAXA",
"unique_id": "RH147",
"outgoing_id": "BD38",
"modified_time": "2016-10-18-10:30:54"
},
"council_rates": "$1200 per annum",
"property_url": "www.propertymicrosite.com",
"other_features": null,
"rental_period": null,
"rental_bond": null,
"under_offer": false,
"published": false,
"address": "6/89 Portal Avenue",
"dates": {
"created": {
"date_time": "06/10/2016 15:50"
},
"auction": {
"date_time": "18/10/2016 12:00"
},
"sold": {
"date": "18/10/2016"
}
}
},
{...},
{...}
]
HTTP Request
GET /campaigns/search.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
string | null | No | The string that will be used to search the records. |
portal_unique_id | null | No | The string that will be used to search portal unique ids. |
external_id | null | No | The string that will be used to search for both portal unique ids or portal outgoing ids. |
portal_short_code | null | No | Required if using portal_unique_id or external_id. Will be used to match the portal short code e.g. agentbox. |
Returns
This endpoint returns a JSON array of campaign objects.
Search Campaigns from CRM
Search for campaigns from the agency's CRM (e.g. MyDesktop, Rex, VaultRE).
Request:
curl -X GET "/api/v2/campaigns/api_search.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY" \
-F "agency_id=1" \
-F "string=23 smith street"
Response:
{
"data": [
{
"address": "1/23 Smith Street, Brookvale NSW",
"id": 2048095,
"life_id": 2437597,
"service_provider": "vaultre"
}
]
}
HTTP Request
GET /campaigns/api_search.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
agency_id | null | Yes | The ID of the agency whose CRM will be searched. |
string | null | Yes | The string that will be used to search the records. |
Returns
This endpoint returns a data array of campaign objects.
Create Campaign
Creates a new campaign using the supplied details.
Request:
curl -X POST "/api/v2/campaigns.json" \
-F "agency_id=1" \
-F "campaign_status=current" \
-F "country_code=AU" \
-F "post_code=2100" \
-F "state=NSW" \
-F "suburb_name=Narrabeen" \
-F "street_name=Clarke Street" \
-F "street_number=16" \
-F "unit_number=5" \
-F "agents[][email]=agent@estate.com.au" \
-F "agents[][mobile]=0411 72 72 18" \
-F "agents[][email]=agent2@estate.com.au" \
-F "agents[][mobile]=0404 362 129" \
-F "bedrooms=3" \
-F "bathrooms=2" \
-F "carparks=2"
Response:
[
{
"id": 147,
"agency_id": 1,
"provider_id": null,
"lot_number": null,
"site_name": null,
"unit_number": "6",
"street_number": "89",
"street_name": "Portal Avenue",
"suburb_id": "724",
"suburb_name": "Newport",
"state_id": "1",
"state_name": "NSW",
"post_code": "2106",
"country_code": "AU",
"country_name": null,
"bedrooms": "4",
"bathrooms": "3",
"carparks": "2",
"carports": "1",
"car_spaces": 2,
"studies": "1",
"living_areas": "2",
"facilities": null,
"land_area": 740,
"land_area_units": "squareMeter",
"land_details": "680sqm Approx",
"campaign_type_id": 1,
"campaign_sale_method_id": 1,
"campaign_category_id": 7,
"campaign_commercial_category_id": null,
"campaign_status_id": 4,
"auction_date": "2016-10-18T12:00:00.000+11:00",
"hide_sold_price": false,
"hide_address": false,
"hide_price": false,
"hidden": false,
"inspection_details": "Inspect Wed & Sat",
"data": {
"portal": {
"id": 4,
"title": "Realhub"
},
"agent_id": "XAXAXA",
"unique_id": "RH147",
"modified_time": "2016-10-18-10:30:54"
},
"council_rates": "$1200 per annum",
"property_url": "www.propertymicrosite.com",
"other_features": null,
"rental_period": null,
"rental_bond": null,
"under_offer": false,
"published": false,
"address": "6/89 Portal Avenue",
"dates": {
"created": {
"date_time": "06/10/2016 15:50"
},
"auction": {
"date_time": "18/10/2016 12:00"
},
"sold": {
"date": "18/10/2016"
}
}
},
{...},
{...}
]
HTTP Request
POST /campaigns.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
agency_id | null | Yes | The ID of the agency that the campaign belongs to. |
agents | null | Yes | An array of agent objects e.g. [{ email: "email", mobile: "0400 000 000" }] |
campaign_status | null | Yes | Can be current, withdrawn, offmarket, sold, leased or proposal |
country_code | null | Yes | 2 Digit ISO Alpha-2 e.g. AU |
post_code | null | Yes | 4 digit post code e.g. 2100 |
state | null | Yes | Can be NSW, VIC, QLD, SA, NT, TAS, ACT or WA |
suburb_name | null | Yes | Name of the property suburb |
street_name | null | Yes | Name of the property street, road etc. |
street_number | null | Yes | Number of the property e.g. 4 |
unit_number | null | No | Unit number of property. |
bathrooms | null | No | Number of bathrooms the property. |
bedrooms | null | No | Number of bedrooms the property. |
car_spaces | null | No | Number of car spaces at the property. |
carparks | null | No | Number of carparks at the property. |
carports | null | No | Number of carports at the property. |
land_area | null | No | Property land area. |
land_area_units | null | No | Land area units sqm, acre etc. |
living_areas | null | No | Number of living areas of the property. |
lot_number | null | No | Lot number of the property. |
price | null | No | Integer value of price e.g. 1200000 |
price_guide | null | No | Price guide description e.g. Offers over $1,200,00 |
sold | null | No | Can be either true or false. |
sold_price | null | No | Integer value of sold price e.g. 1351000 |
studies | null | No | Number of studies at the property |
Returns
This endpoint returns a campaign object.
Import Campaign via CRM
Creates a new campaign by importing data from the CRM.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/campaigns/api_import.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "agency_id=1" \
-F "external_id=2048095"
-F "sale_method=lease"
Response:
{
"address": "33 Barrack Rd",
"agency_id": 1,
"agency_marketing": false,
"auction_date": null,
"bathrooms": "2",
"bedrooms": "2",
"campaign_category_id": 7,
"campaign_commercial_category_id": 6,
"campaign_duration": null,
"campaign_rural_category_id": 9,
"campaign_sale_method_id": 2,
"campaign_status_id": 1,
"campaign_type_id": 12,
"car_spaces": 0,
"carparks": "1",
"carports": "2",
"council_rates": null,
"country_code": "AU",
"country_name": null,
"data": {
"agent_id": null,
"external_api_id": 996027,
"modified_time": "2020-11-09-13:00:10",
"outgoing_id": "996027",
"portal": {
"id": 11,
"type": "Portal",
"title": "VaultRE"
},
"unique_id": "996027"
},
"end_date": null,
"energy_rating": null,
"extra_fields": {
"coords": {
"lat": -27.4670045,
"lng": 153.0896884
},
"strata_admin": {
"period": "quarter",
"value": null
},
"water_rates": {
"period": "year",
"value": null
}
},
"facilities": null,
"frontage": 0.0,
"hidden": false,
"hide_address": false,
"hide_price": false,
"hide_sold_price": false,
"id": 579,
"inspection_details": null,
"land_area": 890.0,
"land_area_units": "squareMeter",
"land_details": "890.0squareMeter Approx",
"land_zoning": null,
"latitude": "-27.467005",
"legal_description": null,
"living_areas": null,
"longitude": "153.089688",
"lot_number": null,
"lowest_search": 890,
"marketing_agency_id": null,
"municipality": null,
"other_features": null,
"post_code": "4170",
"price": 890.0,
"price_guide": null,
"property_url": null,
"provider_id": null,
"public_token": "62B5q9TyTVUPyDtoRE_D",
"published": false,
"rental_bond": 3560.0,
"rental_period": "weekly",
"site_name": null,
"sold": false,
"sold_date": null,
"sold_price": null,
"start_date": null,
"state_id": "3",
"state_name": "QLD",
"street_name": "Barrack Rd",
"street_number": "33",
"studies": null,
"suburb_id": "5948",
"suburb_name": "Cannon Hill",
"team_id": null,
"title": "33 Barrack Rd, Cannon Hill",
"under_offer": false,
"unit_number": null,
"workflow_status_key": null,
"year_built": null,
"cache_key": 1605130881,
"dates": {
"auction": {
"date": "",
"date_time": ""
},
"created": {
"date_time": "12/11/2020 08:41"
},
"end": {
"date": ""
},
"sold": {
"date": ""
},
"start": {
"date": ""
},
"updated": {
"date_time": "12/11/2020 08:41"
}
}
}
HTTP Request
POST /campaigns/api_import.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
external_id | null | Yes | The ID of the campaign in the CRM's system. |
agency_id | null | No | The ID of the agency that the campaign belongs to. Required for non-agency users. |
sale_method | sale | No | The sale method of the campaign to import. Required if the CRM is VaultRE and the method is ‘lease’. Can be sale or lease. |
Returns
This endpoint returns an object representing a campaign.
Get Combined Spend
Returns all the approved orders and campaign items for a campaign.
Request:
curl -X GET "/api/v2/campaigns/:id/combined_spend.json" \
-H "x-api-token: API_KEY"
Response:
{
"id": 224,
"items": [
{
"id": 75,
"campaign_id": 224,
"invoice_notes": null,
"invoice_reference": null,
"invoice_total": null,
"item_type": "custom",
"price": 290,
"price_override": 290,
"title": "Marketing Admin Fee",
"user_id": 10,
"dates": {
"created": {
"date_time": "02/01/2018 12:53"
},
"updated": {
"date_time": "02/01/2018 12:53"
}
}
},
{...}
],
"orders": [
{
"id": 1495,
"agency_id": 1,
"campaign_id": 224,
"campaign_proposal_id": null,
"campaign_quote_id": 163,
"coupon_id": null,
"deleted": false,
"invoice_notes": null,
"invoice_reference": null,
"invoice_total": null,
"invoiced": false,
"notes": null,
"order_bundle_id": null,
"order_type": "item",
"override_reason": null,
"pagination_approved": false,
"provider_id": 1,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"purchase_order": null,
"shipping_address": null,
"status_id": 1,
"title": "6x4 Signboard",
"total": 200,
"total_override": null,
"user_id": 10,
"total_raw": 200,
"dates": {
"created": {
"date_time": "02/01/2018 12:53"
},
"updated": {
"date_time": "02/01/2018 12:53"
},
"approval": {
"date_time": "",
"integer": 0
}
}
},
{...}
]
}
HTTP Request
GET /campaigns/:id/combined_spend.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
id | null | Yes | The ID of the campaign that you would like to query. |
Returns
This endpoint returns an object with an array of approved orders and items for a given campaign.
Campaign Comparables
A campaign comparable object represents a property similar to the one being sold, allowing an estimate of the value. The API allows you to create a campaign comparable.
Campaign Comparable Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the image associated with the campaign comparable:
include_campaign_comparable_image=true
Parameter | Default | Required | Description |
---|---|---|---|
include_campaign_comparable_image | No | No | Include the URL of the image associated with the campaign comparable. |
Create Campaign Comparable
Create a campaign comparable.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/campaign_comparables.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-data '{
"campaign_id": 508,
"country_code": "AU",
"post_code": 2100,
"state_name": "NSW",
"street_name": "Harbord Rd",
"street_number": 10,
"suburb_name": "Brookvale",
"data": {
"data_provider": {
"title": "pricefinder",
"entity_id": 683452
},
"sale_method": "rental"
},
"bathrooms": 2,
"bedrooms": 3,
"building_area": 200,
"carparks": 1,
"distance": 45,
"land_area": 450,
"latitude": -33.723657,
"listing_agency": "LJ Hooker Seaforth",
"listing_agent": "John Smith",
"longitude": 151.297135,
"price": 1200000,
"price_guide": "Price Withheld",
"property_type": "House",
"rpd": "1/916831",
"sale_type": "For Lease",
"sold": true,
"sold_date": "2020-03-04"
}'
Response:
{
"id": 462,
"address": "10 Harbord Rd",
"bathrooms": "2",
"bedrooms": "3",
"building_area": "200",
"campaign_id": 508,
"carparks": "1",
"comparable_source": "market",
"country_code": "AU",
"data": {
"data_provider": {
"title": "pricefinder",
"entity_id": 683452
},
"sale_method": "rental"
},
"distance": 45.0,
"external_link": null,
"land_area": "450",
"latitude": "-33.723657",
"listing_agency": "LJ Hooker Seaforth",
"listing_agent": "John Smith",
"longitude": "151.297135",
"notes": null,
"post_code": "2100",
"price": 1200000.0,
"price_guide": "Price Withheld",
"property_type": "House",
"rpd": "1/916831",
"sale_type": "For Lease",
"sold": true,
"sold_date": "2020-03-04",
"source_campaign_id": null,
"state_name": "NSW",
"street_name": "Harbord Rd",
"street_number": "10",
"suburb_name": "Brookvale",
"unit_number": null
}
HTTP Request
POST /campaign_comparables.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
campaign_id | number | Yes | The ID of the campaign this comparable is associated with. |
country_code | string | Yes | 2-digit ISO Alpha-2 e.g. AU. |
post_code | string | Yes | 4-digit post code e.g. 2100. |
state_name | string | Yes | Can be NSW, VIC, QLD, SA, NT, TAS, ACT or WA. |
street_name | string | Yes | Name of the street, road, etc the property is on. |
street_number | string | Yes | Number of the property e.g. 4. |
suburb_name | string | Yes | Name of the property's suburb. |
auction_date | date-time | No | The date of the auction to sell the property in format YYYY-MM-DD HH:mm:SS e.g. 2020-08-15 15:30:00. |
bathrooms | string | No | Number of bathrooms at the property e.g. 1. |
bedrooms | string | No | Number of bedrooms at the property e.g. 2. |
building_area | string | No | The area of the property occupied by the building in square meters e.g. 200. |
carparks | string | No | Number of carparks at the property e.g. 2. |
comparable_source | string | No | The source of the information regarding the property e.g. agency, market. Defaults to market. |
data | json | No | Additional data regarding the sale method, and data providers's title and entity id. |
data.data_provider | json | No | Information regarding the data provider of the comparable. |
data.data_provider.entity_id | number | No | The ID of the property in the data provider's system. |
data.data_provider.title | string | No | The name of the data provider e.g. pricefinder, corelogic. |
data.sale_method | string | No | A description of the sale method. Must be rental if this is a rental property. |
distance | number | No | Distance in metres from the comparable property to the original e.g. 120.5. |
external_link | string | No | Any link to an external resource. |
land_area | string | No | The area of the property in square meters e.g. 75. |
latitude | number | No | Latitude co-ordinates of the property e.g. 10.521123 |
listing_agency | string | No | The real estate agency associated with this campaign comparable. |
listing_agent | string | No | The name of the lead agent on this campaign comparable. |
longitude | number | No | Longitude co-ordinates of the property e.g. 123.241230. |
notes | string | No | Any additional information regarding the campaign comparable. |
price | number | No | The price at which the property was sold e.g. 900000. |
price_guide | string | No | The price the property was expected to sell at e.g. $1000000, or a description e.g. Price Withheld |
property_type | string | No | Can be Apartment, Commercial, House, Townhouse, Unit, or Vacant Land. |
rpd | string | No | Legal description of the property, e.g. 1/916831. |
sale_type | string | No | A description of the sale type e.g. Auction, Normal Sale. |
sold | boolean | No | Whether the property has been sold, true or false. Defaults to false. |
sold_date | date | No | The date the property was sold at, formatted as YYYY-MM-DD e.g. 2020-02-10. |
source_campaign_id | number | No | The ID of the source campaign in the Realhub database. |
unit_number | string | No | The unit number of the property e.g. 6. |
Returns
This endpoint returns a JSON object representing a campaign comparable.
Update Campaign Comparables
Updates a campaign comparable.
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/campaign_comparables/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-data '{
"listing_agency": "LJ Hooker Manly",
"listing_agent": "David Smith",
...
}'
Response:
{
"id": 462,
"address": "10 Harbord Rd",
"bathrooms": "2",
"bedrooms": "3",
"building_area": "200",
"campaign_id": 508,
"carparks": "1",
"comparable_source": "market",
"country_code": "AU",
"data": {
"data_provider": {
"title": "pricefinder",
"entity_id": 683452
},
"sale_method": "rental"
},
"distance": 45.0,
"external_link": null,
"land_area": "450",
"latitude": "-33.723657",
"listing_agency": "LJ Hooker Manly",
"listing_agent": "David Smith",
"longitude": "151.297135",
"notes": null,
"post_code": "2100",
"price": 1200000.0,
"price_guide": "Price Withheld",
"property_type": "House",
"rpd": "1/916831",
"sale_type": "For Lease",
"sold": true,
"sold_date": "2020-03-04",
"source_campaign_id": null,
"state_name": "NSW",
"street_name": "Harbord Rd",
"street_number": "10",
"suburb_name": "Brookvale",
"unit_number": null
}
HTTP Request
PUT /campaign_comparables/:id.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
campaign_id | number | Yes | The ID of the campaign this comparable is associated with. |
country_code | string | Yes | 2-digit ISO Alpha-2 e.g. AU. |
post_code | string | Yes | 4-digit post code e.g. 2100. |
state_name | string | Yes | Can be NSW, VIC, QLD, SA, NT, TAS, ACT or WA. |
street_name | string | Yes | Name of the street, road, etc the property is on. |
street_number | string | Yes | Number of the property e.g. 4. |
suburb_name | string | Yes | Name of the property's suburb. |
auction_date | date-time | No | The date of the auction to sell the property in format YYYY-MM-DD HH:mm:SS e.g. 2020-08-15 15:30:00. |
bathrooms | string | No | Number of bathrooms at the property e.g. 1. |
bedrooms | string | No | Number of bedrooms at the property e.g. 2. |
building_area | string | No | The area of the property occupied by the building in square meters e.g. 200. |
carparks | string | No | Number of carparks at the property e.g. 2. |
comparable_source | string | No | The source of the information regarding the property e.g. agency, market. Defaults to market. |
data | json | No | Additional data regarding the sale method, and data providers's title and entity id. |
data.data_provider | json | No | Information regarding the data provider of the comparable. |
data.data_provider.entity_id | number | No | The ID of the property in the data provider's system. |
data.data_provider.title | string | No | The name of the data provider e.g. pricefinder, corelogic. |
data.sale_method | string | No | A description of the sale method. Must be rental if this is a rental property. |
distance | number | No | Distance in metres from the comparable property to the original e.g. 120.5. |
external_link | string | No | Any link to an external resource. |
land_area | string | No | The area of the property in square meters e.g. 75. |
latitude | number | No | Latitude co-ordinates of the property e.g. 10.521123 |
listing_agency | string | No | The real estate agency associated with this campaign comparable. |
listing_agent | string | No | The name of the lead agent on this campaign comparable. |
longitude | number | No | Longitude co-ordinates of the property e.g. 123.241230. |
notes | string | No | Any additional information regarding the campaign comparable. |
price | number | No | The price at which the property was sold e.g. 900000. |
price_guide | string | No | The price the property was expected to sell at e.g. $1000000, or a description e.g. Price Withheld |
property_type | string | No | Can be Apartment, Commercial, House, Townhouse, Unit, or Vacant Land. |
rpd | string | No | Legal description of the property, e.g. 1/916831. |
sale_type | string | No | A description of the sale type e.g. Auction, Normal Sale. |
sold | boolean | No | Whether the property has been sold, true or false. Defaults to false. |
sold_date | date | No | The date the property was sold at, formatted as YYYY-MM-DD e.g. 2020-02-10. |
source_campaign_id | number | No | The ID of the source campaign in the Realhub database. |
unit_number | string | No | The unit number of the property e.g. 6. |
Returns
This endpoint returns a JSON object representing the updated campaign comparable.
Campaign Contributions
A campaign contribution represents an amount paid by a vendor, agent or agency towards the marketing campaign. The API allows you to retrieve and create contributions.
Get Contributions
Returns an array of campaign contributions for the agency.
Request:
curl -X GET "/api/v2/campaign_contributions.json" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 31,
"amount": 2000,
"campaign_id": 235,
"campaign_quote_item_id ": "3",
"paid_by": "vendor",
"payment_method": "EFT",
"payment_received": true,
"reference": "Synced from Trust",
"user_id": null,
"data": {
"campaign_quote_item_id ": "3"
},
"dates": {
"received": {
"date": "12/06/2018"
}
}
},
{...}
]
HTTP Request
GET /campaign_contributions.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | No | Filter contributions by Campaign. |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 50. |
Returns
This endpoint returns an array of campaign contributions.
Create Contribution
Adds a new contribution for an existing campaign.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/api/v2/campaign_contributions.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "campaign_id=235" \
-F "reference=Synced from Trust" \
-F "amount=2000" \
-F "date_received=13/06/2018" \
-F "payment_method=EFT" \
-F "payment_received=true" \
-F "paid_by=vendor"
Response:
{
"id": 32,
"amount": 2000,
"campaign_id": 235,
"campaign_quote_item_id ": "3",
"paid_by": "vendor",
"payment_method": "EFT",
"payment_received": true,
"reference": "Synced from Trust",
"user_id": null,
"data": {
"campaign_quote_item_id ": "3"
},
"dates": {
"received": {
"date": "13/06/2018"
}
}
}
HTTP Request
POST /campaign_contributions.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | Yes | The ID of the campaign the contribution will be added to. |
reference | null | Yes | The reference for identifying the payment. |
amount | null | Yes | The payment amount. e.g 2000.50 . No currency or symbols accepted. |
campaign_quote_item_id | null | No | The ID of the campaign quote item linked to the contribution. |
date_received | null | No | The date the payment was received. Format DD/MM/YYYY |
payment_method | null | No | The method of payment. EFT, CASH, CREDIT_CARD or SALE_COMMISSION. |
payment_received | null | No | Payment has been reconciled. Either true or false. |
paid_by | null | No | The format of the image either vendor, agent or agency. |
Returns
This endpoint returns a campaign contribution object.
Campaign Inspections
A campaign inspection object represents information regarding the showing of a property. The API allows you to retrieve a list of campaign inspections.
Campaign Inspection Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the campaign associated with the inspection:
include_campaign_inspection_campaign=true
Parameter | Default | Required | Description |
---|---|---|---|
include_campaign_inspection_campaign | No | No | Include the associated campaign |
Get Campaign Inspections
Retrieves a list of campaign inspections.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/campaign_inspections.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 230,
"campaign_id": 378,
"user_id": 10,
"dates": {
"inspection": {
"date": "04/07/2020"
}
},
"times": {
"inspection": {
"start": "12:00",
"end": "12:15"
}
},
"date_parts": {
"inspection": {
"date": "4",
"date_ordinalized": "4th",
"day": "Saturday",
"day_abbreviation": "Sat",
"end": "12:15",
"end_meridian": "pm",
"end_12hr": "12:15",
"month": "July",
"month_abbreviation": "Jul",
"start": "12:00",
"start_meridian": "pm",
"start_12hr": "12:00"
}
}
},
{...},
{...}
]
HTTP Request
GET /campaign_inspections.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
agency_id | null | No | Filter inspections by the associated campaign's agency. |
campaign_id | null | No | Filter inspections by the associated campaign. |
campaign_status | null | No | Filter inspections by the associated campaign's status. Can be current, withdrawn, offmarket, sold, leased, or proposal. |
end_date | null | No | Filter inspections by their inspection date. Returns inspections before the end_date, but after the start_date (if provided). Should be in YYYY-MM-DD format e.g. 2020-06-01. |
start_date | null | No | Filter inspections by their inspection date. Returns inspections after the start_date, but before the end_date (if provided). Should be in YYYY-MM-DD format e.g. 2020-06-01. |
offset | 0 | No | The number of inspections to skip before returning. |
limit | 100 | No | The number of inspections to return. Maximum 100. |
Returns
This endpoint returns a JSON array of campaign inspection objects.
Campaign Items
A campaign item object represents a custom item or adjustment that isn't ordered from a provider on the realhub platform. The API allows you to retrieve a list of campaign items.
Agencies can retrieve all campaign items for their agency.
Get Campaign Items
Retrieves a list of campaign items.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/campaign_items.json" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 47,
"campaign_id": 216,
"user_id": 10,
"title": "Major Internet Portals",
"price": 2200,
"price_override": 2200,
"item_type": "custom"
},
{...},
{...}
]
HTTP Request
GET /campaign_items.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | No | Filter the items by campaign. |
offset | 0 | No | The number of items to skip before returning. |
limit | 10 | No | The number of items to return. Maximum 50. |
Returns
This endpoint returns a JSON array of campaign item objects.
Campaign Proposals
A campaign proposal object represents a plan for selling a property. The API allows you to retrieve a list of campaign proposals.
Campaign Proposal Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the campaign associated with the proposal:
include_campaign_proposal_campaign=true
Parameter | Default | Required | Description |
---|---|---|---|
include_campaign_proposal_agent_reviews | No | No | Include an array of reviews |
include_campaign_proposal_campaign | No | No | Include the campaign the proposal is created for |
include_campaign_proposal_campaign_quotes | No | No | Include an array of quotes |
include_campaign_proposal_digital_template | No | No | Include the digital template |
include_campaign_proposal_order | No | No | Include the order |
include_campaign_proposal_scheduled_reminder | No | No | Include the scheduled reminder |
include_campaign_proposal_share_link | No | No | Include the share link |
include_campaign_proposal_status | No | No | Include the status |
Get Campaign Proposals
Retrieves a list of campaign proposals.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/campaign_proposals.json" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 964,
"accepted": false,
"agency_id": 1,
"campaign_id": 442,
"campaign_quote_id": null,
"commission_fee": 2.2,
"commission_structure": "",
"cover_letter": "Thank you for giving me the oppurtunity to appraise one of your biggest assets. I will make sure my team and I do an amazing job to achieve the best price possible",
"custom_data": {},
"digital_template_id": 34,
"list_price_max": 1000000,
"list_price_min": 950000,
"options": {
"video_id": "261069934",
"video_provider": "vimeo",
"campaign_quote_ids": [],
"sorted_section_keys": [],
},
"proposal_type": "sale",
"source_data": null,
"status_id": 1,
"dates": {
"accepted": {
"date_time": ""
},
"created": {
"date_time": "28/07/2020 10:00"
},
"updated": {
"date_time": "28/07/2020 10:00"
}
},
}
{...},
{...}
]
HTTP Request
GET /campaign_proposals.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | No | Filter proposals by campaign. |
proposal_type | null | No | Filter proposals by type (prelist, rental, sale). |
status | null | No | Filter proposals by status (Complete, Pending, Processed, Rejected, Sent). |
portal_short_code | null | No | Filter proposals by a portal. Required if using external_id. |
external_id | null | No | Filter proposals by a campaign external id. Required if using portal_short_code. |
offset | 0 | No | The number of proposals to skip before returning. |
limit | 10 | No | The number of proposals to return. Maximum 50. |
Returns
This endpoint returns a JSON array of campaign proposal objects.
Create Campaign Proposal
Create a proposal for an existing Realhub campaign.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/campaign_proposals.json" \
-H "x-api-token: API_KEY" \
-data '{"campaign_proposal":{"campaign_id"=442,"proposal_type"="sale"}'
Campaign Proposal Format:
{
"campaign_id": 442,
"proposal_type": "sale",
}
Response:
{
"id": 964,
"accepted": false,
"agency_id": 1,
"campaign_id": 442,
"campaign_quote_id": null,
"commission_fee": 2.2,
"commission_structure": "",
"cover_letter": "Thank you for giving me the oppurtunity to appraise one of your biggest assets. I will make sure my team and I do an amazing job to achieve the best price possible",
"custom_data": {},
"digital_template_id": 34,
"list_price_max": 1000000,
"list_price_min": 950000,
"options": {
"video_id": "261069934",
"video_provider": "vimeo",
"campaign_quote_ids": [],
"sorted_section_keys": [],
},
"proposal_type": "sale",
"source_data": null,
"status_id": 1,
"dates": {
"accepted": {
"date_time": ""
},
"created": {
"date_time": "28/07/2020 10:00"
},
"updated": {
"date_time": "28/07/2020 10:00"
}
},
}
HTTP Request
POST /campaign_proposals.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
campaign_proposal | object | Yes | An object containing the campaign id and proposal type. |
campaign_proposal.campaign_id | number | Yes | The ID of the campaign the proposal will be created for. |
campaign_proposal.proposal_type | string | No | The type of proposal (prelist, rental, sale). |
Returns
This endpoint returns a JSON object representing the campaign proposal.
Create Campaign Proposal with Campaign
Create a campaign proposal and linked campaign.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/campaign_proposals/create_with_campaign.json" \
-H "x-api-token: API_KEY" \
-data '{"campaign_proposal":{"agency_id": 1,"proposal_type": "sale"},"campaign":{"agency_id": 1,"agents": [3],"country_code": "AU","post_code": 2101,"state_id": 1,"state_name": "NSW","street_name": "Clarke Street","street_number": 16,"suburb_name": "Narrabeen"}}'
Campaign proposal format:
{
"agency_id": 1,
"proposal_type": "sale",
}
Campaign format:
{
"agency_id": 1,
"agents": [3],
"bathrooms": 1,
"bedrooms": 2,
"carparks": 3,
"country_code": "AU",
"land_area": 1200,
"latitude": 33.1234,
"longitude": 57.3211,
"post_code": 2101,
"state_name": "NSW",
"street_name": "Clarke Street",
"street_number": 16,
"suburb_name": "Narrabeen",
"unit_number": 4
}
Response:
{
"id": 964,
"accepted": false,
"agency_id": 1,
"campaign_id": 442,
"campaign": {
"address": "4/16 Clarke Street",
"agency_id": 1,
"bathrooms": "1",
"bedrooms": "2",
"campaign_status_id": 6,
"carparks": "3",
"country_code": "AU",
"id": 442,
"land_area": 1200.0,
"latitude": "33.1234",
"longitude": "57.3211",
"post_code": "2101",
"state_name": "NSW",
"street_name": "Clarke Street",
"street_number": "16",
"suburb_name": "Narrabeen",
"unit_number": "4",
{...}
},
"campaign_quote_id": null,
"commission_fee": 2.2,
"commission_structure": "",
"cover_letter": "Thank you for giving me the oppurtunity to appraise one of your biggest assets. I will make sure my team and I do an amazing job to achieve the best price possible",
"custom_data": {},
"digital_template_id": 34,
"list_price_max": 1000000,
"list_price_min": 950000,
"options": {
"video_id": "261069934",
"video_provider": "vimeo",
"campaign_quote_ids": [],
"sorted_section_keys": [],
},
"proposal_type": "sale",
"source_data": null,
"status_id": 1,
"dates": {
"accepted": {
"date_time": ""
},
"created": {
"date_time": "28/07/2020 10:00"
},
"updated": {
"date_time": "28/07/2020 10:00"
}
},
}
HTTP Request
POST /campaign_proposals/create_with_campaign.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
campaign | object | Yes | An object containing the below campaign parameters. |
campaign.agency_id | number | Yes | The ID of the agency that the campaign belongs to. |
campaign.agents | array[number] | Yes | The IDs of agents assigned to the campaign. |
campaign.country_code | string | Yes | 2 Digit ISO Alpha-2 e.g. AU. |
campaign.post_code | number | Yes | Post code of the property. |
campaign.state_name | string | Yes | Can be NSW, VIC, QLD, SA, NT, TAS, ACT or WA. |
campaign.street_name | string | Yes | Name of the street the property is on. |
campaign.street_number | number | Yes | Number of the property e.g. 4. |
campaign.suburb_name | string | Yes | Name of the property's suburb. |
campaign.bathrooms | number | No | Number of bathrooms at the property. |
campaign.bedrooms | number | No | Number of bedrooms at the property. |
campaign.carparks | number | No | Number of carparks at the property. |
campaign.land_area | number | No | Property land area. |
campaign.latitude | number | No | Latitude co-ordinates of the property. |
campaign.longitude | number | No | Longitude co-ordinates of the property. |
campaign.unit_number | number | No | Unit number of the campaign. |
campaign_proposal | object | No | An object containing the below campaign proposal parameters. |
campaign_proposal.agency_id | number | No | The ID of the agency that the proposal belongs to. |
campaign_proposal.proposal_type | string | No | Can be prelist, rental, or sale. |
Returns
This endpoint returns a JSON object representing a campaign proposal.
Update Campaign Proposal
Updates an existing campaign proposal and returns it.
Request:
curl -X PUT "/api/v2/campaign_proposals/:id.json" \
-H "x-api-token: API_KEY" \
-data '{"campaign_proposal":{"commission_fee": 2.3,"proposal_type": "sale", ...}}
Response:
[
{
"id": 946,
"accepted": false,
"agency_id": 1,
"campaign_id": 380,
"campaign_quote_id": null,
"commission_fee": 2.3,
"commission_structure": "1.1% up to $2 Million and 11% on the amount in excess of $2 Million including GST",
"cover_letter": "Thank you for giving me the opportunity to appraise one of your biggest assets.",
"custom_data": {},
"digital_template_id": 2,
"list_price_max": null,
"list_price_min": null,
"options": {
"video_id": "261069935",
"review_ids": [
3
],
"video_provider": "vimeo",
"campaign_quote_ids": [2, 3],
"sorted_section_keys": [],
"autopopulate_job_run": true,
},
"proposal_type": "sale",
"source_data": null,
"status_id": 1,
"dates": {
"accepted": {
"date_time": ""
},
"created": {
"date_time": "20/07/2020 16:00"
},
"updated": {
"date_time": "20/07/2020 16:00"
}
},
"formatted": {
"list_price_max": {
"string": null
},
"list_price_min": {
"string": null
}
}
},
{...},
{...}
]
HTTP Request
PUT /campaign_proposals/:id.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
accepted | boolean | No | Whether the proposal has been accepted (true or false). |
agency_id | number | No | The ID of the agency associated with the proposal. |
campaign_id | number | No | The ID of the campaign associated with the proposal. |
campaign_quote_id | number | No | The ID of the campaign quote associated with the proposal. |
commission_fee | number | No | The commission fee associated with the proposal. |
commission_structure | string | No | A description of the commission structure of the proposal. |
cover_letter | string | No | The cover letter association with the proposal. |
digital_template_id | number | No | The ID of the digital template associated with the proposal. |
disabled_sections | array | No | Specified sections of the proposal will not render if the ID is in this array. |
list_price | number | No | The list price of the proposal. |
list_price_max | number | No | The high end of the price range for the proposal. |
list_price_min | number | No | The low end of the price range for the proposal. |
proposal_type | string | No | The type of proposal. Can be sale, prelist, or rental. |
sorted_section_keys | array | No | Sections of the proposal will render in order depending on the IDs in this array. |
status_id | number | No | The ID of the proposal's status. |
video_id | number | No | The ID of the video associated with the proposal. |
video_provider | string | No | The host of the video associated with the proposal. Can be youtube or vimeo. |
Returns
This endpoint returns the updated campaign proposal object.
Campaign Quotes
A campaign quote represents a quotation for a proposed marketing campaign. The API allows you to retrieve a list of quotes.
Quote Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the items in the quote pass:
include_campaign_quote_items=true
Parameter | Default | Required | Description |
---|---|---|---|
include_campaign_quote_agency_payment_method | false | No | Include the quote agency payment method |
include_campaign_quote_sections | false | No | Include the quote sections |
include_campaign_quote_status | false | No | Include the quote status |
include_campaign_quote_items | false | No | Include the quote items |
Get Quotes
Returns an array of campaign quotes for the agency.
Request:
curl -X GET "/api/v2/campaign_quotes.json?include_campaign_quote_items=true" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 57,
"agency_id": 1,
"agency_payment_method_id": null,
"authorization_sent": false,
"authorized": false,
"builder_version": 2,
"campaign_id": 140,
"data": null,
"hidden": false,
"recipient_address": "2/14 Clarke Street\nNarrabeen\nNSW 2101",
"recipient_email": "vendors@email.com",
"recipient_name": "Joe and Sam Vendor",
"recipient_phone": "02 9955 9994",
"status_id": 2,
"title": "Quote #57",
"total": 16,
"void": false,
"dates": {
"approved": {
"date_time": "27/09/2016 10:07"
},
"authorization_sent": {
"date_time": ""
},
"authorized": {
"date_time": ""
},
"created": {
"date_time": "27/09/2016 10:05"
},
"updated": {
"date_time": "27/09/2016 10:07"
}
},
"items": [
{
"id": 204,
"campaign_quote_id": 57,
"campaign_quote_section_id": null,
"compulsory": false,
"data": null,
"description": null,
"display_options": null,
"display_title": null,
"item_type": "orderable",
"locked": false,
"options": [],
"options_string": "",
"order_bundle_id": null,
"price": 5,
"price_override": 5,
"price_type": "fixed",
"processing_fee": null,
"provider_id": 12,
"provider_price_list_item_id": 175,
"publication_edition_id": 33,
"publication_id": 1,
"publication_package_id": 3,
"quantity": 1,
"row_title": null,
"selected": true,
"service_id": 7,
"service_product_id": 34,
"sort": null,
"title": "1/4 Page (M6x3)",
"user_id": 10,
"dates": {
"required": {
"date": ""
}
}
},
{...},
{...}
]
},
{...},
{...}
]
HTTP Request
GET /campaign_quotes.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | No | Filter quotes by Campaign. |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 50. |
Returns
This endpoint returns an array of campaign quotes.
Get Quote
Returns a single quote
Request:
curl -X GET "/api/v2/campaign_quotes/:id.json" \
-H "x-api-token: API_KEY"
Response:
{
"id": 230,
"agency_id": 1,
"agency_payment_method_id": null,
"authorization_sent": true,
"authorized": true,
"builder_version": 2,
"campaign_id": 240,
"data": {},
"hidden": false,
"recipient_address": "24 Loxton Avenue\nWamberal\nNSW 2260",
"recipient_email": "kengreeff@gmail.com",
"recipient_name": "Gmail Greeff",
"recipient_phone": "0404 361 169",
"status_id": 2,
"title": "Premium V2 w/ Unselected",
"total": 8585.0,
"void": false,
"dates": {
"approved": {
"date_time": "04/07/2018 14:49"
},
"authorization_sent": {
"date_time": "04/07/2018 14:47"
},
"authorized": {
"date_time": "04/07/2018 14:48"
},
"created": {
"date_time": "04/07/2018 14:44"
},
"updated": {
"date_time": "04/07/2018 14:49"
}
}
}
HTTP Request
GET /campaign_quotes/:id.json
Returns
This endpoint returns a campaign quote object
Create Quote
Create a quote for an existing campaign.
Request:
curl -X POST "api/v2/campaign_quotes.json" \
-H "x-api-token: API_KEY" \
-d 'campaign_id=227'
Response:
{
"id": 195,
"agency_id": 1,
"agency_payment_method_id": null,
"authorization_sent": false,
"authorized": false,
"builder_version": 1,
"campaign_id": 227,
"data": null,
"hidden": false,
"recipient_address": "52 Golden Grove\nBeacon Hill\nNSW 2100",
"recipient_email": "anil@example.com.au",
"recipient_name": "John Doe",
"recipient_phone": "0425 000 000",
"status_id": 1,
"title": "Quote #195",
"total": 0,
"void": false,
"dates": {
"approved": {
"date_time": ""
},
"authorization_sent": {
"date_time": ""
},
"authorized": {
"date_time": ""
},
"created": {
"date_time": "19/02/2019 15:14"
},
"updated": {
"date_time": "19/02/2019 15:14"
}
},
"sections": [
{
"id": 160,
"campaign_quote_id": 195,
"footer": null,
"header": null,
"locked": false,
"options": {},
"presentation_data": null,
"sort": null,
"title": "Marketing"
}
]
}
HTTP Request
POST /campaign_quotes.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | Yes | The ID of the campaign the quote will be added to. |
Returns
This endpoint returns a JSON object representing the campaign quote. We will also create a campaign quote section for this quote. Please include include_campaign_quote_sections=true
in your params when you send the create quote request to return the quote sections.
Update Quote
Updates an existing quote
Request:
curl -X PUT "api/v2/campaign_quotes/:id.json"
-F campaign_id=227 \
-F 'recipient_address=Edit address' \
-F recipient_email=edit@example.com.au \
-F 'recipient_name=Edit name' \
-F 'recipient_phone=0400 000 000' \
-F 'title=Edit title'
Response:
{
"id": 194,
"agency_id": 1,
"agency_payment_method_id": null,
"authorization_sent": false,
"authorized": false,
"builder_version": 1,
"campaign_id": 227,
"data": null,
"hidden": false,
"recipient_address": "Edit address",
"recipient_email": "edit@example.com.au",
"recipient_name": "Edit name",
"recipient_phone": "0400 000 000",
"status_id": 1,
"title": "Edit title",
"total": 507754,
"void": false,
"dates": {
"approved": {
"date_time": ""
},
"authorization_sent": {
"date_time": ""
},
"authorized": {
"date_time": ""
},
"created": {
"date_time": "19/02/2019 15:03"
},
"updated": {
"date_time": "21/02/2019 15:38"
}
}
}
HTTP Request
PUT /campaign_quotes/:id.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
title | null | No | The title for the quote. |
recipient_name | null | No | The recipient name for the quote. |
recipient_address | null | No | The recipient address for the quote. |
recipient_phone | null | No | The recipient phone for the quote. |
recipient_email | null | No | The recipient email for the quote. |
Returns
This endpoint returns an updated campaign quote JSON object.
Delete Quote
Deletes an existing quote.
Request:
curl -X DELETE "api/v2/campaign_quotes/:id.json" \
-H "x-api-token: API_KEY"
Response:
{
"id": 194
}
Notes
It will also delete its sections and items.
HTTP Request
DELETE /campaign_quotes/:id.json
Returns
This endpoint returns a JSON Object with the id of the quote that was deleted.
Authorize Quote
Authorizes a quote so that it can be processed and converted in to orders for the campaign.
Request:
curl -X PUT "/api/v2/campaign_quotes/:id/authorize.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F 'signers=[{"first_name":"Jane","last_name":"Vendor","middle_name":"","address":"245 Underwood Street\nNewport\nNSW 2021","email":"jane@email.com.au","phone":"0452 256 236","document_sent":true,"document_sent_at":"2018-10-09T12:02:17+11:00","document_signed":true,"document_signed_at":"2018-10-11T12:02:17+11:00","physically_present":true,"nature_of_signer":"self","representing_trust":false,"external_id":1}]'
Response:
{
"id": 302,
"agency_id": 1,
"agency_payment_method_id": null,
"authorization_sent": false,
"authorized": true,
"builder_version": 2,
"campaign_id": 259,
"data": null,
"hidden": false,
"recipient_address": "245 Underwood Street\nNewport\nNSW 2021",
"recipient_email": "jane@email.com",
"recipient_name": "Jane Vendor",
"recipient_phone": "0452 256 236",
"status_id": 1,
"title": "Quote #302",
"total": 1916.8,
"void": false,
"dates": {
"approved": {
"date_time": ""
},
"authorization_sent": {
"date_time": ""
},
"authorized": {
"date_time": "11/10/2018 12:08"
},
"created": {
"date_time": "11/10/2018 09:12"
},
"updated": {
"date_time": "11/10/2018 12:08"
}
}
}
HTTP Request
PUT /campaign_quotes/:id/authorize.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
id | null | Yes | ID of the quote. |
signers | null | Yes | A stringified JSON array of the signers. |
Signer Object
Parameter | Type | Required | Description |
---|---|---|---|
first_name | string | Yes | First name of signer. |
last_name | string | Yes | Last name of signer. |
middle_name | string | No | Middle name of signer. |
address | string | Yes | Postal address of signer. |
string | Yes | Email address of the person signing. | |
phone | string | Yes | Phone number of the person signing. |
document_sent | boolean | Yes | Document has been sent to signer |
document_sent_at | datetime | Yes | ISO8601 Formatted Date Time |
document_signed | boolean | Yes | Document signed by signer |
document_signed_at | datetime | Yes | ISO8601 Formatted Date Time |
physically_present | boolean | No | Was the signer physically present at time of signing |
nature_of_signer | string | No | self |
representing_trust | boolean | No | Is the signer representing a trust |
external_id | string | No | ID of the signer in your system. |
Returns
This endpoint returns a JSON object representing the updated campaign quote.
Campaign Quote Items
A campaign quote item represents an item in a quote section. The API allows you to update some of the item's values.
Create Quote Item
Creates a new quote / line item.
Request:
curl -X POST "/api/v2/campaign_quotes/:quote_id/sections/:section_id/items.json" \
-H "x-api-token: API_KEY" \
-F item_type=orderable \
-F order_type=item \
-F price_list_item_id=122
-F 'options=[{"id":95,"title":"Finish","value":{"id":130,"title":"Satin","price":0}},{"id":96,"title":"Paper Weight","value":{"id":135,"title":"200GSM","price":0}},{"id":112,"title":"Delivery","value":{"id":189,"title":"Next Day","price":0}}]'
Options Format:
[
{
"id": provider_price_list_option_id,
"title": provider_price_list_option_title,
"value": {
"id": option_value_id,
"title": option_value_title,
"price": option_value_price,
},
},
{...},
{...},
]
Response:
{
"id": 758,
"campaign_quote_id": 195,
"campaign_quote_section_id": 158,
"compulsory": false,
"data": {},
"description": null,
"display_options": null,
"display_title": "50 x A4 Brochures/Satin/200GSM/Next Day",
"item_type": "orderable",
"locked": false,
"options": [
{
"id": 95,
"title": "Finish",
"value": {
"id": 130,
"title": "Satin",
"price": 0
}
},
{
"id": 96,
"title": "Paper Weight",
"value": {
"id": 135,
"title": "200GSM",
"price": 0
}
},
{
"id": 112,
"title": "Delivery",
"value": {
"id": 189,
"title": "Next Day",
"price": 0
}
}
],
"options_string": "/Satin/200GSM/Next Day",
"order_bundle_id": null,
"package_id": null,
"price": 65,
"price_override": 72,
"price_type": "fixed",
"processing_fee": 7,
"provider_id": 1,
"provider_price_list_item_id": 122,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"quantity": 50,
"row_title": null,
"selected": true,
"service_id": 6,
"service_product_id": 17,
"sort": null,
"title": "A4 Brochures",
"user_id": 10,
"dates": {
"required": {
"date": ""
}
}
}
HTTP Request
POST /campaign_quotes/:quote_id/sections/:section_id/items.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
item_type | null | Yes | Need to be orderable. |
order_type | null | Yes | Need to be item. |
price_list_item_id | null | Yes | The price list item for this quote. |
options | null | No | The options array from price list options and option values. Please follow the format on the right side. |
required_by | null | No | The Date of required. Format YYYY-MM-DD . |
description | null | No | The description of the quote item. |
row_title | null | No | The row title of the quote item. |
Returns
This endpoint returns a quote item object.
Create Quote Item (Package)
Create a quote item from package.
Request:
curl -X POST "/api/v2/campaign_quotes/:quote_id/sections/:section_id/items.json" \
-H "x-api-token: API_KEY" \
-F 'title=Test Title' \
-F item_type=orderable \
-F order_type=package \
-F package_id=10
-
Response:
{
"id": 762,
"campaign_quote_id": 194,
"campaign_quote_section_id": 157,
"compulsory": false,
"data": null,
"description": null,
"display_options": null,
"display_title": "Test Title",
"item_type": "orderable",
"locked": false,
"options": null,
"options_string": null,
"order_bundle_id": null,
"package_id": 10,
"price": 625,
"price_override": 625,
"price_type": "fixed",
"processing_fee": null,
"provider_id": 1,
"provider_price_list_item_id": null,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"quantity": null,
"row_title": null,
"selected": true,
"service_id": null,
"service_product_id": null,
"sort": null,
"title": "6x4 Signboard/300 DL",
"user_id": 10,
"dates": {
"required": {
"date": ""
}
}
}
HTTP Request
POST /campaign_quotes/:quote_id/sections/:section_id/items.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
title | null | Yes | The display title of the quote item. |
item_type | null | Yes | Need to be orderable. |
order_type | null | Yes | Need to be package. |
package_id | null | Yes | The package_id for the quote item. |
required_by | null | No | The Date of required. Format YYYY-MM-DD . |
description | null | No | The description of the quote item. |
row_title | null | No | The row title of the quote item. |
Returns
This endpoint returns a quote item object.
Create Quote Item (Custom)
Create a custom quote item (not supplied by a Realhub provider)
Request:
curl -X POST "/api/v2/campaign_quotes/:quote_id/sections/:section_id/items.json" \
-H "x-api-token: API_KEY" \
-F 'title=Custom Title' \
-F item_type=custom \
-F order_type=item \
-F price=50
Response:
{
"id": 763,
"campaign_quote_id": 195,
"campaign_quote_section_id": 158,
"compulsory": false,
"data": null,
"description": null,
"display_options": null,
"display_title": "Custom Title",
"item_type": "custom",
"locked": false,
"options": null,
"options_string": null,
"order_bundle_id": null,
"package_id": null,
"price": 50,
"price_override": null,
"price_type": "fixed",
"processing_fee": null,
"provider_id": null,
"provider_price_list_item_id": null,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"quantity": null,
"row_title": null,
"selected": true,
"service_id": null,
"service_product_id": null,
"sort": null,
"title": "Custom Title",
"user_id": 10,
"dates": {
"required": {
"date": ""
}
}
}
HTTP Request
POST /campaign_quotes/:quote_id/sections/:section_id/items.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
title | null | Yes | The title of the quote item. |
item_type | null | Yes | Need to be custom. |
order_type | null | Yes | Need to be item. |
price | null | Yes | The price of the quote item. |
required_by | null | No | The Date of required. Format YYYY-MM-DD . |
description | null | No | The description of the quote item. |
row_title | null | No | The row title of the quote item. |
Returns
This endpoint returns a quote item object.
Create Quote Item (Bundle)
Create multiple quote items from a bundle.
Request:
curl -X POST "/api/v2/campaign_quotes/:quote_id/sections/:section_id/items/create_multiple.json" \
-H "x-api-token: API_KEY" \
-F item_type=orderable \
-F order_type=bundle \
-F order_bundle_id=1
Response:
[
{
"id": 751,
"campaign_quote_id": 195,
"campaign_quote_section_id": 158,
"compulsory": false,
"data": {},
"description": null,
"display_options": null,
"display_title": "Day Photography/Small Unit - 3 Paper Buy",
"item_type": "orderable",
"locked": false,
"options": [
{
"id": 82,
"title": "Property Size",
"value": {
"id": 95,
"title": "Small Unit",
"price": 0
}
}
],
"options_string": "/Small Unit",
"order_bundle_id": 1,
"package_id": null,
"price": 300,
"price_override": 300,
"price_type": "fixed",
"processing_fee": 0,
"provider_id": 1,
"provider_price_list_item_id": 109,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"quantity": 1,
"row_title": "Week 1",
"selected": true,
"service_id": 1,
"service_product_id": 1,
"sort": null,
"title": "Day Photography",
"user_id": 10,
"dates": {
"required": {
"date": ""
}
}
},
{...},
{...},
]
HTTP Request
POST /campaign_quotes/:quote_id/sections/:section_id/items/create_multiple.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
item_type | null | Yes | Need to be orderable. |
order_type | null | Yes | Need to be bundle. |
order_bundle_id | null | Yes | The order bundle id. |
required_by | null | No | The Date of required. Format YYYY-MM-DD |
description | null | No | The description of the quote item. |
row_title | null | No | The row title of the quote item. |
Returns
This endpoint returns an array of quote items.
Create Quote Item (Publication)
Create multiple publication quote items.
Request:
curl -X POST "/api/v2/campaign_quotes/:quote_id/sections/:section_id/items/create_multiple.json" \
-H "x-api-token: API_KEY" \
-F item_type=orderable \
-F order_type=publication \
-F 'publication[id]=1' \
-F 'publication_editions[]=419' \
-F price_list_item_id=173 \
-F 'title=Title'
Response:
[
{
"id": 743,
"campaign_quote_id": 195,
"campaign_quote_section_id": 158,
"compulsory": false,
"data": {},
"description": null,
"display_options": null,
"display_title": "Manly Daily 1/2 Page",
"item_type": "orderable",
"locked": false,
"options": [],
"options_string": "",
"order_bundle_id": null,
"package_id": null,
"price": 10,
"price_override": 10,
"price_type": "fixed",
"processing_fee": 0,
"provider_id": 12,
"provider_price_list_item_id": 173,
"publication_edition_id": 419,
"publication_id": 1,
"publication_package_id": 3,
"quantity": 1,
"row_title": "Week 1",
"selected": true,
"service_id": 7,
"service_product_id": 39,
"sort": null,
"title": "1/2 Page (M6x6)",
"user_id": 10,
"dates": {
"required": {
"date": "26/02/2019"
}
}
}
]
HTTP Request
POST /campaign_quotes/:quote_id/sections/:section_id/items/create_multiple.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
item_type | null | Yes | Need to be orderable. |
order_type | null | Yes | Need to be publication. |
price_list_item_id | null | Yes | The price list item for this quote. |
publication | null | Yes | A Object with id represents publication id e.g. { id: 1 } |
publication_editions | null | Yes | An array with edition ids. e.g. [419, 420, 421] |
product_unlocks | null | No | An array of product unlock ids (liftovers). e.g. [2, 3] |
options | null | No | Only if supported by publication. A json stringified array of price list options and values. See create quote item for example. |
required_by | null | No | The Date of required. Format YYYY-MM-DD . |
description | null | No | The description of the quote item. |
row_title | null | No | The row title of the quote item. |
Returns
This endpoint returns an array of quote items.
Update Quote Item
Update specific item attributes.
Request:
curl -X PUT "/api/v2/campaign_quote_items/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F price_override=500 \
-F selected=true
Response:
{
"id": 1218,
"campaign_quote_id": 302,
"campaign_quote_section_id": 322,
"compulsory": false,
"data": {
"tags": []
},
"description": null,
"display_options": null,
"display_title": "50 x A4 Brochures/Satin/200GSM/Next Day",
"item_type": "orderable",
"locked": false,
"options": [
{
"id": 175,
"title": "Finish",
"value": {
"id": 348,
"title": "Satin",
"price": 0
}
},
{
"id": 176,
"title": "Paper Weight",
"value": {
"id": 353,
"title": "200GSM",
"price": 0
}
},
{
"id": 177,
"title": "Delivery",
"value": {
"id": 356,
"title": "Next Day",
"price": 0
}
}
],
"options_string": "/Satin/200GSM/Next Day",
"order_bundle_id": null,
"price": 65,
"price_override": 500,
"price_type": "fixed",
"processing_fee": 7,
"provider_id": 1,
"provider_price_list_item_id": 263,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"quantity": 50,
"row_title": null,
"selected": true,
"service_id": 6,
"service_product_id": 17,
"sort": null,
"title": "A4 Brochures",
"user_id": 10,
"dates": {
"required": {
"date": ""
}
},
"quote_total": 1916.8
}
Notes
Please pay attention to the following params before updating an item:
Parameter | Description |
---|---|
compulsory | If this is true you should not toggle the selected value as it is a compulsory item. |
locked | If this is true you should not toggle the selected value as it is a locked item. |
price_type | If percentage do not change value as it is dynamic and recalculated automatically. |
HTTP Request
PUT /campaign_quote_items/:id.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
id | null | Yes | ID of the quote item. |
price_override | null | No | The float value for the item override price. |
selected | null | No | true or false. |
required_by | null | No | The Date of required. Format YYYY-MM-DD . |
row_title | null | No | The row title of the quote item. |
description | null | No | The description of the quote item. |
Returns
This endpoint returns a JSON object representing the update campaign quote item. We will also return the quote_total, please use this value instead of manually calculating the quote total.
Destroy Quote item
Destroy an existing quote item.
Request:
curl -X DELETE "api/v2/campaign_quote_item/:id.json" \
-H "x-api-token: API_KEY"
Response:
{
"id": 763,
"campaign_quote_id": 195,
"quote_total": 4232
}
Notes
It will also recalculate the quote total price.
HTTP Request
DELETE /campaign_quote_items/:id.json
Returns
This endpoint returns a JSON object with recalculated quote total price.
Campaign Quote Sections
A campaign quote section represents a section/group in a quote. The API allows you create and update some of the section's values.
Create Quote Section
Adds a new section to an existing campaign quote.
Request:
curl -X POST "/api/v2/campaign_quotes/:campaign_quote_id/sections.json" \
-H 'x-api-token: API_KEY' \
-F 'title=New Title' \
-F 'header=Section Header' \
-F 'footer=Section Footer' \
-F hide_dates=true \
-F hide_prices=false \
-F show_subtotal=false
Response:
{
"id": 161,
"campaign_quote_id": 197,
"footer": "Section Footer",
"header": "Section Header",
"locked": false,
"options": {
"hide_dates": true,
"hide_prices": false,
"show_subtotal": false
},
"presentation_data": null,
"sort": null,
"title": "New Title"
}
HTTP Request
POST /campaign_quotes/:campaign_quote_id/sections.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
title | null | Yes | Title of the section. |
header | null | No | Header of the section. |
footer | null | No | Footer of the section. |
hide_dates | null | No | Can be either true or false. |
hide_prices | null | No | Can be either true or false. |
show_subtotal | null | No | Can be either true or false. |
Returns
This endpoint returns a JSON object representing the campaign section.
Update Quote Section
Updates an existing campaign quote section.
Request:
curl -X POST "/api/v2/sections/:campaign_section_id.json" \
-H 'x-api-token: API_KEY' \
-F 'title=Updated Title' \
-F hide_dates=false \
-F hide_prices=true \
-F show_subtotal=true \
-F 'footer=Updated Footer' \
-F 'header=Updated Header'
Response:
{
"id": 162,
"campaign_quote_id": 197,
"footer": "Updated Footer",
"header": "Updated Header",
"locked": false,
"options": {
"hide_dates": false,
"hide_prices": true,
"show_subtotal": true
},
"presentation_data": null,
"sort": null,
"title": "Updated Title"
}
HTTP Request
PUT /sections/:campaign_quote_section_id.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
title | null | Yes | Title of the section. |
header | null | No | Header of the section. |
footer | null | No | Footer of the section. |
hide_dates | null | No | Can be either true or false. |
hide_prices | null | No | Can be either true or false. |
show_subtotal | null | No | Can be either true or false. |
Returns
This endpoint returns a JSON object representing the updated quote section.
Delete Quote Section
Deletes an existing quote section.
Request:
curl -X DELETE "api/v2/sections/:id.json" \
-H "x-api-token: API_KEY"
Response:
{
"id": 162,
"campaign_quote_id": 197,
"quote_total": 0
}
Notes
It will also delete its items and recalculate the quote total price.
HTTP Request
DELETE /sections/:id.json
Returns
This endpoint returns a JSON object with recalculated quote total price.
Campaign Quote Templates
A campaign quote template represents a template for building a new quote.
Quote Template Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of template item:
include_campaign_quote_template_items=true
Parameter | Default | Required | Description |
---|---|---|---|
include_campaign_quote_template_items | false | No | Include the template item that created the template |
Get Quote Templates
Returns a list of quote templates for the agency.
Request:
curl -X GET "/api/v2/campaign_quote_templates.json" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 4,
"agency_id": 1,
"title": "Premium Quote inc Photography",
"total": 1044,
"user_id": 10,
"builder_version": 2
},
{...},
{...},
]
HTTP Request
GET /campaign_quote_templates.json
Returns
This endpoint returns an array of quote templates
Create Quote Using Template
Creates a new quote using an existing template.
Request:
curl -X POST "/api/v2/campaign_quote_templates/:id/create_quote.json" \
-H "x-api-token: API_KEY"
-F campaign_id=227
Response:
{
"id": 198,
"agency_id": 1,
"agency_payment_method_id": null,
"authorization_sent": false,
"authorized": false,
"builder_version": 2,
"campaign_id": 227,
"data": null,
"hidden": false,
"recipient_address": "52 Golden Grove\nBeacon Hill\nNSW 2100",
"recipient_email": "anil@example.com.au",
"recipient_name": "Anil Castle",
"recipient_phone": "0425 000 000",
"status_id": 1,
"title": "Campaign Items Only",
"total": 1570,
"void": false,
"dates": {
"approved": {
"date_time": ""
},
"authorization_sent": {
"date_time": ""
},
"authorized": {
"date_time": ""
},
"created": {
"date_time": "20/02/2019 15:26"
},
"updated": {
"date_time": "20/02/2019 15:26"
}
}
}
HTTP Request
POST /campaign_quote_templates/:id/create_quote.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | null | Yes | The ID of the campaign the quote will be added to. |
Returns
This endpoint returns a JSON object representing the campaign quote.
Case Studies
A case study represents an example of a previous campaign. The API allows you to retrieve a list of case studies.
Case Study Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the image associated with the the case study:
include_campaign_proposal_campaign=true
Parameter | Default | Required | Description |
---|---|---|---|
include_case_study_address_with_country | No | No | Include the country tite e.g. Australia and country code e.g. AU |
include_case_study_address_with_suburb | No | No | Include the suburb in the address string |
include_case_study_image | No | No | Include the case study image url |
include_case_study_subject | No | No | Include the case study subject (campaign) |
include_case_study_users | No | No | Include the users assocated with a case study |
Get Case Studies
Retrieves a list of case studies.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/case_studies.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "user_id=1" \
-F "string=Catalina Crescent"
Response:
[
{
"id": 29,
"added_by_id": 10,
"address": "8 Catalina Crescent",
"agent_ids": [
10,
13
],
"data": {
"custom_data": [
{
"key": "kfnjeuhd",
"custom_item": "Days on Market",
"custom_value": "17"
},
{
"key": "kfnjf4tk",
"custom_item": "Sold over Reserve",
"custom_value": "$85,000"
}
],
"address": {
"post_code": "2103",
"state_name": "NSW",
"street_name": "Catalina Crescent",
"street_number": "8",
"suburb_name": "Mona Vale",
"unit_number": 2
}
},
"description": "This is the case study description.",
"owner_id": 1,
"owner_type": "Agency",
"sold_date": "2021-03-20",
"sold_price": 1500000.0,
"subject_id": 229,
"subject_type": "Campaign",
"dates": {
"created": {
"date_time": "11/09/2020 16:57"
},
"updated": {
"date_time": "29/09/2020 15:45"
}
}
}
]
HTTP Request
GET /case_studies.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
user_id | null | No | The user ID of an agent whose case studies you wish to return. |
string | null | No | The string that will be used to search case study addresses. |
Returns
This endpoint returns a JSON array of case study objects.
Get Case Study
Returns a single case study
Request:
curl -X GET "/api/v2/case_studies/:id.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName"
Response:
{
"id": 34,
"added_by_id": 10,
"address": "58 Awaba Street",
"agent_ids": [
23,
47,
56
],
"data": {
"custom_data": [
{
"key": "kfhhwk87",
"custom_item": "Days on Market",
"custom_value": "17"
},
{
"key": "kfhhwtt8",
"custom_item": "Sold over Reserve",
"custom_value": "$120,000"
}
]
},
"description": "This is the case study description.",
"owner_id": 1,
"owner_type": "Agency",
"sold_date": "2021-07-02",
"sold_price": 1500000.0,
"subject_id": 239,
"subject_type": "Campaign",
"dates": {
"created": {
"date_time": "25/09/2020 10:17"
},
"updated": {
"date_time": "25/09/2020 10:17"
}
}
}
HTTP Request
GET /case_studies/:id.json
Returns
This endpoint returns a case study object
Data Store Items
A Data Store Item represents a custom piece of data stored against the agency or a campaign.
Get Data Store Items
Retrieves a list of Data Store Items.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/data_store_items.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
Response:
[
{
"id": 4,
"data": {
"hidden": false,
"secured": false,
"required": true
},
"digital_template_id": 4,
"editor_id": 9,
"editor_type": "User",
"group_key": "53ce3772-31be-46f4-8eb4-d46670a61a85",
"key": "Custom Key",
"label": "Custom Label",
"owner_id": 2,
"owner_type": "Campaign",
"value": "Custom Value"
}
]
HTTP Request
GET /data_store_items.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
key | null | No | Filter the data store items by custom key i.e. "street_name". |
group_key | null | No | Filter the data store items by group_key. |
owner_type | null | No | Filter the data store items by owner type (i.e. Campaign or Agency). Required if using owner_id. |
owner_id | null | No | Filter the data store items by owner id. |
portal_short_code | null | No | Filter data store items by a portal. Required if using external_id. |
external_id | null | No | Filter data store items by a campaign external id. Required if using portal_short_code. |
limit | 100 | No | The number of data store items to return. Maximum 100. |
Returns
This endpoint returns a JSON array of campaign objects.
Digital Pages
A digital page represents a form, agreement, or microsite associated with a campaign. The API allows you to retrieve a list of digital pages.
Digital Page Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the agent reviews associated with the digital page:
include_digital_page_agent_reviews=true
Parameter | Default | Required | Description |
---|---|---|---|
include_digital_page_agent_reviews | No | No | Include an array of reviews |
include_digital_page_campaign_quotes | No | No | Include an array of campaign quotes |
include_digital_page_digital_template | No | No | Include the digital template |
include_digital_page_document_group | No | No | Include the document group |
include_digital_page_scheduled_reminder | No | No | Include the scheduled reminder |
include_digital_page_share_link | No | No | Include the share link |
include_digital_page_subject | No | No | Include the subject (campaign) the digital page is associated with |
Get Digital Pages
Request:
curl -X GET "https://realhub.realbase.io/api/v2/digital_pages.json" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 62,
"data": null,
"digital_template_id": null,
"options": null,
"owner_id": 1,
"owner_type": "Agency",
"page_type": "form",
"status_id": null,
"subject_id": 368,
"subject_type": "Campaign",
"user_id": 10,
"dates": {
"created": {
"date_time": "13/04/2020 11:15"
},
"updated": {
"date_time": "13/04/2020 11:15"
}
}
},
{...},
{...}
]
HTTP Request
GET /digital_pages.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
page_type | null | No | Filter digital pages by type (form, agreement, microsite). |
subject_type | null | No | Filter digital pages by subject type (Campaign). Required if using subject_id. |
subject_id | null | No | Filter digital pages by subject id. |
status | null | No | Filter digital pages by status (Complete, Pending, Processed, Rejected, Sent). |
portal_short_code | null | No | Filter digital pages by a portal. Required if using external_id. |
external_id | null | No | Filter digital pages by a campaign external id. Required if using portal_short_code. |
offset | 0 | No | The number of digital pages to skip before returning. |
limit | 10 | No | The number of digital pages to return. Maximum 50. |
Returns
This endpoint returns a JSON array of digital page objects.
Images
A image object represents a photo or floor plan in Realhub. The API allows you to add images to existing campaigns.
Create Image
Adds a new image to an existing campaign. The method will return before the image has been downloaded to ensure a quick response time. We will then download and process the image in the backgroud.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/api/v2/images.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "image_type=photo" \
-F "imageable_id=172" \
-F "imageable_type=Campaign" \
-F "image_id=54003" \
-F "image_url=https://www.yourwebsite.com.au/images/54003-awesome-dusk-image.jpg" \
-F "image_format=jpg"
Response:
{
"id": 799,
"user_id": 44,
"imageable_id": 172,
"imageable_type": "Campaign",
"image_type": "photo",
"sort": null,
"contributor_id": null,
"provider_id": 2,
"data": {
"id": "54003",
"url": "https://www.yourwebsite.com.au/images/54003-awesome-dusk-image.jpg",
"md5": null,
"format": "jpg",
"modified_time": "2016-10-27-12:52:42"
},
"private": true
}
HTTP Request
POST /images.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
image_type | photo | Yes | Can be either a photo and plan. |
campaign_id | null | No | The ID of the campaign the image will be added to. Required if imageable_id and imageable_type are not supplied. |
imageable_id | null | No | The ID of the entity the image will be added to. Required if campaign_id is not supplied. |
imageable_type | null | No | The type of the entity the image will be added to. Can be Agency, Campaign, CampaignComparable, CaseStudy, DigitalTemplate, ImageLibrary or User. Required if campaign_id is not supplied. |
image_id | null | Yes | The ID of the image in your system. We may use this to check if it is a duplicate in the future. |
image_url | null | Yes | The public url of the image. We will download the image from the url provided. |
image_format | null | Yes | The format of the image either jpg, gif or png. |
image_md5 | null | No | The MD5 hash of the image. |
Returns
This endpoint returns an image object.
Update Image
Updates an existing image.
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/api/v2/images/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY" \
-F "artwork_page[image_type]=photo" \'
-F "artwork_page[imageable_id]=1" \'
-F "artwork_page[imageable_type]=Campaign" \'
-F "artwork_page[sort]=0" \'
Response:
{
"id": 799,
"user_id": 44,
"imageable_id": 1,
"imageable_type": "Campaign",
"image_type": "photo",
"sort": 0,
"contributor_id": null,
"provider_id": null,
"data": {
"id": "54003",
"url": "https://www.yourwebsite.com.au/images/54003-awesome-dusk-image.jpg",
"md5": null,
"format": "jpg",
"modified_time": "2016-10-27-12:52:42"
},
"private": true
}
HTTP Request
PUT /images/:id.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
image_type | photo | No | Can be either a photo and plan. |
imageable_id | null | No | The ID of the entity the image will be added to. |
imageable_type | null | No | The type of the entity the image will be added to. Can be Agency, Campaign, CampaignComparable, CaseStudy, DigitalTemplate, ImageLibrary or User. |
sort | null | No | An integer used for sorting |
Returns
This endpoint returns an image object.
Image Libraries
An image library object represents a piece of image libraries and its images. The API allows you to create an image library.
Image Libraries Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the image library cover image:
include_image_library_cover_image=true
Parameter | Default | Required | Description |
---|---|---|---|
include_image_library_cover_image | false | No | Include the image library cover image. |
include_image_library_images | false | No | Include the image library images. |
Get Image Libraries
Retrieves a list of image libraries.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/api/v2/image_libraries.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName
Response:
{
"id": 1,
"title": "Bondi House",
"owner_type": "Agency",
"owner_id": 1,
"cover_image_id": 1283,
"dates": {
"created": {
"date_time": "17/01/2018 10:03"
}
}
}
HTTP Request
GET /image_libraries.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
owner_id | Null | No | Filter image libraries by owner id. |
owner_type | Null | No | Filter image libraries by owner type. |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 100. |
Returns
This endpoint returns a JSON array of agency objects.
Create Image library
Creates a new Image library using the supplied details.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/api/v2/image_libraries.json" \
-H "x-api-token: API_KEY" \
-F "title=Proposal Images" \
-F "owner_type: Agency"\
-F "owner_id: 1" \
-F "cover_image_id: 1341"
Response:
{
"id": 1,
"title": "Proposal Images",
"owner_type": "Agency",
"owner_id": 1,
"cover_image_id": 1341,
"dates": {
"created": {
"date_time": "28/03/2018 09:25"
}
}
}
HTTP Request
POST /image_libraries.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
owner_id | number | Yes | The owner id e.g. 3. |
owner_type | string | Yes | The entity type of the Image Library owner e.g. "Agency". |
title | string | Yes | The display name of the Image Library. |
cover_image_id | number | No | The image ID of the library's cover image. |
Returns
This endpoint returns an image library object.
Get Image Library
Retrieves a single Image Library using its ID.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/image_libraries/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY"
Response:
{
"id": 6,
"title": "LJH Brand Library",
"owner_type": "Brand",
"owner_id": 1,
"cover_image_id": 2277,
"dates": {
"created": {
"date_time": "21/09/2018 11:49"
}
}
}
HTTP Request
GET /image_libraries/:id.json
Returns
This endpoint returns a JSON object representing the image library.
Layout Templates
A layout template is used as a base for publication artworks. The API allows you to retrieve a list of templates.
Layout Templates Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the compatible products:
include_layout_template_compatible_products=true
Parameter | Default | Required | Description |
---|---|---|---|
include_layout_template_compatible_products | false | No | Include the layout template compatible products. |
include_layout_template_content_grid | false | No | Include the dimensions of the content grid. |
include_layout_template_dimensions | false | No | Include the layout template dimentions. |
include_layout_template_items | false | No | Include the layout template items. |
include_layout_template_preview | false | No | Include the layout template preview image. |
include_layout_template_trace_image | false | No | Include the layout template trace image. |
include_template_page_attachments | false | No | Include the template page attachments. |
Get Layout Templates
Retrieves a list of layout templates.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/layout_templates.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "brand_id=1" \
-F "publication_product_id=1" \
-F "status:archived" \
-F "string=portrait"
Response:
[
{
"id": 5,
"bleed": 3.0,
"brand_id": 1,
"designer_id": 1,
"designer_type": "Brand",
"global": null,
"height": 316.0,
"hidden": false,
"measurement_unit_id": 1,
"title": "Test Layout Template",
"width": 285.0,
"type": "LayoutTemplate",
"content_grid": {},
"items": []
},
{...},
{...}
]
HTTP Request
GET /layout_templates.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
status | null | No | Filters layout templates by 'hidden', can be current or archived. |
brand_id | null | No | Filters the records by brand_id. |
publication_product_id | null | No | Filters the records by publication_product_id. |
string | null | No | A string used to search the records by title. |
offset | 0 | No | The number of records to skip before returning. |
limit | 50 | No | The number of records to return. Maximum 50. |
Returns
This endpoint returns a JSON array of layout template objects.
Get Layout Template
Retrieves a single Layout Template using its ID.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/layout_templates/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 6,
"bleed": 5.0,
"brand_id": 1,
"designer_id": 3,
"designer_type": "Provider",
"global": false,
"height": 320.0,
"hidden": false,
"measurement_unit_id": 1,
"title": "Full Page Copy",
"width": 288.0,
"type": "LayoutTemplate",
"content_grid": {},
"items": []
},
{...},
{...}
]
HTTP Request
GET /layout_templates/:id.json
Returns
This endpoint returns a JSON object representing the layout template.
Orders
An order object represents the physical order containing order items. The API allows you to retrieve a list of orders.
Order Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the agency that created the order pass:
include_order_agency=true
Parameter | Default | Required | Description |
---|---|---|---|
include_order_agency | false | No | Include the agency that created the order |
include_order_status | false | No | Include the order status |
include_order_campaign | false | No | Include the campaign that the order belongs to |
include_order_provider | false | No | Include the provider that the order belongs to |
include_order_items | false | No | Include the items in the order |
Get Orders
Retrieves a list of orders.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/orders.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 1103,
"agency_id": 2,
"campaign_id": null,
"provider_id": 1,
"coupon_id": null,
"publication_id": null,
"publication_edition_id": null,
"publication_package_id": null,
"campaign_quote_id": null,
"campaign_proposal_id": null,
"title": "Custom Order",
"notes": "Hello there",
"shipping_address": "Hocking Stuart Ringwood\n76 - 82 Maroondah Hwy\nRingwood VIC 3134",
"total": 555,
"invoiced": false,
"deleted": false,
"status_id": 2,
"user_id": 13,
"order_type": "custom",
"purchase_order": null,
"dates": {
"created": {
"date_time": "03/03/2017 09:46"
},
"updated": {
"date_time": "03/03/2017 09:46"
},
"approval": {
"date_time": "03/03/2017 09:46",
"integer": 1488494785
}
}
},
{...},
{...}
]
HTTP Request
GET /orders.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
status_id | null | No | Filter the orders by status_id. |
agency_id | null | No | Filter the orders by agency_id. |
campaign_id | null | No | Filter the orders by campaign_id. |
publication_id | null | No | Filter the orders by publication_id. |
publication_edition_id | null | No | Filter the orders by publication_edition_id. |
modified_since | null | No | Filter the orders that have been modified since date (ISO8601 format) provided. e.g. 2018-02-02T11:49:24 . Will be parsed as Australia/Sydney time. |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 50. |
Returns
This endpoint returns a JSON array of order objects.
Get Order
Retrieves a single Order using its ID.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/orders/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY"
Response:
{
"id": 1103,
"agency_id": 2,
"campaign_id": null,
"provider_id": 1,
"coupon_id": null,
"publication_id": null,
"publication_edition_id": null,
"publication_package_id": null,
"campaign_quote_id": null,
"campaign_proposal_id": null,
"title": "Custom Order",
"notes": "Hello there",
"shipping_address": "Hocking Stuart Ringwood\n76 - 82 Maroondah Hwy\nRingwood VIC 3134",
"total": 555,
"invoiced": false,
"deleted": false,
"status_id": 2,
"user_id": 13,
"order_type": "custom",
"purchase_order": null,
"dates": {
"created": {
"date_time": "03/03/2017 09:46"
},
"updated": {
"date_time": "03/03/2017 09:46"
},
"approval": {
"date_time": "03/03/2017 09:46",
"integer": 1488494785
}
}
}
HTTP Request
GET /orders/:id.json
Returns
This endpoint returns a JSON object representing the order.
Unapprove Order
Unapprove an Order using its ID.
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/orders/:id/unapprove.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY"
Response:
{
"id": 1467,
"agency_id": 322,
"campaign_id": 225,
"campaign_proposal_id": null,
"campaign_quote_id": null,
"coupon_id": null,
"deleted": false,
"invoiced": false,
"notes": null,
"order_type": "item",
"provider_id": 1,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"purchase_order": "",
"shipping_address": "this is addresss",
"status_id": 1,
"title": "A4 Brochures",
"total": 65,
"user_id": 1176,
"dates": {
"created": {
"date_time": "20/12/2017 10:39"
},
"updated": {
"date_time": "03/01/2018 14:47"
},
"approval": {
"date_time": "03/01/2018 14:47",
"integer": 1514951220
}
}
}
HTTP Request
PUT /orders/:id/unapprove.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
force_unapproval | false | No | Force unapproval |
Returns
This endpoint returns an updated JSON object of the Order.
Order Items
An order item represents a single item in an order. The API allows you to update the status of an item as it moves through production.
Order Item Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the artwork for an item pass:
include_order_item_artwork=true
Parameter | Default | Required | Description |
---|---|---|---|
include_order_item_agency_provider_code | false | No | Include agency provider code (for mapping) |
include_order_item_artwork | false | No | Include the items artwork |
include_order_item_provider_product_code | false | No | Include provider product code (for mapping) |
include_order_item_service_product | false | No | Include order item product |
include_order_item_status | false | No | Include status of item |
include_order_item_tasks | false | No | Include item tasks |
Get Order Item
Retrieves a single Order Item using its ID.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/order_items/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY"
Response:
{
"id": 1973,
"service_id": 6,
"service_product_id": 17,
"provider_id": 1,
"title": "A4 Brochures",
"status_id": 11,
"price": 65,
"order_id": 1388,
"provider_price_list_id": 12,
"provider_price_list_item_id": 122,
"quantity": 50,
"options": [
{
"id": 95,
"title": "Finish",
"value": {
"id": 130,
"title": "Satin",
"price": 0
}
},
{
"id": 96,
"title": "Paper Weight",
"value": {
"id": 135,
"title": "200GSM",
"price": 0
}
},
{
"id": 112,
"title": "Delivery",
"value": {
"id": 189,
"title": "Next Day",
"price": 0
}
}
],
"options_string": "/Satin/200GSM/Next Day",
"base_price": 65,
"publication_id": null,
"publication_edition_id": null,
"updated_at": "06/09/2017",
"dates": {
"updated": {
"date_time": "06/09/2017 11:04"
}
}
}
HTTP Request
GET /order_items/:id.json
Returns
This endpoint returns a JSON object representing the order item.
Update Order Item
Update the status of an Order Item using its ID. Permitted statuses (case sensitive):
Processing
, Printed
, Packaged
, Held
, Processed
, Complete
, Dispatched
, Delivered
, Declined
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/order_items/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY" \
-F "status=Complete"
Response:
{
"id": 1973,
"service_id": 6,
"service_product_id": 17,
"provider_id": 1,
"title": "A4 Brochures",
"status_id": 11,
"price": 65,
"order_id": 1388,
"provider_price_list_id": 12,
"provider_price_list_item_id": 122,
"quantity": 50,
"options": [
{
"id": 95,
"title": "Finish",
"value": {
"id": 130,
"title": "Satin",
"price": 0
}
},
{
"id": 96,
"title": "Paper Weight",
"value": {
"id": 135,
"title": "200GSM",
"price": 0
}
},
{
"id": 112,
"title": "Delivery",
"value": {
"id": 189,
"title": "Next Day",
"price": 0
}
}
],
"options_string": "/Satin/200GSM/Next Day",
"base_price": 65,
"publication_id": null,
"publication_edition_id": null,
"updated_at": "06/09/2017",
"dates": {
"updated": {
"date_time": "06/09/2017 11:04"
}
}
}
HTTP Request
PUT /order_items/:id.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
status | null | Yes | One of the permitted statuses above. |
Returns
This endpoint returns a JSON object representing the updated order item.
Order Bundles
Order bundles are predefined groups of items that can be from multiple providers. Usually used by publications when grouping with digital items from their sister companies.
Bundle Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the item details in the order bundle pass:
include_order_bundle_items=true
Parameter | Default | Required | Description |
---|---|---|---|
include_order_bundle_items | No | No | Include the item detail data. |
Get Order Bundles
Retrieves a list of order bundles
Request:
curl -X GET "https://realhub.realbase.io/api/v2/order_bundles.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 1,
"global": true,
"hidden": false,
"price": 300,
"product_code": "123456",
"product_name": "Bundle Product",
"title": "3 Paper Buy",
"dates": {
"start": {
"date": ""
},
"end": {
"date": ""
}
}
}
]
HTTP Request
GET /order_bundles.json
Returns
This endpoint returns a JSON array of order bundle objects.
Price Lists
Price List Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the service in the price list pass:
include_provider_price_list_service=true
Parameter | Default | Required | Description |
---|---|---|---|
include_provider_price_list_products | No | No | Include the products and active product ids in the price list. |
include_provider_price_list_service | No | No | Include the service that the price list belongs to. |
include_provider_price_list_items | No | No | Include the items/quantities in the price list. |
include_provider_price_list_item_options | No | No | Include the item options. |
include_provider_price_list_item_option_values | No | No | Include the item option values. |
Get Price Lists
Retrieves a list of price lists
Request:
curl -X GET "https://realhub.realbase.io/api/v2/provider_price_lists.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 1,
"provider_id": 1,
"service_id": 2,
"title": "Floor Plans 2015",
"default": null,
"service": {
"id": 2,
"title": "Plans",
"short_name": "plans",
"options": null
},
"products": [
{
"id": 5,
"service_id": 2,
"title": "Floor Plan",
"options": null,
"active": true,
"categories": null,
"compatible_publications": null
}
],
"active_product_ids": [
5
]
},
{...}
]
HTTP Request
GET /provider_price_lists.json
Returns
This endpoint returns a JSON array of provider price list objects.
Get Price List
Retrieves a JSON Object of price list
Request:
curl -X GET "/api/v2/provider_price_lists/:id.json" \
-H "x-auth-token: API_KEY"
Response:
{
"id": 35,
"default": true,
"provider_id": 1,
"service_id": 18,
"soft_match_codes": false,
"title": "Other Price List"
}
HTTP Request
GET /provider_price_lists/:id.json
Returns
This endpoint returns a JSON Object of price list.
Price List Items
A price list item object represents a quantity of a product in a price list.
Get Agency Price
Calculates the price for an item/quantity for an array of selected options.
item_options:
[
{
"id": provider_price_list_option_id,
"title": provider_price_list_option_title,
"value": {
"id": option_value_id,
"title": option_value_title,
"price": option_value_price,
},
},
{...},
{...},
]
Request:
curl -X GET "api/v2/provider_price_list_items/122/agency_price.json?item_options=[{%22id%22:95,%22title%22:%22Finish%22,%22value%22:{%22id%22:130,%22title%22:%22Satin%22,%22price%22:0}}]&campaign_id=227" \
-H "x-auth-token: API_KEY"
Response:
{
"price": 65
}
HTTP Request
GET /provider_price_list_items/:item_id/agency_price.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
campaign_id | No | Yes | The price will be calculated base on the campaign. |
item_options | No | No | An array from price list options and option values. Please follow the format on the right side. |
Returns
The endpoint returns a JSON object with the price.
Product Unlocks
Product Unlock Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the unlocked price list in the result pass:
include_product_unlock_unlock_price_list=true
Parameter | Default | Required | Description |
---|---|---|---|
include_product_unlock_unlock_price_list | No | No | Include the unlocked price list in the response. |
include_product_unlock_unlock_price_list_item | No | No | Include the unlocked price list item in the response. |
Get Product Unlocks
Retrieves a list of product unlocks
Request:
curl -X GET "https://realhub.realbase.io/api/v2/product_unlocks.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 12,
"provider_price_list_id": 30,
"service_product_id": 40,
"unlock_price_list_id": 34,
"unlock_product_id": 45,
"formula": "unlocked_by_price / 2",
"unlock_price_list": {
"id": 34,
"default": false,
"provider_id": 12,
"service_id": 7,
"soft_match_codes": false,
"title": "North Shore Times"
},
"unlock_price_list_item": {
"id": 203,
"quantity": 1,
"price": 1444.0
}
},
{...}
]
HTTP Request
GET /product_unlocks.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
product_id | null | No | Filter the unlocks by product_id. |
price_list_id | null | No | Filter the unlocks by price_list_id. |
Notes
Product unlocks only apply if the price list and product match the ids of the unlock item. We suggest passing the product_id and price_list_id params to restrict the results.
Returns
This endpoint returns a JSON array of provider price list product unlock objects.
Provider Package
Package Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the item details in the provider package pass:
include_provider_package_items=true
Parameter | Default | Required | Description |
---|---|---|---|
include_order_bundle_items | No | No | Include the item detail data. |
Get Provider Packages
Request:
curl -X GET "https://realhub.realbase.io/api/v2/provider_packages.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 2,
"provider_id": 1,
"title": "Max Exposure 8x4",
"price": 305
},
{...},
{...},
]
Returns
The endpoint returns an array of provider package objects.
Publications
A publication object represents the physical publication. The API allows you to retrieve a list of publications for the current user.
Get Publications
Retrieves a list of publications
HTTP Request
GET /publications.json
Returns
This endpoint returns a JSON array of publication objects.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/publications.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 2,
"artwork_email": null,
"booking_api": null,
"booking_email": null,
"day_published": 6,
"deadlines": {
"ofi": {
"day": "4",
"time": "12:00",
"weeks_before": "0"
},
"artwork": {
"day": "2",
"time": "15:00",
"weeks_before": "0"
},
"booking": {
"day": "1",
"time": "16:00",
"weeks_before": "0"
},
"editorial": {
"day": "2",
"time": "15:00",
"weeks_before": "0"
}
},
"editorial_email": null,
"email": "xxxxxxx@gmail.com",
"features": {
"ofi": true,
"editorial": true
},
"ftp_host": "",
"ftp_password": "",
"ftp_path": "",
"ftp_port": "",
"ftp_username": "",
"ofi_email": null,
"options": {},
"page_columns": 6,
"page_rows": 12,
"provider_id": 12,
"provider_price_list_id": 31,
"publication_identifier": null,
"title": "Mosman Daily",
"products": [],
"editions": [],
"special_deadlines": [],
"compatible_paginations": [],
"logo": {
"original": null,
"thumb": null
}
},
{...},
]
Publication Editions
A publication edition object represents the physical publication edition. The API allows you to retrieve a list of publication edition for current user.
Get Publication Editions
Retrieves a list of publication editions.
HTTP Request
GET /publication_editions.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
publication_id | No | No | Filter the publication editions by publication_id. |
start_date | No | No | Filter the publication editions greater than or equal to start date by publication_date. Format DD/MM/YYYY |
end_date | No | No | Filter the publication editions less than or equal to end date by publication_date. Format DD/MM/YYYY |
Returns
This endpoint returns a JSON array of publication editions objects.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/publication_editions.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 88,
"publication_id": 1,
"title": "Sat 9 Sep",
"publication_date": "09/09/2017",
"dates": {
"publication": {
"date": "09/09/2017"
},
"booking": {
"date_time": "04/09/2017 17:15"
},
"artwork": {
"date_time": "05/09/2017 15:00"
},
"editorial": {
"date_time": "06/09/2017 15:00"
},
"inspection": {
"date_time": "31/08/2017 14:30"
}
}
},
{...},
{...},
]
Publication Orders
A publication order object represents the physical order containing publication booking items. The API allows you to retrieve a list of publication orders.
Get Publication Orders
Retrieves a list of publication orders.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/publication_orders.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 58,
"user_id": 10,
"publication_id": 1,
"publication_edition_id": 69,
"brand_group_id": 2,
"status_id": 2,
"dates": {
"created": {
"date_time": "01/05/2017 12:13"
}
}
},
{...},
{...}
]
HTTP Request
GET /publication_orders.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
include_publication_order_status | No | No | If given true, it will embed publication order status object. |
include_publication_order_brand_group | No | No | If given true, it will embed publication order brand group object. |
include_publication_order_publication | No | No | If given true, it will embed publication order publication object. |
include_publication_order_publication_edition | No | No | If given true, it will embed publication order publication edition object. |
include_publication_order_bookings | No | No | If given true, it will embed publication order bookings array. |
modified_since | null | No | Filter the orders that have been modified since date (ISO8601 format) provided. e.g. 2018-02-02T11:49:24 . Will be parsed as Australia/Sydney time. |
Returns
This endpoint returns a JSON array of publication order objects.
Reports
Get Digital vs Print Spend
Returns digital vs print spend per agency in the specified date range.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/reports/order_items/digital_vs_print.json" \
-H "x-auth-token: API_KEY"
Response:
{
"columns": [
{
"title": "Agency Name",
"key": "title"
},
{
"title": "Digital Total",
"key": "digital"
},
{
"title": "Publication Total",
"key": "publication"
},
{
"title": "Print Total",
"key": "print"
},
{
"title": "Signboard Total",
"key": "signboard"
}
],
"data": [
{
"title": "Agency One",
"digital": 0,
"publication": 9,
"print": 0,
"signboard": 0
},
{
"title": "Agency Two",
"digital": 0,
"publication": 0,
"print": 525,
"signboard": 0
},
{...},
{...},
]
}
HTTP Request
GET /reports/order_items/digital_vs_print
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
start_date | No | No | Filter reports that were created after date (ISO8601 format) |
end_date | No | No | Filter reports that were created before date (ISO8601 format) |
Note
start_date and end_date must between within 31 days of each other.
Returns
This endpoint returns a JSON object of column explanations and data of spending.
Get Ordered Product Quantities
Returns the quantity of products ordered in the specified date range.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/reports/order_items/product_quantities.json" \
-H "x-auth-token: API_KEY"
Response:
{
"columns": [
{
"title": "ID",
"key": "id"
},
{
"title": "Product",
"key": "title"
},
{
"title": "Quantities",
"key": "count"
}
],
"data": [
{
"id": 29,
"title": "DL Flyers (Bulk)",
"count": 20000
},
{
"id": 17,
"title": "A4 Brochures",
"count": 250
},
{...},
{...},
]
}
HTTP Request
GET /reports/order_items/product_quantities
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
start_date | No | No | Filter reports that were created after date (ISO8601 format) |
end_date | No | No | Filter reports that were created before date (ISO8601 format) |
Note
start_date and end_date must between within 31 days of each other.
Returns
This endpoint returns a JSON object of column explanations and data of product quantities.
Get Generated Proposals
Returns the number of proposals generated for each agency in the specified date range.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/reports/campaign_proposals/generated_proposals.json" \
-H "x-auth-token: API_KEY"
Response:
{
"columns": [
{
"title": "Agency Id",
"key": "id"
},
{
"title": "Agency Name",
"key": "title"
},
{
"title": "Proposals Created",
"key": "count"
}
],
"data": [
{
"id": 1,
"title": "Agency One",
"count": 8
},
{
"id": 18,
"title": "Agency Two",
"count": 2
},
{...},
{...},
]
}
HTTP Request
GET /reports/campaign_proposals/generated_proposals
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
start_date | No | No | Filter reports that were created after date (ISO8601 format) |
end_date | No | No | Filter reports that were created before date (ISO8601 format) |
Note
start_date and end_date must between within 31 days of each other.
Returns
This endpoint returns a JSON object of column explanations and data of proposal count.
Reviews
A review represents an evaluation of a Campaign or other entity. The API allows you to retrieve a list of reviews.
Get Reviews
Retrieves a list of reviews.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/reviews.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "user_id=1"
Response:
[
{
"id": 3,
"added_by_id": 10,
"body": "Primis sapien himenaeos diam varius a odio in est dapibus commodo fringilla vitae feugiat semper dignissim donec purus placerat a tempor mi facilisi commodo natoque.",
"data": {
"address": {
"street_name": "Loxton Avenue",
"street_number": "24",
"suburb_name": "Wamberal",
"unit_number": null
}
},
"owner_id": 8,
"owner_type": "Agency",
"rating": 4.0,
"recipient_id": 10,
"recipient_type": "Agent",
"reviewer_name": "John Smith",
"subject_id": 240,
"subject_type": "Campaign",
"title": "Great Experience",
"dates": {
"created": {
"date_time": "04/09/2018 10:13"
},
"updated": {
"date_time": "11/09/2018 11:30"
}
}
},
{...},
{...}
]
HTTP Request
GET /reviews.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
user_id | null | No | The user ID of the review recipient. |
Returns
This endpoint returns a JSON array of review objects.
Get Review
Returns a single review
Request:
curl -X GET "https://realhub.realbase.io/api/v2/reviews/:id.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName"
Response:
{
"id": 34,
"added_by_id": 10,
"address": "58 Awaba Street",
"agent_ids": [
23,
47,
56
],
"body": "This is the review body.",
"owner_id": 1,
"owner_type": "Agency",
"rating": 5,
"reviewer_name": "Jeff Vendor",
"sold_date": "2021-07-02",
"sold_price": 1500000.0,
"subject_id": 239,
"subject_type": "Campaign",
"title": "This is the review title.",
"dates": {
"created": {
"date_time": "25/09/2020 10:17"
},
"updated": {
"date_time": "25/09/2020 10:17"
}
}
}
HTTP Request
GET /reviews/:id.json
Returns
This endpoint returns a review object
Services
A service object represents an available service / category of product in the Realhub system e.g. Signboards. The API allows you to retrieve a list of services.
Service Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the products for the service:
include_service_products=true
Parameter | Default | Required | Description |
---|---|---|---|
include_service_products | false | No | Include the products assigned to the service |
Get Services
Retrieves a list of services.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/services.json" \
-H "User-Agent: MyCompanyName" \
-H "x-api-token: API_KEY"
Response:
[
{
"id": 1,
"title": "Photography",
"short_name": "photography",
"options": null
},
{...},
{...},
]
HTTP Request
GET /services.json
Returns
This endpoint returns a JSON array of service objects.
Statuses
A status object represents a status type e.g. Pending, Approved, Booked etc. The API allows you to retrieve a list of statuses in the Realhub system.
Get Statuses
Retrieves a list of statuses.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/statuses.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 1,
"title": "Pending",
"options": {
"services": [
"signboards",
"print"
],
"confirm_toggle": true
},
"sort_order": 1
},
{
"id": 2,
"title": "Approved",
"options": {
"services": [
"signboards",
"print"
],
"confirm_toggle": true
},
"sort_order": 2
},
{...},
{...}
]
HTTP Request
GET /statuses
Returns
This endpoint returns a JSON array of available statuses.
Tasks
A task object represents a task for an order item. The API allows you to retrieve a list of tasks.
Task Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the details of the agency that ordered a task pass:
include_task_agency=true
Parameter | Default | Required | Description |
---|---|---|---|
include_task_agency | false | No | Include the agency that ordered the task |
include_task_status | false | No | Include the task status e.g. Approved |
include_task_type | false | No | Include the task type e.g. Install |
include_task_instruction_image | false | No | Include the instruction image if it has been added. |
include_task_order_item | false | No | Include the order item e.g. 6x4 Signboard |
include_task_attachments | false | No | Include any attachments i.e. image proof of installation etc. |
include_task_activity | false | No | Include activity that has been logged against the task. |
include_task_user | false | No | Include the user that created the task. |
Get Tasks
Retrieves a list of tasks.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/tasks.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 311,
"order_item_id": 1811,
"provider_id": 1,
"provider_employee_id": 2,
"sort_order": null,
"status_id": 2,
"address": "78/104 New Order Road, Brookvale",
"instructions": "Another task for the signboard",
"order_item_task_type_id": 4,
"notes": null,
"due_date": "20/06/2017",
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"dates": {
"created": {
"date_time": "17/06/2017 14:44"
},
"updated": {
"date_time": "17/06/2017 14:44"
},
"due": {
"date": "20/06/2017"
},
"completed": {
"date_time": ""
}
}
},
{...},
{...}
]
HTTP Request
GET /tasks.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
status | null | No | Filter the records by status (Approved, Complete). |
task_type_short_name | null | No | Filter the records by task type short name ('install' , 'remove', 'clean', 'repair', 'move', 'overlay', 'other', 'pickup', 'deliver'). |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 50. |
provider_id | No | No | The ID of provider. |
provider_employee_id | No | No | The ID of provider employee. |
modified_since | null | No | Filter the orders that have been modified since date (ISO8601 format) provided. e.g. 2018-02-02T11:49:24 . Will be parsed as Australia/Sydney time. |
Returns
This endpoint returns a JSON array of task objects.
Get Task
Retrieves a single task.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/tasks/:id.json" \
-H "x-auth-token: API_KEY"
Response:
{
"id": 491,
"address": "10/51 Adams Street, Curl Curl",
"instructions": null,
"notes": null,
"order_item_id": 3179,
"order_item_task_type_id": 1,
"provider_employee_id": 2,
"provider_id": 1,
"sort_order": null,
"status_id": 1,
"user_id": null,
"due_date": "",
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"dates": {
"created": {
"date_time": "17/06/2017 14:44"
},
"updated": {
"date_time": "17/06/2017 14:44"
},
"due": {
"date": "20/06/2017"
},
"completed": {
"date_time": ""
}
}
}
HTTP Request
GET /tasks/:id.json
Returns
This endpoint returns a JSON object.
Update Task
Update a Task using its ID.
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/tasks/:task_id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY" \
-F "address=5/73 Smith Street, Lindfield" \
-F "due_date=13/04/2021" \
-F "instructions=Signboard to be removed located to the left of the driveway."
Response:
{
"id": 311,
"order_item_id": 1811,
"provider_id": 1,
"provider_employee_id": 2,
"sort_order": null,
"status_id": 8,
"address": "5/73 Smith Street, Lindfield",
"instructions": "Signboard to be removed located to the left of the driveway",
"order_item_task_type_id": 4,
"notes": "Could not install to the right. Installed on the left instead.",
"due_date": "13/04/2021",
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"dates": {
"created": {
"date_time": "17/06/2017 14:44"
},
"updated": {
"date_time": "05/07/2017 23:02"
},
"due": {
"date": "20/06/2017"
},
"completed": {
"date_time": ""
}
}
}
HTTP Request
PUT /tasks/:id
Parameters
Parameter | Default | Required | Description |
---|---|---|---|
address | null | No | The address of the property the task is to be scheduled for. |
due_date | null | No | The date the task is due to be completed. |
instructions | null | No | Any instructions that should be sent to the agency regarding the task. |
Returns
This endpoint returns an updated JSON object of the Task.
Complete Task
Complete a Task using its ID.
Request:
curl -X PUT "https://realhub.realbase.io/api/v2/tasks/:task_id/complete.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY" \
-F "image=[IMAGE_FILE]" \
-F "notes=Could not install to the left. Installed on the right instead"
Response:
{
"id": 311,
"order_item_id": 1811,
"provider_id": 1,
"provider_employee_id": 2,
"sort_order": null,
"status_id": 8,
"address": "78/104 New Order Road, Brookvale",
"instructions": "Another task for the signboard",
"order_item_task_type_id": 4,
"notes": "Could not install to the left. Installed on the right instead.",
"due_date": "20/06/2017",
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"dates": {
"created": {
"date_time": "17/06/2017 14:44"
},
"updated": {
"date_time": "05/07/2017 23:02"
},
"due": {
"date": "20/06/2017"
},
"completed": {
"date_time": ""
}
}
}
HTTP Request
PUT /tasks/:id/complete
Parameters
Parameter | Default | Required | Description |
---|---|---|---|
image | null | Yes | An image file is required for "Install", "Clean", "Repair", "Move" and "Overlay" task types. |
notes | null | No | Any notes that should be sent to the agency regarding the task. |
Returns
This endpoint returns a updated JSON object of the Task.
Destroy Task
Destroy an existing Task.
Request:
curl -X DELETE "https://realhub.realbase.io/api/v2/tasks/:task_id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY" \
Response:
{
"id": 763,
}
HTTP Request
DELETE /tasks/:id.json
Returns
This endpoint returns a JSON object with the id of the deleted task.
Task Types
An task type object represents a type of task e.g. Install, Remove, Clean etc. The API allows you to retrieve a list of task types.
Get Task Types
Retrieves a list of task types.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/task_types.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"id": 1,
"title": "Install",
"short_name": "install",
"options": null
},
{
"id": 2,
"title": "Remove",
"short_name": "remove",
"options": null
},
{
"id": 3,
"title": "Clean",
"short_name": "clean",
"options": null
},
{...},
{...}
]
HTTP Request
GET /task_types
Returns
This endpoint returns a JSON array of available task types in the Realhub system.
Template Pages
A template page is used to construct advertising media such as signboards. The API allows you to retrieve a list of template pages.
Get Template Pages
Retrieves a list of active template pages.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/template_pages.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "agency_providers_only=true" \
-F "provider_id=1" \
-F "service_id=5" \
-F "service_product_id=14" \
-F "string=portrait" \
-F "tag_id[]=2" \
-F "template_page_ids[]=3"
Response:
[
{
"id": 1,
"assignee_id": null,
"bleed": 12.5,
"brand_id": 1,
"categories": null,
"data": null,
"designer_id": 1,
"designer_type": "Provider",
"height": 475.0,
"hidden": false,
"measurement_unit_id": 1,
"options": {
"bleed": {
"top": 12.5,
"left": 12.5,
"right": 12.5,
"bottom": 12.5
},
"lock_agency_permissions": true
},
"origin_template_id": null,
"page_type": "Signboard 2",
"production_ready": false,
"rebuild_on_restore": false,
"service_id": 5,
"service_product_id": 14,
"sort": null,
"status_id": null,
"tags": [
2
],
"title": "Portrait - Black 2",
"user_id": null,
"width": 325.0,
"type": "TemplatePage",
"dates": {
"active": {
"start": {
"date": ""
},
"end": {
"date": ""
}
}
},
"items": []
},
{...},
{...}
]
HTTP Request
GET /template_pages.json
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
agency_providers_only | false | No | Shows only the records where the provider belongs to the user's agency. True or false. |
brand_id | null | No | Filters the records by brand_id. |
provider_id | null | No | Filters the records by provider_id. |
service_id | null | No | Filters the records by service_id. |
service_product_id | null | No | Filters the records by service_product_id. |
string | null | No | A string used to search the records by title. |
tag_id | null | No | Filters records by tag_id. |
template_page_ids | null | No | Filters records by their IDs. Multiple IDs may be provided. |
offset | 0 | No | The number of records to skip before returning. |
limit | 50 | No | The number of records to return. Maximum 50. |
Returns
This endpoint returns a JSON array of template page objects.
Users
A user object represents a user in the Realhub System. The API allows you to retrieve a list of users assigned to your account.
User Relations
You can include entities that are associated with the object by passing the params below. e.g. to include the profile image of the user:
include_user_image=true&include_user_image_sizes=true
Parameter | Default | Required | Description |
---|---|---|---|
include_user_image | No | No | Include the default user image |
include_user_image_sizes | No | No | Include the image size urls |
Get Users
Retrieves a list of users.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/users.json" \
-H "x-auth-token: API_KEY"
Response:
[
{
"first_name": "Provider",
"last_name": "Name",
"deleted": null,
"email": "provider@realhub.com",
"sign_in_count": 20,
"username": "provider@realhub.com",
"enable_custom_permissions": false,
"custom_permissions": null,
"brand_user": false,
"id": 12,
"full_name": "Provider Name"
},
{...},
{...}
]
HTTP Request
GET /users
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
actable_types | null | No | An array of actable types used to filter the records. e.g. OfficeAdministrator, Agent. |
string | null | No | Filter the records by name. |
offset | 0 | No | The number of records to skip before returning. |
limit | 10 | No | The number of records to return. Maximum 100. |
Returns
This endpoint returns a JSON array of users.
Get User
Retrieve a specific user.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/user/:id.json" \
-H "User-Agent: MyCompanyName" \
-H "x-auth-token: API_KEY"
Response:
{
"first_name": "Provider",
"last_name": "Name",
"deleted": null,
"email": "provider@realhub.com",
"sign_in_count": 20,
"username": "provider@realhub.com",
"enable_custom_permissions": false,
"custom_permissions": null,
"brand_user": false,
"id": 12,
"full_name": "Provider Name"
},
HTTP Request
GET /user/:id
Returns
This endpoint returns a user JSON object.
Find Using Details
Retrieves details of a user matching search params.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/users/find_using_details.json" \
-H "x-auth-token: API_KEY"
-F "username=johnsmith" \
-F "mobile=0400000000" \
-F "email=johnsmith@test.com" \
-F "name=John Smith"
Response:
{
"first_name": "John",
"last_name": "Smith",
"deleted": null,
"email": "johnsmith@test.com",
"sign_in_count": 20,
"username": "johnsmith",
"enable_custom_permissions": false,
"custom_permissions": null,
"brand_user": false,
"id": 12,
"full_name": "John Smith"
}
HTTP Request
GET /users/find_using_details
Query Parameters
Parameter | Default | Required | Description |
---|---|---|---|
null | No | The string that will be used to search users by email. | |
mobile | null | No | The string that will be used to search users by mobile number. |
name | null | No | The string that will be used to search users by name. |
username | null | No | The string that will be used to search users by username. |
Returns
This endpoint returns a user JSON object.
Get Current User
Retrieves details of the currently authenticated user.
Request:
curl -X GET "https://realhub.realbase.io/api/v2/users/me.json" \
-H "x-auth-token: API_KEY"
Response:
{
"first_name": "Provider",
"last_name": "Name",
"deleted": null,
"email": "provider@realhub.com",
"sign_in_count": 20,
"username": "provider@realhub.com",
"enable_custom_permissions": false,
"custom_permissions": null,
"brand_user": false,
"id": 12,
"full_name": "Provider Name"
}
HTTP Request
GET /users/me
Returns
This endpoint returns a user JSON object.
Create user
Creates a user on the Realhub platform.
Request:
curl -X POST "https://realhub.realbase.io/api/v2/users.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName" \
-F "user[association_id]=1" \
-F "user[first_name]=John" \
-F "user[last_name]=Smith" \
-F "user[username]=johnsmith@test.com" \
-F "user[email]=johnsmith@test.com" \
-F "user[role_id]=10" \
-F "user[role_title]=Agent" \
-F "user[password]=12345678" \
-F "user[mobile_number]=0404361168"
Response:
{
"actable_id": 957,
"actable_type": "Agent",
"api_user": false,
"brand_user": false,
"country_calling_code": "61",
"custom_permissions": null,
"data": null,
"deleted": false,
"email": "johnsmith@test.com",
"enable_custom_permissions": false,
"first_name": "John",
"full_name": "John Smith",
"last_name": "Smith",
"latitude": "-33.8688",
"longitude": "151.2093",
"mobile_number": "0404361168",
"options": null,
"second_factor_attempts_count": 0,
"sign_in_count": 0,
"template_master": false,
"time_zone": "Australia/Sydney",
"username": "johnsmith@test.com",
"id": 1399
}
HTTP Request
POST /users.json
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
association_id | number | Yes | The ID of the user's association such as agency ID for an agent or a brand ID for a brand administrator. Not required if creating an Admin or Support user. |
string | Yes | The email associated with this user. | |
first_name | string | Yes | The given name of the user. |
last_name | string | Yes | The surname of the user. |
password | string | Yes | The password for the user's account. |
role_id | number | Yes | The role (e.g. Agent, Office Administrator) of the user. Required if role_title is not supplied. |
role_title | string | Yes | The role of the user. Can be Account Manager, Admin, Agent, Brand Administrator, Directory User, Office Administrator, Office Director, Personal Assistant, Provider Contractor, Provider Director, Provider Employee, Sales Executive, Support, or Vendor. Required if role_id is not supplied. |
username | string | Yes | The username the user will use on the Realhub platform (usually email) e.g. johnsmith@test.com. Must be unique. |
api_user | boolean | No | Whether the user will interact with the Realhub platform via the API. |
country_calling_code | string | No | The international calling code for the user e.g. 61 |
latitude | string | No | The latitude coordinates of the user e.g. 12.34 |
longitude | string | No | The longitude coordinates of the user e.g. 67.89 |
mobile_number | string | No | The mobile phone number for the user e.g. 0404361168 |
template_master | boolean | No | Whether the user is a template master. Default is false. |
time_zone | string | No | The time zone the user lives in e.g. New Zealand/Auckland. Default is Australia/Sydney. |
Returns
This endpoint returns a JSON object representing the user created.
Generate One-Time Password (OTP)
Generates and returns an OTP for a single user.
Request:
curl -X PUT "/api/v2/users/:user_id/generate_otp.json" \
-H "x-api-token: API_KEY" \
-H "User-Agent: MyCompanyName"
Response:
{
"otp": "007944"
}
HTTP Request
PUT /users/:user_id/generate_otp.json
Returns
This endpoint returns a JSON object with the OTP.
Webhooks
Webhook endpoints are URLs defined by users to which Realhub sends events. A single event may be sent to multiple webhook endpoints.
Realhub will issue a POST
request to the endpoint in the format to the right:
{
"id": "WEBHOOK_EVENT_ID",
"type": "EVENT_TYPE",
"payload": "JSON_OBJECT"
}
campaign.sold
The campaign.sold
event occurs when an existing campaign has its sold status changed to true.
Payload:
{
"id": 163,
"type": "campaign.sold",
"payload": {
"id": 229,
"data": null,
"sold": true,
"dates": {
"end": {
"date": "16/04/2018"
},
"sold": {
"date": "20/03/2018"
},
"start": {
"date": "19/03/2018"
},
"auction": {
"date_time": ""
},
"created": {
"date_time": "05/03/2018 11:14"
}
},
"agency": {
"id": 1,
"fax": "02 9901 1237",
"email": "admin@basicrealestate.com",
"phone": "9900 1236",
"title": "Basic Real Estate Brookvale",
"active": false,
"options": {},
"website": "brookvale.basicrealestate.com",
"brand_id": 1,
"short_name": "Brookvale",
"cover_letter": "SAt mollis scelerisque dis sociosqu penatibus a vestibulum aptent tincidunt netus a nullam tristique magnis turpis sit adipiscing a.",
"address_state": "NSW",
"business_name": "Basic Property Group Pty Ltd",
"address_line_1": "654 Sydney Street",
"address_line_2": "",
"address_region": "Brookvale",
"license_number": null,
"business_number": "80 123 123 123",
"address_postcode": "2100",
"shipping_address": "Basic Real Estate Brookvale\n654 Sydney Street\nBrookvale NSW 2100"
},
"agents": [
{
"id": 10,
"email": "agent.one@basicrealestate.com",
"mobile": "0411 72 72 18",
"profile": "Agent Profile",
"agency_id": 1,
"full_name": "Agent One",
"last_name": "Agent",
"first_name": "One",
"agent_title": "Director",
"cover_letter": null,
"commission_fee": null,
"email_notifications": false,
"commission_structure": null
}
],
"hidden": false,
"address": "8 Catalina Crs",
"studies": null,
"bedrooms": "6",
"carparks": "2",
"carports": null,
"state_id": "1",
"agency_id": 1,
"bathrooms": "3",
"land_area": 680,
"post_code": "2103",
"published": false,
"site_name": null,
"suburb_id": "716",
"car_spaces": null,
"facilities": null,
"hide_price": false,
"lot_number": null,
"state_name": "NSW",
"price_guide": null,
"provider_id": null,
"rental_bond": null,
"street_name": "Catalina Crs",
"suburb_name": "Mona Vale",
"under_offer": false,
"unit_number": null,
"auction_date": null,
"country_code": "AU",
"country_name": null,
"extra_fields": {},
"hide_address": null,
"land_details": null,
"living_areas": null,
"property_url": null,
"council_rates": null,
"energy_rating": null,
"rental_period": null,
"street_number": "8",
"other_features": null,
"campaign_status": {
"id": 4,
"title": "Sold",
"options": {
"campaign_types": [
"commercial",
"land",
"residential",
"rural"
]
},
"short_name": "sold"
},
"hide_sold_price": false,
"land_area_units": "squareMeter",
"campaign_type_id": null,
"campaign_duration": "4w",
"legal_description": null,
"campaign_status_id": 1,
"inspection_details": null,
"campaign_category_id": null,
"campaign_sale_method_id": null,
"campaign_rural_category_id": null,
"campaign_commercial_category_id": null
}
}
Returns
The request body for this event is as per the example to the right.
order.approved
The order.approved
event occurs when an order is approved by a user in the agency dashboard.
Payload:
{
"id": 1564688,
"type": "order.approved",
"payload": {
"id": 1740,
"agency_id": 1,
"campaign_id": 237,
"campaign_proposal_id": null,
"campaign_quote_id": null,
"coupon_id": null,
"deleted": false,
"invoice_notes": null,
"invoice_reference": null,
"invoice_total": null,
"invoiced": false,
"notes": null,
"order_bundle_id": null,
"order_type": "item",
"override_reason": null,
"pagination_approved": false,
"provider_id": 1,
"publication_edition_id": null,
"publication_id": null,
"publication_package_id": null,
"purchase_order": "PO56345",
"shipping_address": "Real Estate Agency\n27 Street Place\Brookvale NSW 2100",
"status_id": 2,
"title": "A4 Brochures",
"total": 65,
"total_override": null,
"user_id": 10,
"total_raw": 65,
"dates": {
"created": {
"date_time": "18/06/2018 13:21"
},
"updated": {
"date_time": "18/06/2018 13:22"
},
"approval": {
"date_time": "18/06/2018 13:22",
"integer": 1529292169
}
},
"status": {
"id": 2,
"title": "Approved"
},
"campaign": {
"address": "97-99 Sunnyside Crescent",
"agency_id": 1,
"auction_date": null,
"bathrooms": "2",
"bedrooms": "3",
"campaign_category_id": null,
"campaign_commercial_category_id": null,
"campaign_duration": "4w",
"campaign_rural_category_id": null,
"campaign_sale_method_id": null,
"campaign_status_id": 1,
"campaign_type_id": null,
"car_spaces": null,
"carparks": "1",
"carports": null,
"council_rates": null,
"country_code": "AU",
"country_name": null,
"data": null,
"energy_rating": null,
"extra_fields": {},
"facilities": null,
"hidden": false,
"hide_address": null,
"hide_price": false,
"hide_sold_price": false,
"id": 237,
"inspection_details": null,
"land_area": null,
"land_area_units": null,
"land_details": null,
"legal_description": null,
"living_areas": null,
"lot_number": null,
"other_features": null,
"post_code": "2068",
"price_guide": null,
"property_url": null,
"provider_id": null,
"published": false,
"rental_bond": null,
"rental_period": null,
"site_name": null,
"sold": false,
"state_id": "1",
"state_name": "NSW",
"street_name": "Sunnyside Crescent",
"street_number": "97-99",
"studies": null,
"suburb_id": "622",
"suburb_name": "Castlecrag",
"under_offer": false,
"unit_number": null,
"dates": {
"created": {
"date_time": "14/06/2018 12:07"
},
"auction": {
"date_time": ""
},
"sold": {
"date": ""
},
"start": {
"date": "14/06/2018"
},
"end": {
"date": "12/07/2018"
}
},
"agents": [
{
"id": 10,
"email": "agent.one@basicrealestate.com",
"mobile": "0411 72 72 18",
"profile": "Agent Profile",
"agency_id": 1,
"full_name": "Agent One",
"last_name": "Agent",
"first_name": "One",
"agent_title": "Director",
"cover_letter": null,
"commission_fee": null,
"email_notifications": false,
"commission_structure": null
}
],
"portal_ids": {
"incoming": "RH237",
"outgoing": "RH237"
}
},
"user": {
"id": 10,
"full_name": "Office Admin",
"email": "admin@agency.com"
},
"items": [
{
"id": 2376,
"additional_instructions": null,
"base_price": 65,
"campaign_proposal_id": null,
"data": {
"tags": []
},
"options": [
{
"id": 95,
"title": "Finish",
"value": {
"id": 130,
"title": "Satin",
"price": 0
}
},
{
"id": 96,
"title": "Paper Weight",
"value": {
"id": 135,
"title": "200GSM",
"price": 0
}
},
{
"id": 112,
"title": "Delivery",
"value": {
"id": 189,
"title": "Next Day",
"price": 0
}
}
],
"options_string": "/Satin/200GSM/Next Day",
"order_id": 1740,
"price": 65,
"price_inc_fee": 72,
"processing_fee": 7,
"provider_id": 1,
"provider_price_list_id": 12,
"provider_price_list_item_id": 122,
"publication_edition_id": null,
"publication_id": null,
"quantity": 50,
"service_id": 6,
"service_product_id": 17,
"status_id": 2,
"title": "A4 Brochures",
"updated_at": "18/06/2018",
"dates": {
"updated": {
"date_time": "18/06/2018 13:22"
},
"required": {
"date": ""
}
},
"artwork": {
"id": 1239,
"campaign_id": 237,
"order_item_id": 2376,
"status_id": 1,
"artwork_type": "template",
"service_product_id": 17,
"template_page_category_id": null,
"dates": {
"updated": {
"date_time": "18/06/2018 13:22"
}
},
"links": {
"download_url": "https://www.realhubapp.com/admin/artworks/946/pdf?provider_id=1&token=PUBLIC_TOKEN",
"export_url": null,
},
"pages": [],
"files": {}
},
"artwork_id": 1239,
"service_product": {
"id": 17,
"service_id": 6,
"title": "A4 Brochures",
"options": null,
"orderable": true
},
"agency_identity_code": "C9CA0311-5056-9A04-DF50-D814D97733CC",
"provider_product_code": "PI12345",
"service": {
"id": 6,
"title": "Print",
"short_name": "print",
"options": null
},
"status": {
"id": 2,
"title": "Approved"
},
"tasks": [
{
"id": 305,
"order_item_id": 1811,
"provider_id": 1,
"provider_employee_id": 2,
"sort_order": null,
"status_id": 2,
"address": "78/104 New Order Road, Brookvale",
"instructions": "Install to left of driveway",
"order_item_task_type_id": 1,
"notes": null,
"due_date": "16/06/2017",
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"dates": {
"created": {
"date_time": "14/06/2017 11:15"
},
"updated": {
"date_time": "14/06/2017 11:21"
},
"due": {
"date": "16/06/2017"
},
"completed": {
"date_time": ""
}
},
"task_type": {
"id": 1,
"title": "Install",
"short_name": "install",
"options": null
}
},
{...},
{...}
]
}
]
}
}
Returns
The request body for this event is as per the example to the right.
order.unapproved
The order.unapproved
event occurs when an order is unapproved by a user in the agency dashboard.
Payload:
{
"id": 1564688,
"type": "order.unapproved",
"payload": {
"id": 1263,
"agency_id": 1,
"campaign_id": 203,
"provider_id": 1,
"coupon_id": null,
"publication_id": null,
"publication_edition_id": null,
"publication_package_id": null,
"campaign_quote_id": null,
"title": "6x4 Signboard",
"notes": null,
"shipping_address": "Real Estate Agency\n27 Street Place\Brookvale NSW 2100",
"total": 200,
"invoiced": false,
"deleted": false,
"status_id": 1,
"user_id": 10,
"order_type": "item",
"purchase_order": "PO56345",
"dates": {
"created": {
"date_time": "14/06/2017 11:15"
},
"updated": {
"date_time": "08/07/2017 15:55"
},
"approval": {
"date_time": "14/06/2017 11:21",
"integer": 1497403269
}
},
"status": {
"id": 1,
"title": "Pending"
},
"items": [
{
"id": 1811,
"campaign_proposal_id": null,
"service_id": 5,
"service_product_id": 12,
"provider_id": 1,
"title": "6x4 Signboard",
"status_id": 1,
"price": 200,
"order_id": 1263,
"provider_price_list_id": 6,
"provider_price_list_item_id": 134,
"quantity": 1,
"options": [
{
"id": 103,
"title": "Extras",
"value": {
"id": 160,
"title": "Flag Holder",
"price": 15
}
}
],
"options_string": "/Flag Holder",
"base_price": 230,
"publication_id": null,
"publication_edition_id": null,
"updated_at": "08/07/2017",
"dates": {
"updated": {
"date_time": "08/07/2017 15:55"
}
},
"artwork": {
"id": 946,
"campaign_id": 203,
"status_id": 1,
"order_item_id": 1811,
"service_product_id": 12,
"artwork_type": "template",
"dates": {
"updated": {
"date_time": "14/06/2017 11:21"
}
},
"links": {
"download_url": "https://www.realhubapp.com/admin/artworks/946/pdf?provider_id=1&token=PUBLIC_TOKEN",
"export_url": null
},
"pages": [],
"files": {}
},
"artwork_id": 946,
"service_product": {
"id": 12,
"service_id": 5,
"title": "6x4 Signboard",
"options": null,
"orderable": true
},
"agency_identity_code": "C9CA0311-5056-9A04-DF50-D814D97733CC",
"provider_product_code": "PS6X4",
"service": {
"id": 5,
"title": "Signboards",
"short_name": "signboards",
"options": null
},
"status": {
"id": 1,
"title": "Pending"
},
"tasks": [
{
"id": 305,
"order_item_id": 1811,
"provider_id": 1,
"provider_employee_id": 2,
"sort_order": null,
"status_id": 1,
"address": "78/104 New Order Road, Brookvale",
"instructions": "Install to left of driveway",
"order_item_task_type_id": 1,
"notes": null,
"due_date": "16/06/2017",
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"dates": {
"created": {
"date_time": "14/06/2017 11:15"
},
"updated": {
"date_time": "14/06/2017 11:21"
},
"due": {
"date": "16/06/2017"
},
"completed": {
"date_time": ""
}
},
"task_type": {
"id": 1,
"title": "Install",
"short_name": "install",
"options": null
}
},
{...},
{...}
]
}
]
}
}
Returns
The request body for this event is as per the example to the right.
order.deleted
The order.deleted
event occurs when an order is deleted by a user in the agency dashboard.
Payload:
{
"id": 1564688,
"type": "order.deleted",
"payload": {
"id": 123
}
}
Returns
The request body for this event is as per the example to the right.
order_item.deleted
The order_item.deleted
event occurs when a order_item is deleted by a user in the agency dashboard.
Response:
{
"id": 295,
"type": "order_item.deleted",
"payload": {
"id": 2264
}
}
Returns
The request body for this event is as per the example to the right.
task.approved
The task.approved
event occurs when a task is approved by a user in the agency dashboard.
Response:
{
"id": 335,
"type": "task.approved",
"payload": {
"id": 426,
"user": {
"id": 10,
"email": "admin@agency.com",
"deleted": null,
"username": "admin@agency.com",
"full_name": "Frank Greeff",
"last_name": "Greeff",
"brand_user": false,
"first_name": "Frank",
"sign_in_count": 1233,
"custom_permissions": {
"agency": {
"campaign": {
"media": {
"manage": true
},
"orders": {
"delete": false,
"manage": true,
"approve": true
},
"quotes": {
"manage": true,
"approve": false
},
"ad_copy": {
"manage": false
},
"artwork": {
"manage": true,
"upload": true,
"approve": false,
"print_quality": true
},
"details": {
"manage": true
},
"portals": {
"manage": true
},
"contacts": {
"manage": true
},
"invoices": {
"manage": true,
"approve": false
},
"proposals": {
"manage": false
},
"comparables": {
"manage": false
},
"publications": {
"manage": true
}
}
}
},
"enable_custom_permissions": false
},
"dates": {
"due": {
"date": "23/02/2018"
},
"created": {
"date_time": "16/02/2018 09:22"
},
"updated": {
"date_time": "16/02/2018 09:22"
},
"completed": {
"date_time": ""
}
},
"notes": null,
"status": {
"id": 2,
"title": "Approved",
"options": {
"services": [
"signboards",
"print"
],
"confirm_toggle": true
},
"sort_order": 2
},
"address": "12 Garland Road, Boorcan",
"user_id": 10,
"due_date": "23/02/2018",
"status_id": 2,
"task_type": {
"id": 6,
"title": "Overlay",
"options": null,
"short_name": "overlay"
},
"sort_order": null,
"provider_id": 1,
"instructions": "Hello",
"order_item_id": 2234,
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"provider_employee_id": 2,
"order_item_task_type_id": 6
}
}
Returns
The request body for this event is as per the example to the right.
task.deleted
The task.deleted
event occurs when a task is deleted by a user in the agency dashboard.
Response:
{
"id": 335,
"type": "task.deleted",
"payload": {
"id": 335
}
}
Returns
The request body for this event is as per the example to the right.
task.updated
The task.updated
event occurs when a task is updated by a user in the agency dashboard.
Response:
{
"id": 5060,
"type": "task.updated",
"payload": {
"id": 574,
"address": "3/301 Stanmore Road, Melbourne",
"instructions": "Updated Instructions.",
"notes": nil,
"order_item_id": 3251,
"order_item_task_type_id": 2,
"provider_employee_id": 2,
"provider_id": 1,
"sort_order": nil,
"status_id": 2,
"user_id": 10,
"due_date": "12/05/2021",
"completed_date": {
"date": "",
"date_time": "",
"formatted": ""
},
"dates": {
"created": {
"date_time": "07/05/2021 10:04"
},
"updated": {
"date_time": "07/05/2021 10:05"
},
"due": {
"date": "12/05/2021"
},
"completed": {
"date_time": ""
}
},
"status": {
"id": 2,
"title": "Approved",
"options": {
"services": [
"signboards",
"print"
],
"confirm_toggle": true
},
"sort_order": 2
},
"task_type": {
"id": 2,
"title": "Remove",
"short_name": "remove",
"options": nil
},
"order_item": {
"id": 3251,
"additional_instructions": nil,
"base_price": 180.0,
"campaign_proposal_id": nil,
"data": {
"tags": [
"Just Listed"
],
"agency_price": 180.0
},
"options": [],
"options_string": "",
"order_id": 2563,
"price": 180.0,
"price_inc_fee": 180.0,
"processing_fee": 0.0,
"provider_id": 1,
"provider_price_list_id": 6,
"provider_price_list_item_id": 133,
"publication_edition_id": nil,
"publication_id": nil,
"quantity": 1,
"service_id": 5,
"service_product_id": 11,
"status_id": 2,
"title": "6x2 Signboard",
"updated_at": "30/04/2021",
"dates": {
"updated": {
"date_time": "30/04/2021 09:49"
},
"required": {
"date": "14/05/2021",
"date_time": "14/05/2021 00:00"
}
},
"agency_identity_code": "SPRINT1542",
"provider_product_code": nil
},
"attachments": [],
"user": {
"actable_id": 9,
"actable_type": "OfficeAdministrator",
"api_user": false,
"brand_user": false,
"country_calling_code": "+61",
"custom_permissions": {
"agency": {
"campaign": {
"media": {
"manage": true
},
"orders": {
"delete": true,
"manage": true,
"approve": true,
"require_quote": false
},
"quotes": {
"manage": true,
"approve": true,
"require_authorization": false,
"require_contributions": true
},
"ad_copy": {
"manage": true
},
"artwork": {
"manage": true,
"upload": true,
"approve": true,
"print_quality": true
},
"details": {
"create": true,
"manage": true
},
"portals": {
"manage": true
},
"contacts": {
"manage": true
},
"invoices": {
"manage": true,
"approve": true
},
"proposals": {
"manage": true
},
"comparables": {
"manage": true
},
"publications": {
"manage": true
}
},
"digital_pages": {
"forms": {
"manage": true
},
"proposals": {
"manage": true
},
"agreements": {
"manage": true
},
"microsites": {
"manage": true
}
}
}
},
"data": nil,
"deleted": nil,
"email": "admin@agency.com",
"enable_custom_permissions": true,
"first_name": "Frank",
"full_name": "Frank Greeff",
"last_name": "Greeff",
"latitude": nil,
"longitude": nil,
"mobile_number": "0433 855 946",
"options": {
"custom_dashboards": {
"agency_dashboard": {
"custom": true,
"columns": {
"main": {
"id": "main",
"modules": [
{
"key": "Campaigns-1",
"moduleId": "Campaigns"
},
{
"key": "Campaigns-2",
"moduleId": "Campaigns"
},
{
"key": "Quotes-ke0l3ta7",
"moduleId": "Quotes"
},
{
"key": "Orders-kec14gun",
"moduleId": "Orders"
},
{
"key": "Orders-kec4nbg8",
"moduleId": "Orders"
},
{
"key": "Quotes-kecc6uu8",
"moduleId": "Quotes"
}
]
},
"sidebar": {
"id": "sidebar",
"modules": [
{
"key": "WorkflowTasks-kcog77bn",
"moduleId": "WorkflowTasks"
},
{
"key": "Deadlines-1",
"moduleId": "Deadlines"
},
{
"key": "ReviewedArtworks-1",
"moduleId": "ReviewedArtworks"
},
{
"key": "Notifications-1",
"moduleId": "Notifications"
},
{
"key": "Orders-kec14lm7",
"moduleId": "Orders
"}
]
}
},
"options": {
"Campaigns-1": {
"queryParams": {
"limit": 50,
"campaign_status": "all"
},
"customization": {
"title": "Campaigns",
"display_mode": "tiles"
}
},
"Campaigns-2": {
"queryParams": {
"limit": 10,
"campaign_status": "proposal"
},
"customization": {
"title": "Proposal Campaigns", "display_mode": "list"
}
},
"Orders-kec14gun": {
"queryParams": {
"limit": 5,
"status": "all",
"order_type": "all",
"campaign_marketing_type": "agency_marketing"
},
"customization": {
"title": "Orders",
"display_mode": "compact-list"
}
},
"Orders-kec14lm7": {
"queryParams": {
"limit": 5,
"status": "all",
"order_type": "all"
},
"customization": {
"title": "Orders",
"display_mode": "compact-list"
}
},
"Orders-kec4nbg8": {
"queryParams": {
"limit": "10",
"status": "all",
"order_type": "all",
"campaign_marketing_type": "property_marketing"
},
"customization": {
"title": "Orders",
"display_mode": "list"
}
},
"Quotes-ke0l3ta7": {
"queryParams": {
"limit": 5,
"status": "all",
"authorized": "all",
"authorization_sent": "all"
},
"customization": {
"title": "Quotes",
"display_mode": "compact-list"
}
},
"Quotes-kecc6uu8": {
"queryParams": {
"limit": 5,
"status": "all",
"authorized": "all",
"authorization_sent": "all"
},
"customization": {
"title": "Quotes",
"display_mode": "list"
}
},
"WorkflowTasks-kcog77bn": {
"queryParams": {
"limit": 5, "status": "all"
},
"customization": {
"title": "Workflow Tasks"
}
}
}
},
"campaign_manager": {
"custom": true,
"columns": {
"main": {
"id": "main",
"modules": [
{
"key": "Proposals-1",
"moduleId": "Proposals"
},
{
"key": "Activity-ka33dzkz",
"moduleId": "Activity"
},
{
"key": "Images-ke0kz9l4",
"moduleId": "Images"
},
{
"key": "Orders-ke0kzdsm",
"moduleId": "Orders"
},
{
"key": "Quotes-ke0l1ky8",
"moduleId": "Quotes"
}
]
},
"sidebar": {
"id": "sidebar",
"modules": []
}
},
"options": {
"Images-1": {
"queryParams": {
"limit": 6
},
"customization": {
"title": "Images"
}
},
"Orders-1": {
"queryParams": {
"limit": 5,
"status": "all",
"order_type": "all"
},
"customization": {
"title": "Orders",
"display_mode": "list"
}
},
"Quotes-1": {
"queryParams": {
"limit": 5,
"status": "all",
"authorized": "all",
"authorization_sent": "all"
},
"customization": {
"title": "Quotes",
"display_mode": "compact-list"
}
},
"Activity-1": {
"queryParams": {
"limit": 10
},
"customization": {
"title": "Activity"
}
},
"Proposals-1": {
"queryParams": {
"limit": 10,
"status": "all",
"campaign_status": "all"
}, "customization": {
"title": "Proposals",
"display_mode": "tiles"
}
},
"DigitalPages-1": {
"queryParams": {
"limit": 5,
"page_type": "all"
},
"customization": {
"title": "Digital Pages",
"display_mode": "list"
}
},
"Images-ke0kz9l4": {
"queryParams": {
"limit": 5
},
"customization": {
"title": "Images"
}
},
"Orders-ke0kzdsm": {
"queryParams": {
"limit": 5,
"status": "all",
"order_type": "all"
},
"customization": {
"title": "Orders",
"display_mode": "list"
}
},
"Quotes-ke0l1ky8": {
"queryParams": {
"limit": 5,
"status": "all",
"authorized": "all",
"authorization_sent": "all"
},
"customization": {
"title": "Quotes",
"display_mode": "compact-list"
}
},
"WorkflowTasks-1": {
"queryParams": {
"limit": 10, "status": "all"
},
"customization": {
"title": "Workflow Tasks",
"link_workflow_status": true
}
},
"Activity-ka33dzkz": {
"queryParams": {
"key": "all",
"limit": "5"
},
"customization": {
"title": "Activity"
}
},
"SubjectConversation-1": {
"customization": {
"title": "Conversation"
}
}
}
}
}
},
"second_factor_attempts_count": 0,
"sign_in_count": 2145,
"template_master": false,
"time_zone": "Australia/Sydney",
"username": "admin@agency.com",
"id": 10
}
}
}
Returns
The request body for this event is as per the example to the right.
publication_order.created
The publication_order.created
event occurs when an order is created by a user in the agency dashboard.
Payload:
{
"id":316,
"type":"publication_order.created",
"payload":{
"id":88,
"dates":{
"created":{
"date_time":"13/02/2018 11:31"
}
},
"status":{
"id":2,
"title":"Approved"
},
"user_id":10,
"bookings":[
{
"id":362,
"sort":1,
"dates":{
"booking":{
"date_time":"13/02/2018 11:31"
},
"created":{
"date_time":"13/02/2018 11:29"
},
"approval":{
"date_time":""
},
"booking_confirmation":{
"date_time":""
}
},
"items":[
],
"links":{
"download_url":"http://realhub.dev/admin/publication_bookings/362/pdf"
},
"notes":null,
"deleted":false,
"user_id":10,
"status_id":15,
"page_options":null,
"booking_error":null,
"page_position":null,
"brand_group_id":2,
"publication_id":1,
"available_space":0,
"booking_confirmed":false,
"ftp_transfer_data":null,
"layout_template_id":7,
"publication_order_id":88,
"publication_edition_id":443,
"publication_product_id":2,
"booking_confirmation_id":"88-001",
"ftp_transfer_successful":null
}
],
"status_id":2,
"brand_group":{
"id":2,
"title":"Realhub Test Group",
"brand_id":1,
"full_access":true,
"agency_paginated":false
},
"publication":{
"id":1,
"logo":{
"thumb":null,
"original":null
},
"email":"publications@realhub.com.au",
"title":"Manly Daily (Gloss)",
"options":{
"notes":"true",
"domain_coco":"true",
"page_position":"true",
"product_options":"false",
"booking_api_mode":"test",
"image_icc_profile":"PSO_LWC_Improved_eci.icc",
"inspection_format":"newscorp_quest",
"pdf_compatibility":"1.3",
"strip_image_profile":"true",
"booking_confirmation_id_method":"system"
},
"editions":[
],
"features":{
"ofi":true,
"editorial":true
},
"ftp_host":"xml.realhub.com.au",
"ftp_path":"/public_html",
"ftp_port":"",
"products":[
],
"deadlines":{
"ofi":{
"day":"4",
"time":"14:30",
"weeks_before":"1"
},
"artwork":{
"day":"2",
"time":"15:00",
"weeks_before":"0"
},
"booking":{
"day":"1",
"time":"17:15",
"weeks_before":"0"
},
"editorial":{
"day":"3",
"time":"15:00",
"weeks_before":"0"
}
},
"ofi_email":"ofi@news.com",
"page_rows":12,
"booking_api":"newscorp-xml",
"provider_id":12,
"ftp_password":"QTCFeSLw1",
"ftp_username":"realhub",
"instructions":null,
"page_columns":6,
"artwork_email":"artwork@publication.com.au",
"booking_email":"ken@kengreeff.com",
"day_published":6,
"editorial_email":"editorials@news.com",
"special_deadlines":[
],
"compatible_paginations":[
],
"provider_price_list_id":30,
"publication_identifier":"Manly Daily RE"
},
"brand_group_id":2,
"publication_id":1,
"publication_edition":{
"id":443,
"dates":{
"artwork":{
"date_time":"16/10/2018 15:00"
},
"booking":{
"date_time":"15/10/2018 17:15"
},
"editorial":{
"date_time":"17/10/2018 15:00"
},
"inspection":{
"date_time":"11/10/2018 14:30"
},
"publication":{
"date":"20/10/2018"
}
},
"title":"Sat Oct 20",
"publication_id":1,
"publication_date":"20/10/2018",
"special_deadline":false
},
"publication_edition_id":443
}
}
Returns
The request body for this event is as per the example to the right.
publication_order.reverted
The publication_order.reverted
event occurs when an publication order is reverted by a user in the admin dashboard.
Payload:
{
"id":294,
"type":"publication_order.reverted",
"payload":{
"id":71,
"dates":{
"created":{
"date_time":"03/01/2018 13:43"
}
},
"status":{
"id":1,
"title":"Pending"
},
"user_id":10,
"bookings":[
{
"id":273,
"sort":1,
"dates":{
"booking":{
"date_time":"03/01/2018 13:43"
},
"created":{
"date_time":"03/01/2018 13:43"
},
"approval":{
"date_time":"03/01/2018 13:44"
},
"booking_confirmation":{
"date_time":""
}
},
"items":[
],
"links":{
"download_url":"http://example.org/admin/publication_bookings/273/pdf"
},
"notes":null,
"user_id":10,
"status_id":1,
"page_options":null,
"booking_error":null,
"page_position":null,
"brand_group_id":2,
"publication_id":1,
"available_space":0,
"booking_confirmed":false,
"ftp_transfer_data":{
"code":"226",
"message":"226-File successfully transferred\n226 0.038 seconds (measured here), 1.03 Mbytes per second\n"
},
"layout_template_id":7,
"publication_order_id":71,
"publication_edition_id":321,
"publication_product_id":2,
"booking_confirmation_id":"71-001",
"ftp_transfer_successful":true
}
],
"status_id":1,
"brand_group":{
"id":2,
"title":"Realhub Test Group",
"brand_id":1,
"full_access":true,
"agency_paginated":false
},
"publication":{
"id":1,
"logo":{
"thumb":null,
"original":null
},
"email":"publications@realhub.com.au",
"title":"Manly Daily (Gloss)",
"options":{
"notes":"true",
"domain_coco":"true",
"page_position":"true",
"product_options":"false",
"booking_api_mode":"test",
"image_icc_profile":"PSO_LWC_Improved_eci.icc",
"inspection_format":"newscorp_quest",
"pdf_compatibility":"1.3",
"strip_image_profile":"true",
"booking_confirmation_id_method":"system"
},
"editions":[
],
"features":{
"ofi":true,
"editorial":true
},
"ftp_host":"xml.realhub.com.au",
"ftp_path":"/public_html",
"ftp_port":"",
"products":[
],
"deadlines":{
"ofi":{
"day":"4",
"time":"14:30",
"weeks_before":"1"
},
"artwork":{
"day":"2",
"time":"15:00",
"weeks_before":"0"
},
"booking":{
"day":"1",
"time":"17:15",
"weeks_before":"0"
},
"editorial":{
"day":"3",
"time":"15:00",
"weeks_before":"0"
}
},
"ofi_email":"ofi@news.com",
"page_rows":12,
"booking_api":"newscorp-xml",
"provider_id":12,
"ftp_password":"QTCFeSLw1",
"ftp_username":"realhub",
"instructions":null,
"page_columns":6,
"artwork_email":"artwork@publication.com.au",
"booking_email":"ken@kengreeff.com",
"day_published":6,
"editorial_email":"editorials@news.com",
"special_deadlines":[
],
"compatible_paginations":[
],
"provider_price_list_id":30,
"publication_identifier":"Manly Daily RE"
},
"brand_group_id":2,
"publication_id":1,
"publication_edition":{
"id":321,
"dates":{
"artwork":{
"date_time":"16/01/2018 16:00"
},
"booking":{
"date_time":"15/01/2018 11:00"
},
"editorial":{
"date_time":""
},
"inspection":{
"date_time":""
},
"publication":{
"date":"20/01/2018"
}
},
"title":"Sat Jan 20",
"publication_id":1,
"publication_date":"20/01/2018",
"special_deadline":false
},
"publication_edition_id":321
}
}
Returns
The request body for this event is as per the example to the right.
publication_booking.approved
The publication_booking.approved
event occurs when an order is approved by a user in the agency dashboard.
Payload:
{
"id":318,
"type":"publication_booking.approved",
"payload":{
"id":362,
"sort":1,
"dates":{
"booking":{
"date_time":"13/02/2018 11:31"
},
"created":{
"date_time":"13/02/2018 11:29"
},
"approval":{
"date_time":"13/02/2018 11:36"
},
"booking_confirmation":{
"date_time":""
}
},
"items":[
{
"x":0.0,
"y":372.753333333333,
"id":850,
"row":6,
"dates":{
"confirmation":{
"date_time":""
}
},
"links":{
"new_artwork":"http://realhub.dev/agency/order_items/2292/artworks/new"
},
"column":0,
"removed":false,
"order_id":1665,
"status_id":2,
"booking_error":null,
"order_item_id":2292,
"booking_confirmed":false,
"previous_booking_id":null,
"pending_cancellation":false,
"publication_booking_id":362,
"booking_confirmation_id":null
},
{...},
{...}
],
"links":{
"download_url":"http://realhub.dev/admin/publication_bookings/362/pdf"
},
"notes":null,
"status":{
"id":2,
"title":"Approved"
},
"deleted":false,
"user_id":10,
"status_id":2,
"brand_group":{
"id":2,
"title":"Realhub Test Group",
"brand_id":1,
"full_access":true,
"agency_paginated":false
},
"publication":{
"id":1,
"logo":{
"thumb":null,
"original":null
},
"email":"publications@realhub.com.au",
"title":"Manly Daily (Gloss)",
"options":{
"notes":"true",
"domain_coco":"true",
"page_position":"true",
"product_options":"false",
"booking_api_mode":"test",
"image_icc_profile":"PSO_LWC_Improved_eci.icc",
"inspection_format":"newscorp_quest",
"pdf_compatibility":"1.3",
"strip_image_profile":"true",
"booking_confirmation_id_method":"system"
},
"editions":[
],
"features":{
"ofi":true,
"editorial":true
},
"ftp_host":"xml.realhub.com.au",
"ftp_path":"/public_html",
"ftp_port":"",
"products":[
],
"deadlines":{
"ofi":{
"day":"4",
"time":"14:30",
"weeks_before":"1"
},
"artwork":{
"day":"2",
"time":"15:00",
"weeks_before":"0"
},
"booking":{
"day":"1",
"time":"17:15",
"weeks_before":"0"
},
"editorial":{
"day":"3",
"time":"15:00",
"weeks_before":"0"
}
},
"ofi_email":"ofi@news.com",
"page_rows":12,
"booking_api":"newscorp-xml",
"provider_id":12,
"ftp_password":"QTCFeSLw1",
"ftp_username":"realhub",
"instructions":null,
"page_columns":6,
"artwork_email":"artwork@publication.com.au",
"booking_email":"ken@kengreeff.com",
"day_published":6,
"editorial_email":"editorials@news.com",
"special_deadlines":[
],
"compatible_paginations":[
],
"provider_price_list_id":30,
"publication_identifier":"Manly Daily RE"
},
"page_options":null,
"booking_error":null,
"page_position":null,
"brand_group_id":2,
"publication_id":1,
"available_space":72,
"booking_confirmed":false,
"ftp_transfer_data":{
"code":"226",
"message":"226-File successfully transferred\n226 0.051 seconds (measured here), 1.29 Mbytes per second\n"
},
"layout_template_id":7,
"publication_edition":{
"id":443,
"dates":{
"artwork":{
"date_time":"16/10/2018 15:00"
},
"booking":{
"date_time":"15/10/2018 17:15"
},
"editorial":{
"date_time":"17/10/2018 15:00"
},
"inspection":{
"date_time":"11/10/2018 14:30"
},
"publication":{
"date":"20/10/2018"
}
},
"title":"Sat Oct 20",
"publication_id":1,
"publication_date":"20/10/2018",
"special_deadline":false
},
"publication_product":{
"id":2,
"rows":12,
"bleed":5.0,
"title":"Full Page (M12x6)",
"width":300.0,
"height":300.0,
"columns":6,
"product_code":"FULL",
"publication_id":1
},
"publication_order_id":88,
"publication_edition_id":443,
"publication_product_id":2,
"booking_confirmation_id":"88-001",
"ftp_transfer_successful":true
}
}
Returns
The request body for this event is as per the example to the right.
publication_booking.unapproved
The publication_booking.unapproved
event occurs when an order is unapproved by a user in the agency dashboard.
Payload:
{
"id":320,
"type":"publication_booking.unapproved",
"payload":{
"id":362,
"sort":1,
"dates":{
"booking":{
"date_time":"13/02/2018 11:31"
},
"created":{
"date_time":"13/02/2018 11:29"
},
"approval":{
"date_time":""
},
"booking_confirmation":{
"date_time":""
}
},
"items":[
{
"x":0.0,
"y":372.753333333333,
"id":850,
"row":6,
"dates":{
"confirmation":{
"date_time":""
}
},
"links":{
"new_artwork":"http://realhub.dev/agency/order_items/2292/artworks/new"
},
"column":0,
"removed":false,
"order_id":1665,
"status_id":15,
"booking_error":null,
"order_item_id":2292,
"booking_confirmed":false,
"previous_booking_id":null,
"pending_cancellation":false,
"publication_booking_id":362,
"booking_confirmation_id":null
},
{...},
{...}
],
"links":{
"download_url":"http://realhub.dev/admin/publication_bookings/362/pdf"
},
"notes":null,
"status":{
"id":15,
"title":"Booked"
},
"deleted":false,
"user_id":10,
"status_id":15,
"brand_group":{
"id":2,
"title":"Realhub Test Group",
"brand_id":1,
"full_access":true,
"agency_paginated":false
},
"publication":{
"id":1,
"logo":{
"thumb":null,
"original":null
},
"email":"publications@realhub.com.au",
"title":"Manly Daily (Gloss)",
"options":{
"notes":"true",
"domain_coco":"true",
"page_position":"true",
"product_options":"false",
"booking_api_mode":"test",
"image_icc_profile":"PSO_LWC_Improved_eci.icc",
"inspection_format":"newscorp_quest",
"pdf_compatibility":"1.3",
"strip_image_profile":"true",
"booking_confirmation_id_method":"system"
},
"editions":[
],
"features":{
"ofi":true,
"editorial":true
},
"ftp_host":"xml.realhub.com.au",
"ftp_path":"/public_html",
"ftp_port":"",
"products":[
],
"deadlines":{
"ofi":{
"day":"4",
"time":"14:30",
"weeks_before":"1"
},
"artwork":{
"day":"2",
"time":"15:00",
"weeks_before":"0"
},
"booking":{
"day":"1",
"time":"17:15",
"weeks_before":"0"
},
"editorial":{
"day":"3",
"time":"15:00",
"weeks_before":"0"
}
},
"ofi_email":"ofi@news.com",
"page_rows":12,
"booking_api":"newscorp-xml",
"provider_id":12,
"ftp_password":"QTCFeSLw1",
"ftp_username":"realhub",
"instructions":null,
"page_columns":6,
"artwork_email":"artwork@publication.com.au",
"booking_email":"ken@kengreeff.com",
"day_published":6,
"editorial_email":"editorials@news.com",
"special_deadlines":[
],
"compatible_paginations":[
],
"provider_price_list_id":30,
"publication_identifier":"Manly Daily RE"
},
"page_options":null,
"booking_error":null,
"page_position":null,
"brand_group_id":2,
"publication_id":1,
"available_space":72,
"booking_confirmed":false,
"ftp_transfer_data":{
"code":"226",
"message":"226-File successfully transferred\n226 0.050 seconds (measured here), 1.30 Mbytes per second\n"
},
"layout_template_id":7,
"publication_edition":{
"id":443,
"dates":{
"artwork":{
"date_time":"16/10/2018 15:00"
},
"booking":{
"date_time":"15/10/2018 17:15"
},
"editorial":{
"date_time":"17/10/2018 15:00"
},
"inspection":{
"date_time":"11/10/2018 14:30"
},
"publication":{
"date":"20/10/2018"
}
},
"title":"Sat Oct 20",
"publication_id":1,
"publication_date":"20/10/2018",
"special_deadline":false
},
"publication_product":{
"id":2,
"rows":12,
"bleed":5.0,
"title":"Full Page (M12x6)",
"width":300.0,
"height":300.0,
"columns":6,
"product_code":"FULL",
"publication_id":1
},
"publication_order_id":88,
"publication_edition_id":443,
"publication_product_id":2,
"booking_confirmation_id":"88-001",
"ftp_transfer_successful":true
}
}
Returns
The request body for this event is as per the example to the right.
Webhooks (Internal Only)
The webhooks below are for internal use only, they cannot be utilized by providers. When an enabled event occurs, Realhub will send a POST request to the requested URL with a payload containing the relevant entity.
{
"id": "WEBHOOK_EVENT_ID",
"type": "EVENT_TYPE",
"payload": "JSON_OBJECT"
}
agency.created
The agency.created
event occurs when an agency is created.
Response:
{
"id": "1",
"type": "agency.created",
"payload": {
"id": 1,
"active": true
"address_line_1": "52/49-51 Mitchell Road",
"address_line_2": "",
"address_postcode": "2100",
"address_region": "Brookvale",
"address_state": "NSW",
"brand_id": 1,
"business_number": "80 000 000 000",
"email": "admin@firstrealty.com",
"fax": "02 9999 9999",
"options": null,
"phone": "02 9999 9999",
"short_name": "Seaforth",
"title": "First Realty Brookvale",
"website": "www.firstrealty.com",
}
}
Returns
This endpoint returns a JSON object representing an agency.
agency.updated
The agency.updated
event occurs when an agency is updated.
Response:
{
"id": "1",
"type": "agency.updated",
"payload": {
"id": 1,
"active": true
"address_line_1": "52/49-51 Mitchell Road",
"address_line_2": "",
"address_postcode": "2100",
"address_region": "Brookvale",
"address_state": "NSW",
"brand_id": 1,
"business_number": "80 000 000 000",
"email": "admin@firstrealty.com",
"fax": "02 9999 9999",
"options": null,
"phone": "02 9999 9999",
"short_name": "Seaforth",
"title": "First Realty Brookvale",
"website": "www.firstrealty.com",
}
}
Returns
This endpoint returns a JSON object representing an agency.
brand.created
The brand.created
event occurs when a brand is created.
Response:
{
"id": "1",
"type": "brand.created",
"payload": {
"id": 3,
"address_line_1": "1 Smith St",
"address_line_2": null,
"address_postcode": "2000",
"address_region": "Sydney",
"address_state": "NSW",
"business_name": "Ray White Pty Ltd",
"colour_accent": null,
"colour_gradient_end": null,
"colour_gradient_start": null,
"colour_highlight": null,
"colour_primary": "ffffff",
"colour_secondary": null,
"options": {
"agency_importer_api": null,
"disable_artwork_download": false,
"disable_artwork_upload": false,
"disable_print_quality": false,
"enable_proposals": true,
"proposal_theme": "",
"template_page_fee": 1.0,
"template_page_monthly_allowance": 1
},
"title": "Ray White"
}
}
Returns
This endpoint returns a JSON object representing a brand.
brand.updated
The brand.updated
event occurs when a brand is updated.
Response:
{
"id": "1",
"type": "brand.updated",
"payload": {
"id": 3,
"address_line_1": "1 Smith St",
"address_line_2": null,
"address_postcode": "2000",
"address_region": "Sydney",
"address_state": "NSW",
"business_name": "Ray White Pty Ltd",
"colour_accent": null,
"colour_gradient_end": null,
"colour_gradient_start": null,
"colour_highlight": null,
"colour_primary": "ffffff",
"colour_secondary": null,
"options": {
"agency_importer_api": null,
"disable_artwork_download": false,
"disable_artwork_upload": false,
"disable_print_quality": false,
"enable_proposals": true,
"proposal_theme": "",
"template_page_fee": 1.0,
"template_page_monthly_allowance": 1
},
"title": "Ray White"
}
}
Returns
This endpoint returns a JSON object representing a brand.
campaign.created
The campaign.created
event occurs when a campaign is created.
Response:
{
"id": "1",
"type": "campaign.created",
"payload": {
"id": 147,
"agency_id": 1,
"provider_id": null,
"lot_number": null,
"site_name": null,
"unit_number": "6",
"street_number": "89",
"street_name": "Portal Avenue",
"suburb_id": "724",
"suburb_name": "Newport",
"state_id": "1",
"state_name": "NSW",
"post_code": "2106",
"country_code": "AU",
"country_name": null,
"bedrooms": "4",
"bathrooms": "3",
"carparks": "2",
"carports": "1",
"car_spaces": 2,
"studies": "1",
"living_areas": "2",
"facilities": null,
"land_area": 740,
"land_area_units": "squareMeter",
"land_details": "680sqm Approx",
"campaign_type_id": 1,
"campaign_sale_method_id": 1,
"campaign_category_id": 7,
"campaign_commercial_category_id": null,
"campaign_status_id": 4,
"auction_date": "2016-10-18T12:00:00.000+11:00",
"hide_sold_price": false,
"hide_address": false,
"hide_price": false,
"hidden": false,
"inspection_details": null,
"data": {
"portal": {
"id": 4,
"title": "Realhub"
},
"agent_id": "XAXAXA",
"unique_id": "RH147",
"outgoing_id": "BD38",
"modified_time": "2016-10-18-10:30:54"
},
"council_rates": "$1200 per annum",
"property_url": "www.propertymicrosite.com",
"other_features": null,
"rental_period": null,
"rental_bond": null,
"under_offer": false,
"published": false,
"address": "6/89 Portal Avenue",
"dates": {
"created": {
"date_time": "06/10/2016 15:50"
},
"auction": {
"date_time": "18/10/2016 12:00"
},
"sold": {
"date": "18/10/2016"
}
}
}
}
Returns
This endpoint returns a JSON object representing a campaign.
campaign.updated
The campaign.updated
event occurs when a campaign is updated.
Response:
{
"id": "1",
"type": "campaign.updated",
"payload": {
"id": 147,
"agency_id": 1,
"provider_id": null,
"lot_number": null,
"site_name": null,
"unit_number": "6",
"street_number": "89",
"street_name": "Portal Avenue",
"suburb_id": "724",
"suburb_name": "Newport",
"state_id": "1",
"state_name": "NSW",
"post_code": "2106",
"country_code": "AU",
"country_name": null,
"bedrooms": "4",
"bathrooms": "3",
"carparks": "2",
"carports": "1",
"car_spaces": 2,
"studies": "1",
"living_areas": "2",
"facilities": null,
"land_area": 740,
"land_area_units": "squareMeter",
"land_details": "680sqm Approx",
"campaign_type_id": 1,
"campaign_sale_method_id": 1,
"campaign_category_id": 7,
"campaign_commercial_category_id": null,
"campaign_status_id": 4,
"auction_date": "2016-10-18T12:00:00.000+11:00",
"hide_sold_price": false,
"hide_address": false,
"hide_price": false,
"hidden": false,
"inspection_details": null,
"data": {
"portal": {
"id": 4,
"title": "Realhub"
},
"agent_id": "XAXAXA",
"unique_id": "RH147",
"outgoing_id": "BD38",
"modified_time": "2016-10-18-10:30:54"
},
"council_rates": "$1200 per annum",
"property_url": "www.propertymicrosite.com",
"other_features": null,
"rental_period": null,
"rental_bond": null,
"under_offer": false,
"published": false,
"address": "6/89 Portal Avenue",
"dates": {
"created": {
"date_time": "06/10/2016 15:50"
},
"auction": {
"date_time": "18/10/2016 12:00"
},
"sold": {
"date": "18/10/2016"
}
}
}
}
Returns
This endpoint returns a JSON object representing a campaign.
user.created
The user.created
event occurs when a user is created.
Response:
{
"id": "1",
"type": "user.created",
"payload": {
"id": 12,
"actable": {
"id": 9,
"type": "OfficeAdministrator",
"title": "Office Administrator",
"mobile": "0499 999 999",
"profile": "",
"ebu_admin": false,
"agent_title": "",
"cover_letter": "",
"business_name": "",
"notifications": {
"email": "employee@agency.com"
}
},
"brand_user": false,
"custom_permissions": null,
"deleted": null,
"email": "employee@agency.com",
"enable_custom_permissions": false,
"first_name": "Employee",
"full_name": "Employee Name"
"last_name": "Name",
"role": {
"id": 9,
"title": "Office Administrator"
},
"sign_in_count": 20,
"username": "employee@agency.com",
}
}
Returns
This endpoint returns a JSON object representing a user.
user.updated
The user.updated
event occurs when a user is updated.
Response:
{
"id": "1",
"type": "user.updated",
"payload": {
"id": 12,
"actable": {
"id": 9,
"type": "OfficeAdministrator",
"title": "Office Administrator",
"mobile": "0499 999 999",
"profile": "",
"ebu_admin": false,
"agent_title": "",
"cover_letter": "",
"business_name": "",
"notifications": {
"email": "employee@agency.com"
}
},
"brand_user": false,
"custom_permissions": null,
"deleted": null,
"email": "employee@agency.com",
"enable_custom_permissions": false,
"first_name": "Employee",
"full_name": "Employee Name"
"last_name": "Name",
"role": {
"id": 9,
"title": "Office Administrator"
},
"sign_in_count": 20,
"username": "employee@agency.com",
}
}
Returns
This endpoint returns a JSON object representing a user.
Errors
The Realhub API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request failed or is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The enpoint requested cannot be accessed by this user. |
500 | Internal Server Error -- We had a problem with our server. Please let us know. |