Get a customer
GET
/{currentTeam}/customers/{customer}
const url = 'https://api.tradeops.cc/v1/example/customers/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tradeops.cc/v1/example/customers/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”currentTeam
required
string
The current team slug
customer
required
string
The customer ulid
Query Parameters
Section titled “Query Parameters”include
Array<string>
fields[customers]
Array<string>
fields[customer_locations]
Array<string>
Responses
Section titled “Responses”CustomerResource
Media typeapplication/vnd.api+json
object
data
required
CustomerResource
object
id
required
string
type
required
string
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
links
required
object
self
required
string
included
Array<object>
CustomerLocationResourceobject
id
required
string
type
required
string
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"}Headers
Section titled “Headers”Retry-After
integer
Seconds until you can try again.