Get Sales Rep
Retrieves the details of a single sales rep, including all companies, customers and roles they can access.
HTTP Request
- URL:
/salesRep/{id} - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_CUSTOMERorREAD_WRITE_CUSTOMER
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the sales rep to retrieve. |
cURL Example
curl --location '<BASE_URL>/salesRep/66b1c2d3e4f5a6b7c8d9e0f1' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The sales rep was returned successfully.
- 400 Bad Request: The access token is missing or invalid, the token does not have the required scope, or the sales rep ID is not valid.
Sample JSON Response
{
"success": true,
"data": {
"id": "66b1c2d3e4f5a6b7c8d9e0f1",
"firstName": "James",
"lastName": "Carter",
"email": "james.carter@aximcommerce.com",
"phoneNumber": "2125550188",
"status": "active",
"verifiedEmail": true,
"accessAll": false,
"notes": "Northeast territory",
"metaFields": [
{
"id": "66b1c2d3e4f5a6b7c8d9e0f9",
"metaFieldId": "6650c1a2b3c4d5e6f7a8b9c1",
"code": "territory",
"label": "Territory",
"valueType": "text",
"displayStorefront": false,
"value": "Northeast"
}
],
"createdBy": {
"name": "ERP Connector api",
"type": "api"
},
"salesRepCompanies": [
{
"id": "66b1c2d3e4f5a6b7c8d9e0f2",
"company": "665434c100e82884676936b9",
"customers": ["66a5023524b16685e42a1eda"],
"roles": [],
"accessType": "customer"
},
{
"id": "66b1c2d3e4f5a6b7c8d9e0f3",
"company": "665434c100e82884676936ba",
"customers": [],
"roles": ["663a0aff4587085935a4fb95"],
"accessType": "roles"
}
],
"createdAt": "2024-08-06T09:12:51.204Z",
"updatedAt": "2024-09-18T15:40:02.731Z"
}
}
Response Details
Sales Rep Data
The fields are the same as in Get All Sales Reps, including the Sales Rep Companies Data.
Notes
- If no sales rep matches the ID,
datais an empty object.