API doc for NovoWatt app - Mobile API (1.0.0)

Download OpenAPI specification:

This is the API documentation for Novowatt app.

User

Request OTP to verify current email

Send OTP to the authenticated user's current email for "verify now" flow. This endpoint requires Authorization token.

Responses

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "OTP sent"
}

Confirm OTP and verify current email

Verify OTP for the authenticated user's current email, then set email_verified=true for that user. This endpoint requires Authorization token.

Request Body schema: application/json
required
otp
required
string

OTP code sent from /email/verify-now/request

Responses

Request samples

Content type
application/json
{
  • "otp": "123456"
}

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "Email verified successfully"
}

Verify phone OTP code

Verify the OTP code sent to a user's phone number.

query Parameters
phone
required
string

Phone number to verify (e.g. 65XXXXXXXX)

code
required
string

OTP code received via SMS

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "OTP correct"
}

Send OTP to phone

Send OTP code via SMS for phone-based authentication (login or registration).

query Parameters
phone
required
string

Singapore phone number. Accepts either 8 digits (old app) or full 65XXXXXXXX format.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "OTP sent"
}

Verify phone OTP and sign in

Verify OTP for phone login.

  • If phone already exists: sign in and return user token.
  • If phone does not exist: create a new account by phone, then sign in and return user token. Use is_new_account to determine whether to show onboarding screens.
Request Body schema: application/json
required
phone
required
string

Singapore phone number. Accepts either 8 digits (old app) or full 65XXXXXXXX format.

otp
required
string

OTP code sent by /send/otp.

fcm_token
string

Optional device push token.

Responses

Request samples

Content type
application/json
{
  • "phone": "91234567",
  • "otp": "123456",
  • "fcm_token": "fcm_device_token"
}

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "OTP verified and login success",
  • "data": {
    }
}

Get all users

Retrieve a list of all users

query Parameters
page
integer

Page number

per_page
integer

Number of items per page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "data": [
    ]
}

Get user's car information

Get user's car information

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Update user's car information

Update user's car information

Request Body schema: application/json
required
vehicle_license_plate
required
string

Vehicle license plate of the user

vehicle_brand
required
string

Brand of the vehicle

vehicle_model
required
string

Model of the vehicle

Responses

Request samples

Content type
application/json
{
  • "vehicle_license_plate": "ABC1234",
  • "vehicle_brand": "Toyota",
  • "vehicle_model": "Camry"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get all location that has this user id in list_queueing_users

Retrieve the location and position user in list_queueing_users.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Start as guest

Start as guest

Request Body schema: application/json
required
device_id
required
string

Device id of the user

device_platform
required
string

Device Platform of the guest

Responses

Request samples

Content type
application/json
{
  • "device_id": "ABCD12344TTT",
  • "device_platform": "android or ios"
}

Response samples

Content type
application/json
{
  • "login_token": "20241128ABCDEFGHIJKLMN"
}

Get current user information

Retrieve the information of the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get current user's rewards

Retrieve the rewards of the currently logged-in user.

query Parameters
reward_type_id
string
Example: reward_type_id=665e8f15ebf7d56c133612ab

Filter rewards by type

status
string
Example: status=redeemed

Filter rewards by status

page
integer
Example: page=1

Page number for pagination

per_page
integer
Example: per_page=10

Number of items per page for pagination

Responses

Response samples

Content type
application/json
{}

Get a specific reward of the current user

Retrieve a specific reward of the currently logged-in user.

path Parameters
reward_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the reward to retrieve.

Responses

Response samples

Content type
application/json
{}

Redeem a specific reward of the current user

Redeem a specific reward of the currently logged-in user.

path Parameters
reward_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the reward to redeem.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Reward redeemed successfully"
}

Get current user's points history

Retrieve the point history of the currently logged-in user.

query Parameters
from_date
string <date>
Example: from_date=2023-01-01

Start date for filtering points history

to_date
string <date>
Example: to_date=2023-12-31

End date for filtering points history

page
integer
Example: page=1

Page number for pagination

per_page
integer
Example: per_page=10

Number of items per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 20,
  • "page": 1,
  • "data": [
    ]
}

Get current user's points statistics

Retrieve the point statistics of the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get current user's pending charging sessions

Retrieve the pending charging sessions of the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get current user's charging sessions

Retrieve charging sessions for the currently logged-in user with various filtering options.

query Parameters
chargepoint_id
string
Example: chargepoint_id=665e8f15ebf7d56c133612ab

Filter by charge point ID (MongoDB ObjectId)

location_id
string
Example: location_id=665e8f15ebf7d56c133612ab

Filter by location ID (MongoDB ObjectId)

status
string
Enum: "charging" "holding" "completed" "noshow" "canceled"
Example: status=completed

Filter by session status

type
string
Enum: "adhoc" "reserved" "queue"
Example: type=adhoc

Filter by session type

from_date
string <date>
Example: from_date=2024-01-01

Filter sessions from this date (inclusive, start of day)

to_date
string <date>
Example: to_date=2024-01-31

Filter sessions until this date (inclusive, end of day)

skip
integer
Default: 0

Number of records to skip (pagination)

limit
integer
Default: 0
Example: limit=20

Maximum number of records to return (0 = no limit)

page
integer
Default: 1
Example: page=1

Page number for pagination

per_page
integer
Default: 10
Example: per_page=10

Number of records per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get user's charge session history (simplified)

Retrieve charging sessions for the current user, including related transaction records.

query Parameters
chargePointId
string

Filter by charge point ID

type
string
Enum: "adhoc" "reserved"

Filter by session type

page
integer
Default: 1

Page number

per_page
integer
Default: 10

Items per page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "total": 209,
  • "page": 1
}

Get user's queue history

Retrieve queue history for the current user from queueing_charging, including cancelled and missed queue records. Each item can include a mapped ChargeSession when the queue entry has a related charge_session_id.

query Parameters
location_id
string
Example: location_id=696869d231454e612bbdf207

Filter by location ID

status
string
Enum: "activated" "cancelled" "missed"
Example: status=cancelled

Filter queue records by queue status

from_date
string <date>
Example: from_date=2026-04-01

Filter queue records from this date (inclusive, start of day)

to_date
string <date>
Example: to_date=2026-04-18

Filter queue records until this date (inclusive, end of day)

page
integer
Default: 1
Example: page=1

Page number for pagination

per_page
integer
Default: 10
Example: per_page=10

Number of records per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 46,
  • "page": 1,
  • "per_page": 20,
  • "data": [
    ]
}

Pay a specific charging session of the current user

Pay a specific charging session of the currently logged-in user.

path Parameters
session_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the charging session to pay.

Request Body schema: application/json
required
payment_method
string

Payment method to use (e.g., wallet, card)

card_id
string

Card ID to use if payment_method is card

Responses

Request samples

Content type
application/json
{
  • "payment_method": "wallet",
  • "card_id": "card_123456789"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Make payment successfully.",
  • "data": {
    }
}

Get user's comprehensive charging statistics

Retrieve complete charging statistics including historical data, financial breakdown, and usage patterns for the current user in a single API call.

query Parameters
type
string
Default: "week"
Enum: "week" "month" "year"
Example: type=week

Time period for statistics

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get current user's transactions

Retrieve the transactions of the currently logged-in user.

query Parameters
month
integer [ 1 .. 12 ]
Example: month=1

Month for filtering transactions (1-12)

year
integer [ 2000 .. 2100 ]
Example: year=2023

Year for filtering transactions (e.g., 2023)

from_date
string <date>
Example: from_date=2023-01-01

Start date for filtering transactions

to_date
string <date>
Example: to_date=2023-12-31

End date for filtering transactions

status
string
Example: status=completed

Filter transactions by status (e.g., completed, pending, failed, paid, unpaid)

type
string
Example: type=charge_session

Filter transactions by type (e.g., charge_session)

charge_session_id
string
Example: charge_session_id=665e8f15ebf7d56c133612ab

ID of the charge session to filter transactions (must be a valid ObjectId)

page
integer
Example: page=1

Page number for pagination

per_page
integer
Example: per_page=10

Number of items per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 20,
  • "page": 1,
  • "data": [
    ]
}

Pay a specific transaction of the current user

Pay a specific transaction of the currently logged-in user.

path Parameters
transaction_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the transaction to pay.

Request Body schema: application/json
required
payment_method
string

Payment method to use (e.g., wallet, card)

card_id
string

Card ID to use if payment_method is card

Responses

Request samples

Content type
application/json
{
  • "payment_method": "wallet",
  • "card_id": "card_123456789"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Transaction paid successfully",
  • "card_id": "card_123456789"
}

Get current user's outstanding payments

Retrieve the outstanding payments of the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

List supported car brands

Returns a static list of car brands with icons and models for the vehicle picker. Public route.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Delete the current user's account

Deletes the logged-in user's account (blocked if wallet balance is negative). Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Log a client-side event

Accepts an arbitrary payload and writes it to the server log for the logged-in user. Requires Authorization token.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true
}

Get the authenticated user's profile

Returns the authenticated user's profile. This endpoint requires Authorization token. plug_n_charge_enabled is always present and coerced to a boolean.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

List the current user's notifications

Returns notifications for the logged-in user from the Notification service. Requires Authorization token.

query Parameters
page
integer
limit
integer

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Delete a notification

Deletes a single notification via the Notification service. Requires Authorization token.

Request Body schema: application/json
required
notification_id
required
string

Responses

Request samples

Content type
application/json
{
  • "notification_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Notification deleted"
}

Mark a notification as read

Marks a single notification as read via the Notification service. Requires Authorization token.

Request Body schema: application/json
required
notification_id
required
string

Responses

Request samples

Content type
application/json
{
  • "notification_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Notification read"
}

Mark all notifications as read

Marks all of a user's notifications as read via the Notification service. Requires Authorization token.

Request Body schema: application/json
required
user_id
required
string

Responses

Request samples

Content type
application/json
{
  • "user_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "All notifications read"
}

Update the current user's avatar

Uploads and sets the logged-in user's profile avatar image. Requires Authorization token.

Request Body schema: multipart/form-data
required
avatar
string <binary>

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Profile avatar updated!",
  • "data": { }
}

Update the authenticated user's profile

Update the authenticated user's profile. All fields are optional; only the fields provided in the request body are updated. This endpoint requires Authorization token.

Request Body schema: application/json
optional
name
string

Display name of the user

dob
string

Date of birth

vehicle_brand
string

Brand of the vehicle

vehicle_model
string

Model of the vehicle

vehicle_license_plate
string

Vehicle license plate (alias, vehicle_no is also accepted)

password
string

New password

gender
string
address
string
plug_n_charge_enabled
boolean

Enable or disable Plug & Charge for the user

Responses

Request samples

Content type
application/json
{
  • "name": "John Doe",
  • "dob": "1990-01-01",
  • "vehicle_brand": "Toyota",
  • "vehicle_model": "Camry",
  • "vehicle_license_plate": "ABC1234",
  • "password": "Secret123",
  • "gender": "male",
  • "address": "1 Marina Bay",
  • "plug_n_charge_enabled": true
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Profile name updated",
  • "data": {
    }
}

Verify the current user's password

Checks the supplied password against the logged-in user's stored password. Requires Authorization token.

Request Body schema: application/json
required
password
string

Responses

Request samples

Content type
application/json
{
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string"
}

Auth

Request OTP to verify current email

Send OTP to the authenticated user's current email for "verify now" flow. This endpoint requires Authorization token.

Responses

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "OTP sent"
}

Confirm OTP and verify current email

Verify OTP for the authenticated user's current email, then set email_verified=true for that user. This endpoint requires Authorization token.

Request Body schema: application/json
required
otp
required
string

OTP code sent from /email/verify-now/request

Responses

Request samples

Content type
application/json
{
  • "otp": "123456"
}

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "Email verified successfully"
}

Send OTP to phone

Send OTP code via SMS for phone-based authentication (login or registration).

query Parameters
phone
required
string

Singapore phone number. Accepts either 8 digits (old app) or full 65XXXXXXXX format.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "OTP sent"
}

Verify phone OTP and sign in

Verify OTP for phone login.

  • If phone already exists: sign in and return user token.
  • If phone does not exist: create a new account by phone, then sign in and return user token. Use is_new_account to determine whether to show onboarding screens.
Request Body schema: application/json
required
phone
required
string

Singapore phone number. Accepts either 8 digits (old app) or full 65XXXXXXXX format.

otp
required
string

OTP code sent by /send/otp.

fcm_token
string

Optional device push token.

Responses

Request samples

Content type
application/json
{
  • "phone": "91234567",
  • "otp": "123456",
  • "fcm_token": "fcm_device_token"
}

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "OTP verified and login success",
  • "data": {
    }
}

Render admin sign-up page

Renders the multi-step admin/CPO sign-up form. When the role is "Seeding Partner", the available locations are included for selection.

query Parameters
step
string
role
string

Responses

Create admin account (step 1)

Creates the admin/CPO account with name, email, role and password. For "Seeding Partner" roles a profit-sharing percentage and location assignment are required.

Request Body schema: application/json
required
name
required
string
email
required
string
role
required
string
password
required
string
retypePassword
required
string
profit_sharing_sp
number

Required only for Seeding Partner (0-100)

Location
string

Location id

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "role": "string",
  • "password": "string",
  • "retypePassword": "string",
  • "profit_sharing_sp": 0,
  • "Location": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Create company (step 2)

Creates a company from the request body and assigns it to the admin identified by the id query parameter.

query Parameters
id
required
string

Admin id to assign the company to

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Create location (step 3)

Creates an Ampeco location and a local Location record for the admin identified by the id query parameter.

query Parameters
id
required
string

Admin (CPO) id

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Save electricity information (step 4)

Saves electricity information to the company belonging to the admin identified by the id query parameter.

query Parameters
id
required
string

Admin id

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Save billing information (step 5)

Saves billing information to the company belonging to the admin identified by the id query parameter.

query Parameters
id
required
string

Admin id

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Admin dashboard login

Authenticates an admin/CPO account by email and password. Superadmins are logged into the session; non-superadmins receive a redirect to the CPO dashboard backend.

Request Body schema: application/json
required
email
required
string
password
required
string

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Admin logout

Destroys the current admin session and redirects to the home page.

Responses

List recent admin notifications

Returns the 10 most recent admin notifications with a relative-time createdAt.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Mark admin notification as read

Marks the given admin notification as read. Only effective for Superadmin sessions.

path Parameters
notification_id
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Render user info page

Renders an admin HTML view with the user's details, transactions, reservations and idling session.

path Parameters
user_id
required
string

Responses

Check if a user exists by email

Looks up a user by email and returns basic identity info if found. Public route (no token required).

query Parameters
email
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Request a password-reset email or OTP

Sends either an OTP (method=otp) or a reset link to the user's email for the forgot-password flow. Public route (no token required).

query Parameters
email
required
string
method
string
Enum: "otp" "link"

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Confirm the current user's new email via OTP

Verifies the OTP and marks the logged-in user's email as verified. Requires Authorization token.

Request Body schema: application/json
required
email
required
string
otp
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "otp": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Email verified successfully"
}

Request an OTP to verify the current user's new email

Sends an OTP to a new email for the logged-in user, ensuring the email is not already in use by another account. Requires Authorization token.

Request Body schema: application/json
required
email
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "OTP sent"
}

Verify an email OTP

Validates an email + OTP pair against the User service. Public route.

Request Body schema: application/json
required
email
required
string
otp
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "otp": "string"
}

Response samples

Content type
application/json
{
  • "ok": true
}

Login with email and password

Authenticates a user with email/password, issues a login token, records a sign-in log and returns the user profile. Public route (no token required).

Request Body schema: application/json
required
email
required
string
password
required
string
fcm_token
string

Optional device FCM token

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "fcm_token": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Login Success",
  • "data": {
    }
}

Register a new user account

Creates a new user after checking email/phone uniqueness, then pushes the customer to NetSuite. Public route (no token required).

Request Body schema: application/json
required
email
required
string
password
required
string
name
required
string
phone
required
string
vehicle_no
required
string
car_brand
required
string
car_model
required
string
dob
required
string

Date of birth

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "name": "string",
  • "phone": "string",
  • "vehicle_no": "string",
  • "car_brand": "string",
  • "car_model": "string",
  • "dob": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "User created",
  • "data": { }
}

Send an SMS OTP

Sends a 2FA verification code by SMS to the given phone number (Singapore numbers auto-prefixed with 65). Public route.

query Parameters
phone
required
string
purpose
string
Default: "register"
Enum: "register" "login"

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "OTP sent"
}

Login or register via a social provider

Resolves an email from a social provider token; logs in an existing user or returns a register intent for a new one. Public route.

Request Body schema: application/json
required
type
required
string

Social provider type

token
required
string
fcm_token
string

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "token": "string",
  • "fcm_token": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": { }
}

Reset a user's password

Updates the password for the given email when new_password matches confirm_password (used in the forgot-password flow). Public route.

Request Body schema: application/json
required
email
required
string
new_password
required
string
confirm_password
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "new_password": "string",
  • "confirm_password": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Password updated!"
}

Check whether an email has been verified

Polled by the mobile app to check if the emailed verification link has been clicked. Public route.

query Parameters
email
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Email verified"
}

Request an email-verification OTP or link

Sends an OTP (method=otp) or a verification link to a not-yet-registered email. Public route.

query Parameters
email
required
string
method
string
Enum: "otp" "link"

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Confirm email via verification link

Endpoint hit when a user clicks the emailed verification link; marks the email verified and renders an HTML confirmation page. Public route.

path Parameters
token
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": false,
  • "msg": "Something went wrong, please contact CS for supporting."
}

Verify a phone OTP

Checks a phone number + OTP code against the cached value. Public route.

query Parameters
phone
required
string
code
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "OTP correct"
}

Login (or auto-register) via phone OTP

Verifies a phone OTP, creating a new account if the phone is unknown, then performs login and returns the user profile. Public route.

Request Body schema: application/json
required
phone
required
string
otp
required
string
fcm_token
string

Responses

Request samples

Content type
application/json
{
  • "phone": "string",
  • "otp": "string",
  • "fcm_token": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Merchants

Get all merchant

Get all merchant

query Parameters
keyword
string

Get merchants by name, code

page
integer

Page number

per_page
integer

Number of items per page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "data": [
    ]
}

Get a merchant by id

Fetches a single merchant from the Subscription service by its id. This route is public (no Authorization token required).

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": { }
}

Subscription plans

Get all subscription plans

Get all subscription plans

query Parameters
keyword
string

Get subscription plans by name or code

merchant_id
string

Merchant ID

merchant_code
string

Merchant code

status
string
Enum: "active" "inactive" "deleted"

Status of the subscription plan

per_page
integer

Number of items per page

page
integer

Page number

deleteAt
string <date-time>

Deletion date

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "data": [
    ]
}

Get a subscription plan by ID

Get a subscription plan by ID

path Parameters
id
required
string

ID of the subscription plan to get

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Subscribe to a subscription plan

Subscribe to a subscription plan. The request is rejected when the authenticated user already has a same-location effective subscription. Effective checks ignore deleted records and match records with status=active or records where subscribe_to is non-null and still in the future.

Request Body schema: application/json
required
subscription_plan_id
required
string

ID of the subscription plan

location_id
required
string

ID of the location that is used for this subscription. Required for all regular purchases via /subscribe. A null/global-scope location_id is accepted only through the activation-code flow (POST /v1/subscriptions/activate-by-code), not through this endpoint.

user_id
string

ID of the user

object

Plan price details

active_date
string <date-time>

Activation date

is_auto_renew
boolean

Enable automatic renewal after this subscription becomes active. Defaults to false.

Responses

Request samples

Content type
application/json
{
  • "subscription_plan_id": "6555e1982a447d5393551866",
  • "location_id": "66337ada513dff7cb0219963",
  • "user_id": "66b176eac77dae25d567ec2",
  • "plan_price": {
    },
  • "active_date": "2024-10-15T08:00:00Z",
  • "is_auto_renew": false
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": { }
}

Subscription

Get all subscriptions

Get all subscriptions

query Parameters
subscription_plan_id
string

Subscription plan ID

merchant_id
string

Merchant ID

status
string

Subscription status

per_page
integer

Number of items per page

page
integer

Page number

active_from
string <date>

Active from date

active_to
string <date>

Active to date

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "data": [
    ]
}

Make a payment for a subscription

Make a payment for a subscription

Request Body schema: application/json
required
subscription_id
string

Subscription ID

payment_type
string
Enum: "wallet" "card" "abapay"

Payment type

card_id
string

if payment_type==card, use should select the card

promo_code_id
string

Promo code ID

Responses

Request samples

Content type
application/json
{
  • "subscription_id": "string",
  • "payment_type": "wallet",
  • "card_id": "66f77bc453598b2450dd2a0a",
  • "promo_code_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Subscription already paid",
  • "data": {
    }
}

Activate a subscription

Activate a subscription

path Parameters
subscription_id
required
string

Subscription ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Toggle auto-renew for a subscription

Toggles recurring renewal for one owned, active, paid, unexpired subscription whose plan supports renewal.

path Parameters
subscription_id
required
string

Subscription ID

Request Body schema: application/json
required
is_auto_renew
required
boolean

Responses

Request samples

Content type
application/json
{
  • "is_auto_renew": true
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string"
}

Deactivate a subscription

Deactivate a subscription

path Parameters
subscription_id
required
string

Subscription ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get Subscription's consumption

path Parameters
id
required
string

Subscription ID (UUID)

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get locations that enable subscription price

query Parameters
subscription_plan_id
string
Default: "6555e1982a447d5393551866"

Filter by subscription plan ID (UUID)

page
integer
Default: 1

Page number

per_page
integer
Default: 100

Number records/page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": "",
  • "total": 30,
  • "page": 1,
  • "per_page": 100
}

Get current user's transaction for this subscription

path Parameters
id
required
string

Subscription ID (UUID)

query Parameters
page
integer
Default: 1

Page number

per_page
integer
Default: 100

Number records/page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": "",
  • "total": 30,
  • "page": 1,
  • "per_page": 100
}

Check if an activation code is valid

Checks whether a global/no-location activation code is redeemable.

query Parameters
code
required
string

Activation Code

subscription_plan_id
required
string

Subscription Plan ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": ""
}

Activate a subscription by code

Redeems a global/no-location activation-code subscription. The request is rejected if the user already has an effective global subscription. Effective checks ignore deleted records and match records with status=active or records where subscribe_to is non-null and still in the future. Location-bound effective subscriptions can coexist with the redeemed global subscription.

Request Body schema: application/json
required
code
string

Activation Code

subscription_plan_id
string

Subscription Plan ID

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "subscription_plan_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": ""
}

Renew a subscription

path Parameters
id
required
string

The subscription ID (MongoDB ObjectId)

Request Body schema: application/json
required
payment_type
string
Enum: "wallet" "card" "abapay"

The type of payment

card_id
string

The ID of the card used for payment (mongoDB ObjectId). Required with type=card

Responses

Request samples

Content type
application/json
{
  • "payment_type": "wallet",
  • "card_id": "5f7e8f15ebf7d56c133612ab"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    },
  • "msg": "Subscription renewed successfully"
}

Check subscription renewal information

This endpoint checks the renewal information for a subscription. It fetches the subscription based on the provided subscription ID, calculates the renewal date, and returns the price and price with GST.

path Parameters
subscription_id
required
string

The ID of the subscription to check

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Subscriptions

Get Subscription's consumption

path Parameters
id
required
string

Subscription ID (UUID)

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get locations that enable subscription price

query Parameters
subscription_plan_id
string
Default: "6555e1982a447d5393551866"

Filter by subscription plan ID (UUID)

page
integer
Default: 1

Page number

per_page
integer
Default: 100

Number records/page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": "",
  • "total": 30,
  • "page": 1,
  • "per_page": 100
}

Get current user's transaction for this subscription

path Parameters
id
required
string

Subscription ID (UUID)

query Parameters
page
integer
Default: 1

Page number

per_page
integer
Default: 100

Number records/page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": "",
  • "total": 30,
  • "page": 1,
  • "per_page": 100
}

Check if an activation code is valid

Checks whether a global/no-location activation code is redeemable.

query Parameters
code
required
string

Activation Code

subscription_plan_id
required
string

Subscription Plan ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": ""
}

Activate a subscription by code

Redeems a global/no-location activation-code subscription. The request is rejected if the user already has an effective global subscription. Effective checks ignore deleted records and match records with status=active or records where subscribe_to is non-null and still in the future. Location-bound effective subscriptions can coexist with the redeemed global subscription.

Request Body schema: application/json
required
code
string

Activation Code

subscription_plan_id
string

Subscription Plan ID

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "subscription_plan_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "msg": ""
}

Renew a subscription

path Parameters
id
required
string

The subscription ID (MongoDB ObjectId)

Request Body schema: application/json
required
payment_type
string
Enum: "wallet" "card" "abapay"

The type of payment

card_id
string

The ID of the card used for payment (mongoDB ObjectId). Required with type=card

Responses

Request samples

Content type
application/json
{
  • "payment_type": "wallet",
  • "card_id": "5f7e8f15ebf7d56c133612ab"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    },
  • "msg": "Subscription renewed successfully"
}

Check subscription renewal information

This endpoint checks the renewal information for a subscription. It fetches the subscription based on the provided subscription ID, calculates the renewal date, and returns the price and price with GST.

path Parameters
subscription_id
required
string

The ID of the subscription to check

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

PromoCodes

Get list promo codes programs with pagination

query Parameters
keyword
string

Search by keyword - code, name, ...

promo_type
string
Enum: "Subscription" "FeePayment"

Filter by promo type

status
string
Enum: "active" "inactive" "deleted"

Filter by status

is_used
boolean

Filter by is used

merchant_id
string

Filter by merchant id

page
integer

The page number.

per_page
integer

The numbers of items to return.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "data": [
    ]
}

Find promo code by code

query Parameters
code
required
string
Example: code=PROMOV3O

code that want to search

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get promo codes

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Calculate discount with promo code

path Parameters
id
required
string

Promo code ID

Request Body schema: application/json
required

Calculate discount request body

invoice_type
string

Type of invoice

amount
number

Amount for which discount is to be calculated

Responses

Request samples

Content type
application/json
{
  • "invoice_type": "Subscription",
  • "amount": 100
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Redeem a promo code

path Parameters
id
required
string

Promo code ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Promo code redeemed successfully"
}

Mark used a promo code

path Parameters
id
required
string

Promo code ID

Request Body schema: application/json
required

Mark used request body

transaction_id
string

Transaction id

Responses

Request samples

Content type
application/json
{
  • "transaction_id": "666b176eac77dae25d567ec2"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Used ${number} promo codes"
}

PromoPrograms

Get promo programs

query Parameters
keyword
string

Keyword to search promo programs

merchant_id
string

Merchant ID

promo_type
string

Promo type

used_codes
integer

Number of used codes

start_date
string <date>

Start date

end_date
string <date>

End date

per_page
integer >= 1

Items per page

page
integer >= 1

Page number

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "data": [
    ]
}

Get a specific promo program

path Parameters
promo_program_id
required
string

Promo program ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Faq

Get a faq promo code

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": [
    ]
}

Get a faq subscription

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": [
    ]
}

List active FAQs

Returns active FAQs, optionally filtered by information category.

query Parameters
category_id
string

Filter FAQs by information category ID.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "",
  • "data": [
    ]
}

Payments

Topup wallet using ABA Payway

Request Body schema: application/json
required
amount
number

Amount to topup

Responses

Request samples

Content type
application/json
{
  • "amount": 0
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Handle ABA PayWay payment webhook

Receives a payment status callback from ABA PayWay and forwards it to the Payment service. Requires a transaction id (tran_id) in the body. This route is public (no Authorization token required).

Request Body schema: application/json
required
tran_id
required
string

ABA PayWay transaction id

Responses

Request samples

Content type
application/json
{
  • "tran_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Transaction id is required"
}

Process a payout request

Updates the status of a payout request (awaiting/processing/paid) and notifies the requester by email. A transaction reference is required for processing/paid statuses. Requires update ACL.

Request Body schema: application/json
required
_id
required
string
status
required
string
Enum: "awaiting" "processing" "paid"
transaction_id
string
remarks
string
confirm
required
boolean

Responses

Request samples

Content type
application/json
{
  • "_id": "string",
  • "status": "awaiting",
  • "transaction_id": "string",
  • "remarks": "string",
  • "confirm": true
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Payout updated"
}

Render payout processing page

Renders the admin HTML view for processing a specific payout request. Requires update ACL.

path Parameters
payout_id
required
string

Responses

Render payout request page

Renders the payout request HTML form pre-filled with the admin's company bank details and wallet balance.

Responses

Submit a payout request

Creates a payout request for the logged-in admin. Requires a wallet balance of at least the minimum payout amount and all bank fields to be provided; resets the wallet balance to 0.

Request Body schema: application/json
required
confirm
required
boolean
bank_account_number
required
string
bank_account_holder_name
required
string
bank_branch
required
string
bank_name
required
string
notify_email
required
string

Responses

Request samples

Content type
application/json
{
  • "confirm": true,
  • "bank_account_number": "string",
  • "bank_account_holder_name": "string",
  • "bank_branch": "string",
  • "bank_name": "string",
  • "notify_email": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Payout submitted"
}

List the current user's saved cards

Returns the logged-in user's tokenized (Stripe) cards. Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Add a payment card

Creates a Stripe customer if needed, links the card token, performs a check/refund and stores the tokenized card for the logged-in user. Requires Authorization token.

Request Body schema: application/json
required
card_token
required
string
is_default
boolean
billing_adress1
string
billing_adress2
string
expiry_date
string
postal_code
string
country
string
mobile_holder
string
email_holder
string

Responses

Request samples

Content type
application/json
{
  • "card_token": "string",
  • "is_default": true,
  • "billing_adress1": "string",
  • "billing_adress2": "string",
  • "expiry_date": "string",
  • "postal_code": "string",
  • "country": "string",
  • "mobile_holder": "string",
  • "email_holder": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Card added successfully",
  • "data": { }
}

Verify a card via a small charge and refund

Charges a small amount ($1) to validate the given card then automatically refunds it. Requires Authorization token.

Request Body schema: application/json
required
id
required
string

Tokenized card id

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "transaction_id": "string",
  • "msg": "string"
}

Set a card as default

Marks the given card as the default payment card for the logged-in user. Requires Authorization token.

Request Body schema: application/json
required
id
required
string

Tokenized card id

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get the default payment method

Returns the authenticated user's currently selected default payment method and card id. Defaults to the wallet when none is set. Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Set the default payment method

Sets the authenticated user's default payment method to a card or the wallet. When type is card, card_id is required and must belong to the user. Requires Authorization token.

Request Body schema: application/json
required
type
required
string
Enum: "wallet" "stripe" "abapay" "card"

Payment method type

card_id
string

Tokenized card id (required when type is card)

Responses

Request samples

Content type
application/json
{
  • "type": "wallet",
  • "card_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Default payment method updated"
}

Remove a saved card

Deletes a tokenized card for the logged-in user and re-assigns the default card if needed. Requires Authorization token.

Request Body schema: application/json
required
id
required
string

Tokenized card id

is_default
boolean

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "is_default": true
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Top up the wallet with a card

Charges the given card via the Payment service and credits the logged-in user's wallet. Requires Authorization token.

Request Body schema: application/json
required
amount
required
number
card_id
required
string

Responses

Request samples

Content type
application/json
{
  • "amount": 0,
  • "card_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Topup successful",
  • "data": { }
}

Pre-charge payment and availability check

Validates the selected payment method (wallet minimum balance) and that the target EVSE is available/preparing before starting a session, storing the chosen payment method. Requires Authorization token.

Request Body schema: application/json
required
payment_method
string
card_id
string
charge_id
string
evse_id
string

Responses

Request samples

Content type
application/json
{
  • "payment_method": "string",
  • "card_id": "string",
  • "charge_id": "string",
  • "evse_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "All paid"
}

Validate the user's payment method before charging

Checks that the logged-in user's selected payment method (wallet minimum balance or card pre-auth) is valid to start a charging session. Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string"
}

Get the current user's wallet balance

Returns the logged-in user's wallet balance in dollars along with placeholder loyalty fields. Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

ABAPayway

Topup wallet using ABA Payway

Request Body schema: application/json
required
amount
number

Amount to topup

Responses

Request samples

Content type
application/json
{
  • "amount": 0
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Queue

Get queue's status of a Location

path Parameters
location_id
required
string

Location ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Join a queue in a Location

path Parameters
location_id
required
string
Example: 5f7e8f15ebf7d56c133612ab

Location ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Cancel queue in a Location

path Parameters
location_id
required
string
Example: 5f7e8f15ebf7d56c133612ab

Location ID

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Get charging status for EVSEs in a location

Retrieve the charging status of all EVSEs associated with a specific location.

path Parameters
location_id
required
string
Example: 6331276a96ec3fa15d1cb0fc

The ID of the location to filter EVSEs by.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get all location that has this user id in list_queueing_users

Retrieve the location and position user in list_queueing_users.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get user's queue history

Retrieve queue history for the current user from queueing_charging, including cancelled and missed queue records. Each item can include a mapped ChargeSession when the queue entry has a related charge_session_id.

query Parameters
location_id
string
Example: location_id=696869d231454e612bbdf207

Filter by location ID

status
string
Enum: "activated" "cancelled" "missed"
Example: status=cancelled

Filter queue records by queue status

from_date
string <date>
Example: from_date=2026-04-01

Filter queue records from this date (inclusive, start of day)

to_date
string <date>
Example: to_date=2026-04-18

Filter queue records until this date (inclusive, end of day)

page
integer
Default: 1
Example: page=1

Page number for pagination

per_page
integer
Default: 10
Example: per_page=10

Number of records per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 46,
  • "page": 1,
  • "per_page": 20,
  • "data": [
    ]
}

Loyalty

Get all reward types

Retrieve a list of all reward types.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 3,
  • "page": 1,
  • "data": [
    ]
}

Get current user's rewards

Retrieve the rewards of the currently logged-in user.

query Parameters
reward_type_id
string
Example: reward_type_id=665e8f15ebf7d56c133612ab

Filter rewards by type

status
string
Example: status=redeemed

Filter rewards by status

page
integer
Example: page=1

Page number for pagination

per_page
integer
Example: per_page=10

Number of items per page for pagination

Responses

Response samples

Content type
application/json
{}

Get a specific reward of the current user

Retrieve a specific reward of the currently logged-in user.

path Parameters
reward_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the reward to retrieve.

Responses

Response samples

Content type
application/json
{}

Redeem a specific reward of the current user

Redeem a specific reward of the currently logged-in user.

path Parameters
reward_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the reward to redeem.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Reward redeemed successfully"
}

Redeem a reward from a specific reward program for the current user

Redeem a reward from the specified reward program using points. Only rewards that have not been assigned to any user (user_id is null) can be redeemed. The current logged-in user will be assigned the reward upon successful redemption.

path Parameters
reward_program_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the reward program to redeem a reward from.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Reward redeemed successfully from program.",
  • "data": {
    }
}

Get current user's points history

Retrieve the point history of the currently logged-in user.

query Parameters
from_date
string <date>
Example: from_date=2023-01-01

Start date for filtering points history

to_date
string <date>
Example: to_date=2023-12-31

End date for filtering points history

page
integer
Example: page=1

Page number for pagination

per_page
integer
Example: per_page=10

Number of items per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 20,
  • "page": 1,
  • "data": [
    ]
}

Get current user's points statistics

Retrieve the point statistics of the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get list of reward vendors

Retrieve a paginated list of reward vendors. Supports filtering by name and code.

query Parameters
name
string
Example: name=Nike

Filter by vendor name (supports partial match, case-insensitive)

code
string
Example: code=nike

Filter by vendor code (supports partial match, case-insensitive)

page
integer
Default: 1

Page number for pagination.

per_page
integer
Default: 10

Number of items per page.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "per_page": 10,
  • "data": [
    ]
}

Get list of reward categories

Retrieve a paginated list of reward categories.

query Parameters
name
string
Example: name=Text

Filter by category name (supports partial match, case-insensitive).

code
string
Example: code=text

Filter by category code (supports partial match, case-insensitive).

page
integer
Default: 1

Page number for pagination.

per_page
integer
Default: 10

Number of items per page.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "per_page": 10,
  • "data": [
    ]
}

Get list of reward programs

Retrieve a paginated list of reward programs. Supports filtering by name, code, type, status, reward_type_id, vendor_id, and category_id, and location_id.

query Parameters
name
string
Example: name=Charge and Get

Filter by reward program name (partial match, case-insensitive)

code
string
Example: code=MYSTERYBOX2025

Filter by reward program code (partial match, case-insensitive)

type
string
Enum: "points" "cashback" "mystery_box" "discount" "sign_up_bonus" "referral_bonus"
Example: type=cashback

Filter by reward program type

status
string
Enum: "active" "inactive" "archived"
Example: status=active

Filter by reward program status

reward_type_id
string
Example: reward_type_id=68fecfef9865f720ce4416f7

Filter by reward type ID (partial match, case-insensitive)

vendor_id
string
Example: vendor_id=68ff2fe9946eb191f89574fd

Filter by vendor ID (must be a valid ObjectId)

category_id
string
Example: category_id=68fef6a32506e0a62fc34c9c

Filter by category ID (must be a valid ObjectId)

location_id
string
Example: location_id=6331276a96ec3fa15d1cb0fc

Filter by location ID (must be a valid ObjectId)

is_favorite
boolean
Example: is_favorite=true

Filter to only favorite reward programs of the current user

page
integer
Default: 1

Page number for pagination

per_page
integer
Default: 10

Number of items per page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 25,
  • "page": 1,
  • "per_page": 10,
  • "data": [
    ]
}

Get reward program detail of current user

Retrieve detailed information of a specific reward program for the authenticated user. Requires a valid reward_program_id (MongoDB ObjectId).

path Parameters
reward_program_id
required
string
Example: 68fecfef9865f720ce4416f7

Reward program ID (must be a valid MongoDB ObjectId)

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get loyalty banners for the current user

Retrieve the list of loyalty banners displayed in the loyalty screen for the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Mark or unmark reward program as favorite

  • If the program is already favorited → it will be removed from favorites.
  • If not favorited → it will be added to favorites.
path Parameters
reward_programs_id
required
string

Reward program ID (MongoDB ObjectId)

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Added to favorites successfully",
  • "data": {
    }
}

Mark a redeemed reward as used

Marks the authenticated user's redeemed reward as used via the loyalty service. Requires Authorization token.

path Parameters
reward_id
required
string

Mongo ID of the reward to mark as used

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Reward marked as used successfully.",
  • "data": { }
}

Charging

Get current user's pending charging sessions

Retrieve the pending charging sessions of the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get reservable EVSE list by date and time

Retrieve EVSEs that are available for reservation at a specific location, date, time, and charging type.

query Parameters
date
required
string <date>
Example: date=2026-03-27

Reservation date in YYYY-MM-DD format.

time
required
string^([01][0-9]|2[0-3]):[0-5][0-9]$
Example: time=14:30

Reservation start time in HH:mm format.

location
required
string
Example: location=655da4b5b659e4ea4e5c5009

Location ID (MongoDB ObjectId).

type
required
string
Example: type=ac

EVSE current type.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "ok",
  • "data": [
    ]
}

Stop a specific charging session of the current user

Stop a specific charging session of the currently logged-in user.

Request Body schema: application/json
required
session_id
required
string

The ID of the charging session to stop.

Responses

Request samples

Content type
application/json
{
  • "session_id": "665e8f15ebf7d56c133612ab"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Charging session stopped successfully"
}

Get charge sessions by query

Retrieve charge sessions based on query parameters. This is an admin/internal endpoint.

query Parameters
user_id
string
Example: user_id=665e8f15ebf7d56c133612ab

Filter by user ID (MongoDB ObjectId)

charge_point_id
string
Example: charge_point_id=665e8f15ebf7d56c133612ab

Filter by charge point ID (MongoDB ObjectId)

status
string
Enum: "charging" "holding" "completed" "noshow" "canceled"
Example: status=completed

Filter by session status

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get current user's charging sessions

Retrieve charging sessions for the currently logged-in user with various filtering options.

query Parameters
chargepoint_id
string
Example: chargepoint_id=665e8f15ebf7d56c133612ab

Filter by charge point ID (MongoDB ObjectId)

location_id
string
Example: location_id=665e8f15ebf7d56c133612ab

Filter by location ID (MongoDB ObjectId)

status
string
Enum: "charging" "holding" "completed" "noshow" "canceled"
Example: status=completed

Filter by session status

type
string
Enum: "adhoc" "reserved" "queue"
Example: type=adhoc

Filter by session type

from_date
string <date>
Example: from_date=2024-01-01

Filter sessions from this date (inclusive, start of day)

to_date
string <date>
Example: to_date=2024-01-31

Filter sessions until this date (inclusive, end of day)

skip
integer
Default: 0

Number of records to skip (pagination)

limit
integer
Default: 0
Example: limit=20

Maximum number of records to return (0 = no limit)

page
integer
Default: 1
Example: page=1

Page number for pagination

per_page
integer
Default: 10
Example: per_page=10

Number of records per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get user's charge session history (simplified)

Retrieve charging sessions for the current user, including related transaction records.

query Parameters
chargePointId
string

Filter by charge point ID

type
string
Enum: "adhoc" "reserved"

Filter by session type

page
integer
Default: 1

Page number

per_page
integer
Default: 10

Items per page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "total": 209,
  • "page": 1
}

Get user's queue history

Retrieve queue history for the current user from queueing_charging, including cancelled and missed queue records. Each item can include a mapped ChargeSession when the queue entry has a related charge_session_id.

query Parameters
location_id
string
Example: location_id=696869d231454e612bbdf207

Filter by location ID

status
string
Enum: "activated" "cancelled" "missed"
Example: status=cancelled

Filter queue records by queue status

from_date
string <date>
Example: from_date=2026-04-01

Filter queue records from this date (inclusive, start of day)

to_date
string <date>
Example: to_date=2026-04-18

Filter queue records until this date (inclusive, end of day)

page
integer
Default: 1
Example: page=1

Page number for pagination

per_page
integer
Default: 10
Example: per_page=10

Number of records per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 46,
  • "page": 1,
  • "per_page": 20,
  • "data": [
    ]
}

Get user's comprehensive charging statistics

Retrieve complete charging statistics including historical data, financial breakdown, and usage patterns for the current user in a single API call.

query Parameters
type
string
Default: "week"
Enum: "week" "month" "year"
Example: type=week

Time period for statistics

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Sync a charge point from Ampeco

Fetches the latest charge point and EVSE state from Ampeco and upserts them locally. Accepts either an Ampeco chargepoint id or a local ChargePoint _id (24-char). Requires Authorization token.

path Parameters
chargepoint_id
required
string

Ampeco chargepoint id or ChargePoint _id

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Render a charge point's VIP list page

Renders the dashboard HTML table of a charge point's EVSEs and their VIP user lists.

path Parameters
chargepoint_id
required
string

ChargePoint _id

Responses

Response samples

Content type
application/json
{
  • "ok": false,
  • "msg": "Something went wrong, please contact CS for supporting."
}

Toggle subscription pricing for a charge point

Enables or disables subscription-based pricing on a charge point and all of its EVSEs.

path Parameters
chargepoint_id
required
string

ChargePoint _id

status
required
string
Enum: "true" "false"

Whether subscription pricing is enabled

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Invalid ChargePoint ID"
}

EVSE router health check

Simple liveness endpoint that returns true. Requires Authorization token.

Responses

Response samples

Content type
application/json
true

Check whether an EVSE is ready to start charging

Checks with Ampeco whether the given EVSE's hardware status is ready (preparing/finishing) to start a charging session. Accepts either a local EVSE _id (24-char) or an Ampeco EVSE id. Requires Authorization token.

path Parameters
evse_id
required
string

EVSE _id or Ampeco EVSE id

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": ""
}

Get the next upcoming reservation for an EVSE

Returns the next upcoming (not yet started) reservation for the given EVSE, if any. Requires Authorization token.

Request Body schema: application/json
required
ampeco_evse_id
required
string

Ampeco EVSE id

Responses

Request samples

Content type
application/json
{
  • "ampeco_evse_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

List reservations for a date

Lists upcoming reservations on a given date, filtered by one of EVSE, charge point or location. Requires Authorization token.

query Parameters
date
required
string <date>

Date to list reservations for

evse_id
string
charge_point_id
string
location_id
string
skip
integer
Default: 0
limit
integer
Default: 100

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": [
    ]
}

Poll live charging session status

Returns the current status of an active charging session, including live energy charged, running price (with GST), charge point / EVSE details and idling fee. Reads the latest state from Ampeco and cached pricing. Requires Authorization token.

Request Body schema: application/json
required
session_id
required
string

Ampeco session id

Responses

Request samples

Content type
application/json
{
  • "session_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Start a charging session for the current user

Start a charging session on an EVSE for the authenticated user.

Called by the mobile app and by the camera webhook (services service → POST /v1/camera/webhook), which authenticates as the matched user and sends started_by: camera_webhook. This endpoint requires an Authorization token.

All business outcomes are returned with HTTP 200 and an { ok, msg } envelope — ok: true (with data) only when the session actually starts; every rejection or failure returns ok: false with a human-readable msg. See the response examples for every situation the endpoint (and therefore the camera webhook) can receive.

Request Body schema: application/json
required
chargepoint_id
string

Ampeco charge point id, or the ChargePoint Mongo _id (24 chars).

network_id
string

EVSE network id of the connector to start.

started_by
string
Enum: "mobile_app" "camera_webhook"

Origin of the start request. Defaults to mobile_app.

Responses

Request samples

Content type
application/json
{
  • "chargepoint_id": "84",
  • "network_id": "1",
  • "started_by": "camera_webhook"
}

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "code": "SUCCESS",
  • "msg": "ok",
  • "data": {
    }
}

Add VIP users to an EVSE

Adds one or more users (matched by phone number) to an EVSE's restricted/VIP access list. Phone numbers are provided newline-separated; matching users are resolved and pushed to the charging service.

Request Body schema: application/json
required
numbers
required
string

Newline-separated phone numbers

id
required
string

EVSE _id

Responses

Request samples

Content type
application/json
{
  • "numbers": "91234567\n98765432",
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "VIPs Added"
}

Remove a VIP user from an EVSE

Removes a user from an EVSE's restricted/VIP access list and syncs the removal to the charging service.

Request Body schema: application/json
required
vip_id
required
string

User _id to remove

evse_id
required
string

EVSE _id

Responses

Request samples

Content type
application/json
{
  • "vip_id": "string",
  • "evse_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "VIP removed from Charger"
}

Render an EVSE's VIP list page

Renders the dashboard HTML page listing the whitelisted (VIP) users allowed to use the given EVSE.

path Parameters
id
required
string

EVSE _id

Responses

Response samples

Content type
application/json
{
  • "ok": false,
  • "msg": "Something went wrong, please contact CS for supporting."
}

Check if a charge point EVSE is ready

Queries Ampeco for the charge point status and reports whether the given EVSE is preparing/finishing (ready to start). Requires Authorization token.

path Parameters
charge_point_id
required
string
evse_id
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string"
}

Search charging locations near a point

Returns enabled locations near the given coordinates with EVSE availability, pricing and subscription-aware rates. Results are cached briefly. Requires Authorization token.

query Parameters
latitude
required
string
longitude
required
string
radius
number
Default: 5

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Get a single charging location

Returns detailed info for one location including its EVSEs, availability and subscription-aware pricing. Requires Authorization token.

path Parameters
location_id
required
string
query Parameters
latitude
string
longitude
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Look up a charger by QR short code

Resolves an EVSE from a scanned QR short code and returns its location, pricing and reservation status for the logged-in user. Requires Authorization token.

Request Body schema: application/json
required
short_code
required
string

Responses

Request samples

Content type
application/json
{
  • "short_code": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Found Charger",
  • "data": { }
}

Reservation

Get reservable EVSE list by date and time

Retrieve EVSEs that are available for reservation at a specific location, date, time, and charging type.

query Parameters
date
required
string <date>
Example: date=2026-03-27

Reservation date in YYYY-MM-DD format.

time
required
string^([01][0-9]|2[0-3]):[0-5][0-9]$
Example: time=14:30

Reservation start time in HH:mm format.

location
required
string
Example: location=655da4b5b659e4ea4e5c5009

Location ID (MongoDB ObjectId).

type
required
string
Example: type=ac

EVSE current type.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "ok",
  • "data": [
    ]
}

Cancel an EVSE reservation

Cancels a reserved charge session, releasing or capturing the deposit depending on the cancel grace period. Requires Authorization token.

Request Body schema: application/json
required
session_id
required
string

Responses

Request samples

Content type
application/json
{
  • "session_id": "string"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Reservation cancelled"
}

List reservable EVSEs for a location and time

Returns EVSEs at a location that can be reserved for the given date/time and current type, excluding already-booked slots. Requires Authorization token.

query Parameters
date
required
string
time
required
string
location
required
string
type
required
string
Enum: "ac" "dc"

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Make an EVSE reservation

Reserves an EVSE timeslot for the logged-in user after taking a deposit (wallet or card pre-auth) and creating a reserved charge session. Requires Authorization token.

Request Body schema: application/json
required
evse
required
string

EVSE id

date
required
string
time
required
string
required
object

Responses

Request samples

Content type
application/json
{
  • "evse": "string",
  • "date": "string",
  • "time": "string",
  • "selectedPayment": {
    }
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "string",
  • "data": {
    }
}

Charge Sessions

Get charge sessions by query

Retrieve charge sessions based on query parameters. This is an admin/internal endpoint.

query Parameters
user_id
string
Example: user_id=665e8f15ebf7d56c133612ab

Filter by user ID (MongoDB ObjectId)

charge_point_id
string
Example: charge_point_id=665e8f15ebf7d56c133612ab

Filter by charge point ID (MongoDB ObjectId)

status
string
Enum: "charging" "holding" "completed" "noshow" "canceled"
Example: status=completed

Filter by session status

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get Ampeco session details

Retrieve detailed session information from Ampeco platform by session ID.

path Parameters
session_id
required
string
Example: ampeco_session_123

Ampeco session ID

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": { }
}

Check and email charge sessions report

Generate and email a report of charge sessions within a date range. This is an admin endpoint.

query Parameters
from_date
required
string <date>
Example: from_date=2024-01-01

Start date for the report

to_date
required
string <date>
Example: to_date=2024-01-31

End date for the report

limit
integer
Default: 1000
Example: limit=1000

Maximum number of sessions to include

skip
integer
Default: 0

Number of sessions to skip (pagination)

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

Get current user's charging sessions

Retrieve charging sessions for the currently logged-in user with various filtering options.

query Parameters
chargepoint_id
string
Example: chargepoint_id=665e8f15ebf7d56c133612ab

Filter by charge point ID (MongoDB ObjectId)

location_id
string
Example: location_id=665e8f15ebf7d56c133612ab

Filter by location ID (MongoDB ObjectId)

status
string
Enum: "charging" "holding" "completed" "noshow" "canceled"
Example: status=completed

Filter by session status

type
string
Enum: "adhoc" "reserved" "queue"
Example: type=adhoc

Filter by session type

from_date
string <date>
Example: from_date=2024-01-01

Filter sessions from this date (inclusive, start of day)

to_date
string <date>
Example: to_date=2024-01-31

Filter sessions until this date (inclusive, end of day)

skip
integer
Default: 0

Number of records to skip (pagination)

limit
integer
Default: 0
Example: limit=20

Maximum number of records to return (0 = no limit)

page
integer
Default: 1
Example: page=1

Page number for pagination

per_page
integer
Default: 10
Example: per_page=10

Number of records per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get user's charge session history (simplified)

Retrieve charging sessions for the current user, including related transaction records.

query Parameters
chargePointId
string

Filter by charge point ID

type
string
Enum: "adhoc" "reserved"

Filter by session type

page
integer
Default: 1

Page number

per_page
integer
Default: 10

Items per page

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ],
  • "total": 209,
  • "page": 1
}

Pay a specific charging session of the current user

Pay a specific charging session of the currently logged-in user.

path Parameters
session_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the charging session to pay.

Request Body schema: application/json
required
payment_method
string

Payment method to use (e.g., wallet, card)

card_id
string

Card ID to use if payment_method is card

Responses

Request samples

Content type
application/json
{
  • "payment_method": "wallet",
  • "card_id": "card_123456789"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Make payment successfully.",
  • "data": {
    }
}

Get user's comprehensive charging statistics

Retrieve complete charging statistics including historical data, financial breakdown, and usage patterns for the current user in a single API call.

query Parameters
type
string
Default: "week"
Enum: "week" "month" "year"
Example: type=week

Time period for statistics

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

List the authenticated user's charge sessions

Retrieves charge sessions for the authenticated user from the Charging service. The user id is applied automatically; additional query filters are passed through. Requires Authorization token.

query Parameters
page
integer
per_page
integer
status
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get the current user's active charging sessions

Returns the logged-in user's active (holding/charging) session with computed charging fees and energy. Cached briefly. Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Get the current user's activity dashboard

Returns the logged-in user's active charging session, fee-calculating session, reservation, recent transactions and any broadcast message. Cached briefly. Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Check idling status for the current user

Determines whether the user's most recent charge session is currently idling on its EVSE. Requires Authorization token.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

Transaction

Get current user's transactions

Retrieve the transactions of the currently logged-in user.

query Parameters
month
integer [ 1 .. 12 ]
Example: month=1

Month for filtering transactions (1-12)

year
integer [ 2000 .. 2100 ]
Example: year=2023

Year for filtering transactions (e.g., 2023)

from_date
string <date>
Example: from_date=2023-01-01

Start date for filtering transactions

to_date
string <date>
Example: to_date=2023-12-31

End date for filtering transactions

status
string
Example: status=completed

Filter transactions by status (e.g., completed, pending, failed, paid, unpaid)

type
string
Example: type=charge_session

Filter transactions by type (e.g., charge_session)

charge_session_id
string
Example: charge_session_id=665e8f15ebf7d56c133612ab

ID of the charge session to filter transactions (must be a valid ObjectId)

page
integer
Example: page=1

Page number for pagination

per_page
integer
Example: per_page=10

Number of items per page for pagination

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "total": 20,
  • "page": 1,
  • "data": [
    ]
}

Pay a specific transaction of the current user

Pay a specific transaction of the currently logged-in user.

path Parameters
transaction_id
required
string
Example: 665e8f15ebf7d56c133612ab

The ID of the transaction to pay.

Request Body schema: application/json
required
payment_method
string

Payment method to use (e.g., wallet, card)

card_id
string

Card ID to use if payment_method is card

Responses

Request samples

Content type
application/json
{
  • "payment_method": "wallet",
  • "card_id": "card_123456789"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Transaction paid successfully",
  • "card_id": "card_123456789"
}

Get current user's outstanding payments

Retrieve the outstanding payments of the currently logged-in user.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": {
    }
}

List transactions

Returns a list of transactions from the payment service, transformed for the client. Query parameters are passed through to the payment service (pagination, filters). Requires Authorization token.

query Parameters
page
integer
per_page
integer
type
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Create a transaction

Creates a transaction record from the request body. Requires Authorization token.

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": "string"
}

Data-fix maintenance endpoint

Internal/maintenance endpoint used to fix legacy charge session records. Currently a no-op.

Responses

Get transaction detail

Returns a detailed payment payload for a transaction. The shape varies by transaction type (subscription_payment, topup, deposit, charging/idle) and merges data from the payment, subscription and charging services.

path Parameters
transaction_id
required
string

Transaction ObjectId or external transaction_id

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": { }
}

Render transaction invoice

Renders an HTML invoice preview for the given charge transaction.

path Parameters
transaction_id
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": false,
  • "msg": "Given ID does not exist"
}

Mark transaction as read

Marks a recent transaction (cached per user) as read. Requires Authorization token.

path Parameters
transaction_id
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Update successfully"
}

Email transaction invoice

Sends the charge invoice email for the given transaction to the recipient email (defaults to the user's email).

path Parameters
transaction_id
required
string
query Parameters
email
string

Override recipient email

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Email sent"
}

Deal

List active deals

Returns all active deals with resolved background image URLs.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "",
  • "data": [
    ]
}

EmailPreview

Preview the charging invoice template

Renders the charging invoice HTML template with sample data for preview.

Responses

Preview the forgot-password template

Renders the forgot-password HTML template with a sample reset link for preview.

Responses

Preview the payout notification template

Renders the payout-update HTML template with sample data for preview.

Responses

Preview the top-up invoice template

Renders the top-up invoice HTML template with sample data for preview.

Responses

Preview the email verification template

Renders the verify-email HTML template with sample data for preview.

Responses

Info

List information categories

Returns active information categories of type "news" (default) or "faq".

query Parameters
type
string
Enum: "news" "faq"

Category type to list; defaults to news.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Ok",
  • "data": [
    ]
}

Get news feed or FAQs for a category

Returns information items for the given category. If the category type is "faq", returns the category's FAQs instead of news items.

query Parameters
category_id
string

Information category ID to fetch the feed for.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "",
  • "data": [
    ]
}

Netsuite

List customers for Netsuite sync

Fetches users from the User service and maps them into the Netsuite customer shape. Supports optional creation-date filtering.

query Parameters
limit
integer
Default: 1000

Max number of customers to return (maps to per_page).

created_from
string <date-time>

Only include users created on/after this date.

created_to
string <date-time>

Only include users created on/before this date.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "hash": "",
  • "data": [
    ]
}

List fully populated invoices

Proxies to the Payment service to return fully populated transactions/invoices. All query parameters are passed through to the underlying service.

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Bulk send customers to Netsuite

Fetches a batch of users and asynchronously sends each one to Netsuite. Responds immediately with the count being processed. No-op when Netsuite syncing is disabled.

Request Body schema: application/json
optional
per_page
integer
Default: 10000
page
integer
Default: 1
created_from
string <date-time>
created_to
string <date-time>
string or Array of strings

Specific user IDs to send (string or array).

is_guest
boolean

Responses

Request samples

Content type
application/json
{
  • "per_page": 10000,
  • "page": 1,
  • "created_from": "2019-08-24T14:15:22Z",
  • "created_to": "2019-08-24T14:15:22Z",
  • "ids": "string",
  • "is_guest": true
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Sending 10 customers to Netsuite",
  • "data": {
    }
}

Send a single customer to Netsuite

Fetches the user by ID, transforms it into the Netsuite customer shape, and posts it to Netsuite. Records the sync result and marks the user as sent on success. No-op when Netsuite syncing is disabled.

path Parameters
user_id
required
string

Responses

Response samples

Content type
application/json
{
  • "ok": true,
  • "Code": 200
}

Send a single invoice to Netsuite

Fetches a transaction, builds the appropriate Netsuite invoice (charging, subscription, deposit, or topup based on type) and posts it to Netsuite. Records the sync result and marks the transaction as sent on success. No-op when Netsuite syncing is disabled.

path Parameters
transaction_id
required
string
Request Body schema: application/json
optional
batchCode
string

Optional batch identifier for the sync.

Responses

Request samples

Content type
application/json
{
  • "batchCode": "string"
}

Response samples

Content type
application/json
{
  • "invoice": { },
  • "response": {
    }
}

Bulk send invoices to Netsuite

Collects Approved transactions (charging, deposit, subscription, topup) matching the filters and asynchronously sends each one to Netsuite under a generated batch code. Responds immediately with the transaction IDs being processed. Requires ids, from_date, or to_date. No-op when Netsuite syncing is disabled.

Request Body schema: application/json
required
from_date
string <date-time>
to_date
string <date-time>
include_failed_transaction
boolean
exclude_charging
boolean
exclude_deposit
boolean
exclude_subscription
boolean
exclude_topup
boolean
string or Array of strings
page
integer
Default: 1
per_page
integer
Default: 10

Responses

Request samples

Content type
application/json
{
  • "from_date": "2019-08-24T14:15:22Z",
  • "to_date": "2019-08-24T14:15:22Z",
  • "include_failed_transaction": true,
  • "exclude_charging": true,
  • "exclude_deposit": true,
  • "exclude_subscription": true,
  • "exclude_topup": true,
  • "ids": "string",
  • "page": 1,
  • "per_page": 10
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "msg": "Sent 5 invoices to Netsuite",
  • "data": {
    }
}

Scripts

Migrate collection image fields to storage

Utility script that iterates every document in the given collection, uploads the referenced local image files for the specified fields to storage, and updates each document with the new file paths.

path Parameters
collection_name
required
string

Name of the Mongoose model/collection to process.

Request Body schema: application/json
required
field_names
required
Array of strings

Document fields whose file values should be uploaded to storage.

Responses

Request samples

Content type
application/json
{
  • "field_names": [
    ]
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "data": [
    ]
}

Webhooks

Third-party webhook test console (browser)

Serves a same-origin HTML console (services service → docs/webhook-test.html) that lets a third-party partner push a signed sample webhook to their own endpoint during onboarding.

Env-gated behind WEBHOOK_TEST_TOOL_ENABLED=true; returns 404 when disabled. The page calls POST /v1/webhooks/test/integrate-webhook.

Responses

Send a sample webhook to a partner endpoint

Pushes one signed sample event to a partner-supplied URL so they can verify their integration from their side, and returns the key the sample was signed with.

The delivery is synchronous and is not persisted or retried (unlike real outbound webhooks). Only sample data is ever sent; the envelope carries "test": true and the request includes an X-Watt-Test: true header so a partner never mistakes it for real traffic. Signing matches production exactly: X-Watt-Signature: t=<unix>,v1=<hmac-sha256 of "t.rawBody">.

The target URL must be public HTTP(S) and must not resolve to a loopback, private, or link-local address (SSRF protection, enforced outside development).

Env-gated behind WEBHOOK_TEST_TOOL_ENABLED=true. When WEBHOOK_TEST_TOOL_TOKEN is set, callers must send it as an X-Test-Token header. Rate limited per IP (WEBHOOK_TEST_TOOL_RATE_LIMIT, default 10/min).

See services/docs/partner-webhook-integration.md for the full partner guide.

header Parameters
X-Test-Token
string

Required only when WEBHOOK_TEST_TOOL_TOKEN is configured.

Request Body schema: application/json
required
url
required
string <uri>

Partner endpoint to receive the sample webhook. Public HTTPS.

event
string
Enum: "session.started" "session.stopped" "session.idling_started" "charger.down" "charger.up" "charger.status"

Event type to send. Defaults to session.started.

secret
string

Verify with your own secret. If omitted, a one-off whsec_test_… key is generated and returned in data.secret.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "Your endpoint accepted the test webhook.",
  • "data": {}
}

Cards

Save a tokenized card

Saves a tokenized credit/debit card to the user's account.

Stripe flow: validates the card token against Stripe, attaches to the Stripe customer, saves to TokenizedCard.

2C2P flow: the card is tokenized client-side via 2C2P UI/SDK. The mobile app completes the 0$ tokenization to get an invoiceNo. The app sends the invoiceNo and the server calls 2C2P inquiry to get the customer token and card metadata.

The payment_gateway saved on the card becomes the source of truth for all future payments with that card.

2C2P required params: when payment_gateway is "2c2p", the field invoiceNo is required.

Authorizations:
None
Request Body schema: application/json
required
card_token
string

[Stripe only] Tokenized card identifier from Stripe (e.g. tok_...). 2C2P does not send this field; use invoiceNo instead.

payment_gateway
string
Enum: "stripe" "2c2p"

Payment gateway. Defaults to stripe if omitted.

is_default
integer

Set to 1 to make this the user's default card.

invoiceNo
string

[2C2P only, required] The invoice number from 2C2P tokenization step.

Responses

Request samples

Content type
application/json
Example
{
  • "payment_gateway": "2c2p",
  • "invoiceNo": "b1bcbe740fef41449768",
  • "is_default": 1
}

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "msg": "Card added successfully"
}