[POST] - Create Subscription

Follow

This API allows you to create subscriptions for Company, People and News. Use this API to receive notification for each change to the subscribed company, people and related news items.

Endpoint

POST https://api.insideview.com/api/v1/subscription

Request

HTTP Headers

Header Name Type Required Description
accessToken String Yes Valid access token.
See Authentication and Authorization Overview for more details.
Accept String No Selects the response's content type.  
Valid values are application/json and application/xml (default)

Form Parameters

Parameter Name Type Required Description
subscriptionType String Yes Valid values are "company" or "companyNews" or "people"
name String No Name of the subscription
description String No  Description of the subscription
frequency String Yes Frequency at which you want to be notified.  The frequency can be expressed in (exclusively): month (d), weeks (w), days (d), hours (h) or minutes (M)
Ex.: 7d = seven days, 3w = 3 weeks
Note: for subscriptions of type company and people, the minimal frequency is 1 day.  For subscriptions of type companyNews, the minimal frequency is 15 minutes.
startTime String Yes Date and time of the first notification.  Subsequent notifications will be triggered based on the frequency.
String in ISO 8601 format, e.g., "2015-02-01T00:00:00-08:00"
companyIds String Yes* *If Subscription type is "company" or "companyNews", this field is mandatory. Comma-separated list of company IDs to subscribe to
Maximum list size: 5,000 IDs
peopleIds String Yes* * If Subscription type is "people" this field is mandatory. Comma-separated list of people IDs to subscribe to Maximum list size: 5,000 IDs
fields String No

Comma-separated list of fields. 

Add the fields you are interested in and for which a notification should be triggered in case of value change.

subscriptionType = "company"
Valid values: 

all(default), Name, ActiveStatus, Revenue, Address, CompanyStatus, CompanyType, FinancialYearEnd, Employees, EmployeeRange, Fax, Naics, Sic, PrimaryIndsutry, Phone, RevenueRange, Ticker, Websites

 

subscriptionType = "people"

Valid values: all (Default) 

agents  String  No Comma-separated list of news agents.
Add the agents you are interested in and for which a notification should be triggered in case of matching company news.
Valid values: ALL (Default), LEADERSHIP_CHANGES, NEW_OFFERINGS, PARTNERSHIPS, COMPANY_PRESENTATION, LITIGATION, COMPLIANCE, RESEARCH_DEVELOPMENT, DATA_SECURITY, FUNDING_DEVELOPMENTS, BANKRUPTCY_RESTRUCTURING, REALESTATE_DEALS, REALESTATE_CONSTRUCTION, CORPORATE_CHALLENGES, ACQUISITIONS, EXPANDING_OPERATIONS, COST_CUTTING, OUTPERFORMING, UNDERPERFORMING
webhook String No Webhook URL. For example: https://my.domain.com/ivwebhook
cron String No Cron expression for custom frequency settings
See http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger for the syntax details.
Ex.: 0 0 12 * * ? ( For generating alerts at 12 PM everyday).

Responses

HTTP 200

Returns either a JSON or XML data structure depending on the request Accept header. 

Company

    
    {
         "subscriptionId": "6qbgrtc5f7jo8smnjel6",
         "subscriptionType":"company"
    }

Company News

     {
          "subscriptionId": "6qbgrtc5f7jo8smnjel6",
          "subscriptionType":"companyNews"
     }

People

    
    {
         "subscriptionId": "6qbgrtc5f7jo8smnjel6",
         "subscriptionType":"people"
    }

HTTP Error Codes

If the start date is less than the current date

{
       "errorType": "VALIDATION_ERROR",
       "status": 400,
        "message": "Invalid start time, it must be greater than the current time",
        "diagnosticCode": "fltln8qr0ta3h7vul3ng",
        "errorNumber": "400-1504"
}

If a frequency is not provided

{
        "errorType": "VALIDATION_ERROR",
         "status": 400,
         "message": "Invalid frequency",
         "diagnosticCode": "l7b8alnku4iqfnrqugk",
         "errorNumber": "400-1503"
}

If  a subscription type is not provided

{
         "errorType": "VALIDATION_ERROR",
         "status": 400,
         "message": "Invalid Subscription type.",
         "diagnosticCode": "dnaat1r17gut7ppq4rcj",
         "errorNumber": "400-1508"
}

If CompanyId is not provided

{
         "errorType": "VALIDATION_ERROR",
         "status": 400,
         "message": "Invalid Company ID",
         "diagnosticCode": "2iof9vopm38ddsm9eivo",
         "errorNumber": "400-1501"
}
Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk