[PUT] - Update Subscription

Follow

This API allows you to update the notification subscription. You can update the notification subscription at any point by adding ids, removing ids, changing startTime, frequency, and any other fields. Total of 5K company Ids can be updated per request.

Endpoint

PUT https://api.insideview.com/api/v1/subscription/{subscriptionID}

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)

URI Parameters

Parameter Name Type Required Description
subscriptionId String Yes Subscription Id is necessary to update for that particular subscription.

Form Parameters

Parameter Name Type Required Description
companyIds String No companyIds to subscribe to. Replaces existing company IDs in the subscription.
addCompanyIds String No Comma-separated list of company IDs to add to the subscription
removeCompanyIds String No Comma-separated company IDs to remove
peopleIds String No peopleIds to subscribe to. Replaces existing people IDs in the subscription.
addPeopleIds String No Comma-separated list of people IDs to add to the subscription
removePeopleIds String No Comma-separated people IDs to remove
subscriptionType String Yes type of subscription (For example: "company", "companyNews", "people")
name String No Name of the subscription
description String No Description of the subscription
startTime String No String in ISO 8601 format, e.g., "2015-02-01T00:00:00-8:00"
frequency String No

"7d" (seven days). The "d" in "7d" is critical so that monthly and yearly

For company and people, you can subscribe using the Type if company then ~ pattern is d,w,m,y ( d = day, w = week, m = month and y = year )

For news, you can subscribe using the Type if news then ~ pattern is M,h,d,w ( M = minutes, h=hours, d=day, and w=week )

Validation min 15 minutes is applicable for news only.

field/agents

( if subscription type is company then param is fields, if subscription type is news then param name is agents )

String No

Comma-separated string containing the fields. For example, "Name,SIC,NAICS,companyType"

if subscriptionType = company ( case sensitive )

fields = all, Name, ActiveStatus, Revenue, Address, CompanyStatus, CompanyType, FinancialYearEnd, Employees, EmployeeRange, Fax, Naics, Sic, PrimaryIndsutry, Phone, RevenueRange, Ticker, Websites

if subscriptionType = people ( case sensitive )

fields = all

if subscriptionType = news ( case sensitive)

agents = ALL, 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

cron

String No

cron expression for custom frequency settings using Quartz Scheduler Ex. : 0 0 12 * * ? ( For generating alerts at 12 PM everyday). For more use cases please review http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger

 webhook String No  Webhook URL

Note: Even if all three of the parameters in the body are marked optional, companyIds must be specified—either one or both of addCompanyIds and removeCompanyIds.

The table below covers all valid and invalid cases:

Combination Validity
companyIds/peopleIds Valid (replaces existing list of Ids)
companyIds/peopleIds, addCompanyIds/addPeopleIds Invalid
companyIds/peopleIds, removeCompanyIds/removePeopleIds Invalid
addCompanyIds/addPeopleIds Valid (duplicates of those already subscribed to are ignored)
removeCompanyIds/removePeopleIds Valid (IDs not in the subscription are ignored)
addCompanyIds/addPeopleIds, removeCompanyIds/removePeopleIds Valid (additions are performed before removals)
companyIds/peopleIds, addCompanyIds/addPeopleIds, removeCompanyId/removePeopleIds Invalid

Responses

HTTP 200

This is for a company


{ "subscriptionId": "78oro46b0cnjc1cubi93", "subscriptionType":"company" }

This is for Company News

 
  {
 
     "subscriptionId": "78oro46b0cnjc1cubi93",
     "subscriptionType":"companyNews"
  } 

HTTP Error Codes

If Start time is less than current time

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

If Frequency is invalid

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

If Subscription type is invalid

{
   "errorType": "VALIDATION_ERROR",
   "status": 400,
   "message": "Invalid Subscription type.",
   "diagnosticCode": "dnaat1r17gut7ppq4rcj",
   "errorNumber": "400-1508"
}
Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk