← Back to API Reference

/accounts

Tag: accounts

getAccounts are the top level entity Asb sports uniform builder

Parameters

NameInTypeFormatRequiredDescription
idquerystring
primary_owner_user_idquerystringThe primary owner of the account
namequerystringThe name of the account
slugquerystringThe slug of the account
emailquerystringThe email of the account. For teams, this is the email of the team (if any)
is_personal_accountquerystringWhether the account is a personal account or not
updated_atquerystring
created_atquerystring
created_byquerystring
updated_byquerystring
picture_urlquerystring
public_dataquerystring
rolequerystringThe user role for personal accounts (member, admin, designer, sales-rep). Defaults to member (customer).
companyquerystringCustomer company / organization name
phonequerystringCustomer phone number
assigned_rep_idquerystringGame One rep_id of the assigned sales representative
assigned_rep_namequerystringFull name of the assigned sales representative
assigned_rep_emailquerystringEmail of the assigned sales representative
assigned_rep_phonequerystringPhone number of the assigned sales representative
assigned_rep_headshot_urlquerystringHeadshot image URL of the assigned sales representative
assigned_rep_sourcequerystringHow the rep was assigned: brand_template or geo_search
assigned_rep_atquerystringWhen the sales representative was assigned
brand_templatequerystringCached Game One customer response (GameOneCustomerResponse) from the last applied brand template
selectquerystringFiltering Columns
orderquerystringOrdering
RangeheaderstringLimiting and Pagination
Range-UnitheaderstringLimiting and Pagination
offsetquerystringLimiting and Pagination
limitquerystringLimiting and Pagination
PreferheaderstringPreference

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

NameInTypeFormatRequiredDescription
accountsbodyobjectaccounts
selectquerystringFiltering Columns
PreferheaderstringPreference

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

NameInTypeFormatRequiredDescription
idquerystring
primary_owner_user_idquerystringThe primary owner of the account
namequerystringThe name of the account
slugquerystringThe slug of the account
emailquerystringThe email of the account. For teams, this is the email of the team (if any)
is_personal_accountquerystringWhether the account is a personal account or not
updated_atquerystring
created_atquerystring
created_byquerystring
updated_byquerystring
picture_urlquerystring
public_dataquerystring
rolequerystringThe user role for personal accounts (member, admin, designer, sales-rep). Defaults to member (customer).
companyquerystringCustomer company / organization name
phonequerystringCustomer phone number
assigned_rep_idquerystringGame One rep_id of the assigned sales representative
assigned_rep_namequerystringFull name of the assigned sales representative
assigned_rep_emailquerystringEmail of the assigned sales representative
assigned_rep_phonequerystringPhone number of the assigned sales representative
assigned_rep_headshot_urlquerystringHeadshot image URL of the assigned sales representative
assigned_rep_sourcequerystringHow the rep was assigned: brand_template or geo_search
assigned_rep_atquerystringWhen the sales representative was assigned
brand_templatequerystringCached Game One customer response (GameOneCustomerResponse) from the last applied brand template
accountsbodyobjectaccounts
PreferheaderstringPreference

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

NameInTypeFormatRequiredDescription
idquerystring
primary_owner_user_idquerystringThe primary owner of the account
namequerystringThe name of the account
slugquerystringThe slug of the account
emailquerystringThe email of the account. For teams, this is the email of the team (if any)
is_personal_accountquerystringWhether the account is a personal account or not
updated_atquerystring
created_atquerystring
created_byquerystring
updated_byquerystring
picture_urlquerystring
public_dataquerystring
rolequerystringThe user role for personal accounts (member, admin, designer, sales-rep). Defaults to member (customer).
companyquerystringCustomer company / organization name
phonequerystringCustomer phone number
assigned_rep_idquerystringGame One rep_id of the assigned sales representative
assigned_rep_namequerystringFull name of the assigned sales representative
assigned_rep_emailquerystringEmail of the assigned sales representative
assigned_rep_phonequerystringPhone number of the assigned sales representative
assigned_rep_headshot_urlquerystringHeadshot image URL of the assigned sales representative
assigned_rep_sourcequerystringHow the rep was assigned: brand_template or geo_search
assigned_rep_atquerystringWhen the sales representative was assigned
brand_templatequerystringCached Game One customer response (GameOneCustomerResponse) from the last applied brand template
PreferheaderstringPreference

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

ColumnTypeFormatNullableDefaultNotes
idPK
stringuuidextensions.uuid_generate_v4()This is a Primary Key.
primary_owner_user_id
stringuuidauth.uid()The primary owner of the account
name
stringcharacter varyingThe name of the account
slug
stringtextThe slug of the account
email
stringcharacter varyingThe email of the account. For teams, this is the email of the team (if any)
is_personal_account
booleanbooleanWhether the account is a personal account or not
updated_at
stringtimestamp with time zone
created_at
stringtimestamp with time zone
created_by
stringuuid
updated_by
stringuuid
picture_url
stringcharacter varying
public_data
objectjsonb
role
stringcharacter varyingmemberFK → roles.name
company
stringcharacter varyingCustomer company / organization name
phone
stringcharacter varyingCustomer phone number
assigned_rep_id
stringtextGame One rep_id of the assigned sales representative
assigned_rep_name
stringtextFull name of the assigned sales representative
assigned_rep_email
stringtextEmail of the assigned sales representative
assigned_rep_phone
stringtextPhone number of the assigned sales representative
assigned_rep_headshot_url
stringtextHeadshot image URL of the assigned sales representative
assigned_rep_source
stringtextHow the rep was assigned: brand_template or geo_search
assigned_rep_at
stringtimestamp with time zoneWhen the sales representative was assigned
brand_template
objectjsonbCached Game One customer response (GameOneCustomerResponse) from the last applied brand template