Skip to main content
POST
/
data-shops
/
subscriptions
/
matches
Get matches
curl --request POST \
  --url https://api-dev.narrative.io/data-shops/subscriptions/matches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "details": {
    "type": "marketplace",
    "company_constraint": {
      "type": "inclusion",
      "company_ids": [
        1,
        2,
        3
      ]
    },
    "data_rules": {
      "attributes": [
        {
          "attribute_id": 123,
          "fields": [
            {
              "field": "example.timestamp",
              "filter": {
                "recency": "P30D",
                "from": {
                  "type": "inclusive",
                  "value": "2021-12-10 12:00:00"
                },
                "to": null
              },
              "exported": false
            },
            {
              "field": "example.string_field",
              "filter": null,
              "exported": true
            }
          ],
          "optional": true
        }
      ]
    },
    "pricing": {
      "micro_cents_usd": 1000000000
    }
  }
}
'
{
  "records": [
    {
      "attributes": [
        {
          "id": 123,
          "name": "<string>"
        }
      ],
      "dataset": {
        "id": 123,
        "company_id": 123,
        "name": "<string>",
        "description": "<string>"
      },
      "matching_access_rules": {
        "id": 123,
        "pricing": 123,
        "constraints": [
          "<string>"
        ]
      },
      "non_matching_access_rules": {
        "id": 123,
        "pricing": 123,
        "constraints": [
          "<string>"
        ]
      },
      "type": "attributes"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

A set of subscription constraints for which matches will be generated.

type
enum<string>
required

Details for the purchase of a data stream.

Available options:
data_stream
data_stream_id
string<uuid>
required

Unique identifier for the data stream being purchased.

offer_id
string<uuid>
required

The provider offer being accepted as part of the purchase.

data_shop_id

The hostname of the data shop from which the data stream is being purchased.

Minimum string length: 1

Response

200 - application/json

OK

records
object[]