curl --request GET \
--url https://api-dev.narrative.io/data-shops/subscriptions \
--header 'Authorization: Bearer <token>'{
"records": [
[
{
"id": "f82ac0d3-9391-45f5-b524-4905c383fec7",
"cancelled_at": "2022-08-10T12:00:00Z",
"company_id": 123,
"created_at": "2021-12-10T00:12:23Z",
"budget": {
"amount": {
"value": 100.23,
"currency": "USD"
},
"period": {
"type": "calendar_monthly"
}
},
"details": {
"type": "marketplace",
"company_constraint": {
"type": "inclusion",
"company_ids": [
1,
2,
3
]
},
"data_rules": {
"attributes": [
{
"attribute_id": 321,
"fields": [
{
"field": "foo",
"filter": {
"recency": "P30D",
"from": {
"type": "inclusive",
"value": "2021-12-10 12:00:00"
}
},
"exported": false
},
{
"field": "bar",
"exported": true
}
],
"optional": true
},
{
"attribute_id": 123,
"fields": [
{
"field": "baz",
"exported": false
},
{
"field": "qux",
"exported": true
}
],
"optional": false
}
],
"deduplication": {
"period": "P180D",
"attribute_references": [
{
"attribute_id": 321,
"column_names": [
"baz"
]
}
]
},
"frequency_filter": {
"attribute_references": [
{
"attribute_id": 321,
"column_names": [
"baz"
]
}
],
"min_inclusive": 2,
"max_inclusive": 5
}
},
"pricing": {
"micro_cents_usd": 123321
}
},
"description": "subscriptiondescription",
"name": "subscription name",
"output": {
"dataset_id": 42
},
"cadence": "daily",
"status": "cancelled",
"updated_at": "2021-12-20T00:00:00Z"
},
{
"id": "9b3fd441-9add-41d8-b58a-a6ce6b0c9972",
"company_id": 123,
"created_at": "2021-12-10T00:12:23Z",
"budget": {
"amount": {
"value": 100.23,
"currency": "USD"
},
"period": {
"type": "calendar_monthly"
}
},
"details": {
"type": "data_stream",
"data_rules": {
"column_sets": [
{
"dataset_id": 123,
"fields": [
{
"field": "col1",
"exported": true
},
{
"field": "col2",
"filter": "include_all_values_including_nulls_filter",
"exported": true
},
{
"field": "col3",
"filter": "include_only_if_not_null_filter",
"exported": true
},
{
"field": "col4",
"filter": {
"type": "include",
"list": [
"this",
"that",
"that too",
"some more"
]
},
"exported": true
},
{
"field": "col5",
"filter": {
"type": "exclude",
"list": [
"this",
"that",
"that too",
"some more"
]
},
"exported": true
},
{
"field": "col6",
"filter": {
"min": {
"type": "inclusive",
"value": "-100"
},
"max": {
"type": "inclusive",
"value": "100"
}
},
"exported": true
},
{
"field": "col6",
"filter": {
"max": {
"type": "exclusive",
"value": "timestamp01"
}
},
"exported": false
},
{
"field": "col7",
"filter": {
"recency": "P30D",
"from": {
"type": "inclusive",
"value": "2021-12-10 12:00:00"
}
},
"exported": false
},
{
"field": "col8",
"filter": {
"expressions": [
"col8 > 10"
]
},
"exported": true
}
]
}
],
"deduplication": {
"period": "P90D",
"column_references": [
{
"dataset_id": 123,
"column_names": [
"col2",
"col4"
]
}
]
},
"frequency_filter": {
"column_references": [
{
"dataset_id": 123,
"column_names": [
"col2"
]
}
],
"min_inclusive": 2,
"max_inclusive": 5
}
},
"data_stream_company_id": 3742,
"data_stream_content": {
"description": "description is required"
},
"data_stream_id": "d00b2d0d-6d42-4e56-9116-c7dd8ccf638f",
"data_stream_name": "the data stream name",
"data_stream_slug": "a_data_product",
"offer": {
"id": "3f7c2ef3-17cc-4d37-ba1c-74bb2a287e13",
"channel": "data_streams_market",
"licensing": {
"period": "P90D",
"license": {
"name": "narrative opendata license"
}
},
"pricing": {
"type": "per_record",
"micro_cents_usd": 70000
}
}
},
"description": "subscription description",
"name": "subscription name",
"cadence": "weekly",
"status": "active",
"updated_at": "2021-12-20T00:00:00Z"
}
]
]
}Return all subscriptions belonging to the authenticated company.
curl --request GET \
--url https://api-dev.narrative.io/data-shops/subscriptions \
--header 'Authorization: Bearer <token>'{
"records": [
[
{
"id": "f82ac0d3-9391-45f5-b524-4905c383fec7",
"cancelled_at": "2022-08-10T12:00:00Z",
"company_id": 123,
"created_at": "2021-12-10T00:12:23Z",
"budget": {
"amount": {
"value": 100.23,
"currency": "USD"
},
"period": {
"type": "calendar_monthly"
}
},
"details": {
"type": "marketplace",
"company_constraint": {
"type": "inclusion",
"company_ids": [
1,
2,
3
]
},
"data_rules": {
"attributes": [
{
"attribute_id": 321,
"fields": [
{
"field": "foo",
"filter": {
"recency": "P30D",
"from": {
"type": "inclusive",
"value": "2021-12-10 12:00:00"
}
},
"exported": false
},
{
"field": "bar",
"exported": true
}
],
"optional": true
},
{
"attribute_id": 123,
"fields": [
{
"field": "baz",
"exported": false
},
{
"field": "qux",
"exported": true
}
],
"optional": false
}
],
"deduplication": {
"period": "P180D",
"attribute_references": [
{
"attribute_id": 321,
"column_names": [
"baz"
]
}
]
},
"frequency_filter": {
"attribute_references": [
{
"attribute_id": 321,
"column_names": [
"baz"
]
}
],
"min_inclusive": 2,
"max_inclusive": 5
}
},
"pricing": {
"micro_cents_usd": 123321
}
},
"description": "subscriptiondescription",
"name": "subscription name",
"output": {
"dataset_id": 42
},
"cadence": "daily",
"status": "cancelled",
"updated_at": "2021-12-20T00:00:00Z"
},
{
"id": "9b3fd441-9add-41d8-b58a-a6ce6b0c9972",
"company_id": 123,
"created_at": "2021-12-10T00:12:23Z",
"budget": {
"amount": {
"value": 100.23,
"currency": "USD"
},
"period": {
"type": "calendar_monthly"
}
},
"details": {
"type": "data_stream",
"data_rules": {
"column_sets": [
{
"dataset_id": 123,
"fields": [
{
"field": "col1",
"exported": true
},
{
"field": "col2",
"filter": "include_all_values_including_nulls_filter",
"exported": true
},
{
"field": "col3",
"filter": "include_only_if_not_null_filter",
"exported": true
},
{
"field": "col4",
"filter": {
"type": "include",
"list": [
"this",
"that",
"that too",
"some more"
]
},
"exported": true
},
{
"field": "col5",
"filter": {
"type": "exclude",
"list": [
"this",
"that",
"that too",
"some more"
]
},
"exported": true
},
{
"field": "col6",
"filter": {
"min": {
"type": "inclusive",
"value": "-100"
},
"max": {
"type": "inclusive",
"value": "100"
}
},
"exported": true
},
{
"field": "col6",
"filter": {
"max": {
"type": "exclusive",
"value": "timestamp01"
}
},
"exported": false
},
{
"field": "col7",
"filter": {
"recency": "P30D",
"from": {
"type": "inclusive",
"value": "2021-12-10 12:00:00"
}
},
"exported": false
},
{
"field": "col8",
"filter": {
"expressions": [
"col8 > 10"
]
},
"exported": true
}
]
}
],
"deduplication": {
"period": "P90D",
"column_references": [
{
"dataset_id": 123,
"column_names": [
"col2",
"col4"
]
}
]
},
"frequency_filter": {
"column_references": [
{
"dataset_id": 123,
"column_names": [
"col2"
]
}
],
"min_inclusive": 2,
"max_inclusive": 5
}
},
"data_stream_company_id": 3742,
"data_stream_content": {
"description": "description is required"
},
"data_stream_id": "d00b2d0d-6d42-4e56-9116-c7dd8ccf638f",
"data_stream_name": "the data stream name",
"data_stream_slug": "a_data_product",
"offer": {
"id": "3f7c2ef3-17cc-4d37-ba1c-74bb2a287e13",
"channel": "data_streams_market",
"licensing": {
"period": "P90D",
"license": {
"name": "narrative opendata license"
}
},
"pricing": {
"type": "per_record",
"micro_cents_usd": 70000
}
}
},
"description": "subscription description",
"name": "subscription name",
"cadence": "weekly",
"status": "active",
"updated_at": "2021-12-20T00:00:00Z"
}
]
]
}