curl --request GET \
--url https://api-dev.narrative.io/data-shops/subscriptions/{subscription_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"amount": {
"currency": "USD",
"value": 123
},
"period": {
"type": "calendar_daily"
}
},
"company_id": 123,
"created_at": "<string>",
"name": "<string>",
"status": "active",
"updated_at": "<string>",
"cancelled_at": "<string>",
"description": "<string>",
"details": {
"type": "data_stream",
"data_rules": {
"column_sets": [
{
"dataset_id": 123,
"fields": [
{
"field": "/id/value",
"exported": true,
"filter": "include_all_values_including_nulls_filter"
}
]
}
],
"attributes": [
{
"attribute_id": 123,
"fields": [
{
"field": "/id/value",
"exported": true,
"filter": "include_all_values_including_nulls_filter"
}
],
"optional": true
}
],
"deduplication": {
"period": "<string>",
"column_references": [
{
"dataset_id": 123,
"column_names": [
"/id/value"
]
}
],
"attribute_references": [
{
"attribute_id": 123,
"column_names": [
"/id/value"
]
}
]
},
"frequency_filter": {
"column_references": [
{
"dataset_id": 123,
"column_names": [
"/id/value"
]
}
],
"attribute_references": [
{
"attribute_id": 123,
"column_names": [
"/id/value"
]
}
],
"min_inclusive": 123,
"max_inclusive": 123
},
"dataset_filter": {
"dataset_id": 123,
"attribute": {
"attribute_id": 123,
"field": "/id/value"
},
"inclusion": "include"
}
},
"data_shop_id": "<string>",
"data_stream_company_id": 123,
"data_stream_content": {
"description": "<string>",
"icon": "<string>",
"sections": [
{}
]
},
"data_stream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data_stream_name": "<string>",
"data_stream_slug": "<string>",
"offer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "data_streams_market",
"licensing": {
"period": "<string>",
"license": {
"name": "<string>"
}
},
"pricing": {
"type": "per_record",
"micro_cents_usd": 123
},
"shops": [
"<string>"
]
}
},
"output": {
"dataset_id": 123
},
"cadence": "once"
}Get a subscription by id.
curl --request GET \
--url https://api-dev.narrative.io/data-shops/subscriptions/{subscription_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"amount": {
"currency": "USD",
"value": 123
},
"period": {
"type": "calendar_daily"
}
},
"company_id": 123,
"created_at": "<string>",
"name": "<string>",
"status": "active",
"updated_at": "<string>",
"cancelled_at": "<string>",
"description": "<string>",
"details": {
"type": "data_stream",
"data_rules": {
"column_sets": [
{
"dataset_id": 123,
"fields": [
{
"field": "/id/value",
"exported": true,
"filter": "include_all_values_including_nulls_filter"
}
]
}
],
"attributes": [
{
"attribute_id": 123,
"fields": [
{
"field": "/id/value",
"exported": true,
"filter": "include_all_values_including_nulls_filter"
}
],
"optional": true
}
],
"deduplication": {
"period": "<string>",
"column_references": [
{
"dataset_id": 123,
"column_names": [
"/id/value"
]
}
],
"attribute_references": [
{
"attribute_id": 123,
"column_names": [
"/id/value"
]
}
]
},
"frequency_filter": {
"column_references": [
{
"dataset_id": 123,
"column_names": [
"/id/value"
]
}
],
"attribute_references": [
{
"attribute_id": 123,
"column_names": [
"/id/value"
]
}
],
"min_inclusive": 123,
"max_inclusive": 123
},
"dataset_filter": {
"dataset_id": 123,
"attribute": {
"attribute_id": 123,
"field": "/id/value"
},
"inclusion": "include"
}
},
"data_shop_id": "<string>",
"data_stream_company_id": 123,
"data_stream_content": {
"description": "<string>",
"icon": "<string>",
"sections": [
{}
]
},
"data_stream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data_stream_name": "<string>",
"data_stream_slug": "<string>",
"offer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "data_streams_market",
"licensing": {
"period": "<string>",
"license": {
"name": "<string>"
}
},
"pricing": {
"type": "per_record",
"micro_cents_usd": 123
},
"shops": [
"<string>"
]
}
},
"output": {
"dataset_id": 123
},
"cadence": "once"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier for a subscription.
OK
Unique identifier for the subscription.
The maximum amount that can be spent as part of a subscription in a given time period. Once the budget has been exhausted in a given time period no more data is transacted until the start of the next one.
E.g. with a budget of $100 USD and a period of calendar_monthly you're guaranteed that you will not be charged more than $100 for your subscription in a given month.
Show child attributes
Unique identifier for the company to which the subscription belongs.
ISO-8601 timestamp indicating when the subscription rule was created.
A human-friendly name for the subscription.
The current state of the subscription.
active: the subscription is active, data is being purchased regularly.cancelled: the subscription has been cancelled, but not deleted.pending: the subscription has been created but is not yet active, not data is being purchased as part of the subscription.kickoff: the subscription is kicking off (immediate run) prior to activation.completed: the subscription as run once as requested and is completed.active, cancelled, pending, archived, kickoff, completed ISO-8601 timestamp indicating when the subscription rule was created.
ISO-8601 timestamp indicating when the subscription was cancelled.
A human-friendly description of the subscription.
Show child attributes
Show child attributes
The cadence at which the subscription will be executed.
once: the subscription will run only once.hourly: the subscription run every hour.daily: the subscription run once per day.weekly: the subscription run once per week.monthly: the subscription run once per month.once, hourly, daily, weekly, monthly Was this page helpful?