Skip to main content
The Sales Reps API manages sales representative accounts and their organization assignments within Nymble Commerce. Sales reps operate under the SalesRep JWT role — their token automatically scopes all requests to their assigned customers, so they can only access data for organizations they belong to. Administrative endpoints (create, update, delete, activate, deactivate) require the Admin role.
Sales reps receive an invitation email when they are added to an organization. They log in through your organization’s identity provider and receive a scoped JWT that limits data access to their assigned customers.

GET /api/salesreps/organizations

Returns the list of organizations that the currently authenticated sales rep is assigned to. The rep’s identity is resolved automatically from the UserId JWT claim — you do not pass a user ID in the request. Security: Admin policy Route: GET https://api.achievemomentum.com/api/salesreps/organizations

Response

salesRepOrganizations
array
Array of organization assignments for the sales rep.
Example response
{
  "salesRepOrganizations": [
    {
      "organizationId": "34ku8ni238sdin0n23cdm6",
      "organizationName": "Acme Distributors",
      "identityOrganizationId": "kinde_org_abc123",
      "identityProviderUserId": "kinde_user_xyz789",
      "organizationSalesRepId": "OJ76hgt87hgas4ffG5",
      "salesRepId": "KJ76hgt87hgas4ffG3",
      "repNumber": "REP-001",
      "firstName": "Jane",
      "lastName": "Smith",
      "email": "[email protected]",
      "phoneNumber": "555-555-5555",
      "active": true
    }
  ]
}
curl example
curl -X GET \
  "https://api.achievemomentum.com/api/salesreps/organizations" \
  -H "Authorization: Bearer <sales_rep_token>"

GET /api/organizations/salesreps

Returns a paginated list of all sales reps assigned to the authenticated administrator’s organization. Security: Admin policy

Query parameters

pageNumber
integer
default:"1"
Page number for pagination. Defaults to 1.
pageSize
integer
default:"25"
Number of results per page. Defaults to 25.
sortOn
string
default:"RepNumber"
Field to sort results by. Defaults to RepNumber.
sortDirection
string
default:"asc"
Sort direction. Accepts asc or desc. Defaults to asc.

Response

Returns an array of sales rep records.
organizationId
string
Unique identifier of the organization.
organizationSalesRepId
string
Unique identifier for this rep–organization assignment.
salesRepId
string
Unique identifier of the sales rep record.
firstName
string
Sales rep’s first name.
lastName
string
Sales rep’s last name.
email
string
Sales rep’s email address.
phoneNumber
string
Sales rep’s phone number.
repNumber
string
The rep’s representative number within the organization.
active
boolean
Whether the sales rep is currently active in the organization.
Example response
[
  {
    "organizationId": "34ku8ni238sdin0n23cdm6",
    "organizationSalesRepId": "OJ76hgt87hgas4ffG5",
    "salesRepId": "KJ76hgt87hgas4ffG3",
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phoneNumber": "555-555-5555",
    "repNumber": "1234",
    "active": true
  },
  {
    "organizationId": "34ku8ni238sdin0n23cdm6",
    "organizationSalesRepId": "OJ76hgt87hgas4ffG6",
    "salesRepId": "AJ76hgt87hgas4ffG9",
    "firstName": "Mary",
    "lastName": "Doe",
    "email": "[email protected]",
    "phoneNumber": "555-555-5555",
    "repNumber": "MRY",
    "active": false
  }
]
curl example
curl -X GET \
  "https://api.achievemomentum.com/api/organizations/salesreps?pageNumber=1&pageSize=25&sortOn=LastName&sortDirection=asc" \
  -H "Authorization: Bearer <admin_token>"

PUT /api/organizations/salesreps

Creates a new sales rep and assigns them to your organization. If a sales rep with the given email already exists in the system, the existing rep record is reused and they are simply added to the organization. A welcome email is automatically sent to the rep with login instructions. Security: Admin policy

Request body

firstName
string
required
Sales rep’s first name.
lastName
string
required
Sales rep’s last name.
email
string
required
Sales rep’s email address. Used as the login identifier.
phoneNumber
string
Sales rep’s phone number.
repNumber
string
required
Representative number to assign within the organization (e.g. REP-001).
roles
string[]
Roles to assign. Typically includes SalesRep.

Response

organizationId
string
The organization the rep was added to.
organizationName
string
Display name of the organization.
organizationSalesRepId
string
Unique identifier for this rep–organization assignment.
salesRepId
string
Unique identifier of the sales rep record.
firstName
string
Sales rep’s first name.
lastName
string
Sales rep’s last name.
email
string
Sales rep’s email address.
phoneNumber
string
Sales rep’s phone number.
repNumber
string
The assigned representative number.
identityProvider
string
The identity provider used (e.g. IdP).
identityProviderUserId
string
The identity provider’s user identifier for this rep.
Example request
{
  "firstName": "John",
  "lastName": "Doe",
  "email": "[email protected]",
  "phoneNumber": "123-456-7890",
  "repNumber": "REP-001",
  "roles": ["SalesRep"]
}
curl example
curl -X PUT \
  "https://api.achievemomentum.com/api/organizations/salesreps" \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phoneNumber": "123-456-7890",
    "repNumber": "REP-001",
    "roles": ["SalesRep"]
  }'

PATCH /api/organizations/salesreps

Updates a sales rep’s representative number within the organization. Security: Admin policy

Request body

organizationSalesRepId
string
required
The unique identifier of the rep–organization assignment to update.
repNumber
string
required
The new representative number to assign.

Response

organizationId
string
The organization the rep belongs to.
organizationSalesRepId
string
Unique identifier for the rep–organization assignment.
salesRepId
string
Unique identifier of the sales rep record.
repNumber
string
The updated representative number.
firstName
string
Sales rep’s first name.
lastName
string
Sales rep’s last name.
email
string
Sales rep’s email address.
success
boolean
true if the update succeeded.
curl example
curl -X PATCH \
  "https://api.achievemomentum.com/api/organizations/salesreps" \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "organizationSalesRepId": "KJ76hgt87hgas4ffG3",
    "repNumber": "REP-099"
  }'

POST /api/organizations/salesreps/activate

Reactivates a previously deactivated sales rep within your organization. The rep’s identity provider access and data sync permissions are restored, and they receive a re-invitation email. Security: Admin policy

Request body

organizationSalesRepId
string
required
The unique identifier of the rep–organization assignment to activate.

Response

Returns 200 OK with no body on success.
curl example
curl -X POST \
  "https://api.achievemomentum.com/api/organizations/salesreps/activate" \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{ "organizationSalesRepId": "KJ76hgt87hgas4ffG3" }'

POST /api/organizations/salesreps/deactivate

Deactivates a sales rep within your organization. Their login access and data sync permissions are revoked, but their record is preserved. You can reactivate them at any time. Security: Admin policy

Request body

organizationSalesRepId
string
required
The unique identifier of the rep–organization assignment to deactivate.

Response

Returns 200 OK with no body on success.
curl example
curl -X POST \
  "https://api.achievemomentum.com/api/organizations/salesreps/deactivate" \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{ "organizationSalesRepId": "KJ76hgt87hgas4ffG3" }'

DELETE /api/organizations/salesreps

Permanently removes a sales rep from your organization. If the rep belongs to other organizations, only their access to your organization is revoked. If this is their only organization, their account is fully deleted from the identity provider and data sync system. Security: Admin policy
This action permanently removes the sales rep’s access to your organization and cannot be undone. To temporarily suspend access, use the deactivate endpoint instead.

Request body

organizationSalesRepId
string
required
The unique identifier of the rep–organization assignment to delete.

Response

success
boolean
true if the deletion succeeded.
curl example
curl -X DELETE \
  "https://api.achievemomentum.com/api/organizations/salesreps" \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{ "organizationSalesRepId": "KJ76hgt87hgas4ffG3" }'