Overview
- This is a REST API based primarily on the JSON API standard (http://jsonapi.org/).
- Authorization is similar to the Client ID / Client Secret strategy of OAuth 2.
- All GET requests return collections.
- List operations also include a meta key which contains, at the least, pagination information.
- Show operations typically include more information about the requested resource than their equivalent representation in a list operation.
- Pagination is implemented using the
pagequery string parameter.
Partner Workflow
- We create all the necessary data for the partner (
Companyaccount,RealEstateCompanyandPremierPartnerrecords with credentials). - We pass credentials to the partner via a secure channel.
- Partner controls
Realtoraccounts using the Partner API. - Partner controls
Invitations using the User API below. - Partner requests aggregate stats (revenue, impressions, etc) using both APIs.
Authorization
User API
Use X-AUTH-Token HTTP header.
Partner API
- Headers: Use
X-CLIENT-IDandX-CLIENT-SECRETHTTP headers - Query String Parameters: Use
client_idandclient_secret - Payload: For POST/PUT requests, the payload may contain
client_idandclient_secret
Payload Formats:
Payload bearing API requests should be sent as JSON payloads with headers set properly:
Content-Type: application/json
Accept: application/json
Endpoints
Root: https://rev-insite.com/
User
Categories
-
List
GET /api/v1/categories
Impressions
-
List
GET /api/v1/impressions
Invitations
-
List
GET /api/v1/invitations -
Create
POST /api/v1/invitationsPayload:
{ "invitation": { "email": string, "vendor_id": integer, // optional, should only be specified for existing vendors, although email takes precedence if present "name": string, "company": string, "category": string, // should only be specified for new vendors // optional "phone": string, "business_type": string, "message": string, "price": float // (2 decimal places) } }
Partnerships
-
List
GET /api/v1/partnershipsParams:
provider_directory_idorservice_provider_id
Partner
Accounts
-
List
GET /api/partner/v1/accounts -
Create
POST /api/partner/v1/accountsPayload:
{ "account": { "name": string, "email": string, "company": string, "address": string, "zip": string } } -
Show
GET /api/partner/v1/accounts/:id -
Update
PUT /api/partner/v1/accounts/:idPayload: same as
create