Schema · Entity relationship diagram
GRIN tables and relationships
Creators (contacts) and their social networks, campaigns, activations, content and content stats, affiliate conversions, product-seeding orders, creator payments, products, discount codes and affiliate links.
grin- One table per GRIN list endpoint, with the endpoint's response fields as columns. Every table is keyed on GRIN's record
id. contact_ordersare product-seeding shipments to creators, not store orders. Affiliate sales are inconversions.
Drag to pan, scroll or pinch to zoom, click a table to see what it joins to.
Table reference
12 tables · click a table for its columnscontacts32 columns · Creatorsshow in diagram
GET /contacts
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| record_type | varchar(256) | ||
| source | varchar(256) | ||
| owner_id | varchar(64) | ||
| stage_id | varchar(64) | ||
| live_url_id | varchar(64) | ||
| added_manually | boolean | ||
| profile_picture | varchar(65535) | ||
| first_name | varchar(256) | ||
| last_name | varchar(256) | ||
| varchar(1024) | |||
| primary_address_id | varchar(64) | ||
| phone_number | varchar(256) | ||
| phone_country_code | varchar(256) | ||
| phone_number_display | varchar(256) | ||
| gender | varchar(256) | ||
| language | varchar(256) | ||
| company | varchar(1024) | ||
| total_reach | bigint | ||
| website | varchar(65535) | ||
| application_page_id | varchar(64) | ||
| application_completed_at | timestamp | ||
| primary_contact_id | varchar(64) | ||
| birthday | date | ||
| is_archived | boolean | ||
| is_declined | boolean | ||
| notification_channels | varchar(65535) | ||
| created_at | timestamp | ||
| joined_at | timestamp | ||
| promoted_to_influencer_at | timestamp | ||
| updated_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
contact_networks27 columns · Creatorsshow in diagram
GET /contact-networks: a creator's connected social accounts.
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| contact_idReferences contacts.id. | varchar(64) | FK | References contacts.id. |
| network_id | varchar(64) | ||
| network_user_id | varchar(64) | ||
| network_url | varchar(65535) | ||
| network_username | varchar(1024) | ||
| network_name | varchar(1024) | ||
| network_account_type | varchar(256) | ||
| network_connection_type | varchar(256) | ||
| network_connection_permissions | varchar(65535) | ||
| graph_id | varchar(64) | ||
| reach | bigint | ||
| avg_likes | decimal(20,4) | ||
| avg_comments | decimal(20,4) | ||
| avg_likes_to_comment | decimal(20,4) | ||
| avg_views | decimal(20,4) | ||
| avg_shares | decimal(20,4) | ||
| avg_engagement | decimal(20,4) | ||
| avg_posts_per_day | decimal(20,4) | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| stats_updated_at | timestamp | ||
| reach_updated_at | timestamp | ||
| connection_last_checked_at | timestamp | ||
| network | varchar(256) | ||
| profile | varchar(65535) | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
contact_payments17 columns · Creatorsshow in diagram
GET /payments (GRIN "Contact Payments").
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| user_id | varchar(64) | ||
| payment_account_id | varchar(64) | ||
| contact_idReferences contacts.id. | varchar(64) | FK | References contacts.id. |
| campaign_idReferences campaigns.id. | varchar(64) | FK | References campaigns.id. |
| type | varchar(256) | ||
| amount | decimal(18,2) | ||
| currency | varchar(256) | ||
| conversion_rate | decimal(18,6) | ||
| batch_id | varchar(64) | ||
| status | varchar(256) | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| sent_at | timestamp | ||
| deleted_at | timestamp | ||
| activation_idReferences activations.id. | varchar(64) | FK | References activations.id. |
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
campaigns27 columns · Campaigns & contentshow in diagram
GET /campaigns
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| brand_id | varchar(64) | ||
| team_id | varchar(64) | ||
| version | bigint | ||
| internal_title | varchar(1024) | ||
| influencer_title | varchar(1024) | ||
| image | varchar(65535) | ||
| budget | decimal(18,2) | ||
| description | varchar(65535) | ||
| short_description | varchar(65535) | ||
| date_proposals_start | timestamp | ||
| date_proposals_end | timestamp | ||
| date_content_start | timestamp | ||
| date_content_end | timestamp | ||
| compensation | varchar(65535) | ||
| tracking_tags | varchar(65535) | ||
| public_tags | varchar(65535) | ||
| recurring_proposals | boolean | ||
| discount_code_group_id | varchar(64) | ||
| affiliate_link_idReferences affiliate_links.id. | varchar(64) | FK | References affiliate_links.id. |
| show_revenue_tracking_information | boolean | ||
| allow_influencer_uploads | boolean | ||
| payment_method | varchar(256) | ||
| influencer_inputs_price | boolean | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
activations18 columns · Campaigns & contentshow in diagram
GET /activations
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| account_id | varchar(64) | ||
| brand_id | varchar(64) | ||
| team_id | varchar(64) | ||
| image | varchar(65535) | ||
| name | varchar(1024) | ||
| public_name | varchar(1024) | ||
| description | varchar(65535) | ||
| type | varchar(256) | ||
| status | varchar(256) | ||
| previous_status | varchar(256) | ||
| budget | decimal(18,2) | ||
| dollar_budget | decimal(18,2) | ||
| currency | varchar(256) | ||
| currency_rate | decimal(18,6) | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
contents15 columns · Campaigns & contentshow in diagram
GET /content: creator posts. activation_id is the post's GRIN activation.
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| activation_idReferences activations.id. | varchar(64) | FK | References activations.id. |
| campaign_idReferences campaigns.id. | varchar(64) | FK | References campaigns.id. |
| job_id | varchar(64) | ||
| network_id | varchar(64) | ||
| contact_idReferences contacts.id. | varchar(64) | FK | References contacts.id. |
| content_id | varchar(64) | ||
| content_rights_id | varchar(64) | ||
| is_story | boolean | ||
| media_library_content_id | varchar(64) | ||
| posted_at | timestamp | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| deleted_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
content_stats24 columns · Campaigns & contentshow in diagram
GET /content-stats: latest metrics per post (refreshed in place).
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| content_idReferences contents.id. | varchar(64) | FK | References contents.id. |
| activation_idReferences activations.id. | varchar(64) | FK | References activations.id. |
| owner_reach | bigint | ||
| imv | decimal(18,2) | ||
| engagements | bigint | ||
| engagement_rate | decimal(18,6) | ||
| views | bigint | ||
| likes | bigint | ||
| comments | bigint | ||
| shares | bigint | ||
| interactions | bigint | ||
| impressions | bigint | ||
| impressions_real | bigint | ||
| reach | bigint | ||
| replies | bigint | ||
| reply_rate | decimal(18,6) | ||
| taps_forward | bigint | ||
| taps_back | bigint | ||
| away_swipes | bigint | ||
| exits | bigint | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
contact_orders14 columns · Campaigns & contentshow in diagram
GRIN "Contact Orders" (GET /orders): product-seeding shipments to creators.
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| product_selection_id | varchar(64) | ||
| ecommerce_account_id | varchar(64) | ||
| campaign_idReferences campaigns.id. | varchar(64) | FK | References campaigns.id. |
| campaign_proposal_id | varchar(64) | ||
| contact_idReferences contacts.id. | varchar(64) | FK | References contacts.id. |
| user_id | varchar(64) | ||
| external_order_id | varchar(64) | ||
| fulfillments | varchar(65535) | ||
| shipment_status | varchar(256) | ||
| shipment_status_date | timestamp | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
conversions22 columns · Affiliate & commerceshow in diagram
GET /conversions: affiliate / discount-code sales credited to creators.
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| brand_id | varchar(64) | ||
| contact_idReferences contacts.id. | varchar(64) | FK | References contacts.id. |
| type | varchar(256) | ||
| order_idYour store's order id for the attributed sale (not a GRIN contact order). | varchar(64) | Your store's order id for the attributed sale (not a GRIN contact order). | |
| order_number | varchar(256) | ||
| amount | decimal(18,2) | ||
| commission_amount | decimal(18,2) | ||
| currency | varchar(256) | ||
| rate | decimal(18,6) | ||
| discount_code_idReferences discount_codes.id. | varchar(64) | FK | References discount_codes.id. |
| affiliate_link_idReferences affiliate_links.id. | varchar(64) | FK | References affiliate_links.id. |
| meta_data | varchar(65535) | ||
| is_verified | boolean | ||
| verification_status | varchar(256) | ||
| is_voided | boolean | ||
| void_reason | varchar(65535) | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| voided_at | timestamp | ||
| activation_idReferences activations.id. | varchar(64) | FK | References activations.id. |
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
products20 columns · Affiliate & commerceshow in diagram
GET /products
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| brand_id | varchar(64) | ||
| name | varchar(1024) | ||
| cost | decimal(18,2) | ||
| price | decimal(18,2) | ||
| image | varchar(65535) | ||
| images | varchar(65535) | ||
| description | varchar(65535) | ||
| has_options | boolean | ||
| is_shipped | boolean | ||
| shipping_cost | decimal(18,2) | ||
| sku | varchar(256) | ||
| external_id | varchar(64) | ||
| qty | bigint | ||
| track_inventory | boolean | ||
| track_variant_inventory | boolean | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| status | varchar(256) | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
discount_codes14 columns · Affiliate & commerceshow in diagram
GET /discount-codes
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| ecommerce_account_id | varchar(64) | ||
| external_id | varchar(64) | ||
| group_id | varchar(64) | ||
| contact_idReferences contacts.id. | varchar(64) | FK | References contacts.id. |
| code | varchar(1024) | ||
| start_date | timestamp | ||
| end_date | timestamp | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| disabled_at | timestamp | ||
| disabled_reason | varchar(1024) | ||
| deleted_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |
affiliate_links12 columns · Affiliate & commerceshow in diagram
GET /affiliate-contact-links
Primary key: id
| Column | Type | Key | Description |
|---|---|---|---|
| idPrimary key. | varchar(64) | PK | Primary key. |
| group_id | varchar(64) | ||
| contact_idReferences contacts.id. | varchar(64) | FK | References contacts.id. |
| destination_url | varchar(65535) | ||
| query_parameters | varchar(65535) | ||
| url_path | varchar(1024) | ||
| full_url | varchar(65535) | ||
| start_date | timestamp | ||
| end_date | timestamp | ||
| created_at | timestamp | ||
| updated_at | timestamp | ||
| _jsdata_syncedWhen jsdata last wrote this row. | timestamp | When jsdata last wrote this row. |