Most organization endpoints require an Admin role. The sole exception is
POST /api/organizations (create a new organization), which is public and does not require an existing token.POST /api/organizations
Create a new organization and its initial admin user in a single request. This endpoint is public — you do not need an existing token to call it. It provisions both the organization record and an admin user account simultaneously.Request body
object
required
Details about the organization to create.
object
required
Details about the initial admin user to create for the organization.
Example request
cURL
Response fields
string
The unique Nymble Commerce organization ID for the newly created organization.
string
The organization code used when calling
POST /api/auth/access to enrich a user token.string
The organization’s display name.
string
A URL-friendly identifier for this organization.
Example response
Error responses
GET /api/organization
Retrieve your organization’s full details, including active subscriptions and feature entitlements. The organization ID is read from your JWT claims — you do not pass it as a parameter.Authentication
Example request
cURL
Response fields
object
The full organization record.
array
A list of active subscription records for the organization.
array
A list of feature entitlements derived from the active subscription. Each entry describes a platform capability the organization has access to.
Example response
Error responses
GET /api/organizations/users/admins
List all users who hold the admin role in your organization.Authentication
Example request
cURL
Response
Returns a list ofOrganizationUser objects for every admin in your organization.
array
Example response
POST /api/organizations/users/admins
Assign the admin role to a user in your organization. The user must already have a Nymble Commerce account. A welcome email is sent to the user upon successful assignment.Authentication
Request body
string
required
The email address of the user to promote to admin.Example:
"[email protected]"Example request
cURL
Response fields
boolean
true when the admin role has been successfully assigned.Example response
Error responses
DELETE /api/organizations/users/admins
Remove the admin role from a user in your organization.Authentication
Request body
string
required
The user ID of the admin to demote.Example:
"kp_abc123def456"Example request
cURL
Response fields
boolean
true when the admin role has been successfully removed.Example response
Error responses
POST /api/organizations/users/associate-customer
Link a user account to a customer record within your organization. Once associated, that user’s JWT is automatically enriched with the customer’sCustomerNumber, PriceTier, and CurrencyCode on their next token enrichment call.
Authentication
Request body
string
required
The user ID of the user to associate with a customer account.Example:
"kp_abc123def456"string
required
The customer account number from your ERP or order management system to link to this user.Example:
"C-10042"Example request
cURL
Response fields
object
The newly created user-customer association record.
Example response
Error responses
GET /api/organizations/users/associations
List all user-customer associations in your organization. Supports pagination, sorting, and filtering byUserId or CustomerNumber.
Authentication
Query parameters
integer
default:"1"
Page of results to return (1-indexed).
integer
default:"25"
Number of results per page.
string
default:"UserId"
Field to sort by. Accepted values:
UserId, CustomerNumber.string
default:"asc"
Sort direction. Accepted values:
asc, desc.array
Optional array of filter objects. Each filter targets either
UserId or CustomerNumber.Supported operators: startswith, contains, notcontains, endswith, equals, notequals, gt, gte, lt, lteExample request
cURL
Response fields
array
The current page of user-customer association records.
integer
The total number of associations matching the query (before pagination).
integer
The current page number.
integer
The number of records per page.
Example response
POST /api/organizations/price-tiers
Add a new price tier to your organization. Price tiers are referenced when enriching user tokens and are used to return the correct pricing on product queries.Authentication
Request body
string
required
A unique name for the price tier within your organization.Example:
"Wholesale"string
required
The ISO 4217 currency code for this tier.Example:
"USD"Example request
cURL
Response
Returns200 OK with an empty body on success.
Error responses
PUT /api/organizations/price-tiers
Update an existing price tier’s name or currency code.Authentication
Request body
string
required
The current name of the price tier to update.Example:
"Wholesale"string
required
The new name for the price tier.Example:
"Retail"string
default:"USD"
The updated ISO 4217 currency code for this tier.Example:
"CAD"Example request
cURL
Response
Returns200 OK with an empty body on success.
Error responses
DELETE /api/organizations/price-tiers
Remove a price tier from your organization by name.Authentication
Request body
string
required
The name of the price tier to delete.Example:
"Wholesale"Example request
cURL
Response
Returns200 OK with an empty body on success.