Skip to content

List customers

GET
/{currentTeam}/customers
curl --request GET \
--url https://api.tradeops.cc/v1/example/customers \
--header 'Authorization: Bearer <token>'
currentTeam
required
string

The current team slug

include
Array<string>
Allowed values: locations
fields[customers]
Array<string>
Allowed values: name slug number type channel region territory address city parish latitude longitude contact_name contact_phone contact_email metadata is_active created_at updated_at
fields[customer_locations]
Array<string>
Allowed values: name address city state_province latitude longitude contact_name contact_phone contact_email is_primary is_active created_at updated_at

Array of CustomerResource

Media typeapplication/vnd.api+json
object
data
required
Array<object>
CustomerResource
object
id
required
string
type
required
string
Allowed value: customers
attributes
object
name
string
slug
string
number
string | null
type
string | null
channel
string | null
region
string | null
territory
string | null
address
string | null
city
string | null
parish
string | null
latitude
string | null
longitude
string | null
contact_name
string | null
contact_phone
string | null
contact_email
string | null
metadata
object
is_active
boolean
created_at
string | null format: date-time
updated_at
string | null format: date-time
relationships
object
locations
object
data
required
Array<object>
object
id
required
string
type
required
string
Allowed value: customer_locations
links
required
object
self
required
string
included
Array<object>
CustomerLocationResource
object
id
required
string
type
required
string
Allowed value: customer_locations
attributes
object
name
string | null
address
string | null
city
string | null
state_province
string | null
latitude
string | null
longitude
string | null
contact_name
string | null
contact_phone
string | null
contact_email
string | null
is_primary
boolean
is_active
boolean
created_at
string | null format: date-time
updated_at
string | null format: date-time

Example

{
"data": [
{
"type": "customers",
"relationships": {
"locations": {
"data": [
{
"type": "customer_locations"
}
]
}
}
}
],
"included": [
{
"type": "customer_locations"
}
]
}

Unauthenticated

Media typeapplication/json
object
message
required

Error overview.

string

Example generated

{
"message": "example"
}

Authorization error

Media typeapplication/json
object
message
required

Error overview.

string

Example generated

{
"message": "example"
}

Not found

Media typeapplication/json
object
message
required

Error overview.

string

Example generated

{
"message": "example"
}

Too many requests. Wait for Retry-After seconds before trying again.

Media typeapplication/json
object
message
required
string

Example generated

{
"message": "example"
}
Retry-After
integer

Seconds until you can try again.