← Back to API Reference
/accounts
Tag: accounts
getAccounts are the top level entity Asb sports uniform builder
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
primary_owner_user_id | query | string | — | — | The primary owner of the account |
name | query | string | — | — | The name of the account |
slug | query | string | — | — | The slug of the account |
email | query | string | — | — | The email of the account. For teams, this is the email of the team (if any) |
is_personal_account | query | string | — | — | Whether the account is a personal account or not |
updated_at | query | string | — | — | — |
created_at | query | string | — | — | — |
created_by | query | string | — | — | — |
updated_by | query | string | — | — | — |
picture_url | query | string | — | — | — |
public_data | query | string | — | — | — |
role | query | string | — | — | The user role for personal accounts (member, admin, designer, sales-rep). Defaults to member (customer). |
company | query | string | — | — | Customer company / organization name |
phone | query | string | — | — | Customer phone number |
assigned_rep_id | query | string | — | — | Game One rep_id of the assigned sales representative |
assigned_rep_name | query | string | — | — | Full name of the assigned sales representative |
assigned_rep_email | query | string | — | — | Email of the assigned sales representative |
assigned_rep_phone | query | string | — | — | Phone number of the assigned sales representative |
assigned_rep_headshot_url | query | string | — | — | Headshot image URL of the assigned sales representative |
assigned_rep_source | query | string | — | — | How the rep was assigned: brand_template or geo_search |
assigned_rep_at | query | string | — | — | When the sales representative was assigned |
brand_template | query | string | — | — | Cached Game One customer response (GameOneCustomerResponse) from the last applied brand template |
select | query | string | — | — | Filtering Columns |
order | query | string | — | — | Ordering |
Range | header | string | — | — | Limiting and Pagination |
Range-Unit | header | string | — | — | Limiting and Pagination |
offset | query | string | — | — | Limiting and Pagination |
limit | query | string | — | — | Limiting and Pagination |
Prefer | header | string | — | — | Preference |
Example
bash
curl "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/accounts?select=*&limit=10" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Responses
200OK
206Partial Content
postAccounts are the top level entity Asb sports uniform builder
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
accounts | body | object | — | — | accounts |
select | query | string | — | — | Filtering Columns |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X POST "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/accounts" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"primary_owner_user_id": "00000000-0000-0000-0000-000000000000",
"name": "example",
"is_personal_account": true,
"public_data": {},
"role": "example"
}'Responses
201Created
patchAccounts are the top level entity Asb sports uniform builder
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
primary_owner_user_id | query | string | — | — | The primary owner of the account |
name | query | string | — | — | The name of the account |
slug | query | string | — | — | The slug of the account |
email | query | string | — | — | The email of the account. For teams, this is the email of the team (if any) |
is_personal_account | query | string | — | — | Whether the account is a personal account or not |
updated_at | query | string | — | — | — |
created_at | query | string | — | — | — |
created_by | query | string | — | — | — |
updated_by | query | string | — | — | — |
picture_url | query | string | — | — | — |
public_data | query | string | — | — | — |
role | query | string | — | — | The user role for personal accounts (member, admin, designer, sales-rep). Defaults to member (customer). |
company | query | string | — | — | Customer company / organization name |
phone | query | string | — | — | Customer phone number |
assigned_rep_id | query | string | — | — | Game One rep_id of the assigned sales representative |
assigned_rep_name | query | string | — | — | Full name of the assigned sales representative |
assigned_rep_email | query | string | — | — | Email of the assigned sales representative |
assigned_rep_phone | query | string | — | — | Phone number of the assigned sales representative |
assigned_rep_headshot_url | query | string | — | — | Headshot image URL of the assigned sales representative |
assigned_rep_source | query | string | — | — | How the rep was assigned: brand_template or geo_search |
assigned_rep_at | query | string | — | — | When the sales representative was assigned |
brand_template | query | string | — | — | Cached Game One customer response (GameOneCustomerResponse) from the last applied brand template |
accounts | body | object | — | — | accounts |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X PATCH "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/accounts?id=eq.YOUR_ID" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{"primary_owner_user_id": "00000000-0000-0000-0000-000000000000"}'Responses
204No Content
deleteAccounts are the top level entity Asb sports uniform builder
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
primary_owner_user_id | query | string | — | — | The primary owner of the account |
name | query | string | — | — | The name of the account |
slug | query | string | — | — | The slug of the account |
email | query | string | — | — | The email of the account. For teams, this is the email of the team (if any) |
is_personal_account | query | string | — | — | Whether the account is a personal account or not |
updated_at | query | string | — | — | — |
created_at | query | string | — | — | — |
created_by | query | string | — | — | — |
updated_by | query | string | — | — | — |
picture_url | query | string | — | — | — |
public_data | query | string | — | — | — |
role | query | string | — | — | The user role for personal accounts (member, admin, designer, sales-rep). Defaults to member (customer). |
company | query | string | — | — | Customer company / organization name |
phone | query | string | — | — | Customer phone number |
assigned_rep_id | query | string | — | — | Game One rep_id of the assigned sales representative |
assigned_rep_name | query | string | — | — | Full name of the assigned sales representative |
assigned_rep_email | query | string | — | — | Email of the assigned sales representative |
assigned_rep_phone | query | string | — | — | Phone number of the assigned sales representative |
assigned_rep_headshot_url | query | string | — | — | Headshot image URL of the assigned sales representative |
assigned_rep_source | query | string | — | — | How the rep was assigned: brand_template or geo_search |
assigned_rep_at | query | string | — | — | When the sales representative was assigned |
brand_template | query | string | — | — | Cached Game One customer response (GameOneCustomerResponse) from the last applied brand template |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X DELETE "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/accounts?id=eq.YOUR_ID" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Responses
204No Content
Schema
Accounts are the top level entity Asb sports uniform builder
| Column | Type | Format | Nullable | Default | Notes |
|---|---|---|---|---|---|
idPK | string | uuid | — | extensions.uuid_generate_v4() | This is a Primary Key. |
primary_owner_user_id | string | uuid | — | auth.uid() | The primary owner of the account |
name | string | character varying | — | — | The name of the account |
slug | string | text | ✓ | — | The slug of the account |
email | string | character varying | ✓ | — | The email of the account. For teams, this is the email of the team (if any) |
is_personal_account | boolean | boolean | — | Whether the account is a personal account or not | |
updated_at | string | timestamp with time zone | ✓ | — | — |
created_at | string | timestamp with time zone | ✓ | — | — |
created_by | string | uuid | ✓ | — | — |
updated_by | string | uuid | ✓ | — | — |
picture_url | string | character varying | ✓ | — | — |
public_data | object | jsonb | — | — | — |
role | string | character varying | — | member | FK → roles.name |
company | string | character varying | ✓ | — | Customer company / organization name |
phone | string | character varying | ✓ | — | Customer phone number |
assigned_rep_id | string | text | ✓ | — | Game One rep_id of the assigned sales representative |
assigned_rep_name | string | text | ✓ | — | Full name of the assigned sales representative |
assigned_rep_email | string | text | ✓ | — | Email of the assigned sales representative |
assigned_rep_phone | string | text | ✓ | — | Phone number of the assigned sales representative |
assigned_rep_headshot_url | string | text | ✓ | — | Headshot image URL of the assigned sales representative |
assigned_rep_source | string | text | ✓ | — | How the rep was assigned: brand_template or geo_search |
assigned_rep_at | string | timestamp with time zone | ✓ | — | When the sales representative was assigned |
brand_template | object | jsonb | ✓ | — | Cached Game One customer response (GameOneCustomerResponse) from the last applied brand template |