This API allows you to create the subscription in bulk. The limit for create Subscription job is 1 M company Ids.
Endpoint to Create a job
POST: https://api.insideview.com/api/v1/subscription/job
Request
HTTP Headers
| Header Name | Type | Required | Description |
| accessToken | String | Yes |
Valid access token. |
| Accept | String | No | Selects the response's content type. Valid values are application/json and application/xml (default). |
Form Parameters for Updating a Job
| Parameter Name | Type | Required | Description |
| companyIds | String | Yes* |
*If Subscription type is "company" or "companyNews" or "companyFamilyTree", this field is mandatory. Comma-separated list of company IDs to subscribe to For "companyFamilyTree" only Ultimate Parent Company IDs are supported. |
| peopleIds | String | Yes* |
* If Subscription type is "people" this field is mandatory. Comma-separated list of people IDs to subscribe to Maximum list size: 1M IDs |
| name | String | No |
Name of subscription |
| description | String | No |
Description of subscription |
| subscriptionType | String | Yes |
Valid values are "company" or "companyNews" or "people" or "companyFamilyTree" |
| startTime | String | Yes |
String in ISO 8601 format, e.g., "2015-02-01T00:00:00-08:00" |
| frequency | String | Either Frequency or Cron |
"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. For "companyFamilyTree" the minimum frequency is 1w. |
|
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(default), Name, ActiveStatus, Revenue, Address, CompanyStatus, CompanyType, FinancialYearEnd, Employees, EmployeeRange, Fax, Naics, Sic, PrimaryIndsutry, Phone, RevenueRange, Ticker, Websites, companyStatusV2, companyTypeV2, siteTypes, businessStructure, siteCount, siteLocationCount if subscriptionType = people ( case sensitive ) fields = all (Default), active, name, facebookHandle, linkedInHandle, twitterHandle, education, titles, phone, email, salary, description, imageUrl, age, newEmployment, executiveMobileNo 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 | Either Frequency or Cron | cron expression for custom frequency settings using Quartz Scheduler Ex. : 0 0 12 * * ? ( For generating alerts at 12 PM everyday). For more use cases, see the Quartz Documentation. |
| webhook | String | No | Webhook URL to push the alerts |
|
resultWebhook |
String | No | Push the status of submitted job |
|
signingSecret |
String | No | Key to be used for SHA1 encoding of the content in the custom header X-InsideViewAPI-AlertDataSignature (see configuring Webhook for more details). |
Responses
HTTP 200
{
"jobId":"u259755kvimbu9lo3oq1",
"status":"accepted",
"totalProcessed":0,
"type":"notificationSubscriptionCreate"
}
application/xml Example
<BulkCreateSubscriptionResponse>
<jobId>qlagoc98ui99sv8ugkl5</jobId>
<status>accepted</status>
<totalProcessed>0</totalProcessed>
<type>notificationSubscriptionCreate</type>
</BulkCreateSubscriptionResponse>
HTTP Error Codes for creating job
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"
}