Sponsy Slot (sponsy_slot_v1)

Replicate Sponsy Slots into your database.

To get set up, run this code from the WebhookDB CLI:

webhookdb integrations create sponsy_slot_v1

Source documentation for this API: https://api.getsponsy.com/docs

Features

Depends on
To use this replicator, you will need sponsy_publication_v1. You'll be prompted to create it if you haven't.
Dependents
This replicator is required for the creation of the following dependents:
Supports Webhooks
Supports Backfilling

Schema

Tables replicated from Sponsy Slots have this schema. Note that the data types listed are for Postgres; when replicating to other databases, other data types maybe used.

Column Type Indexed
pk bigint  
sponsy_id text  
publication_id text
date date
notes text  
customer_id text
placement_id text
status_id text
created_at timestamptz  
updated_at timestamptz  
data* jsonb  

* The data column contains the raw payload from the webhook or API. In many cases there is no canonical form, like if a webhook and API request return two different versions of the same resource. In that case we try to keep the most coherent and detailed resource.”

Table definition

This definition can also be generated through webhookdb fixture sponsy_slot_v1.

CREATE TABLE public.sponsy_slot_v1_fixture (
  pk bigserial PRIMARY KEY,
  sponsy_id text UNIQUE NOT NULL,
  publication_id text,
  date date,
  notes text,
  customer_id text,
  placement_id text,
  status_id text,
  created_at timestamptz,
  updated_at timestamptz,
  data jsonb NOT NULL
);
CREATE INDEX IF NOT EXISTS svi_fixture_publication_id_idx ON public.sponsy_slot_v1_fixture (publication_id);
CREATE INDEX IF NOT EXISTS svi_fixture_date_idx ON public.sponsy_slot_v1_fixture (date);
CREATE INDEX IF NOT EXISTS svi_fixture_customer_id_idx ON public.sponsy_slot_v1_fixture (customer_id);
CREATE INDEX IF NOT EXISTS svi_fixture_placement_id_idx ON public.sponsy_slot_v1_fixture (placement_id);
CREATE INDEX IF NOT EXISTS svi_fixture_status_id_idx ON public.sponsy_slot_v1_fixture (status_id);