Developer reference
API Documentation
Available HTTP endpoints for PMS Service API, including request methods, controllers, authentication, and payload details.
Route index
Authentication
POST
/api/v1/access/token
AuthController.getToken
Public
Issue a Bearer JWT for machine-to-machine API access.
Route mapping: 'POST /api/v1/access/token': 'AuthController.getToken'.
Headers
| Name | Value |
Content-Type | application/json |
Payload
| Field | Type | Required | Description |
user_name | string | Yes | API user name |
client_id | string | Yes | Must match the user’s client ID |
client_secret | string | Yes | Must match the user’s client secret |
security_token | string | Yes | Must match the user’s security token |
access_id | string | Yes | Access identity / device / account id |
access_type | string | Yes | Must be allowed for the user (e.g. quickgrind-netsuite, vmcs-register) |
instance | string | No | Optional instance identifier stored in the JWT |
expiry | number | No | Optional token lifetime override (seconds) |
Example request
POST /api/v1/access/token
Content-Type: application/json
{
"user_name": "api.user",
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"security_token": "your-security-token",
"access_id": "plant-001",
"access_type": "quickgrind-netsuite",
"instance": "prod",
"expiry": 3600
}
Success response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer"
}
Error responses
| Status | When |
401 | Missing access_id |
401 | User not found for user_name |
401 | Invalid client_id, client_secret, or security_token |
401 | User has no API access |
401 | Invalid access_type for the user |
POST
/api/v1/access/tokenValid
AuthController.tokenValid
Public
Verify a Bearer JWT. Returns the token payload when valid, or an error when invalid/expired.
Also available as GET /api/v1/access/tokenValid.
How to send the token
| Source | Example |
| Header | Authorization: Bearer <token> |
| Body (POST) | { "token": "<token>" } |
| Query | ?token=<token> |
Example request
POST /api/v1/access/tokenValid
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
Success response
{
"valid": true,
"id": 12,
"access_type": "quickgrind-netsuite",
"access_id": "plant-001",
"instance": "prod",
"expiresIn": 3600,
"iat": 1710000000,
"exp": 1710003600
}
Error responses
| Status | When |
400 | No token provided / bad Authorization header format |
401 | Invalid or expired token |
PUT
/api/v1/entrance/login
Public
Sign in with email/password and create a browser session cookie.
Payload
| Field | Type | Required | Description |
email_address | string | Yes | User email |
password | string | Yes | Plain-text password |
platform | string | No | Defaults to quickgrind |
rememberMe | boolean | No | Extend session cookie lifetime |
Example request
{
"email_address": "admin@example.com",
"password": "your-password",
"rememberMe": true
}
POST
/api/v1/entrance/signup
Public
Create a new user account and sign the requester in.
Payload
| Field | Type | Required | Description |
emailAddress | string | Yes | Valid email address |
password | string | Yes | New password |
fullName | string | Yes | Display name |
POST
/api/v1/entrance/send-password-recovery-email
Public
Send a password recovery email when Mailgun is configured.
Payload
| Field | Type | Required | Description |
emailAddress | string | Yes | Account email to recover |
POST
/api/v1/entrance/update-password-and-login
Public
Set a new password using a recovery token, then log in.
Payload
| Field | Type | Required | Description |
password | string | Yes | New password |
token | string | Yes | Password recovery token |
Session / Account
GET
/api/v1/account/logout
Session
Clear the current browser session. Also available via /logout.
Payload
None
PUT
/api/v1/account/update-password
Session required
Update password for the currently logged-in user.
Payload
| Field | Type | Required | Description |
password | string | Yes | New password |
PUT
/api/v1/account/update-profile
Session required
Update profile fields for the logged-in user.
Payload
| Field | Type | Required | Description |
fullName | string | No | Display name |
emailAddress | string | No | New email address |
PUT
/api/v1/account/update-billing-card
Session required
Update billing card details when Stripe is configured.
Payload
| Field | Type | Required | Description |
stripeToken | string | No | Stripe token (empty clears card) |
billingCardBrand | string | No | Card brand |
billingCardLast4 | string | No | Last 4 digits |
billingCardExpMonth | string | No | Expiry month |
billingCardExpYear | string | No | Expiry year |
GET
/api/v1/users
UserController.getUsers
Bearer JWT
Returns the decoded token payload for the authorized caller.
Route mapping: 'GET /api/v1/users': 'UserController.getUsers'.
Headers
| Name | Value |
Authorization | Bearer <token> |
Payload
None
Example response
{
"id": 1,
"access_type": "quickgrind-netsuite",
"access_id": "plant-001",
"iat": 1710000000,
"exp": 1710003600
}
Admin
These endpoints expect an authenticated browser session (logged-in admin).
POST
/user/create
Session required
Create a user from the admin UI.
Payload
{
"inputs": {
"first_name": "Jane",
"middle_name": "",
"last_name": "Doe",
"user_name": "jane.doe",
"email_address": "jane@example.com",
"password": "hashed-or-plain-as-configured",
"client_id": "client-id",
"client_secret": "client-secret",
"vmcs-register": true
}
}
POST
/user/updateuserinfo
Session required
Update user profile fields from admin.
Payload
{
"id": 12,
"inputs": {
"first_name": "Jane",
"last_name": "Doe",
"email_address": "jane@example.com",
"user_name": "jane.doe"
}
}
POST
/user/updatepassword
Session required
Update a user’s password from admin.
Payload
{
"id": 12,
"inputs": {
"password": "new-password"
}
}
POST
/user/changeaccesstypes
Session required
Replace a user’s access types.
Payload
{
"id": 12,
"inputs": {
"vmcs-register": "true",
"quickgrind-netsuite": "true"
}
}
POST
/user/resetsecuritytoken
Session required
Generate and save a new security token for a user.
Payload
{
"id": 12
}
POST
/api/v1/deliver-contact-form-message
Public
Deliver the public contact form message (email features depend on Mailgun config).
Utility
GET
/ping
Public
Health check endpoint.
Example response
{
"success": true
}