# Square schema ERD

Table and field reference for the Fivetran Square connector.

## Table & Field Reference

### order_service_charge

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| order_id | String | PK, FK |
| catalog_object_id | String | FK |
| amount_money_amount | Long |  |
| amount_money_currency | String |  |
| applied_money_amount | Long |  |
| applied_money_currency | String |  |
| calculation_money | String |  |
| name | String |  |
| percentage | Double |  |
| taxable | Boolean |  |
| total_money_amount | Long |  |
| total_money_currency | String |  |
| total_tax_money_amount | Long |  |
| total_tax_money_currency | String |  |

### transaction

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| order_id | String | FK |
| client_id | String |  |
| created_at | Instant |  |
| product | String |  |
| reference_id | String |  |
| shipping_address_** |  |  |

### catalog_custom_attribute_value

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| catalog_object_id | String | PK, FK |
| custom_attribute_definition_id | String | FK |
| boolean_value | Boolean |  |
| name | String |  |
| number_value | String |  |
| selection_uid_values | Json |  |
| string_value | String |  |
| type | String |  |

### order_return_line_item

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| catalog_object_id | String | FK |
| order_return_id | String | FK |
| source_line_item_uid | String | FK |
| base_price_money_amount | Long |  |
| base_price_money_currency | String |  |
| gross_return_money_amount | Long |  |
| gross_return_money_currency | String |  |
| name | String |  |
| note | String |  |
| quantity | String |  |
| quantity_measurement_area_unit | String |  |
| quantity_measurement_custom_unit_abbrevation | String |  |
| quantity_measurement_custom_unit_name | String |  |
| quantity_measurement_generic_unit | String |  |
| quantity_measurement_length_unit | String |  |
| quantity_measurement_volume_unit | String |  |
| quantity_measurement_weight_unit | String |  |
| quantity_precision | Int |  |
| total_discount_money_amount | Long |  |
| total_discount_money_currency | String |  |
| total_money_amount | Long |  |
| total_money_currency | String |  |
| total_tax_money_amount | Long |  |
| total_tax_money_currency | String |  |
| variation_name | String |  |
| variation_total_price_money_amount | Long |  |
| variation_total_price_money_currency | String |  |

### loyalty_reward

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| loyalty_account_id | String | FK |
| order_id | String | FK |
| reward_tier_id | String | FK |
| created_at | Instant |  |
| points | Int |  |
| redeemed_at | Instant |  |
| status | String |  |
| updated_at | Instant |  |

### break_type

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| break_name | String |  |
| created_at | Instant |  |
| expected_duration | String |  |
| is_paid | Boolean |  |
| updated_at | Instant |  |
| version | Long |  |

### loyalty_account

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| customer_id | String | FK |
| program_id | String | FK |
| balance | Int |  |
| created_at | Instant |  |
| enrolled_at | Instant |  |
| lifetime_points | Int |  |
| mapping_created_at | Instant |  |
| mapping_id | String |  |
| mapping_phone_number | String |  |
| updated_at | Instant |  |

### catalog_item_category

| Column | Type | Keys |
| --- | --- | --- |
| catalog_item_id | String | PK, FK |
| id | String | PK, FK |
| ordinal | Long |  |

### customer_group

| Column | Type | Keys |
| --- | --- | --- |
| customer_id | String | PK, FK |
| group_id | String | PK, FK |

### gift_card_activity

| Column | Type | Keys |
| --- | --- | --- |
| gift_card_id | String | PK |
| id | String | PK |
| adjust_decrement_activity_amount | Long |  |
| adjust_decrement_activity_currency | String |  |
| adjust_decrement_activity_reason | String |  |
| adjust_increment_activity_amount | Long |  |
| adjust_increment_activity_currency | String |  |
| adjust_increment_activity_reason | String |  |
| block_activity_reason | String |  |
| clear_balance_activity_reason | String |  |
| created_at | Instant |  |
| deactivate_activity_reason | String |  |
| gift_card_balance_amount | Long |  |
| gift_card_balance_currency | String |  |
| gift_card_gan | String |  |
| import_activity_amount | Long |  |
| import_activity_currency | String |  |
| import_reversal_activity_amount | Long |  |
| import_reversal_activity_currency | String |  |
| location_id | String |  |
| transfer_balance_from_activity_amount | Long |  |
| transfer_balance_from_activity_currency | String |  |
| transfer_balance_from_activity_transfer_to_gift_card_id | String |  |
| transfer_balance_to_activity_amount | Long |  |
| transfer_balance_to_activity_currency | String |  |
| transfer_balance_to_activity_transfer_from_gift_card_id | String |  |
| type | String |  |
| unblock_activity_reason | String |  |
| unlinked_activity_refund_activity_amount | Long |  |
| unlinked_activity_refund_activity_currency | String |  |
| unlinked_activity_refund_activity_payment_id | String |  |
| unlinked_activity_refund_activity_reference_id | String |  |
| activate_activity_** |  |  |
| load_activity_** |  |  |
| redeem_activity_** |  |  |
| refund_activity_** |  |  |

### catalog_product_set

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| all_products | Boolean |  |
| name | String |  |
| quantity_exact | Int |  |
| quantity_max | Int |  |
| quantity_min | Int |  |

### catalog_item_modifier_list_info

| Column | Type | Keys |
| --- | --- | --- |
| item_id | String | PK, FK |
| modifier_list_id | String | PK, FK |
| enabled | Boolean |  |
| max_selected_modifiers | Int |  |
| min_selected_modifiers | Int |  |

### order_return

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| source_order_id | String | PK, FK |

### order

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| closed_at | Instant |  |
| created_at | Instant |  |
| customer_id | String |  |
| order_source_name | String |  |
| reference_id | String |  |
| rounding_adjustment_amount_money_amount | Long |  |
| rounding_adjustment_amount_money_currency | String |  |
| rounding_adjustment_name | String |  |
| rounding_adjustment_uid | String |  |
| state | String |  |
| ticket_name | String |  |
| total_discount_amount | Long |  |
| total_discount_currency | String |  |
| total_money_amount | Long |  |
| total_money_currency | String |  |
| total_service_charge_amount | Long |  |
| total_service_charge_currency | String |  |
| total_tax_amount | Long |  |
| total_tax_currency | String |  |
| updated_at | Instant |  |
| net_amount_** |  |  |
| return_amount_** |  |  |

### refund

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| order_id | String | FK |
| payment_id | String | FK |
| tender_id | String | FK |
| transaction_id | String | FK |
| amount_amount | Long |  |
| amount_currency | String |  |
| created_at | Instant |  |
| processing_fee_amount | Long |  |
| processing_fee_currency | String |  |
| reason | String |  |
| status | String |  |

### catalog_discount

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| amount_money_amount | Long |  |
| amount_money_currency | String |  |
| discount_type | String |  |
| label_color | String |  |
| name | String |  |
| percentage | Double |  |
| pin_required | Boolean |  |

### payment

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| customer_id | String | FK |
| device_detail_device_id | String | FK |
| location_id | String | FK |
| order_id | String | FK |
| team_member_id | String | FK |
| amount_money_amount | Long |  |
| amount_money_currency | String |  |
| app_fee_money_amount | Long |  |
| app_fee_money_currency | String |  |
| buyer_email_address | String |  |
| created_at | Instant |  |
| delay_action | String |  |
| delay_duration | String |  |
| delayed_until | String |  |
| device_detail_device_installation_id | String |  |
| employee_id | String |  |
| is_offline_payment | Boolean |  |
| note | String |  |
| offline_payment_details_client_created_at | Instant |  |
| receipt_number | String |  |
| receipt_url | String |  |
| reference_id | String |  |
| refunded_money_amount | Long |  |
| refunded_money_currency | String |  |
| source_type | String |  |
| status | String |  |
| tip_money_amount | Long |  |
| tip_money_currency | String |  |
| total_money_amount | Long |  |
| total_money_currency | String |  |
| updated_at | Instant |  |
| billing_address_** |  |  |
| shipping_address_** |  |  |

### order_return_discount

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| catalog_object_id | String | FK |
| order_return_id | String | FK |
| source_discount_uid | String | FK |
| amount_money_amount | Long |  |
| amount_money_currency | String |  |
| applied_money_amount | Long |  |
| applied_money_currency | String |  |
| name | String |  |
| percentage | Double |  |
| scope | String |  |
| type | String |  |

### cash_drawer

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| closed_at | Instant |  |
| closed_cash_money_amount | Long |  |
| closed_cash_money_currency | String |  |
| description | String |  |
| ended_at | Instant |  |
| expected_cash_money_amount | Long |  |
| expected_cash_money_currency | String |  |
| opened_at | Instant |  |
| opened_cash_money_amount | Long |  |
| opened_cash_money_currency | String |  |
| state | String |  |

### catalog_category

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| name | String |  |

### order_line_item_modifier

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| order_id | String | PK, FK |
| catalog_object_id | String | FK |
| order_line_item_id | String | FK |
| base_price_amount | Long |  |
| base_price_currency | String |  |
| name | String |  |
| total_price_amount | Long |  |
| total_price_currency | String |  |

### shift_break

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| shift_id | String | FK |
| break_type_id | String |  |
| end_at | Instant |  |
| expected_duration | String |  |
| is_paid | Boolean |  |
| name | String |  |
| start_at | Instant |  |

### loyalty_program_accrual_rule

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| program_id | String | PK, FK |
| accrual_type | String |  |
| catalog_object_id | String |  |
| category_id | String |  |
| points | Int |  |
| spend_amount | Long |  |
| spend_currency | String |  |
| visit_minimum_amount | Long |  |
| visit_minimum_currency | String |  |

### workweek_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| updated_at | Instant | PK |
| created_at | Instant |  |
| start_of_day_local_time | String |  |
| start_of_week | String |  |
| version | Long |  |

### device_component

| Column | Type | Keys |
| --- | --- | --- |
| type | String | PK |
| device_id | String | PK, FK |
| application_type | String |  |
| application_version | String |  |
| battery_external_power | String |  |
| battery_visible_percent | Int |  |
| card_reader_version | String |  |
| ethernet_active | Boolean |  |
| session_location | String |  |
| wifi_** |  |  |

### order_line_item_tax

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| order_id | String | PK, FK |
| catalog_object_id | String | FK |
| applied_money_amount | Long |  |
| applied_money_currency | String |  |
| name | String |  |
| percentage | Double |  |
| scope | String |  |
| type | String |  |

### item_variation_location_override

| Column | Type | Keys |
| --- | --- | --- |
| item_variation_id | String | PK, FK |
| location_id | String | PK, FK |
| inventory_alert_threshold | Int |  |
| inventory_alert_type | String |  |
| price_money_amount | Long |  |
| price_money_currency | String |  |
| pricing_type | String |  |
| track_inventory | Boolean |  |

### catalog_object

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| absent_at_location_ids | Json |  |
| image_url | String |  |
| is_deleted | Boolean |  |
| present_at_all_locations | Boolean |  |
| present_at_location_ids | Json |  |
| type | String |  |
| updated_at | Instant |  |
| version | Long |  |

### additional_refund_recipient

| Column | Type | Keys |
| --- | --- | --- |
| location_id | String | PK, FK |
| refund_id | String | PK, FK |
| amount_amount | Long |  |
| amount_currency | String |  |
| description | String |  |
| receivable_id | String |  |

### team_member_assigned_location

| Column | Type | Keys |
| --- | --- | --- |
| location_id | String | PK, FK |
| team_member_id | String | PK, FK |

### order_return_line_item_modifier

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| catalog_object_id | String | FK |
| order_return_line_item_id | String | FK |
| source_modifier_uid | String | FK |
| base_price_amount | Long |  |
| base_price_currency | String |  |
| name | String |  |
| total_price_amount | Long |  |
| total_price_currency | String |  |

### additional_tender_recipient

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| location_id | String | PK, FK |
| tender_id | String | PK, FK |
| amount_amount | Long |  |
| amount_currency | String |  |
| description | String |  |
| receivable_id | String |  |

### invoice_payment_request

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| invoice_id | String | PK, FK |
| automatic_payment_source | String |  |
| card_id | String |  |
| computed_amount | Long |  |
| computed_currency | String |  |
| due_date | LocalDate |  |
| fixed_amount_requested_amount | Long |  |
| fixed_amount_requested_currency | String |  |
| percentage_requested | String |  |
| request_type | String |  |
| rounding_adjustment_included_amount | Long |  |
| rounding_adjustment_included_currency | String |  |
| tipping_enabled | Boolean |  |
| total_completed_amount | Long |  |
| total_completed_currency | String |  |

### card

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| card_brand | String |  |
| card_type | String |  |
| cardholder_name | String |  |
| exp_month | Int |  |
| exp_year | Int |  |
| fingerprint | String |  |
| last_4 | String |  |
| prepaid_type | String |  |
| billing_address_** |  |  |

### customer_card

| Column | Type | Keys |
| --- | --- | --- |
| card_id | String | PK, FK |
| customer_id | String | PK, FK |

### location_capability

| Column | Type | Keys |
| --- | --- | --- |
| capability | String | PK |
| location_id | String | PK, FK |

### invoice_recipient

| Column | Type | Keys |
| --- | --- | --- |
| invoice_id | String | PK, FK |
| customer_id | String | FK |
| tax_ids_eu_vat | String |  |

### catalog_tax

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| applies_to_custom_amounts | Boolean |  |
| calculation_phase | String |  |
| enabled | Boolean |  |
| inclusion_type | String |  |
| name | String |  |
| percentage | Double |  |

### catalog_pricing_rule_customer_group

| Column | Type | Keys |
| --- | --- | --- |
| catalog_pricing_rule_id | String | PK, FK |
| customer_group_id | String | PK, FK |

### dispute

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| disputed_payment_id | String | FK |
| location_id | String | FK |
| amount_money_amount | Long |  |
| amount_money_currency | String |  |
| brand_dispute_id | String |  |
| card_brand | String |  |
| created_at | Instant |  |
| dispute_id | String |  |
| due_at | Instant |  |
| reason | String |  |
| reported_at | Instant |  |
| reported_date | Instant |  |
| state | String |  |
| updated_at | Instant |  |
| version | Int |  |

### timecard_break

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| time_card_id | String | FK |
| break_type_id | String |  |
| end_at | Instant |  |
| expected_duration | String |  |
| is_paid | Boolean |  |
| name | String |  |
| start_at | Instant |  |

### loyalty_program_reward_tier

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| program_id | String | PK, FK |
| created_at | Instant |  |
| name | String |  |
| points | Int |  |
| pricing_rule_catalog_version | Long |  |
| pricing_rule_object_id | String |  |
| definition_** |  |  |

### catalog_modifier_list

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| name | String |  |
| selection_type | String |  |

### cash_drawer_event

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| cash_drawer_id | String | FK |
| created_at | Instant |  |
| description | String |  |
| event_money_amount | Long |  |
| event_money_currency | String |  |
| event_type | String |  |

### customer

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| birthday | String |  |
| company_name | String |  |
| created_at | Instant |  |
| creation_source | String |  |
| email_address | String |  |
| family_name | String |  |
| given_name | String |  |
| nickname | String |  |
| note | String |  |
| phone_number | String |  |
| preferences_email_unsubscribed | Boolean |  |
| reference_id | String |  |
| updated_at | Instant |  |
| address_** |  |  |

### catalog_pricing_rule

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| discount_id | String | FK |
| exclude_products_id | String |  |
| exclude_strategy | String |  |
| match_products_id | String |  |
| minimum_order_subtotal_money_amount | Long |  |
| minimum_order_subtotal_money_currency | String |  |
| name | String |  |
| valid_from_date | String |  |
| valid_from_local_time | String |  |
| valid_until_date | String |  |
| valid_until_local_time | String |  |

### custom_attribute_definition

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| created_at | Instant |  |
| description | String |  |
| name | String |  |
| schema | Json |  |
| updated_at | Instant |  |
| version | Int |  |
| visibility | String |  |

### employee

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_at | Instant |  |
| first_name | String |  |
| last_name | String |  |
| status | String |  |
| updated_at | Instant |  |

### catalog_modifier

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| name | String |  |
| price_money_amount | Long |  |
| price_money_currency | String |  |

### invoice

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| order_id | String | FK |
| created_at | Instant |  |
| delivery_method | String |  |
| description | String |  |
| invoice_number | String |  |
| next_payment_amount | Long |  |
| next_payment_currency | String |  |
| payment_conditions | String |  |
| public_url | String |  |
| sale_or_service_date | LocalDate |  |
| scheduled_at | Instant |  |
| status | String |  |
| store_payment_method_enabled | Boolean |  |
| subscription_id | String |  |
| timezone | String |  |
| title | String |  |
| updated_at | Instant |  |
| version | Int |  |
| accepted_payment_method_** |  |  |

### merchant

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| main_location_id | String | FK |
| business_name | String |  |
| country | String |  |
| created_at | Instant |  |
| currency | String |  |
| language_code | String |  |
| status | String |  |

### order_fulfillment

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| order_id | String | PK, FK |
| state | String |  |
| type | String |  |
| pickup_detail_** |  |  |

### bank_account

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| account_number_suffix | String |  |
| account_type | String |  |
| bank_name | String |  |
| country | String |  |
| creditable | Boolean |  |
| currency | String |  |
| debit_mandate_reference_id | String |  |
| debitable | Boolean |  |
| fingerprint | String |  |
| holder_name | String |  |
| primary_bank_identification_number | String |  |
| reference_id | String |  |
| secondary_bank_identification_number | String |  |
| status | String |  |
| version | Int |  |

### catalog_v_1_id

| Column | Type | Keys |
| --- | --- | --- |
| catalog_v_1_id | String | PK |
| id | String | PK, FK |
| location_id | String | PK, FK |

### customer_segment

| Column | Type | Keys |
| --- | --- | --- |
| customer_id | String | PK, FK |
| segment_id | String | PK, FK |

### loyalty_program

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_at | Instant |  |
| expiration_policy_expiration_duration | String |  |
| location_ids | Json |  |
| status | String |  |
| terminology_one | String |  |
| terminology_other | String |  |
| updated_at | Instant |  |

### payment_processing_fee

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| payment_id | String | PK, FK |
| amount | Long |  |
| currency | String |  |
| effective_at | Instant |  |
| type | String |  |

### invoice_payment_reminder

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| payment_request_id | String | PK, FK |
| message | String |  |
| relative_scheduled_days | Int |  |
| sent_at | Instant |  |
| status | String |  |

### gift_card

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| balance_amount | Long |  |
| balance_currency | String |  |
| created_at | Instant |  |
| gan | String |  |
| gan_source | String |  |
| state | String |  |
| type | String |  |

### catalog_item_variation

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| item_id | String | FK |
| inventory_alert_threshold | Int |  |
| inventory_alert_type | String |  |
| name | String |  |
| ordinal | Int |  |
| price_money_amount | Long |  |
| price_money_currency | String |  |
| pricing_type | String |  |
| service_duration | Int |  |
| sku | String |  |
| track_inventory | Boolean |  |
| upc | String |  |
| user_data | String |  |

### catalog_item

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| abbreviation | String |  |
| available_electronically | Boolean |  |
| available_for_pickup | Boolean |  |
| available_online | Boolean |  |
| category_id | String |  |
| description | String |  |
| description_html | String |  |
| description_plaintext | String |  |
| image_url | String |  |
| label_color | String |  |
| name | String |  |
| product_type | String |  |
| reporting_category_id | String |  |
| reporting_category_ordinal | Long |  |
| skip_modifier_screen | Boolean |  |

### order_return_tax

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| catalog_object_id | String | FK |
| order_return_id | String | FK |
| source_tax_uid | String | FK |
| applied_money_amount | Long |  |
| applied_money_currency | String |  |
| name | String |  |
| percentage | Double |  |
| scope | String |  |
| type | String |  |

### segment

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_at | Instant |  |
| name | String |  |
| updated_at | Instant |  |

### tender

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| order_id | String | PK, FK |
| location_id | String | FK |
| transaction_id | String | FK |
| amount_amount | Long |  |
| amount_currency | String |  |
| card_details_card_brand | String |  |
| card_details_entry_method | String |  |
| card_details_fingerprint | String |  |
| card_details_last_4 | String |  |
| card_details_status | String |  |
| cash_details_buyer_tender_amount | Long |  |
| cash_details_buyer_tender_currency | String |  |
| cash_details_change_back_amount | Long |  |
| cash_details_change_back_currency | String |  |
| created_at | Instant |  |
| customer_id | String |  |
| note | String |  |
| processing_fee_amount | Long |  |
| processing_fee_currency | String |  |
| tender_id | String |  |
| tip_amount | Long |  |
| tip_currency | String |  |
| type | String |  |

### loyalty_account_mapping

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | PK, FK |
| created_at | Instant |  |
| type | String |  |
| value | String |  |

### catalog_item_tax

| Column | Type | Keys |
| --- | --- | --- |
| item_id | String | PK, FK |
| tax_id | String | PK, FK |

### timecard

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| location_id | String | FK |
| team_member_id | String | FK |
| created_at | Instant |  |
| declared_cash_tip_amount | Long |  |
| declared_cash_tip_currency | String |  |
| end_at | Instant |  |
| start_at | Instant |  |
| status | String |  |
| timezone | String |  |
| updated_at | Instant |  |
| version | Int |  |
| wage_** |  |  |

### device

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| manufacturer | String |  |
| manufacturers_id | String |  |
| merchant_token | String |  |
| model | String |  |
| name | String |  |
| status_category | String |  |
| type | String |  |
| updated_at | Instant |  |
| version | String |  |

### order_line_item

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| order_id | String | PK, FK |
| catalog_object_id | String | FK |
| base_price_amount | Long |  |
| base_price_currency | String |  |
| gross_sales_amount | Long |  |
| gross_sales_currency | String |  |
| name | String |  |
| note | String |  |
| quantity | Double |  |
| total_amount | Long |  |
| total_currency | String |  |
| total_discount_amount | Long |  |
| total_discount_currency | String |  |
| total_tax_amount | Long |  |
| total_tax_currency | String |  |
| variation_name | String |  |

### customer_group_info

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| customer_id | String | PK, FK |
| name | String |  |

### catalog_modifier_override

| Column | Type | Keys |
| --- | --- | --- |
| item_id | String | PK, FK |
| modifier_id | String | PK, FK |
| modifier_list_id | String | PK, FK |
| on_by_default | Boolean |  |

### team_member_wage

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| team_member_id | String | FK |
| hourly_rate_amount | Long |  |
| hourly_rate_currency | String |  |
| job_id | String |  |
| tip_eligible | Boolean |  |
| title | String |  |

### order_custom_attribute

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK, FK |
| order_id | String | PK, FK |
| created_at | Instant |  |
| updated_at | Instant |  |
| value | Json |  |
| version | Int |  |
| visibility | String |  |

### employee_wage

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| employee_id | String | FK |
| hourly_rate_amount | Long |  |
| hourly_rate_currency | String |  |
| title | String |  |

### employee_location

| Column | Type | Keys |
| --- | --- | --- |
| employee_id | String | PK, FK |
| location_id | String | PK, FK |

### invoice_custom_field

| Column | Type | Keys |
| --- | --- | --- |
| label | String | PK |
| invoice_id | String | PK, FK |
| placement | String |  |
| value | String |  |

### shift

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| employee_id | String | FK |
| location_id | String | FK |
| team_member_id | String | FK |
| created_at | Instant |  |
| end_at | Instant |  |
| start_at | Instant |  |
| status | String |  |
| timezone | String |  |
| updated_at | Instant |  |
| version | Int |  |
| wage_hourly_rateamount | Long |  |
| wage_hourly_ratecurrency | String |  |
| wage_title | String |  |

### gift_card_customer

| Column | Type | Keys |
| --- | --- | --- |
| customer_id | String | PK, FK |
| gift_card_id | String | PK, FK |

### order_custom_attribute_definition

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| created_at | Instant |  |
| description | String |  |
| name | String |  |
| schema | Json |  |
| updated_at | Instant |  |
| version | Int |  |
| visibility | String |  |

### card_payment_details

| Column | Type | Keys |
| --- | --- | --- |
| payment_id | String | PK, FK |
| card_id | String | FK |
| application_cryptogram | String |  |
| application_identifier | String |  |
| application_name | String |  |
| auth_result_code | String |  |
| avs_status | String |  |
| cvv_status | String |  |
| entry_method | String |  |
| refund_requires_card_presence | Boolean |  |
| statement_description | String |  |
| status | String |  |
| tip_money_device_id | String |  |
| tip_money_device_name | String |  |
| verification_method | String |  |
| verification_results | String |  |

### dispute_evidence

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| dispute_id | String | FK |
| evidence_filename | String |  |
| evidence_filetype | String |  |
| evidence_type | String |  |
| uploaded_at | Instant |  |

### location

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| business_name | String |  |
| country | String |  |
| created_at | Instant |  |
| currency | String |  |
| language_code | String |  |
| merchant_id | String |  |
| name | String |  |
| phone_number | String |  |
| status | String |  |
| timezone | String |  |
| type | String |  |
| website_url | String |  |
| address_** |  |  |

### order_line_item_discount

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| order_id | String | PK, FK |
| catalog_object_id | String | FK |
| amount_money_amount | Long |  |
| amount_money_currency | String |  |
| applied_money_amount | Long |  |
| applied_money_currency | String |  |
| name | String |  |
| percentage | Double |  |
| scope | String |  |
| type | String |  |

### team_member

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| assignment_type | String |  |
| created_at | Instant |  |
| email_address | String |  |
| family_name | String |  |
| given_name | String |  |
| is_owner | Boolean |  |
| phone_number | String |  |
| reference_id | String |  |
| status | String |  |
| updated_at | Instant |  |

### group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_at | Instant |  |
| name | String |  |
| updated_at | Instant |  |

### merchant_custom_attribute

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK, FK |
| merchant_id | String | PK, FK |
| created_at | Instant |  |
| updated_at | Instant |  |
| value | String |  |
| version | Int |  |
| visibility | String |  |

### order_return_service_charge

| Column | Type | Keys |
| --- | --- | --- |
| uid | String | PK |
| catalog_object_id | String | FK |
| source_service_charge_uid | String | FK |
| amount_money_amount | Long |  |
| amount_money_currency | String |  |
| applied_money_amount | Long |  |
| applied_money_currency | String |  |
| calculation_phase | String |  |
| name | String |  |
| percentage | Double |  |
| taxable | Boolean |  |
| total_money_amount | Long |  |
| total_money_currency | String |  |
| total_tax_money_amount | Long |  |
| total_tax_money_currency | String |  |

### catalog_custom_attribute_definition

| Column | Type | Keys |
| --- | --- | --- |
| catalog_object_id | String | PK, FK |
| allowed_object_types | Json |  |
| app_visibility | String |  |
| description | String |  |
| key | String |  |
| name | String |  |
| number_config_precision | Int |  |
| selection_config_allowed_selections | Json |  |
| selection_config_max_allowed_selections | Int |  |
| seller_visibility | String |  |
| source_application_id | String |  |
| source_application_name | String |  |
| source_application_product | String |  |
| string_config_enforce_uniqueness | Boolean |  |
| type | String |  |

### catalog_modifier_in_catalog_modifier_list

| Column | Type | Keys |
| --- | --- | --- |
| modifier_id | String | PK, FK |
| modifier_list_id | String | PK, FK |

### inventory_count_history

| Column | Type | Keys |
| --- | --- | --- |
| calculated_at | String | PK |
| catalog_object_id | String | PK, FK |
| location_id | String | PK, FK |
| catalog_object_type | String |  |
| quantity | String |  |
| state | String |  |

## Relationships

- order_service_charge(order_id) → order(id)
- order_service_charge(catalog_object_id) → catalog_object(id)
- transaction(location_id) → location(id)
- transaction(order_id) → order(id)
- catalog_custom_attribute_value(catalog_object_id) → catalog_object(id)
- catalog_custom_attribute_value(custom_attribute_definition_id) → catalog_custom_attribute_definition(catalog_object_id)
- order_return_line_item(source_line_item_uid) → order_line_item(uid)
- order_return_line_item(order_return_id) → order_return(uid)
- order_return_line_item(catalog_object_id) → catalog_object(id)
- loyalty_reward(loyalty_account_id) → loyalty_account(id)
- loyalty_reward(reward_tier_id) → loyalty_program_reward_tier(id)
- loyalty_reward(order_id) → order(id)
- break_type(location_id) → location(id)
- loyalty_account(program_id) → loyalty_program(id)
- loyalty_account(customer_id) → customer(id)
- catalog_item_category(catalog_item_id) → catalog_item(id)
- catalog_item_category(id) → catalog_category(id)
- customer_group(customer_id) → customer(id)
- customer_group(group_id) → customer_group(customer_id)
- catalog_product_set(id) → catalog_object(id)
- catalog_item_modifier_list_info(item_id) → catalog_item(id)
- catalog_item_modifier_list_info(modifier_list_id) → catalog_modifier_list(id)
- order_return(source_order_id) → order(id)
- order(location_id) → location(id)
- refund(location_id) → location(id)
- refund(transaction_id) → transaction(id)
- refund(order_id) → order(id)
- refund(tender_id) → tender(index)
- refund(payment_id) → payment(id)
- catalog_discount(id) → catalog_object(id)
- payment(location_id) → location(id)
- payment(order_id) → order(id)
- payment(customer_id) → customer(id)
- payment(team_member_id) → team_member(id)
- payment(device_detail_device_id) → device(id)
- order_return_discount(source_discount_uid) → order_line_item_discount(uid)
- order_return_discount(order_return_id) → order_return(uid)
- order_return_discount(catalog_object_id) → catalog_object(id)
- cash_drawer(location_id) → location(id)
- catalog_category(id) → catalog_object(id)
- order_line_item_modifier(order_id) → order(id)
- order_line_item_modifier(order_line_item_id) → order_line_item(uid)
- order_line_item_modifier(catalog_object_id) → catalog_object(id)
- shift_break(shift_id) → shift(id)
- loyalty_program_accrual_rule(program_id) → loyalty_program(id)
- device_component(device_id) → device(id)
- order_line_item_tax(order_id) → order(id)
- order_line_item_tax(catalog_object_id) → catalog_object(id)
- item_variation_location_override(item_variation_id) → catalog_item_variation(id)
- item_variation_location_override(location_id) → location(id)
- additional_refund_recipient(refund_id) → refund(id)
- additional_refund_recipient(location_id) → location(id)
- team_member_assigned_location(team_member_id) → team_member(id)
- team_member_assigned_location(location_id) → location(id)
- order_return_line_item_modifier(source_modifier_uid) → order_line_item_modifier(uid)
- order_return_line_item_modifier(order_return_line_item_id) → order_return_line_item(uid)
- order_return_line_item_modifier(catalog_object_id) → catalog_object(id)
- additional_tender_recipient(tender_id) → tender(index)
- additional_tender_recipient(location_id) → location(id)
- invoice_payment_request(invoice_id) → invoice(id)
- customer_card(customer_id) → customer(id)
- customer_card(card_id) → card(id)
- location_capability(location_id) → location(id)
- invoice_recipient(invoice_id) → invoice(id)
- invoice_recipient(customer_id) → customer(id)
- catalog_tax(id) → catalog_object(id)
- catalog_pricing_rule_customer_group(catalog_pricing_rule_id) → catalog_pricing_rule(id)
- catalog_pricing_rule_customer_group(customer_group_id) → customer_group(customer_id)
- dispute(location_id) → location(id)
- dispute(disputed_payment_id) → payment(id)
- timecard_break(time_card_id) → timecard(id)
- loyalty_program_reward_tier(program_id) → loyalty_program(id)
- catalog_modifier_list(id) → catalog_object(id)
- cash_drawer_event(cash_drawer_id) → cash_drawer(id)
- catalog_pricing_rule(id) → catalog_object(id)
- catalog_pricing_rule(discount_id) → catalog_discount(id)
- catalog_modifier(id) → catalog_object(id)
- invoice(location_id) → location(id)
- invoice(order_id) → order(id)
- merchant(main_location_id) → location(id)
- order_fulfillment(order_id) → order(id)
- bank_account(location_id) → location(id)
- catalog_v_1_id(id) → catalog_object(id)
- catalog_v_1_id(location_id) → location(id)
- customer_segment(customer_id) → customer(id)
- customer_segment(segment_id) → customer_segment(customer_id)
- payment_processing_fee(payment_id) → payment(id)
- invoice_payment_reminder(payment_request_id) → invoice_payment_request(invoice_id)
- catalog_item_variation(id) → catalog_object(id)
- catalog_item_variation(item_id) → catalog_item(id)
- catalog_item(id) → catalog_object(id)
- order_return_tax(source_tax_uid) → order_line_item_tax(uid)
- order_return_tax(order_return_id) → order_return(uid)
- order_return_tax(catalog_object_id) → catalog_object(id)
- tender(order_id) → order(id)
- tender(location_id) → location(id)
- tender(transaction_id) → transaction(id)
- loyalty_account_mapping(account_id) → loyalty_account(id)
- catalog_item_tax(item_id) → catalog_item(id)
- catalog_item_tax(tax_id) → catalog_tax(id)
- timecard(team_member_id) → team_member(id)
- timecard(location_id) → location(id)
- order_line_item(order_id) → order(id)
- order_line_item(catalog_object_id) → catalog_item_variation(id)
- customer_group_info(customer_id) → customer(id)
- catalog_modifier_override(item_id) → catalog_item(id)
- catalog_modifier_override(modifier_list_id) → catalog_item_modifier_list_info(item_id)
- catalog_modifier_override(modifier_id) → catalog_modifier(id)
- team_member_wage(team_member_id) → team_member(id)
- order_custom_attribute(order_id) → order(id)
- order_custom_attribute(key) → order_custom_attribute_definition(key)
- employee_wage(employee_id) → employee(id)
- employee_location(employee_id) → employee(id)
- employee_location(location_id) → location(id)
- invoice_custom_field(invoice_id) → invoice(id)
- shift(employee_id) → employee(id)
- shift(location_id) → location(id)
- shift(team_member_id) → team_member(id)
- gift_card_customer(gift_card_id) → gift_card(id)
- gift_card_customer(customer_id) → customer(id)
- card_payment_details(payment_id) → payment(id)
- card_payment_details(card_id) → card(id)
- dispute_evidence(dispute_id) → dispute(id)
- order_line_item_discount(order_id) → order(id)
- order_line_item_discount(catalog_object_id) → catalog_object(id)
- merchant_custom_attribute(merchant_id) → merchant(id)
- merchant_custom_attribute(key) → custom_attribute_definition(key)
- order_return_service_charge(source_service_charge_uid) → order(id)
- order_return_service_charge(catalog_object_id) → catalog_object(id)
- catalog_custom_attribute_definition(catalog_object_id) → catalog_object(id)
- catalog_modifier_in_catalog_modifier_list(modifier_list_id) → catalog_modifier_list(id)
- catalog_modifier_in_catalog_modifier_list(modifier_id) → catalog_modifier(id)
- inventory_count_history(catalog_object_id) → catalog_object(id)
- inventory_count_history(location_id) → location(id)
