Update chain IDs within subscription
curl --request PATCH \
--url https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"chain_ids": [
"ethereum"
]
}
'import requests
url = "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids"
payload = { "chain_ids": ["ethereum"] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({chain_ids: ['ethereum']})
};
fetch('https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids', 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.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids"
payload := strings.NewReader("{\n \"chain_ids\": [\n \"ethereum\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}subscriptions to transactions
Update chain IDs within subscription
This endpoint updates the list of chain IDs associated with a specific subscription.
NOTE:
- Consider all IDs as abstract strings, without making any assumptions about their format or relying on such assumptions.
- The chain IDs provided will replace the existing chain IDs associated with the subscription.
PATCH
/
v1
/
tx-subscriptions
/
{subscription_id}
/
chain_ids
Update chain IDs within subscription
curl --request PATCH \
--url https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"chain_ids": [
"ethereum"
]
}
'import requests
url = "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids"
payload = { "chain_ids": ["ethereum"] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({chain_ids: ['ethereum']})
};
fetch('https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids', 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.zerion.io/v1/tx-subscriptions/{subscription_id}/chain_ids"
payload := strings.NewReader("{\n \"chain_ids\": [\n \"ethereum\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}Authorizations
Path Parameters
ID of the subscription
Example:
"77e77447-1586-40e8-a75b-467ef939a0b1"
Body
application/json
The list of new chain IDs to replace the current associated chain IDs in the subscription.
A chain ID.
Response
Successfully updated chain IDs
Was this page helpful?