Back to top

Rallio Public API

Accessible Users

Your OAuth2 application credentials allow you to generate access tokens for a subset of Rallio users, either a fixed list of users or for an entire domain of email addresses (e.g., you may be able to generate access tokens for all Rallio users with email addresses @yourcompany.com).

Index

Index
GET/accessible_users

This endpoint allows you to fetch the list of users for which you may generate access tokens.

Example URI

GET https://app.rallio.com/api/v1/accessible_users
Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Response  200
HideShow
Body
{
  "users": [
    {
      "id": 100,
      "email": "bob@yourcompany.com",
      "first_name": "Bob",
      "last_name": "Anderson"
    }
  ]
}

Franchisors

Your OAuth2 application credentials grant you access to a set of Franchisors in Rallio. (A Franchisor is a collection of Accounts.)

In particular, when authorized as an app, you are permitted to do several things:

  1. Create a new Franchisor and update its name if needed.

  2. Create an Account in any Franchisor you may access.

  3. Grant a Rallio User you have created to administer a Franchisor you may access.

  4. Grant a Rallio User you have created to administer an Account inside any Franchisor you may access.

Index

Index
GET/franchisors

This endpoint returns the Franchisors that your app is allowed to access.

Example URI

GET https://app.rallio.com/api/v1/franchisors
Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Response  200
HideShow
Body
{
  "franchisors": [
    {
      "id": 100,
      "name": "Awesome Haircuts"
    }
  ]
}

Create
POST/franchisors

This endpoint allows you to create a new Franchisor.

Note: This endpoint is authenticated using your application ID and Secret.

Example URI

POST https://app.rallio.com/api/v1/franchisors
Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Body
{
  "franchisor": {
    "name": "BestCuts Hair Salons"
  }
}
Schema
{
  "type": "object",
  "properties": {
    "franchisor": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
  "franchisor": {
    "id": 100,
    "name": "BestCuts Hair Salons"
  }
}
Response  400
HideShow
Body
{
  "error": "Validation failed: Name can't be blank"
}

Update

Update
PUT/franchisors/{id}

Use this endpoint to update the name of an existing franchisor owned by your app.

Example URI

PUT https://app.rallio.com/api/v1/franchisors/123
URI Parameters
HideShow
id
string (required) Example: 123

The Franchisor ID.

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Body
{
  "franchisor": {
    "name": "SuperDuperCuts"
  }
}
Schema
{
  "type": "object",
  "properties": {
    "franchisor": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
  "franchisor": {
    "id": 100,
    "name": "SuperDuperCuts"
  }
}
Response  400
HideShow
Body
{
  "error": "Validation failed: Name can't be blank"
}

Accounts

Index

Index
GET/franchisors/{franchisor_id}/accounts

This endpoint returns the Accounts belonging to the specified Franchisor.

Note 1: You may only list Accounts for Franchisors owned by your application.

Note 2: This endpoint is authenticated using your application ID and Secret.

Example URI

GET https://app.rallio.com/api/v1/franchisors/100/accounts
URI Parameters
HideShow
franchisor_id
string (required) Example: 100

The franchisor’s ID

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Response  200
HideShow
Body
{
  "accounts": [
    {
      "id": 100,
      "name": "Awesome Haircuts New York City",
      "short_name": "AH-NYC",
      "url": "https://awesomehaircuts.fake",
      "city": "New York",
      "country_code": "US",
      "time_zone": "Eastern Time (US & Canada)"
    }
  ]
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified franchisor_id"
}

Create
POST/franchisors/{franchisor_id}/accounts

This endpoint allows you to create an Account belonging to a Franchisor your application owns.

Note 1: You may only create Accounts for Franchisors owned by your application.

Note 2: This endpoint is authenticated using your application ID and Secret.

Example URI

POST https://app.rallio.com/api/v1/franchisors/100/accounts
URI Parameters
HideShow
franchisor_id
string (required) Example: 100

The franchisor’s ID

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Body
{
  "account": {
    "name": "Awesome Haircuts New York City",
    "short_name": "AH-NYC",
    "url": "https://awesomehaircuts.fake",
    "city": "New York",
    "country_code": "US",
    "time_zone": "Eastern Time (US & Canada)"
  }
}
Schema
{
  "type": "object",
  "properties": {
    "account": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "short_name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "time_zone": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "short_name",
        "url",
        "city",
        "country_code"
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
  "account": {
    "id": 100,
    "name": "Awesome Haircuts New York City",
    "short_name": "AH-NYC",
    "url": "https://awesomehaircuts.fake",
    "city": "New York",
    "country_code": "US",
    "time_zone": "Eastern Time (US & Canada)"
  }
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified franchisor_id"
}

Users

You may create new Rallio Users using your OAuth2 Application credentials.

Create

Create
POST/users

This endpoint allows you to create a new Rallio user.

Note 1: if a user with the given email already exists in Rallio, but was not created by your OAuth2 application, then this request will fail.

Note 2: if a user with the given email already exists in Rallio, and was created by your OAuth2 application, then this request will succeed and will return the existing user.

Example URI

POST https://app.rallio.com/api/v1/users
Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Body
{
  "user": {
    "email": "mark@rallio.com",
    "first_name": "Mark",
    "last_name": "Przepiora"
  }
}
Schema
{
  "type": "object",
  "properties": {
    "user": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        }
      },
      "required": [
        "email",
        "first_name",
        "last_name"
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
  "email": {
    "token": "15ad86b2ede6",
    "expires_at": "2015-04-16T23:56:30.321Z",
    "url": "https://app.rallio.com/api/internal/sign_on_tokens/15ad86b2ede6"
  }
}
Response  400
HideShow
Body
{
  "error": "This email address already has a Rallio login but your application does not have access to it"
}
Response  400
HideShow
Body
{
  "error": "param is missing or the value is empty: email"
}

Single Sign-on Tokens

You may use your OAuth2 application credentials to generate a single sign-on (SSO) URL for any of the users you have access to. (See the Accessible Users documentation above.)

Create

Create
POST/users/{user_id}/sign_on_tokens

This endpoint creates a new single-use sign on URL for the given user.

The returned sign-on token is valid only for 5 minutes (in reality you should only need it for a few seconds), and can only be used once. In case you need this information, the expires_at field will tell you until what time you can use it.

You should then redirect the user to the URL in the url field, which will log them into the system. If a user attempts to use this token a second time, or after it is expired, this will result in a 404 error.

Example URI

POST https://app.rallio.com/api/v1/users/100/sign_on_tokens
URI Parameters
HideShow
user_id
string (required) Example: 100

The user ID

connect_account_id
string (optional) Example: 123

If specified, then instead of forwarding the user to their default Rallio dashboard upon login, the user will instead be sent to their Social Profiles connection page for the specified Account ID, which will allow them to connect their Facebook, Yelp and Google My Business accounts.

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Response  200
HideShow
Body
{
  "sign_on_token": {
    "token": "15ad86b2ede6",
    "expires_at": "2015-04-16T23:56:30.321Z",
    "url": "https://app.rallio.com/api/internal/sign_on_tokens/15ad86b2ede6"
  }
}

Access Tokens

You may use your OAuth2 application credentials to generate an OAuth2 access token for any of the users you have access to. This access token is used to authorize all API endpoints below this one.

Create

Create
POST/users/{user_id}/access_token

This endpoint generates a new OAuth2 access token for the given user.

Example URI

POST https://app.rallio.com/api/v1/users/100/access_token
URI Parameters
HideShow
user_id
string (required) Example: 100

The user ID

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Response  200
HideShow
Body
{
  "access_token": "4a25dd89e50bd0a0db1eeae65864fe6b",
  "user_id": 100,
  "expires_at": null,
  "scopes": "user_info basic_access"
}

Destroy

Destroy
DELETE/access_token

This endpoint invalidates an access token.

Example URI

DELETE https://app.rallio.com/api/v1/access_token
Request
HideShow
Headers
Authorization: Bearer 4a25dd89e50bd0a0db1eeae65864fe6b
Response  200
HideShow
Body
null

Franchisor Ownerships

You may give the Rallio Users you have created administrative access to the Franchisors you control.

You may also list the Franchisors that a User owns.

Create

Create
POST/users/{user_id}/franchisor_ownerships

This endpoint grants the given User ownership over a Franchisor.

Note 1: This endpoint is authenticated using your OAuth2 Application credentials.

Note 2: You may only grant Users you own access to Franchisors you own.

Example URI

POST https://app.rallio.com/api/v1/users/100/franchisor_ownerships
URI Parameters
HideShow
user_id
string (required) Example: 100

The user’s ID

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Body
{
  "franchisor_id": "100"
}
Schema
{
  "type": "object",
  "properties": {
    "franchisor_id": {
      "type": "string"
    }
  },
  "required": [
    "franchisor_id"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
  "franchisor_ownership": {
    "user_id": 100,
    "franchisor_id": 100,
    "franchisor_name": "Awesome Haircuts"
  }
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified user_id"
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified franchisor_id"
}

Destroy

Destroy
DELETE/users/{user_id}/franchisor_ownerships/{franchisor_id}

This endpoint removes the given User’s ownership of a Franchisor.

Note 1: This endpoint is authenticated using your OAuth2 Application credentials.

Note 2: You may only remove Users you own from Franchisors you own.

Example URI

DELETE https://app.rallio.com/api/v1/users/100/franchisor_ownerships/100
URI Parameters
HideShow
user_id
string (required) Example: 100

The user’s ID

franchisor_id
string (required) Example: 100

The franchisor’s ID

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Response  200
HideShow
Body
null
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified user_id"
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified franchisor_id"
}

Index

Index
GET/franchisor_ownerships

This endpoint lists the Franchisors that a User owns.

Note: This endpoint is authenticated using a user Access Token.

Example URI

GET https://app.rallio.com/api/v1/franchisor_ownerships
Request
HideShow
Headers
Authorization: Bearer 4a25dd89e50bd0a0db1eeae65864fe6b
Response  200
HideShow
Body
{
  "franchisor_ownerships": [
    {
      "user_id": 100,
      "franchisor_id": 100,
      "franchisor_name": "Awesome Haircuts"
    }
  ]
}

Account Ownerships

You may give the Rallio Users you have created administrative access to the Accounts you control.

You may also list the Accounts that a User owns.

Create

Create
POST/users/{user_id}/account_ownerships

This endpoint grants the given User ownership over a Account.

Note 1: This endpoint is authenticated using your OAuth2 Application credentials.

Note 2: You may only grant Users you own access to Accounts belonging to Franchisors you own.

Example URI

POST https://app.rallio.com/api/v1/users/100/account_ownerships
URI Parameters
HideShow
user_id
string (required) Example: 100

The user’s ID

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Body
{
  "account_id": "200"
}
Schema
{
  "type": "object",
  "properties": {
    "account_id": {
      "type": "string"
    }
  },
  "required": [
    "account_id"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
  "account_ownership": {
    "user_id": 100,
    "account_id": 200,
    "account_name": "Awesome Haircuts New York City",
    "account_franchisor_id": 300,
    "account_franchisor_name": "Awesome Haircuts"
  }
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified user_id"
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified account_id"
}

Destroy

Destroy
DELETE/users/{user_id}/account_ownerships/{account_id}

This endpoint removes the given User’s ownership of a Account.

Note 1: This endpoint is authenticated using your OAuth2 Application credentials.

Note 2: You may only remove Users you own from Accounts belonging to Franchisors you own.

Example URI

DELETE https://app.rallio.com/api/v1/users/100/account_ownerships/100
URI Parameters
HideShow
user_id
string (required) Example: 100

The user’s ID

account_id
string (required) Example: 100

The account’s ID

Request
HideShow
Headers
X-Application-ID: fcd832627fd71cf1476f8d1abfae79902f1a120690a1b4d2e0eba84988098f5b
X-Application-Secret: 5125eedbe5b00b7e3b7d907fbf6f543cb5de3d7d8dbecf0e9d6edecc8f9170dc
Response  200
HideShow
Body
null
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified user_id"
}
Response  400
HideShow
Body
{
  "error": "You do not have access to the specified account_id"
}

Index

Index
GET/account_ownerships

This endpoint lists the Accounts that a User owns.

Note: This endpoint is authenticated using a user Access Token.

Example URI

GET https://app.rallio.com/api/v1/account_ownerships
Request
HideShow
Headers
Authorization: Bearer 4a25dd89e50bd0a0db1eeae65864fe6b
Response  200
HideShow
Body
{
  "account_ownerships": [
    {
      "user_id": 100,
      "account_id": 200,
      "account_name": "Awesome Haircuts New York City",
      "account_franchisor_id": 300,
      "account_franchisor_name": "Awesome Haircuts"
    }
  ]
}

Dashboard

Show

Show
GET/dashboard{?account_id}

This endpoint returns detailed information about the current user, and importantly, the Franchisors and Accounts that they may access.

This intention of endpoint is to give the application enough information to let the user start using their Rallio data.

Example URI

GET https://app.rallio.com/api/v1/dashboard?account_id=100
URI Parameters
HideShow
account_id
string (optional) Example: 100

Return only accounts by the given ID.

Request
HideShow
Headers
Authorization: Bearer 4a25dd89e50bd0a0db1eeae65864fe6b
Response  200
HideShow
Body
{
  "me": {
    "id": 2,
    "email": "user-2@example.com",
    "name": "John Q User"
  },
  "accounts": [
    {
      "id": 100,
      "name": "Rally-O Tires NYC",
      "franchisor_id": 200,
      "franchisor_name": "Rally-O Tires",
      "facebook_connected": true,
      "yelp_connected": false,
      "google_connected": false
    }
  ],
  "franchisors": [
    {
      "id": 200,
      "name": "Rally-O Tires"
    }
  ]
}

Reviews

Index

Index
GET/reviews

This endpoint returns the reviews that a user can access. Without any filtering options specified, this endpoint will return all reviews that a user can access, no matter the account or franchisor. Results are paginated, with 10 reviews per page.

Reviews are always returned in reverse chronological order, but you may filter the results, e.g. only to return 1-star reviews.

Some notes:

  • location_name vs account_name: The location_name field gives you the name of, e.g., the Facebook page that received the review. On the other hand, the account_name field gives you the name of the Rallio account where the review appears.

  • The comments array: for Yelp, this will always be empty (since the Yelp API does not provide a business response if present). For Google, this array will either be empty or contain a single comment (since Google only allows the business to provide a reply to a review). For Facebook, this array may contain many comments, since reviews can be discussed on Facebook just like posts can.

  • The can_reply field: This boolean tells you whether it is possible to respond to the given review using the Reply API below.

  • The user_image field: Please note that this field may be null if the user who wrote the review does not have an avatar. You should handle this case gracefully.

  • The notes field: This is an internal text field you can read and update to be used internally by the account or franchisor owner(s) to record important information about the review. For example, if the account owner has reached out to the reviewer, this could note what was done to resolve the issue.

  • The handled and completed fields: These are internal booleans you can read and set, to indicate whether someone at your company has reached out to the customer about the review, and whether the matter is now closed, respectively.

Example URI

GET https://app.rallio.com/api/v1/reviews
URI Parameters
HideShow
page
string (optional) Example: 2

Return the given page of results

account_id
string (optional) Example: 100

Fetch reviews for the given account ID only. You may specify multiple account IDs separated by commas here.

franchisor_id
string (optional) Example: 200

Fetch reviews for the given franchisor ID only.

network
string (optional) Example: yelp

Return only reviews from the given platform. Valid values: yelp, facebook, google_places.

end_date
string (optional) Example: 2017-03-16T17:10:19Z

Return only reviews posted earlier than the given ISO 8601 timestamp.

start_date
string (optional) Example: 2017-03-09T17:10:19Z

Return only reviews posted later than the given ISO 8601 timestamp.

rating
string (optional) Example: 3

Return only reviews with the given star rating. Valid values: 1, 2, 3, 4, 5. A range of ratings may also be specified by specifying this query param in the [] array notation. Example: rating[]=1&rating[]=2 would search for reviews with a rating of either 1 or 2.

has_reply
string (optional) Example: 1

When 1, return only reviews with at least one reply. When 0, return only reviews with no replies.

Request
HideShow
Headers
Authorization: Bearer 4a25dd89e50bd0a0db1eeae65864fe6b
Response  200
HideShow
Body
{
      "meta": {
        "page": 1,
        "pages_count": 3
      },
      "reviews" : [
        {
          "id" : 64,
          "account_id" : 7,
          "account_name" : "Rally-O Tires New York",
          "network" : "facebook",
          "posted_at" : "2014-07-14T16:55:51.000Z",
          "user_name" : "Andy Bobson",
          "user_image": "https://graph.facebook.com/100009872044695/picture",
          "liked" : false,
          "rating" : 5,
          "message" : "This is my favourite tire store",
          "comments" : [
            {
              "user_name": "Rally-O Tires New York",
              "user_image": "https://graph.facebook.com/113397275345614/picture",
              "message": "Thanks for the 5 star review!",
              "created_at": "2017-02-22T00:49:53.000+00:00",
            }
          ],
          "url": "https://www.facebook.com/123123123",
          "can_reply" : true,
          "location_name": "Rally-O Tires New York",
          "location_image_url": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/16266055_1428821143803214_8378119243787669723_n.jpg?oh=3268e6e30474a0aa488cfd896a6d6c06&oe=59357742",
          "notes": "some internal notes about this review",
          "handled": true,
          "completed": false
        },
        {
          "id" : 65,
          "account_id" : 7,
          "account_name" : "Rally-O Tires New York",
          "network" : "yelp",
          "posted_at" : "2014-07-14T16:55:51.000Z",
          "user_name" : "Andy Bobson",
          "user_image": null,
          "liked" : false,
          "rating" : 1,
          "message" : "This place is the worst",
          "comments" : [],
          "url": "https://yelp.com/fake_url",
          "can_reply" : false,
          "location_name": "Rally-O Tires New York",
          "location_image_url": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/16266055_1428821143803214_8378119243787669723_n.jpg?oh=3268e6e30474a0aa488cfd896a6d6c06&oe=59357742",
          "notes": "some internal notes about this review",
          "handled": false,
          "completed": false
        },
        {
          "id" : 66,
          "account_id" : 7,
          "account_name" : "Rally-O Tires New York",
          "network" : "google_places",
          "posted_at" : "2014-07-14T16:55:51.000Z",
          "user_name" : "Andy Bobson",
          "user_image": null,
          "liked" : false,
          "rating" : 1,
          "message" : "This place is the worst",
          "comments" : [
            {
              "user_name": "Rally-O Tires New York",
              "user_image": "https://graph.facebook.com/113397275345614/picture",
              "message": "Thanks for the 5 star review!",
              "created_at": "2017-02-22T00:49:53.000+00:00",
            }
          ],
          "url": "https://plus.google.com/106439850000634313879",
          "can_reply" : true,
          "location_name": "Rally-O Tires New York",
          "location_image_url": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/16266055_1428821143803214_8378119243787669723_n.jpg?oh=3268e6e30474a0aa488cfd896a6d6c06&oe=59357742",
          "notes": "",
          "handled": false,
          "completed": false
        }
      ]
    }

Reply to a Review
POST/reviews

Reply to a review. Please note that not all reviews can be replied to. You should check the can_reply field on the review record to make sure this is possible.

Example URI

POST https://app.rallio.com/api/v1/reviews
URI Parameters
HideShow
id
string (required) Example: 100

The review ID

Request
HideShow
Headers
Authorization: Bearer 4a25dd89e50bd0a0db1eeae65864fe6b
Body
{
  "message": "Thanks for the review!"
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
      "review" : {
        "id" : 100,
        "account_id" : 7,
        "account_name" : "Rally-O Tires New York",
        "network" : "facebook",
        "posted_at" : "2014-07-14T16:55:51.000Z",
        "user_name" : "Andy Bobson",
        "user_image": "https://graph.facebook.com/100009872044695/picture",
        "liked" : false,
        "rating" : 5,
        "message" : "This is my favourite tire store",
        "comments" : [
          {
            "user_name": "Rally-O Tires New York",
            "user_image": "https://graph.facebook.com/113397275345614/picture",
            "message": "Thanks for the review!",
            "created_at": "2017-02-22T00:49:53.000+00:00",
          }
        ],
        "url": "https://www.facebook.com/123123123",
        "can_reply" : true,
        "location_name": "Rally-O Tires New York",
        "location_image_url": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/16266055_1428821143803214_8378119243787669723_n.jpg?oh=3268e6e30474a0aa488cfd896a6d6c06&oe=59357742",
      }
    }
Response  400
HideShow
Body
{
  "error": "You cannot reply to this review"
}
Response  400
HideShow
Body
{
  "error": "An error occurred submitting this review to Facebook"
}

Update a Review

Update a Review
PUT/reviews/{id}

Use this endpoint to update a limited number of fields in the a Review record.

Example URI

PUT https://app.rallio.com/api/v1/reviews/123
URI Parameters
HideShow
id
string (required) Example: 123

The Review ID.

Request
HideShow
Body
{
  "review": {
    "notes": "some internal notes about the review",
    "handled": true,
    "completed": false
  }
}
Schema
{
  "type": "object",
  "properties": {
    "review": {
      "type": "object",
      "properties": {
        "notes": {
          "type": "string"
        },
        "handled": {
          "type": "boolean",
          "description": "Whether the customer has been contacted."
        },
        "completed": {
          "type": "boolean",
          "description": "Whether the review is now \"closed\""
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Body
{
  "review": {
    "id": 64,
    "account_id": 7,
    "account_name": "Rally-O Tires New York",
    "network": "facebook",
    "posted_at": "2014-07-14T16:55:51.000Z",
    "user_name": "Andy Bobson",
    "user_image": "https://graph.facebook.com/100009872044695/picture",
    "liked": false,
    "rating": 5,
    "message": "This is my favourite tire store",
    "comments": [
      {
        "user_name": "Rally-O Tires New York",
        "user_image": "https://graph.facebook.com/113397275345614/picture",
        "message": "Thanks for the 5 star review!",
        "created_at": "2017-02-22T00:49:53.000+00:00"
      }
    ],
    "url": "https://www.facebook.com/123123123",
    "can_reply": true,
    "location_name": "Rally-O Tires New York",
    "location_image_url": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/16266055_1428821143803214_8378119243787669723_n.jpg?oh=3268e6e30474a0aa488cfd896a6d6c06&oe=59357742",
    "notes": "some internal notes about this review",
    "handled": true,
    "completed": false
  }
}

CSV

CSV
GET/reviews.csv

This endpoint takes the same query parameters as the GET /v1/reviews endpoint but returns the matching reviews as a CSV file.

Example URI

GET https://app.rallio.com/api/v1/reviews.csv
Response  200
HideShow
Body
Review ID,Rallio Account ID,Rallio Account Name,Platform,Posted At,Posted By,Rating,Message,Link,Page Name
1,1,SocialWise,google_places,2014-07-14 16:55:51 UTC,Mark P.,5,This is my favourite place,https://plus.google.com/118437174826481648947,Verizon Wireless

Generated by aglio on 17 Aug 2017