NAV
curl

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://app.realhublive.com/api/v2

The base url for Production API calls is:

https://www.realhubapp.com/api/v2

Note

Each environment has a unique database so will require different API keys to function.

Identification

Please identify yourself 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://www.realhubapp.com/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://www.realhubapp.com/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

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://www.realhubapp.com/api/v2/agencies.json" \
  -H "x-api-token: API_KEY"

Response:

[
  {
    "id": 1,
    "brand_id": 1,
    "title": "First Realty Brookvale",
    "email": "admin@firstrealty.com",
    "phone": "02 9999 9999",
    "website": "www.firstrealty.com",
    "business_number": "80 000 000 000",
    "short_name": "Seaforth",
    "fax": "02 9999 9999",
    "address_line_1": "52/49-51 Mitchell Road",
    "address_line_2": "",
    "address_region": "Brookvale",
    "address_postcode": "2100",
    "address_state": "NSW",
    "options": null,
    "active": true
  },
  {...},
  {...}
]

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.

Search Agencies

Search for an agency using their name or ID.

Request:

curl -X GET "https://www.realhubapp.com/api/v2/agencies/search.json" \
  -H "x-api-token: API_KEY",
  -F "string=first"

Response:

[
  {
    "id": 1,
    "brand_id": 1,
    "title": "First Realty Brookvale",
    "email": "admin@firstrealty.com",
    "phone": "02 9999 9999",
    "website": "www.firstrealty.com",
    "business_number": "80 000 000 000",
    "short_name": "Seaforth",
    "fax": "02 9999 9999",
    "address_line_1": "52/49-51 Mitchell Road",
    "address_line_2": "",
    "address_region": "Brookvale",
    "address_postcode": "2100",
    "address_state": "NSW",
    "options": null,
    "active": true
  },
  {...},
  {...}
]

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.

Campaigns

A campaign object represents an individual property in Realhub. The API allows you to retrieve a list of campaigns.

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

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://www.realhubapp.com/api/v2/campaigns.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.json

Query Parameters

Parameter Default Required Description
agency_id null No Filter the campaigns by Agency.
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://www.realhubapp.com/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",
      "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.
portal_short_code null No Required if using portal_unique_id. Will be used to match the portal short code e.g. agentbox.

Returns

This endpoint returns a JSON 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.

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 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,
      "paid_by": "vendor",
      "payment_method": "EFT",
      "payment_received": true,
      "reference": "Synced from Trust",
      "user_id": null,
      "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://www.realhubapp.com/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,
  "paid_by": "vendor",
  "payment_method": "EFT",
  "payment_received": true,
  "reference": "Synced from Trust",
  "user_id": null,
  "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.
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 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://www.realhubapp.com/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 Quotes

A campaign quote represents a quotation for a proposed marketing campaign. The API allows you to retrieve a list of quotes.

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_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.

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.
email 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 items represents an item in a quote. The API allows you to update some of the item’s values.

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.

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.

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://www.realhubapp.com/api/v2/api/v2/images.json" \
  -H "x-api-token: API_KEY" \
  -F "image_type=photo" \
  -F "campaign_id=172" \
  -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 Yes The ID of the campaign the image will be added to.
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.

Orders

An order object represents the physical order containing order items. The API allows you to retrieve a list of orders.

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://www.realhubapp.com/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.

Unapprove Order

Unapprove an Order using its ID.

Request:

curl -X PUT "https://www.realhubapp.com/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.

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

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://www.realhubapp.com/api/v2/order_items/:order_item_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.

Price Lists

Get price lists

Retrieves a list of price lists

HTTP Request

GET /provider_price_lists.json

Query Parameters

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.

Returns

This endpoint returns a JSON array of provider price list objects.

Request:

curl -X GET "https://www.realhubapp.com/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
        ]
    },
    {...}
]

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://www.realhubapp.com/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://www.realhubapp.com/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://www.realhubapp.com/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.

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://www.realhubapp.com/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

An task object represents a task for physical order item. The API allows you to retrieve a list of tasks.

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://www.realhubapp.com/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).
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.

Complete Task

Complete a Task using its ID.

Request:

curl -X PUT "https://www.realhubapp.com/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.

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://www.realhubapp.com/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 /users

Returns

This endpoint returns a JSON array of available task types in the Realhub system.

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.

Get Users

Retrieves a list of users.

Request:

curl -X GET "https://www.realhubapp.com/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

Returns

This endpoint returns a JSON array of users.

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.

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.

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.