Subscribe to companies
curl --request POST \
--url https://api.noonum.ai/v2/segments/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.noonum.ai/v2/segments/subscriptions"
payload = { "companyIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({companyIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.noonum.ai/v2/segments/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.noonum.ai/v2/segments/subscriptions"
payload := strings.NewReader("{\n \"companyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"results": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"symbol": "<string>",
"subscribedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"companyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "<string>"
}{
"error": "<string>",
"available": 123,
"requested": 123
}Segments
Subscribe to companies
Subscribes you to each company for 365 days. A subscription cannot be cancelled or moved to another company. A company you are already subscribed to is left as it is and does not count again. The request is all or nothing: when the new subscriptions do not fit under your plan’s limit, none is made. Take the company IDs from /helper/companies/search.
POST
/
segments
/
subscriptions
Subscribe to companies
curl --request POST \
--url https://api.noonum.ai/v2/segments/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.noonum.ai/v2/segments/subscriptions"
payload = { "companyIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({companyIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.noonum.ai/v2/segments/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.noonum.ai/v2/segments/subscriptions"
payload := strings.NewReader("{\n \"companyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"results": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"symbol": "<string>",
"subscribedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"companyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "<string>"
}{
"error": "<string>",
"available": 123,
"requested": 123
}