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
Details about the organization to create.
Details about the initial admin user to create for the organization.
Example request
cURL
Response fields
The unique Nymble Commerce organization ID for the newly created organization.
The organization code used when calling
POST /api/auth/access to enrich a user token.The organization’s display name.
A URL-friendly identifier for this organization.
Example response
Error responses
| Status | Description |
|---|---|
400 Bad Request | The organization name already exists, or required fields are missing. |
500 Internal Server Error | An unexpected error occurred during provisioning. |
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
The full organization record.
A list of active subscription records for the organization.
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
| Status | Description |
|---|---|
400 Bad Request | The organization derived from your token cannot be found. |
403 Forbidden | Your token does not carry the Admin role. |
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.
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
The email address of the user to promote to admin.Example:
"[email protected]"Example request
cURL
Response fields
true when the admin role has been successfully assigned.Example response
Error responses
| Status | Description |
|---|---|
400 Bad Request | No user was found with the given email address, or the request is malformed. |
403 Forbidden | Your token does not carry the Admin role. |
DELETE /api/organizations/users/admins
Remove the admin role from a user in your organization.Authentication
Request body
The user ID of the admin to demote.Example:
"kp_abc123def456"Example request
cURL
Response fields
true when the admin role has been successfully removed.Example response
Error responses
| Status | Description |
|---|---|
400 Bad Request | UserId is missing or the user cannot be found. |
403 Forbidden | Your token does not carry the Admin role. |
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
The user ID of the user to associate with a customer account.Example:
"kp_abc123def456"The customer account number from your ERP or order management system to link to this user.Example:
"C-10042"Example request
cURL
Response fields
The newly created user-customer association record.
Example response
Error responses
| Status | Description |
|---|---|
400 Bad Request | UserId or CustomerNumber is missing or invalid. |
403 Forbidden | Your token does not carry the Admin role. |
GET /api/organizations/users/associations
List all user-customer associations in your organization. Supports pagination, sorting, and filtering byUserId or CustomerNumber.
Authentication
Query parameters
Page of results to return (1-indexed).
Number of results per page.
Field to sort by. Accepted values:
UserId, CustomerNumber.Sort direction. Accepted values:
asc, desc.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
The current page of user-customer association records.
The total number of associations matching the query (before pagination).
The current page number.
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
A unique name for the price tier within your organization.Example:
"Wholesale"The ISO 4217 currency code for this tier.Example:
"USD"Example request
cURL
Response
Returns200 OK with an empty body on success.
Error responses
| Status | Description |
|---|---|
400 Bad Request | Name or CurrencyCode is missing or the currency code is not recognized. |
403 Forbidden | Your token does not carry the Admin role. |
PUT /api/organizations/price-tiers
Update an existing price tier’s name or currency code.Authentication
Request body
The current name of the price tier to update.Example:
"Wholesale"The new name for the price tier.Example:
"Retail"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
| Status | Description |
|---|---|
400 Bad Request | OldName does not match any existing price tier, or required fields are missing. |
403 Forbidden | Your token does not carry the Admin role. |
DELETE /api/organizations/price-tiers
Remove a price tier from your organization by name.Authentication
Request body
The name of the price tier to delete.Example:
"Wholesale"Example request
cURL
Response
Returns200 OK with an empty body on success.
Error responses
| Status | Description |
|---|---|
400 Bad Request | Name does not match any existing price tier, or the organization cannot be found. |
403 Forbidden | Your token does not carry the Admin role. |