Download OpenAPI specification:
This is the API documentation for Novowatt app.
Authenticate a user and return a token
| email required | string <email> Email address of the user |
| password required | string Password of the user |
{- "password": "password123"
}{- "ok": true,
- "token": "678f81f18e80dea828493b88",
- "user": {
- "ok": true,
- "data": [
- {
- "_id": "64dfb8a1234567890abcdef",
- "name": "Tino Nguyen",
- "is_active": true,
- "Role": "6326e0e844841a723ee10cbe",
- "profit_sharing_sp": 0.1,
- "createdAt": "2023-12-01T12:00:00.000Z",
- "updatedAt": "2023-12-10T12:00:00.000Z",
- "__v": 0,
- "Company": "6326e0e844841a723ee10cbe",
- "ac_subscription_fee": 20,
- "dc_subscription_fee": 20,
- "profit_sharing_cpo": 20,
- "profit_sharing_platform": 20,
- "type": "SuperAdmin"
}
]
}
}Returns subscriptions with location_id preserved and mapped location data for support visibility.
| subscription_plan_id | string |
| merchant_id | string |
| status | string |
| user_name | string |
| user_email | string |
| user_phone | string |
| user_id | string Filter subscriptions by user (use to fetch a single user's subscriptions, e.g. for a subscription detail view). |
| page | integer |
| per_page | integer |
{- "ok": true,
- "data": [
- {
- "_id": "668e541d135096d2c3b2f59c",
- "subscription_plan_id": "668a960adb4cd9bf088e5dc1",
- "subscription_plan_name": "Plan of DEV1",
- "user_id": "667ae4df75ed5e17162fdcea",
- "user_name": "Alex Tan",
- "location_id": "66337ada513dff7cb0219963",
- "location": {
- "_id": "66337ada513dff7cb0219963",
- "name": "Watt Hub",
- "address": "77 Enterprise Rd, Singapore 629824",
- "city": "Singapore",
- "latitude": 1.3483,
- "longitude": 103.6831
}, - "status": "active",
- "payment_status": "paid"
}
], - "total": 1,
- "page": 1
}Returns locations whose EVSEs enable the requested subscription plan. Admin callers must provide at least one plan ID; this endpoint does not fall back to all plans.
| subscription_plan_id | string Single subscription plan ID. |
| subscription_plan_ids | string Comma-separated subscription plan IDs. |
| name | string Case-insensitive location name search. |
| page | integer Default: 1 |
| per_page | integer Default: 10 Number of locations per page. Defaults to 10 for admin list display. |
{- "ok": true,
- "data": [
- {
- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "is_queue_enabled": true,
- "createdAt": "2023-02-13T02:25:12.997Z",
- "updatedAt": "2023-07-18T11:36:42.255Z",
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}
], - "total": 1,
- "page": 1,
- "per_page": 10
}Admin/CS endpoint for changing support-managed subscription details after purchase. Only admin roles Superadmin and CS may call this PUT endpoint. Supported fields are location_id, user_email, and user_phone; Admin API forwards only those supported fields. When location_id is provided, the Subscription service validates the subscription, target location, plan enablement, and same-location active/effective conflict before updating.
| subscription_id required | string Subscription ID to update. |
| location_id | string Target location ID. The location must enable the subscription's plan. |
| user_email | string <email> Subscription email to store on the subscription record. |
| user_phone | string Subscription phone to store on the subscription record. |
{- "location_id": "66337ada513dff7cb0219963",
- "user_phone": "+6591234567"
}{- "ok": true,
- "data": {
- "_id": "668e541d135096d2c3b2f59c",
- "subscription_plan_id": "668a960adb4cd9bf088e5dc1",
- "subscription_plan_name": "Plan of DEV1",
- "user_id": "667ae4df75ed5e17162fdcea",
- "user_name": "Alex Tan",
- "location_id": "66337ada513dff7cb0219963",
- "location": {
- "_id": "66337ada513dff7cb0219963",
- "name": "Watt Hub",
- "address": "77 Enterprise Rd, Singapore 629824",
- "city": "Singapore",
- "latitude": 1.3483,
- "longitude": 103.6831
}, - "status": "active",
- "payment_status": "paid"
}
}Deprecated. Active subscriptions are now resolved from the subscriptions collection and this endpoint no longer rebuilds legacy singular user active subscription fields.
{- "ok": false,
- "msg": "This legacy user active subscription mapping endpoint is deprecated."
}Activates the given subscription via the subscription service and records an admin log entry.
| subscription_id required | string Mongo ObjectId of the subscription |
{- "subscription_id": "string"
}{- "ok": true
}Deactivates the given subscription via the subscription service and records an admin log entry.
| subscription_id required | string Mongo ObjectId of the subscription |
{- "subscription_id": "string"
}{- "ok": true
}Exports the filtered subscription list as an .xlsx file. Accepts the same filters
as the list endpoint.
| subscription_plan_id | string |
| merchant_id | string |
| status | string Enum: "active" "waiting_for_active" "expired" "cancelled" |
| active_from | string <date> |
| active_to | string <date> |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": false,
- "msg": "Something went wrong, please contact CS for supporting."
}Triggers payment for an existing subscription via the subscription service. An optional promo code may be applied. Emits an admin activity log on success.
| subscription_id required | string Mongo ObjectId of the subscription |
| promo_code_id | string |
{- "subscription_id": "string",
- "promo_code_id": "string"
}{- "ok": true
}Maintenance job that iterates subscriptions missing denormalized user fields
(user_name, user_email, user_phone) and populates them from the users collection.
| limit | integer Default: 1000 Batch size per iteration. |
{- "ok": true,
- "msg": "Processed all subscriptions successfully"
}Deletes the given subscription via the subscription service and records an admin log entry capturing the previous state.
| subscription_id required | string |
{- "ok": true
}Marks the subscription's payment as paid and activates it. Records an admin log entry on success.
| subscription_id required | string |
{- "ok": true
}Returns transactions associated with a single subscription from the subscription service.
| subscription_id required | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Deprecated. Active subscription plan data is no longer rebuilt onto user records because active subscriptions are resolved from the subscriptions collection.
{- "ok": false,
- "msg": "This legacy active subscription plan rebuild endpoint is deprecated."
}Get all companies
| keyword | string Get companies by name, address,.... |
| page | integer Page number |
| per_page | integer Number of items per page |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "id": 0,
- "name": "string",
- "address": "string",
- "city": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
]
}Create a new company
| name required | string Name of the company |
| address required | string Address of the company |
| city required | string City of the company |
| country required | string Country of the company |
| phone required | string Phone number of the company |
| email required | string Email of the company |
| website required | string Website of the company |
{- "name": "Novowatt",
- "address": "123, XYZ Street",
- "city": "XYZ City",
- "country": "XYZ Country",
- "phone": 1234567890,
}{- "ok": true,
- "data": {
- "id": 0,
- "name": "string",
- "address": "string",
- "city": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
}Get a company by ID
| companyId required | integer ID of the company to get |
{- "ok": true,
- "data": {
- "id": 0,
- "name": "string",
- "address": "string",
- "city": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
}Update a company by ID
| companyId required | integer ID of the company to update |
| name required | string Name of the company |
| address required | string Address of the company |
| city required | string City of the company |
| country required | string Country of the company |
| phone required | string Phone number of the company |
| email required | string Email of the company |
| website required | string Website of the company |
{- "name": "Novowatt",
- "address": "123, XYZ Street",
- "city": "XYZ City",
- "country": "XYZ Country",
- "phone": 1234567890,
}{- "ok": true,
- "data": {
- "id": 0,
- "name": "string",
- "address": "string",
- "city": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
}Partially updates a company document with the provided fields and logs the admin action.
| id required | string Company ObjectId |
| property name* additional property | any |
{ }{- "ok": true,
- "msg": "Update Company successfully!"
}Get all locations
| keyword | string Get locations by name, address, etc. |
| page | integer Page number |
| per_page | integer Number of items per page |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "is_queue_enabled": true,
- "createdAt": "2023-02-13T02:25:12.997Z",
- "updatedAt": "2023-07-18T11:36:42.255Z",
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}
]
}Create a new location
| name required | string Name of the location |
| longitude required | number Longitude of the location |
| latitude required | number Latitude of the location |
| status required | string Status of the location |
| description required | string Description of the location |
| address required | string Address of the location |
| region required | string Region of the location |
| city required | string City of the location |
| postal required | string Postal code of the location |
| country required | string Country code of the location |
| image required | string Image filename of the location |
| ChargePoints | Array of strings List of ChargePoint IDs to add to the location |
| is_enabled required | boolean Whether the location is enabled |
| SeedingPartner required | string ID of the SeedingPartner |
| CPO required | string ID of the CPO |
{- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}{- "ok": true,
- "data": {
- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "is_queue_enabled": true,
- "createdAt": "2023-02-13T02:25:12.997Z",
- "updatedAt": "2023-07-18T11:36:42.255Z",
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}
}Get a location by ID
| locationId required | integer ID of the location to get |
{- "ok": true,
- "data": {
- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "is_queue_enabled": true,
- "createdAt": "2023-02-13T02:25:12.997Z",
- "updatedAt": "2023-07-18T11:36:42.255Z",
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}
}Update a location by ID
| locationId required | integer ID of the location to update |
| name required | string Name of the location |
| longitude required | number Longitude of the location |
| latitude required | number Latitude of the location |
| status required | string Status of the location |
| description required | string Description of the location |
| address required | string Address of the location |
| region required | string Region of the location |
| city required | string City of the location |
| postal required | string Postal code of the location |
| country required | string Country code of the location |
| image required | string Image filename of the location |
| ChargePoints | Array of strings List of ChargePoint IDs to add to the location |
| is_enabled required | boolean Whether the location is enabled |
| SeedingPartner required | string ID of the SeedingPartner |
| CPO required | string ID of the CPO |
{- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}{- "ok": true,
- "data": {
- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "is_queue_enabled": true,
- "createdAt": "2023-02-13T02:25:12.997Z",
- "updatedAt": "2023-07-18T11:36:42.255Z",
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}
}This API retrieves the total number of locations for each date within a specified date range (from_date to to_date).
The sessions are counted and grouped by date based on the createdAt field.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string <string> The type of request |
{- "ok": true,
- "data": {
- "2024-01-10": 1,
- "2024-01-16": 3,
- "2024-01-18": 6,
- "2024-02-21": 5,
- "2024-02-22": 6,
- "2024-02-24": 9,
- "2024-03-16": 12,
- "2024-03-18": 18,
- "2024-03-22": 23,
- "2024-03-26": 25,
- "2024-04-04": 45,
- "2024-04-05": 55,
- "2024-04-08": 57,
- "2024-04-09": 68,
- "2024-04-10": 58,
- "2024-04-11": 78,
- "2024-04-12": 58,
- "2024-04-13": 79
}
}This endpoint adds restricted users to specific EVSEs associated with provided locations.
string or Array of strings A single user ID or an array of user IDs to restrict. | |
string or Array of strings A single location ID or an array of location IDs. |
{- "user_ids": [
- "6633b336d2cf8eb80e24222d",
- "6633b336d2cf8eb80e24222d"
], - "location_ids": [
- "6331276a96ec3fa15d1cb0fc",
- "6331276a96ec3fa15d1cb0fc"
]
}{- "ok": true,
- "message": "Restricted users have been updated successfully"
}Enables the given subscription plans on the specified charge points within locations.
| charge_point_ids required | Array of strings |
| subscription_plans required | Array of strings |
{- "charge_point_ids": [
- "string"
], - "subscription_plans": [
- "string"
]
}{- "ok": true
}Aggregates locations (scoped by the caller's role) with their charge points, CPO and
seeding partner data and streams the result as an .xlsx (Location.xlsx) attachment.
| name | string |
| address | string |
| city | string |
| region | string |
| postal | string |
| country | string |
| cpo_sp_name | string |
| type | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": false,
- "msg": "Something went wrong, please contact CS for supporting."
}Retrieve location statistics for the requested type within the specified date range.
For location-occupancy-reports, from_date and to_date are interpreted as Asia/Singapore calendar dates to match the daily occupancy report generation job.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string Enum: "number-of-location" "location-occupancy-reports" "location-performance" The statistics type to retrieve. |
{- "ok": false,
- "msg": "invalid input",
- "errors": [
- "id is required"
]
}Generates a monthly performance report for the given location for the specified month and year.
| id required | string |
| month required | integer [ 1 .. 12 ] |
| year required | integer |
{- "month": 1,
- "year": 0
}{- "ok": true,
- "data": { }
}Toggles the charging queue feature for the given location.
| location_id required | string |
| is_active required | boolean |
{- "is_active": true
}{- "ok": true,
- "data": { }
}Retrieve multiple locations in a single request by passing an array of their IDs. Soft-deleted locations are excluded; invalid or missing IDs yield an empty list.
| ids required | Array of strings <objectId> [ items <objectId > ] Array of location IDs (MongoDB ObjectIds) to fetch. |
{- "ids": [
- "6331276a96ec3fa15d1cb0fc",
- "6331276a96ec3fa15d1cb0fd"
]
}{- "ok": true,
- "data": [
- {
- "name": "Lake Life",
- "longitude": 103.7240083,
- "latitude": 1.3321456,
- "status": "active",
- "description": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "address": "2, 6, 8, 10, 12 Tao Ching Rd, Singapore 618721",
- "region": "West",
- "city": "Singapore",
- "postal": 618721,
- "country": "SG",
- "image": "dlRjgYZsxXu1jvNJnx.png",
- "ChargePoints": [
- "645c99b3c4aa3d518c24b2ac"
], - "is_enabled": true,
- "is_queue_enabled": true,
- "createdAt": "2023-02-13T02:25:12.997Z",
- "updatedAt": "2023-07-18T11:36:42.255Z",
- "SeedingPartner": "645c9740c4aa3d518c24b232",
- "CPO": "6331254696ec3fa15d1cb0f7"
}
]
}Retrieve a list of all users
| page | integer Page number |
| per_page | integer Number of items per page |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "_id": {
- "$oid": "66337ada513dff7cb0219963"
}, - "name": "Tino",
- "password": "string",
- "dob": "1990-05-02T00:00:00.000Z",
- "phone": 827277157,
- "wallet_balance": 15931,
- "vehicle_license_plate": "123456",
- "vehicle_brand": "TESLA",
- "vehicle_model": "123456",
- "stripe_tokenized_cards": [
- {
- "$oid": "66337ba6b70e4d50370876aa"
}
], - "total_points": 1000,
- "membership_level": {
- "$oid": "66337ba6b70e4d50370876aa"
}, - "membership_level_name": "Gold"
}
]
}Create a new user
| name required | string Name of the user |
| email required | string <email> Email address of the user |
| password required | string Password for the user |
| phone required | string Phone number of the user |
| dob | string <date> Date of birth of the user (optional) |
| 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 |
{- "name": "user1",
- "password": "password123",
- "phone": "1234567890",
- "dob": "1991-04-01",
- "vehicle_license_plate": "ABC1234",
- "vehicle_brand": "Toyota",
- "vehicle_model": "Camry"
}{- "ok": true,
- "data": {
- "_id": {
- "$oid": "66337ada513dff7cb0219963"
}, - "name": "Tino",
- "password": "string",
- "dob": "1990-05-02T00:00:00.000Z",
- "phone": 827277157,
- "wallet_balance": 15931,
- "vehicle_license_plate": "123456",
- "vehicle_brand": "TESLA",
- "vehicle_model": "123456",
- "stripe_tokenized_cards": [
- {
- "$oid": "66337ba6b70e4d50370876aa"
}
], - "total_points": 1000,
- "membership_level": {
- "$oid": "66337ba6b70e4d50370876aa"
}, - "membership_level_name": "Gold"
}
}Get a user by their ID
| userId required | string ID of the user to retrieve |
{- "ok": true,
- "data": {
- "_id": {
- "$oid": "66337ada513dff7cb0219963"
}, - "name": "Tino",
- "password": "string",
- "dob": "1990-05-02T00:00:00.000Z",
- "phone": 827277157,
- "wallet_balance": 15931,
- "vehicle_license_plate": "123456",
- "vehicle_brand": "TESLA",
- "vehicle_model": "123456",
- "stripe_tokenized_cards": [
- {
- "$oid": "66337ba6b70e4d50370876aa"
}
], - "total_points": 1000,
- "membership_level": {
- "$oid": "66337ba6b70e4d50370876aa"
}, - "membership_level_name": "Gold"
}
}Update a user by their ID
| userId required | string ID of the user to update |
| name | string Name of the user |
string <email> Email address of the user | |
| password | string Password for the user |
| phone | integer Phone number of the user |
| dob | string <date> Date of birth of the user |
| wallet_balance | integer Current wallet balance of the user |
| vehicle_license_plate | string License plate number of the user's vehicle |
| vehicle_brand | string Brand of the user's vehicle |
| vehicle_model | string Model of the user's vehicle |
| stripe_tokenized_cards | Array of strings |
{- "name": "Tino",
- "password": "password123",
- "phone": 827277157,
- "dob": "1990-05-02T00:00:00.000Z",
- "wallet_balance": 15931,
- "vehicle_license_plate": "123456",
- "vehicle_brand": "TESLA",
- "vehicle_model": "123456",
- "stripe_tokenized_cards": [
- "66337ba6b70e4d50370876aa"
]
}{- "ok": true,
- "data": {
- "_id": {
- "$oid": "66337ada513dff7cb0219963"
}, - "name": "Tino",
- "password": "string",
- "dob": "1990-05-02T00:00:00.000Z",
- "phone": 827277157,
- "wallet_balance": 15931,
- "vehicle_license_plate": "123456",
- "vehicle_brand": "TESLA",
- "vehicle_model": "123456",
- "stripe_tokenized_cards": [
- {
- "$oid": "66337ba6b70e4d50370876aa"
}
], - "total_points": 1000,
- "membership_level": {
- "$oid": "66337ba6b70e4d50370876aa"
}, - "membership_level_name": "Gold"
}
}Retrieve the point history of a specific user
| userId required | string ID of the user to retrieve point history for |
{- "ok": true,
- "data": [
- {
- "_id": "string",
- "user_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "points": 0,
- "source": "string",
- "source_id": "string",
- "remark": "string",
- "old_point": 0,
- "new_point": 0
}
]
}Add points to a specific user's account
| userId required | string ID of the user to add points to |
| points | integer Number of points to add to the user's account |
{- "points": 1000
}{- "ok": true,
- "message": "Points added successfully"
}Allows updating the auto-renew setting for a specific user.
| user_id required | string <objectid> The unique identifier of the user (MongoDB ObjectId). |
| subscription_auto_renew required | boolean Indicates whether the subscription should auto-renew. |
{- "subscription_auto_renew": true
}{- "ok": true,
- "message": "Update subscription auto renew for user successfully"
}Authenticates an authorizing admin using credentials provided in request headers, then returns the login token of the target user specified in the request body. The admin must exist and provide valid credentials. The target user must exist in the system.
| admin-email required | |
| admin-password required | string Example: s3cur3P@ssw0rd Password of the admin performing the authorization. |
| email required | string <email> Email of the target user whose login token is being requested. |
| purpose required | string Reason for requesting the token. This is recorded in the audit log. |
{- "purpose": "Customer support session"
}{- "ok": true,
- "data": {
- "token": "279d30f7a0eb7554a3201ec276613f60"
}
}Fetches users from the user service (with optional filters) and returns an
.xlsx spreadsheet as a downloadable attachment.
| name | string |
string | |
| phone | string |
| vehicle_license_plate | string |
| vehicle_brand | string |
| vehicle_model | string |
| per_page | integer >= 1 |
| page | integer >= 1 |
{- "ok": false,
- "msg": "invalid input",
- "errors": [
- "id is required"
]
}Returns user statistics by type (e.g. number of new users). Results are scoped to the requesting admin's role (Seeding Partner / CPO) and, when a date range is provided, missing dates are back-filled.
| type required | string Statistic type, e.g. by-number-of-new-users |
| from_date | string <date> YYYY-MM-DD |
| to_date | string <date> YYYY-MM-DD |
{- "ok": true,
- "data": [
- { }
]
}Adds free credit to a user's wallet via the payment service. The amount is converted to cents before being sent.
| amount required | number Amount greater than 0 |
| description required | string |
| user_id required | string User ObjectId |
{- "amount": 10,
- "description": "Promo top-up",
- "user_id": "string"
}{- "ok": true,
- "msg": "Topup successful",
- "data": { }
}Enables or disables auto-renew of the user's active subscription.
| user_id required | string User ObjectId |
| subscription_auto_renew required | boolean |
{- "subscription_auto_renew": true
}{- "ok": true
}Retrieve multiple users in a single request by passing an array of their IDs. Optional name/email/phone filters further narrow the matched users.
| ids required | Array of strings <objectId> [ items <objectId > ] Array of user IDs (MongoDB ObjectIds) to fetch. |
| name | string Optional case-insensitive partial match on user name. |
string Optional case-insensitive partial match on user email. | |
| phone | string Optional case-insensitive partial match on user phone. |
{- "ids": [
- "6633b336d2cf8eb80e24222d",
- "6633b336d2cf8eb80e24222e"
], - "name": "John",
- "phone": "12345"
}{- "ok": true,
- "data": [
- {
- "_id": {
- "$oid": "66337ada513dff7cb0219963"
}, - "name": "Tino",
- "password": "string",
- "dob": "1990-05-02T00:00:00.000Z",
- "phone": 827277157,
- "wallet_balance": 15931,
- "vehicle_license_plate": "123456",
- "vehicle_brand": "TESLA",
- "vehicle_model": "123456",
- "stripe_tokenized_cards": [
- {
- "$oid": "66337ba6b70e4d50370876aa"
}
], - "total_points": 1000,
- "membership_level": {
- "$oid": "66337ba6b70e4d50370876aa"
}, - "membership_level_name": "Gold"
}
]
}| 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. |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "program_id": "665e8f15ebf7d56c133612ab",
- "name": "Free 1 month",
- "merchant_id": "665e8f15ebf7d56c133612ab",
- "merchant_name": "Merchant ABC Ltd.",
- "description": "This is a description",
- "promo_type": "Subscription",
- "discount_value": 100,
- "number_of_codes": 10,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "expiry_date": "2021-07-31T00:00:00.000Z",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z"
}
]
}| id required | string |
{- "ok": true,
- "data": [
- {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "program_id": "665e8f15ebf7d56c133612ab",
- "name": "Free 1 month",
- "merchant_id": "665e8f15ebf7d56c133612ab",
- "merchant_name": "Merchant ABC Ltd.",
- "description": "This is a description",
- "promo_type": "Subscription",
- "discount_value": 100,
- "number_of_codes": 10,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "expiry_date": "2021-07-31T00:00:00.000Z",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z"
}
]
}| program_id | string |
| number_of_codes | integer |
| start_date | string |
| end_date | string |
| status | string |
| discount_value | number |
| discount_type | string Enum: "percent" "fixed" |
| max_discount | number Maximum discount amount |
| max_discount_type | string Enum: "percent" "fixed" |
{- "program_id": "665e8f15ebf7d56c133612ab",
- "number_of_codes": 10,
- "start_date": "2021-07-01T00:00:00.000Z",
- "end_date": "2021-07-31T00:00:00.000Z",
- "status": "active",
- "discount_value": 100,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed"
}{- "ok": true
}| ids | Array of strings |
| promo_program_id | string |
{- "ids": [
- "667fced180a245c95d401f4d",
- "667fced180a245c95d401f4e"
], - "promo_program_id": "667fced180a245c95d401f4c"
}{- "ok": true,
- "message": "Invalidated {number} promo codes"
}| ids | Array of strings |
| promo_program_id | string |
| extend_to_date | string date with format YYYY-MM-DD |
{- "ids": [
- "667fced180a245c95d401f4d",
- "667fced180a245c95d401f4e"
], - "promo_program_id": "667fced180a245c95d401f4c",
- "extend_to_date": "2028-07-31"
}{- "ok": true,
- "message": "Expiration dates updated successfully"
}| id required | string Promo Code ID |
| amount required | number |
| invoice_type | string |
{- "amount": 500000,
- "invoice_type": "percent"
}{- "ok": true,
- "data": { }
}Validates the user and promo code, then redeems (assigns) the specified promo code to the given user via the Promo Code service and records an admin activity log.
| user_id required | string ID of the user to assign the promo code to |
| promo_code_id required | string ID of the promo code to assign |
{- "user_id": "string",
- "promo_code_id": "string"
}{- "ok": true,
- "data": { }
}Fetches promo codes from the Promo Code service matching the given filters and streams
them back as an .xlsx spreadsheet download.
| keyword | string |
| code | string |
| promo_type | string |
| program_id | string |
| status | string |
| is_used | string |
| user_id | string |
| merchant_id | string |
| ids | string |
{- "ok": false,
- "msg": "Something went wrong, please contact CS for supporting."
}Maintenance job that iterates over promo codes missing denormalized user fields and backfills
user_name, user_email, and user_phone from the users collection in batches.
| limit | integer Default: 1000 Batch size per iteration |
{- "ok": true,
- "msg": "Processed all promocodes successfully"
}| keyword | string Search by keyword - name, code, ... |
| merchant_id | string Filter by merchant id |
| promo_type | string Enum: "Subscription" "FeePayment" Filter by promo type |
| used_codes | integer Filter by used codes count |
| start_date | string <date-time> Filter by start date |
| end_date | string <date-time> Filter by end date |
| page | integer The page number. |
| per_page | integer The numbers of items to return. |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "merchant_id": "665e8f15ebf7d56c133612ab",
- "name": "Free 1 month",
- "description": "This program is for new user only",
- "promo_type": "Subscription",
- "discount_value": 100,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "start_date": "2021-07-01T00:00:00.000Z",
- "end_date": "2021-07-31T00:00:00.000Z",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "used_codes": 5,
- "banner": "Banner URL",
- "term_of_use": "Terms of use",
- "detail": "Detailed description"
}
]
}| name required | string |
| code required | string <= 5 characters |
| merchant_id required | string |
| description | string |
| start_date required | string <date-time> |
| end_date required | string <date-time> |
| promo_type required | string Enum: "Subscription" "FeePayment" |
| status required | string |
| discount_value required | integer |
| discount_type required | string |
| max_discount required | integer |
| max_discount_type required | string |
| banner | string |
| term_of_use | string |
| detail | string |
{- "name": "string",
- "code": "strin",
- "merchant_id": "string",
- "description": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "promo_type": "Subscription",
- "status": "string",
- "discount_value": 0,
- "discount_type": "string",
- "max_discount": 0,
- "max_discount_type": "string",
- "banner": "string",
- "term_of_use": "string",
- "detail": "string"
}{- "ok": true,
- "promoprograms": {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "merchant_id": "665e8f15ebf7d56c133612ab",
- "name": "Free 1 month",
- "description": "This program is for new user only",
- "promo_type": "Subscription",
- "discount_value": 100,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "start_date": "2021-07-01T00:00:00.000Z",
- "end_date": "2021-07-31T00:00:00.000Z",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "used_codes": 5,
- "banner": "Banner URL",
- "term_of_use": "Terms of use",
- "detail": "Detailed description"
}
}Deletes the specified promo program via the Promo Code service and records an admin activity log with the previous state.
| promo_program_id required | string |
{- "ok": true
}| promo_program_id required | string Promo Program ID |
{- "ok": true,
- "data": {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "merchant_id": "665e8f15ebf7d56c133612ab",
- "name": "Free 1 month",
- "description": "This program is for new user only",
- "promo_type": "Subscription",
- "discount_value": 100,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "start_date": "2021-07-01T00:00:00.000Z",
- "end_date": "2021-07-31T00:00:00.000Z",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "used_codes": 5,
- "banner": "Banner URL",
- "term_of_use": "Terms of use",
- "detail": "Detailed description"
}
}| promo_program_id required | string Promo Program ID |
| name required | string |
| code required | string <= 5 characters |
| merchant_id required | string |
| description | string |
| start_date required | string <date-time> |
| end_date required | string <date-time> |
| promo_type required | string Enum: "Subscription" "FeePayment" |
| status required | string |
| discount_value required | integer |
| discount_type required | string |
| max_discount required | integer |
| max_discount_type required | string |
| banner | string |
| term_of_use | string |
| detail | string |
{- "name": "string",
- "code": "strin",
- "merchant_id": "string",
- "description": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "promo_type": "Subscription",
- "status": "string",
- "discount_value": 0,
- "discount_type": "string",
- "max_discount": 0,
- "max_discount_type": "string",
- "banner": "string",
- "term_of_use": "string",
- "detail": "string"
}{- "ok": true,
- "promoprograms": {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "merchant_id": "665e8f15ebf7d56c133612ab",
- "name": "Free 1 month",
- "description": "This program is for new user only",
- "promo_type": "Subscription",
- "discount_value": 100,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "start_date": "2021-07-01T00:00:00.000Z",
- "end_date": "2021-07-31T00:00:00.000Z",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "used_codes": 5,
- "banner": "Banner URL",
- "term_of_use": "Terms of use",
- "detail": "Detailed description"
}
}Retrieve a list of transactions with optional filters.
| status | string Filter by transaction status |
| user_id | string Filter by user ID (must be a MongoDB ObjectId) |
| user_name | string Filter by user name (supports partial match) |
| cpo_id | string Filter by CPO ID (must be a MongoDB ObjectId) |
| cpo_name | string Filter by CPO name (supports partial match) |
| sp_id | string Filter by Seeding Partner ID (must be a MongoDB ObjectId) |
| sp_name | string Filter by Seeding Partner name (supports partial match) |
| payment_type | string Filter by payment type |
| type | string Filter by transaction type |
| transaction_id | string Filter by transaction ID |
| charge_session_id | string Filter by charge session ID (must be a MongoDB ObjectId) |
| from_date | string <date> Filter transactions from a specific date |
| to_date | string <date> Filter transactions to a specific date |
| page | integer The page number for pagination (default is 1) |
| per_page | integer The number of items per page for pagination (default is 10) |
{- "ok": true,
- "total": 100,
- "page": 1,
- "per_page": 10,
- "data": [
- {
- "_id": "string",
- "User": {
- "_id": "string",
- "name": "string"
}, - "amount": 0,
- "transaction_id": "string",
- "type": "string",
- "payment_type": "string",
- "is_paid": true,
- "status": "string",
- "ChargeSession": {
- "_id": "string"
}, - "gst": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}
}
]
}Deletes the given transaction via the payment service, optionally recording a delete reason. Records an admin log entry capturing the previous state.
| transaction_id required | string |
| reason_delete | string |
{- "reason_delete": "string"
}{- "ok": true,
- "msg": "Transaction deleted successfully"
}Retrieve a specific transaction by its ID.
| transaction_id required | string The ID of the transaction (must be a MongoDB ObjectId) |
{- "ok": true,
- "data": {
- "_id": "string",
- "User": {
- "_id": "string",
- "name": "string"
}, - "amount": 0,
- "transaction_id": "string",
- "type": "string",
- "payment_type": "string",
- "is_paid": true,
- "status": "string",
- "ChargeSession": {
- "_id": "string"
}, - "gst": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}
}
}This API retrieves the total deposit of transaction for each date within a specified date range (from_date to to_date).
The sessions are counted and grouped by date based on the createdAt field.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string <string> The type of request |
{- "ok": true,
- "data": {
- "2024-01-10": 1000,
- "2024-01-16": 4533,
- "2024-01-18": 6562,
- "2024-02-21": 55334,
- "2024-02-22": 653455,
- "2024-02-24": 934554,
- "2024-03-16": 1252323
}
}This API retrieves the total of transaction for each date within a specified date range (from_date to to_date).
The sessions are counted and grouped by date based on the createdAt field.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string <string> The type of request |
{- "ok": true,
- "data": {
- "2024-01-10": 25,
- "2024-01-16": 54,
- "2024-01-18": 233,
- "2024-02-21": 345,
- "2024-02-22": 389,
- "2024-02-24": 445,
- "2024-03-16": 556
}
}Superadmin-only. Charges a user for a charge session or performs a wallet top up using the
user's current card. For charge_session type, charge_session_id is required.
| type required | string Enum: "charge_session" "topup" |
| user_id required | string Mongo ObjectId of the user |
| charge_session_id | string Required when type is charge_session |
| amount required | number Amount in dollars |
| reason required | string |
{- "type": "charge_session",
- "user_id": "string",
- "charge_session_id": "string",
- "amount": 0,
- "reason": "string"
}{- "ok": true,
- "msg": "string"
}Exports the filtered transaction list as an .xlsx file. CPO and Seeding Partner roles are
automatically scoped to their own transactions.
| status | string |
| user_id | string |
| user_name | string |
| cpo_id | string |
| cpo_name | string |
| sp_id | string |
| sp_name | string |
| payment_type | string |
| type | string |
| transaction_id | string |
| charge_session_id | string |
| from_date | string <date> YYYY-MM-DD |
| to_date | string <date> YYYY-MM-DD |
| ids | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": false,
- "msg": "invalid input",
- "errors": [
- "id is required"
]
}Maintenance job that iterates fee_charging transactions missing denormalized fields (user, charge point, EVSE, location names, fees) and populates them from their charge sessions.
| limit | integer Default: 1000 Batch size per iteration. |
{- "ok": true,
- "msg": "Processed all transactions successfully"
}Returns transaction statistics of a given type over an optional date range. Supported types
are total-deposit and total-number-transaction. CPO and Seeding Partner roles are scoped
to their own data.
| type required | string Enum: "total-deposit" "total-number-transaction" |
| from_date | string <date> YYYY-MM-DD |
| to_date | string <date> YYYY-MM-DD |
{- "ok": true,
- "data": [
- { }
]
}Retrieve multiple transactions in a single request by passing an array of their IDs. Optional filters allow selecting specific fields and narrowing by type/status.
| ids required | Array of strings <objectId> [ items <objectId > ] Array of transaction IDs (MongoDB ObjectIds) to fetch. |
| selectFields | string Optional comma-separated list of fields to include in each returned transaction. |
| type | string Optional filter by transaction type. |
| status | string Optional filter by transaction status. |
{- "ids": [
- "66337ba6b70e4d50370876aa",
- "66337ba6b70e4d50370876ab"
], - "selectFields": "amount,status,type",
- "type": "deposit",
- "status": "success"
}{- "ok": true,
- "data": [
- {
- "_id": "string",
- "User": {
- "_id": "string",
- "name": "string"
}, - "amount": 0,
- "transaction_id": "string",
- "type": "string",
- "payment_type": "string",
- "is_paid": true,
- "status": "string",
- "ChargeSession": {
- "_id": "string"
}, - "gst": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}
}
]
}Retrieve a list of all EVSEs with optional filters.
| status | string Filter by EVSE status (e.g., active, inactive) |
| location | string Filter by location name or ID |
| vip_user | string Filter by VIP user ID (must be a MongoDB ObjectId) |
| from_date | string <date> Filter EVSEs from a specific date |
| to_date | string <date> Filter EVSEs to a specific date |
| is_queue_enabled | boolean Filter EVSEs by whether they consume users from the location queue. When false, EVSEs with a false, null, or missing flag are returned. |
{- "ok": true,
- "total": 50,
- "data": [
- {
- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z",
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "connectors": [
- {
- "id": 184,
- "status": "active",
- "type": "type2",
- "format": "cable"
}
], - "idle_enters_reservation_fee": 500,
- "idle_grace_fee": 5,
- "idle_timing_0": "07:00-23:00",
- "idle_timing_1": "07:00-23:00",
- "idle_timing_2": "07:00-23:00",
- "idle_timing_3": "07:00-23:00",
- "idle_timing_4": "07:00-23:00",
- "idle_timing_5": "07:00-23:00",
- "idle_timing_6": "07:00-23:00",
- "idle_timing_enabled": true,
- "max_a": 32,
- "max_p": 22000,
- "max_v": 400
}
]
}Create a new EVSE with the provided information.
| ampeco_evse_id | string The AMPECO EVSE ID |
| current_type | string The type of current for the EVSE |
| status | string The status of the EVSE |
| hardware_status | string The hardware status of the EVSE |
| network_id | string The network ID for the EVSE |
object | |
object | |
object | |
| createdAt | string <date-time> The date the EVSE was created |
| updatedAt | string <date-time> The date the EVSE was last updated |
| is_enabled | boolean Whether the EVSE is enabled |
| is_queue_enabled | boolean Default: false Whether this EVSE consumes users from the location queue. |
| active_subscription | boolean Whether the EVSE has an active subscription |
| deletedAt | string <date-time> The date the EVSE was deleted, if applicable |
{- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z"
}{- "ok": true,
- "data": {
- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z",
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "connectors": [
- {
- "id": 184,
- "status": "active",
- "type": "type2",
- "format": "cable"
}
], - "idle_enters_reservation_fee": 500,
- "idle_grace_fee": 5,
- "idle_timing_0": "07:00-23:00",
- "idle_timing_1": "07:00-23:00",
- "idle_timing_2": "07:00-23:00",
- "idle_timing_3": "07:00-23:00",
- "idle_timing_4": "07:00-23:00",
- "idle_timing_5": "07:00-23:00",
- "idle_timing_6": "07:00-23:00",
- "idle_timing_enabled": true,
- "max_a": 32,
- "max_p": 22000,
- "max_v": 400
}
}Retrieve a specific EVSE by its ID.
| evse_id required | string The ID of the EVSE (must be a MongoDB ObjectId) |
{- "ok": true,
- "data": {
- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z",
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "connectors": [
- {
- "id": 184,
- "status": "active",
- "type": "type2",
- "format": "cable"
}
], - "idle_enters_reservation_fee": 500,
- "idle_grace_fee": 5,
- "idle_timing_0": "07:00-23:00",
- "idle_timing_1": "07:00-23:00",
- "idle_timing_2": "07:00-23:00",
- "idle_timing_3": "07:00-23:00",
- "idle_timing_4": "07:00-23:00",
- "idle_timing_5": "07:00-23:00",
- "idle_timing_6": "07:00-23:00",
- "idle_timing_enabled": true,
- "max_a": 32,
- "max_p": 22000,
- "max_v": 400
}
}Update an existing EVSE with the provided information.
| evse_id required | string The ID of the EVSE to update (must be a MongoDB ObjectId) |
| ampeco_evse_id | string The AMPECO EVSE ID |
| current_type | string The type of current for the EVSE |
| status | string The status of the EVSE |
| hardware_status | string The hardware status of the EVSE |
| network_id | string The network ID for the EVSE |
object | |
object | |
object | |
| createdAt | string <date-time> The date the EVSE was created |
| updatedAt | string <date-time> The date the EVSE was last updated |
| is_enabled | boolean Whether the EVSE is enabled |
| is_queue_enabled | boolean Default: false Whether this EVSE consumes users from the location queue. |
| active_subscription | boolean Whether the EVSE has an active subscription |
| deletedAt | string <date-time> The date the EVSE was deleted, if applicable |
| _id | string The unique identifier for the EVSE. |
| connectors | string A list of connectors available for the EVSE. |
| idle_enters_reservation_fee | number Fee charged when the EVSE enters reservation mode. |
| idle_grace_fee | number Fee charged during the idle grace period. |
| idle_timing_0 | number Idle timing fee for time slot 0. |
| idle_timing_1 | number Idle timing fee for time slot 1. |
| idle_timing_2 | number Idle timing fee for time slot 2. |
| idle_timing_3 | number Idle timing fee for time slot 3. |
| idle_timing_4 | number Idle timing fee for time slot 4. |
| idle_timing_5 | number Idle timing fee for time slot 5. |
| idle_timing_6 | number Idle timing fee for time slot 6. |
| idle_timing_enabled | boolean Whether idle timing is enabled for the EVSE. |
| max_a | number Maximum current the EVSE can provide. |
| max_p | number Maximum power the EVSE can provide. |
| max_v | number Maximum voltage the EVSE can provide. |
{- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z",
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "connectors": [
- {
- "id": 184,
- "status": "active",
- "type": "type2",
- "format": "cable"
}
], - "idle_enters_reservation_fee": 500,
- "idle_grace_fee": 5,
- "idle_timing_0": "07:00-23:00",
- "idle_timing_1": "07:00-23:00",
- "idle_timing_2": "07:00-23:00",
- "idle_timing_3": "07:00-23:00",
- "idle_timing_4": "07:00-23:00",
- "idle_timing_5": "07:00-23:00",
- "idle_timing_6": "07:00-23:00",
- "idle_timing_enabled": true,
- "max_a": 32,
- "max_p": 22000,
- "max_v": 400
}{- "ok": true,
- "data": {
- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z",
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "connectors": [
- {
- "id": 184,
- "status": "active",
- "type": "type2",
- "format": "cable"
}
], - "idle_enters_reservation_fee": 500,
- "idle_grace_fee": 5,
- "idle_timing_0": "07:00-23:00",
- "idle_timing_1": "07:00-23:00",
- "idle_timing_2": "07:00-23:00",
- "idle_timing_3": "07:00-23:00",
- "idle_timing_4": "07:00-23:00",
- "idle_timing_5": "07:00-23:00",
- "idle_timing_6": "07:00-23:00",
- "idle_timing_enabled": true,
- "max_a": 32,
- "max_p": 22000,
- "max_v": 400
}
}Retrieve the count of EVSEs grouped by date within the specified time range. Filters are available for current type, hardware status, CPO, and Seeding Partner.
| from_date required | string <date> The start date of the range in YYYY-MM-DD format. |
| to_date required | string <date> The end date of the range in YYYY-MM-DD format. |
| current_type | string The current type to filter EVSEs (e.g., AC or DC). |
| hardware_status | string The hardware status to filter EVSEs (e.g., active or inactive). |
| type required | string <string> The type of request (e.g., number-evse) |
{- "ok": true,
- "data": {
- "2024-12-01": 5,
- "2024-12-02": 8
}
}Retrieve the count of EVSEs grouped by date and charger status (e.g., active, inactive) within the specified time range. Additional filters are available for CPO and Seeding Partner.
| from_date required | string <date> The start date of the range in YYYY-MM-DD format. |
| to_date required | string <date> The end date of the range in YYYY-MM-DD format. |
| type required | string <string> The type of request (e.g., number-charger-status) |
{- "ok": true,
- "data": [
- {
- "date": "2024-12-01",
- "active": 10,
- "inactive": 5
}
]
}Retrieve statistics about the total watt fee (calculated as the count of EVSEs multiplied by a fee per unit, e.g., 50) grouped by date and charger status within the specified time range. Optional filters are available for CPO and Seeding Partner.
| from_date required | string <date> The start date of the range in YYYY-MM-DD format. |
| to_date required | string <date> The end date of the range in YYYY-MM-DD format. |
| type required | string <string> The type of request (e.g., total-watt-fee) |
{- "ok": true,
- "data": [
- {
- "date": "2024-12-01",
- "active": {
- "count": 10,
- "total": 500
}, - "inactive": {
- "count": 5,
- "total": 250
}
}
]
}Retrieve statistics about the total expense (calculated as the count of EVSEs multiplied by a fee per unit, e.g., 50) grouped by date and charger status within the specified time range. Optional filters are available for CPO and Seeding Partner.
| from_date required | string <date> The start date of the range in YYYY-MM-DD format. |
| to_date required | string <date> The end date of the range in YYYY-MM-DD format. |
| type required | string <string> The type of request (e.g., total-expense) |
{- "ok": true,
- "data": [
- {
- "date": "2024-12-01",
- "active": {
- "count": 10,
- "total": 500
}, - "inactive": {
- "count": 5,
- "total": 250
}
}
]
}This endpoint adds restricted users to specific EVSEs associated with provided locations.
string or Array of strings A single user ID or an array of user IDs to restrict. | |
string or Array of strings A single evse ID or an array of evse IDs. |
{- "user_ids": [
- "6633b336d2cf8eb80e24222d",
- "6633b336d2cf8eb80e24222d"
], - "evse_ids": [
- "6433a188c6154228bd25c6dc",
- "6433a188c6154228bd25c6dc"
]
}{- "ok": true,
- "message": "Restricted users have been updated successfully"
}Using to subscription_price_enabled to toggle enable/disable subscription plan for EVSE
Using enable_subscription_plans to edit subscription plans for EVSE
| evse_id required | string The ID of the EVSE (must be a MongoDB ObjectId) |
| subscription_price_enabled | boolean Using to toggle enable/disable subscription plan for EVSE |
| enable_subscription_plans | Array of strings |
{- "subscription_price_enabled": true,
- "enable_subscription_plans": [
- "66b78456642444e4b596a9db"
]
}{- "ok": true,
- "data": {
- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z",
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "connectors": [
- {
- "id": 184,
- "status": "active",
- "type": "type2",
- "format": "cable"
}
], - "idle_enters_reservation_fee": 500,
- "idle_grace_fee": 5,
- "idle_timing_0": "07:00-23:00",
- "idle_timing_1": "07:00-23:00",
- "idle_timing_2": "07:00-23:00",
- "idle_timing_3": "07:00-23:00",
- "idle_timing_4": "07:00-23:00",
- "idle_timing_5": "07:00-23:00",
- "idle_timing_6": "07:00-23:00",
- "idle_timing_enabled": true,
- "max_a": 32,
- "max_p": 22000,
- "max_v": 400
}
}Initiates a background synchronization of all EVSEs from Ampeco. If a synchronization is already in progress, the request will be rejected. The sync runs asynchronously — a 200 response only indicates the process has been started. A Slack notification is sent when the sync is initiated. The in-progress lock expires after 5 minutes.
{- "ok": true,
- "msg": "Synchronization of all EVSEs has been initiated. This process may take some time to complete."
}Builds and streams an Evse.xlsx spreadsheet of EVSEs matching the given filters.
Seeding Partner and CPO roles are scoped to their own EVSEs.
| name | string |
| ampeco_evse_id | string |
| status | string |
| network_id | string |
| current_type | string |
| charge_point_id | string |
| cpo_sp_name | string |
| per_page | integer >= 1 |
| page | integer >= 1 |
{- "ok": false,
- "msg": "Something went wrong, please contact CS for supporting."
}Fetches EVSE pricing from the charging service and streams an EvsePricing.xlsx spreadsheet.
Seeding Partner and CPO roles are scoped to their own EVSEs.
| name | string |
| ampeco_evse_id | string |
| status | string |
| network_id | string |
| current_type | string |
| charge_point_id | string |
| cpo_sp_name | string |
{- "ok": false,
- "msg": "Something went wrong, please contact CS for supporting."
}Parses an uploaded XLSX file and updates EVSE pricing (price_normal_new, price_vip_new,
tariff_new) via the charging service. Requires a multipart file upload under the file field.
| file required | string <binary> XLSX file with pricing rows |
| is_update_immediately | boolean Apply the new prices immediately |
| apply_time | string Scheduled time to apply the new prices |
{- "ok": true,
- "msg": "string"
}Removes restricted (VIP) users from the given EVSEs via the charging service and records an admin log entry.
string or Array of strings | |
string or Array of strings |
{- "user_ids": "string",
- "evse_ids": "string"
}{- "ok": true
}Returns the restricted-user (VIP) records for EVSEs, proxied to the charging service. Seeding Partner and CPO roles are automatically scoped to their own records.
{- "ok": true,
- "data": [
- { }
]
}Returns EVSE statistics depending on the type parameter. Supported types include
number-evse, number-charger-status, total-watt-fee, total-expense, current-status,
total-restricted-users and by-charger. Seeding Partner and CPO roles are scoped to their own EVSEs.
| type required | string Enum: "number-evse" "number-charger-status" "total-watt-fee" "total-expense" "current-status" "total-restricted-users" "by-charger" |
| from_date | string <date> |
| to_date | string <date> |
| current_type | string |
| hardware_status | string |
{- "ok": true,
- "data": { }
}Proxies the request to the charging service to synchronize each EVSE's VIP list.
{ }{- "ok": true
}Rebuilds the evsevipuser records from each EVSE's vip_list, enriching them with user and location details, and marks outdated entries as removed.
{- "ok": true,
- "msg": "string"
}Returns the top EVSEs ranked by utilization rating for the given period, proxied to the charging service. Seeding Partner and CPO roles are scoped to their own EVSEs.
| limit | integer |
| rating_type | string Enum: "daily" "weekly" "monthly" |
{- "ok": true,
- "data": [
- { }
]
}Iterates over EVSEs missing a Location and sets it from their linked charge point, in batches.
| limit | integer Batch size (default 50) |
{- "limit": 0
}{- "ok": true,
- "msg": "string"
}Updates the set of EVSEs on which a single user is restricted (VIP), via the charging service, and records an admin log entry.
| user_id required | string The user to update (required) |
string or Array of strings |
{- "user_id": "string",
- "evse_ids": "string"
}{- "ok": true
}Proxies the request body to the charging service to update VIP data on EVSEs.
{ }{- "ok": true
}Generates a performance report for the given EVSE and month/year via the charging service.
| id required | string |
| month required | integer [ 1 .. 12 ] Report month (1-12) |
| year required | integer Report year |
{- "month": 1,
- "year": 0
}{- "ok": true,
- "data": { }
}Retrieve multiple EVSEs in a single request by passing an array of their IDs.
| ids required | Array of strings <objectId> [ items <objectId > ] Array of EVSE IDs (MongoDB ObjectIds) to fetch. |
{- "ids": [
- "645c99b3c4aa3d518c24b2ac",
- "645c99b3c4aa3d518c24b2ad"
]
}{- "ok": true,
- "data": [
- {
- "ampeco_evse_id": "string",
- "current_type": "string",
- "status": "string",
- "hardware_status": "string",
- "network_id": "string",
- "ChargePoint": {
- "_id": "string",
- "name": "string"
}, - "CPO": {
- "_id": "string",
- "name": "string"
}, - "SeedingPartner": {
- "_id": "string",
- "name": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "is_enabled": true,
- "is_queue_enabled": true,
- "active_subscription": true,
- "deletedAt": "2019-08-24T14:15:22Z",
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "connectors": [
- {
- "id": 184,
- "status": "active",
- "type": "type2",
- "format": "cable"
}
], - "idle_enters_reservation_fee": 500,
- "idle_grace_fee": 5,
- "idle_timing_0": "07:00-23:00",
- "idle_timing_1": "07:00-23:00",
- "idle_timing_2": "07:00-23:00",
- "idle_timing_3": "07:00-23:00",
- "idle_timing_4": "07:00-23:00",
- "idle_timing_5": "07:00-23:00",
- "idle_timing_6": "07:00-23:00",
- "idle_timing_enabled": true,
- "max_a": 32,
- "max_p": 22000,
- "max_v": 400
}
]
}Fetch a list of information records with optional filters and pagination.
| title | string Filter by title (case-insensitive regex search) |
| is_active | boolean Filter by active status |
| per_page | integer <int32> Example: per_page=10 Number of records per page |
| page | integer <int32> Example: page=1 Page number for pagination |
{- "ok": true,
- "data": [
- {
- "_id": "string",
- "title": "string",
- "content": "string",
- "icon": "string",
- "background": "string",
- "InformationCategory": "string",
- "is_active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "description": "string"
}
], - "total": 100,
- "page": 1,
- "per_page": 10
}Create a new information record with the provided data.
| title | string |
| content | string |
| icon | string |
| background | string |
| InformationCategory | string <objectId> |
| is_active | boolean |
| description | string |
{- "title": "string",
- "content": "string",
- "icon": "string",
- "background": "string",
- "InformationCategory": "string",
- "is_active": true,
- "description": "string"
}{- "ok": true,
- "data": {
- "_id": "string",
- "title": "string",
- "content": "string",
- "icon": "string",
- "background": "string",
- "InformationCategory": "string",
- "is_active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "description": "string"
}
}Fetch a single information record by its ID.
| information_id required | string <objectId> ID of the information to retrieve |
{- "ok": true,
- "data": {
- "_id": "string",
- "title": "string",
- "content": "string",
- "icon": "string",
- "background": "string",
- "InformationCategory": "string",
- "is_active": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "description": "string"
}
}Update information details using the provided data.
| information_id required | string <objectId> ID of the information to update |
| title | string |
| content | string |
| icon | string |
| background | string |
| InformationCategory | string <objectId> |
| is_active | boolean |
| description | string |
{- "title": "string",
- "content": "string",
- "icon": "string",
- "background": "string",
- "InformationCategory": "string",
- "is_active": true,
- "description": "string"
}{- "ok": true,
- "msg": "Update information successfully"
}Mark an information record as deleted by setting the deletedAt field.
| information_id required | string <objectId> ID of the information to delete |
{- "ok": true,
- "msg": "Delete information successfully!"
}Fetch a list of information category records with optional filters and pagination.
| name | string Filter by category name (case-insensitive regex search) |
| type | string Filter by category type (case-insensitive regex search) |
| is_active | boolean Filter by active status |
| per_page | integer <int32> Example: per_page=10 Number of records per page |
| page | integer <int32> Example: page=1 Page number for pagination |
{- "ok": true,
- "data": [
- {
- "_id": "string",
- "name": "string",
- "description": "string",
- "type": "string",
- "is_active": true,
- "thumbnail": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "total": 100,
- "page": 1,
- "per_page": 10
}Create a new information category with the provided data.
| name | string |
| description | string |
| type | string |
| is_active | boolean |
| thumbnail | string |
{- "name": "string",
- "description": "string",
- "type": "string",
- "is_active": true,
- "thumbnail": "string"
}{- "ok": true,
- "category": {
- "_id": "string",
- "name": "string",
- "description": "string",
- "type": "string",
- "is_active": true,
- "thumbnail": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Fetch a single information category record by its ID.
| category_id required | string <objectId> ID of the category to retrieve |
{- "ok": true,
- "data": {
- "_id": "string",
- "name": "string",
- "description": "string",
- "type": "string",
- "is_active": true,
- "thumbnail": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Update category details using the provided data.
| category_id required | string <objectId> ID of the category to update |
| name | string |
| description | string |
| type | string |
| is_active | boolean |
| thumbnail | string |
{- "name": "string",
- "description": "string",
- "type": "string",
- "is_active": true,
- "thumbnail": "string"
}{- "ok": true,
- "msg": "Update category successfully"
}Mark an information category record as deleted by setting the deletedAt field.
| category_id required | string <objectId> ID of the category to delete |
{- "ok": true,
- "msg": "Delete category successfully!"
}Upload a single file to a specific schema folder. The returned link is a CDN URL for the uploaded file.
| schema required | string Example: rewards-programs Schema folder to upload into (information, information-category, avatar, rewards-programs, etc.) |
| file required | string <binary> |
{- "ok": true,
}Fetches data for admins with roles of CPO or SP based on optional query parameters.
| name | string Name to filter. |
string Email to filter. | |
| type | string Type to filter the results by. |
| role_id | string <objectID> Role ID to filter the results by. Must be a valid MongoDB ObjectId. |
| company_id | string <objectID> Company ID to filter the results by. Must be a valid MongoDB ObjectId. |
{- "ok": true,
- "data": [
- {
- "ok": true,
- "data": [
- {
- "_id": "64dfb8a1234567890abcdef",
- "name": "Tino Nguyen",
- "is_active": true,
- "Role": "6326e0e844841a723ee10cbe",
- "profit_sharing_sp": 0.1,
- "createdAt": "2023-12-01T12:00:00.000Z",
- "updatedAt": "2023-12-10T12:00:00.000Z",
- "__v": 0,
- "Company": "6326e0e844841a723ee10cbe",
- "ac_subscription_fee": 20,
- "dc_subscription_fee": 20,
- "profit_sharing_cpo": 20,
- "profit_sharing_platform": 20,
- "type": "SuperAdmin"
}
]
}
], - "total": 100,
- "page": 1,
- "per_page": 10
}Creates an admin account. Resolves the given role name to a Role reference, encrypts the password, and validates profit-sharing splits (must total 0 or 1).
| name required | string >= 3 characters |
| email required | string <email> |
| password required | string |
| type | string Enum: "commercial" "residential" "industrial" "government" |
| role | string |
| acSubscriptionFee | number |
| dcSubscriptionFee | number |
| platformProfitSharing | number [ 0 .. 1 ] |
| cpoProfitSharing | number [ 0 .. 1 ] |
| spProfitSharing | number [ 0 .. 1 ] |
{- "name": "string",
- "password": "string",
- "type": "commercial",
- "role": "string",
- "acSubscriptionFee": 0,
- "dcSubscriptionFee": 0,
- "platformProfitSharing": 1,
- "cpoProfitSharing": 1,
- "spProfitSharing": 1
}{- "ok": true,
- "msg": "Admin created successfully",
- "admin": {
- "_id": "string"
}
}Retrieve a list of admins based on filters, pagination, and role information.
| name | string Filter by admin name (case-insensitive, partial match). |
string Filter by admin email (case-insensitive, partial match). | |
| ids | string Comma-separated list of admin IDs to filter by. |
| is_active | boolean Filter by active status. |
| role_names | string Comma-separated list of role names to filter by. |
| per_page | integer Default: 10 Number of records per page for pagination (default is 10). |
| page | integer Default: 1 Page number for pagination (default is 1). |
{- "ok": true,
- "data": [
- {
- "_id": "64dfb8a1234567890abcdef",
- "name": "John Doe",
- "is_active": true,
- "profit_sharing_sp": 0.1,
- "Role": {
- "_id": "64dfb8a1234567890abcdef",
- "name": "Admin"
}, - "createdAt": "2023-12-01T12:00:00.000Z",
- "updatedAt": "2023-12-10T12:00:00.000Z",
- "wallet_balance": 1000,
- "Company": "6326e7b289ebfe2ce7ab9bdf.",
- "ac_subscription_fee": 20,
- "dc_subscription_fee": 30,
- "profit_sharing_cpo": 0.15,
- "profit_sharing_platform": 0.05,
- "type": "SuperAdmin"
}
], - "total": 50,
- "page": 1,
- "per_page": 10
}Authenticates an authorizing admin using credentials provided in request headers, then returns the login token of the target admin specified in the request body. Both the authorizing admin and the target admin must exist in the system.
| admin-email required | |
| admin-password required | string Example: s3cur3P@ssw0rd Password of the admin performing the authorization. |
| email required | string <email> Email of the target admin whose login token is being requested. |
| purpose required | string Reason for requesting the token. This is recorded in the audit log. |
{- "purpose": "Customer support session"
}{- "ok": true,
- "data": {
- "token": "279d30f7a0eb7554a3201ec276613f60"
}
}Sets a new password for an admin after verifying the OTP. password and
confirm_password must match.
| email required | string <email> |
| otp required | string |
| password required | string |
| confirm_password required | string |
{- "otp": "string",
- "password": "string",
- "confirm_password": "string"
}{- "ok": true
}Returns admins filtered to CPO / Seeding Partner roles, with pagination and filters.
| name | string |
string | |
| type | string |
| role_id | string |
| company_id | string |
| ids | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Initiates a password reset for the admin with the given email (sends an OTP).
| email required | string <email> |
{- "email": "[email protected]"
}{- "ok": true
}Verifies a one-time password issued during the admin password-reset flow.
| email required | string <email> |
| otp required | string |
{- "otp": "string"
}{- "ok": true
}Updates an admin's profile. Resolves role name to a Role reference, encrypts a new password if given, and validates that profit-sharing splits total 0 or 1.
| id required | string Admin ObjectId |
| name | string >= 3 characters |
string <email> | |
| password | string >= 6 characters |
| type | string Enum: "commercial" "residential" "industrial" "government" |
| role | string |
| acSubscriptionFee | number |
| dcSubscriptionFee | number |
| platformProfitSharing | number [ 0 .. 1 ] |
| cpoProfitSharing | number [ 0 .. 1 ] |
| spProfitSharing | number [ 0 .. 1 ] |
{- "name": "string",
- "password": "string",
- "type": "commercial",
- "role": "string",
- "acSubscriptionFee": 0,
- "dcSubscriptionFee": 0,
- "platformProfitSharing": 1,
- "cpoProfitSharing": 1,
- "spProfitSharing": 1
}{- "ok": true
}Partially updates an admin, mapping company_id and location_id to their
Company / Location references.
| id required | string Admin ObjectId |
| company_id | string Company ObjectId |
| location_id | string Location ObjectId |
{- "company_id": "string",
- "location_id": "string"
}{- "ok": true
}Retrieve multiple admins (each with their populated role) in a single request by passing an array of their IDs. Soft-deleted admins are excluded.
| ids required | Array of strings <objectId> [ items <objectId > ] Array of admin IDs (MongoDB ObjectIds) to fetch. |
{- "ids": [
- "64dfb8a1234567890abcdef1",
- "64dfb8a1234567890abcdef2"
]
}{- "ok": true,
- "data": [
- {
- "ok": true,
- "data": [
- {
- "_id": "64dfb8a1234567890abcdef",
- "name": "Tino Nguyen",
- "is_active": true,
- "Role": "6326e0e844841a723ee10cbe",
- "profit_sharing_sp": 0.1,
- "createdAt": "2023-12-01T12:00:00.000Z",
- "updatedAt": "2023-12-10T12:00:00.000Z",
- "__v": 0,
- "Company": "6326e0e844841a723ee10cbe",
- "ac_subscription_fee": 20,
- "dc_subscription_fee": 20,
- "profit_sharing_cpo": 20,
- "profit_sharing_platform": 20,
- "type": "SuperAdmin"
}
]
}
]
}Retrieve a list of Charge Points with optional filters and pagination.
| name | string Filter by name (case-insensitive regex search) |
| ampeco_chargepoint_id | string Filter by ampeco_chargepoint_ids |
| status | string Filter by status |
| network_status | string Filter by network_status |
| is_enabled | boolean Filter by is_enabled |
| access_type | boolean Filter by access_type |
| cpo_id | string <ObjectID> Filter by CPO _id |
| sp_id | string <ObjectID> Filter by SP _id |
| location_id | string <ObjectID> Filter by Location _id |
| from_date | string <date-time> Filter ChargePoint was created from from_date (ISO8601, YYYY-MM-DD) |
| to_date | string <date-time> Filter ChargePoint was created before to_date (ISO8601, YYYY-MM-DD) |
| per_page | integer <int32> Example: per_page=10 Number of records per page |
| page | integer <int32> Example: page=1 Page number for pagination |
{- "ok": true,
- "data": [
- {
- "_id": "string",
- "name": "string",
- "ampeco_chargepoint_id": "string",
- "Evse": "string",
- "Location": "string",
- "CPO": "string",
- "SeedingPartner": "string",
- "status": "string",
- "network_id": "string",
- "network_protocol": "string",
- "charge_speed": "string",
- "network_status": "string",
- "is_enabled": true,
- "access_type": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "subscription_price_enabled": true,
- "reservation_enabled": true,
- "reservation_same_day": false,
- "reservation_block": 15,
- "reservation_cancel_grace_period": 5,
- "reservation_grace_period": 30,
- "reservation_deposit_amount": 10050,
- "idle_enters_reservation_fee": 5075,
- "idle_timing_enabled": true,
- "idle_grace_period": 10,
- "idle_grace_fee": 25,
- "idle_timing_0": "08:00-18:00",
- "idle_timing_1": "08:00-18:00",
- "idle_timing_2": "08:00-18:00",
- "idle_timing_3": "08:00-18:00",
- "idle_timing_4": "08:00-18:00",
- "idle_timing_5": "08:00-18:00",
- "idle_timing_6": "08:00-18:00",
- "price_vip": 12075,
- "price_normal": 10050,
- "tariff": 1500
}
], - "total": 100,
- "page": 1,
- "per_page": 10
}Creates a new charge point in the system with the provided details.
| name required | string Name of the charge point. |
| ampeco_chargepoint_id required | string Ampeco charge point ID. |
| Evse required | Array of strings <ObjectID> [ items <ObjectID > ] List of EVSE IDs associated with the charge point. |
| Location required | string ID of the location where the charge point is installed. |
| CPO required | string ID of the CPO (Charge Point Operator) responsible for the charge point. |
| status required | string Status of the charge point. |
| access_type required | string Access type of the charge point. |
| network_id required | string Network ID to which the charge point belongs. |
| network_protocol required | string Network protocol used by the charge point. |
| charge_speed required | integer Charge speed of the charge point in kW. |
| network_status required | string Current network status of the charge point. |
| subscription_price_enabled required | boolean Indicates if subscription price is enabled for this charge point. |
| reservation_enabled required | boolean Indicates if the reservation function is enabled. |
| reservation_same_day required | boolean Indicates if same-day reservations are allowed. |
| reservation_block | integer Grace period (block) for the reservation in minutes. |
| reservation_cancel_grace_period | integer Cancellation grace period in minutes. |
| reservation_grace_period | integer Maximum reservation period in minutes. |
| reservation_deposit_amount | number <float> Deposit amount for the reservation. |
| idle_enters_reservation_fee | number <float> Idling fee charged when a reserved charge point is not utilized. |
| idle_timing_enabled | boolean Indicates if the idling penalty function is enabled. |
| idle_grace_period | integer Grace period for idling in minutes. |
| idle_grace_fee | number <float> Idling penalty fee charged after the grace period. |
| idle_timing_0 | string Custom idling timing for Sunday in the format HH:mm-HH:mm. |
| idle_timing_1 | string Custom idling timing for Monday in the format HH:mm-HH:mm. |
| idle_timing_2 | string Custom idling timing for Tuesday in the format HH:mm-HH:mm. |
| idle_timing_3 | string Custom idling timing for Wednesday in the format HH:mm-HH:mm. |
| idle_timing_4 | string Custom idling timing for Thursday in the format HH:mm-HH:mm. |
| idle_timing_5 | string Custom idling timing for Friday in the format HH:mm-HH:mm. |
| idle_timing_6 | string Custom idling timing for Saturday in the format HH:mm-HH:mm. |
| price_vip required | number <float> Pricing for public users. |
| price_normal required | number <float> Pricing for restricted users. |
| tariff required | number <float> Electrical tariff rate. |
{- "name": "TinoCPO",
- "ampeco_chargepoint_id": "147",
- "Evse": [
- "605c72ef1f1a2d3d9e5a7b2a",
- "605c72ef1f1a2d3d9e5a7b2b"
], - "Location": "605c72ef1f1a2d3d9e5a7b2c",
- "CPO": "605c72ef1f1a2d3d9e5a7b2d",
- "status": "active",
- "access_type": "public",
- "network_id": "network-001",
- "network_protocol": "OCPP 2.0",
- "charge_speed": 50,
- "network_status": "long-term unavailable",
- "subscription_price_enabled": true,
- "reservation_enabled": true,
- "reservation_same_day": true,
- "reservation_block": 15,
- "reservation_cancel_grace_period": 30,
- "reservation_grace_period": 120,
- "reservation_deposit_amount": 10.5,
- "idle_enters_reservation_fee": 2.5,
- "idle_timing_enabled": true,
- "idle_grace_period": 10,
- "idle_grace_fee": 1.5,
- "idle_timing_0": "07:00-10:00",
- "idle_timing_1": "07:00-10:00",
- "idle_timing_2": "07:00-10:00",
- "idle_timing_3": "07:00-10:00",
- "idle_timing_4": "07:00-10:00",
- "idle_timing_5": "07:00-10:00",
- "idle_timing_6": "07:00-10:00",
- "price_vip": 5,
- "price_normal": 3,
- "tariff": 0.2
}{- "ok": true,
- "chargepoint": {
- "insertedId": "605c72ef1f1a2d3d9e5a7b2e"
}
}Fetch a single ChargePoint record by its ID.
| charge_point_id required | string Example: 605c72ef1f1a2d3d9e5a7b2e The ID of the charge point to update. |
{- "ok": true,
- "data": {
- "_id": "string",
- "name": "string",
- "ampeco_chargepoint_id": "string",
- "Evse": "string",
- "Location": "string",
- "CPO": "string",
- "SeedingPartner": "string",
- "status": "string",
- "network_id": "string",
- "network_protocol": "string",
- "charge_speed": "string",
- "network_status": "string",
- "is_enabled": true,
- "access_type": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "subscription_price_enabled": true,
- "reservation_enabled": true,
- "reservation_same_day": false,
- "reservation_block": 15,
- "reservation_cancel_grace_period": 5,
- "reservation_grace_period": 30,
- "reservation_deposit_amount": 10050,
- "idle_enters_reservation_fee": 5075,
- "idle_timing_enabled": true,
- "idle_grace_period": 10,
- "idle_grace_fee": 25,
- "idle_timing_0": "08:00-18:00",
- "idle_timing_1": "08:00-18:00",
- "idle_timing_2": "08:00-18:00",
- "idle_timing_3": "08:00-18:00",
- "idle_timing_4": "08:00-18:00",
- "idle_timing_5": "08:00-18:00",
- "idle_timing_6": "08:00-18:00",
- "price_vip": 12075,
- "price_normal": 10050,
- "tariff": 1500
}
}Updates the details of a charge point specified by the ID.
| charge_point_id required | string Example: 605c72ef1f1a2d3d9e5a7b2e The ID of the charge point to update. |
| name | string Name of the charge point. |
| ampeco_chargepoint_id | string Ampeco charge point ID. |
| Evse | Array of strings List of EVSE IDs associated with the charge point. |
| Location | string ID of the location where the charge point is installed. |
| CPO | string ID of the CPO (Charge Point Operator) responsible for the charge point. |
| status | string Status of the charge point. |
| access_type | string Access type of the charge point. |
| network_id | string Network ID to which the charge point belongs. |
| network_protocol | string Network protocol used by the charge point. |
| charge_speed | integer Charge speed of the charge point in kW. |
| network_status | string Current network status of the charge point. |
| subscription_price_enabled | boolean Indicates if subscription price is enabled for this charge point. |
{- "name": "ChargePoint Name",
- "ampeco_chargepoint_id": "197",
- "Evse": [
- "605c72ef1f1a2d3d9e5a7b2a",
- "605c72ef1f1a2d3d9e5a7b2b"
], - "Location": "605c72ef1f1a2d3d9e5a7b2c",
- "CPO": "605c72ef1f1a2d3d9e5a7b2d",
- "status": "active",
- "access_type": "public",
- "network_id": "network-001",
- "network_protocol": "OCPP 2.0",
- "charge_speed": 50,
- "network_status": "long-term unavailable",
- "subscription_price_enabled": true
}{- "ok": true,
- "msg": "Charge point updated successfully"
}This endpoint enables subscription plans for a specified charge point identified by either its ID or name.
| charge_point_id required | string The unique identifier of the charge point (ObjectId). |
| charge_point_name | string The name of the charge point. |
| subscription_plans required | Array of strings |
{- "charge_point_id": "string",
- "charge_point_name": "string",
- "subscription_plans": [
- "string"
]
}{- "ok": true,
- "data": { }
}| charge_point_names | Array of strings An array of charge point names to exclude. |
| charge_point_ids required | Array of strings An array of charge point IDs to exclude (either ObjectId or ampeco_chargepoint_id). |
| subscription_plans required | Array of strings An array of subscription plan IDs to enable. |
{- "charge_point_names": [
- "string"
], - "charge_point_ids": [
- "string"
], - "subscription_plans": [
- "string"
]
}{- "ok": true,
- "msg": "Subscription plans enabled for all ChargePoints except excluded IDs/names"
}| charge_point_names | Array of strings An array of charge point names to include. |
| charge_point_ids required | Array of strings An array of charge point IDs to include (either ObjectId or ampeco_chargepoint_id). |
| subscription_plans required | Array of strings An array of subscription plan IDs to enable. |
{- "charge_point_names": [
- "string"
], - "charge_point_ids": [
- "string"
], - "subscription_plans": [
- "string"
]
}{- "ok": true,
- "msg": "3 chargepoints updated"
}This endpoint adds restricted users to specific EVSEs associated with provided locations.
string or Array of strings A single user ID or an array of user IDs to restrict. | |
string or Array of strings A single charge points ID or an array of charge points IDs. |
{- "user_ids": [
- "6633b336d2cf8eb80e24222d",
- "6633b336d2cf8eb80e24222d"
], - "charge_point_ids": [
- "64339f7e2b54f1a9608b2eee",
- "649a500224aaf376753a98aa"
]
}{- "ok": true,
- "message": "Restricted users have been updated successfully"
}Triggers the charging service to sync the EVSEs of the given Ampeco charge point.
| ampeco_chargepoint_id required | string |
{- "ampeco_chargepoint_id": "string"
}{- "ok": true
}Fetches charge points from the charging service using the same filters as the list
endpoint and streams the result as an .xlsx (ChargePoint.xlsx) attachment.
| name | string |
| ampeco_chargepoint_id | string |
| status | string |
| network_status | string |
| is_enabled | boolean |
| access_type | string |
| cpo_id | string |
| sp_id | string |
| location_id | string |
| from_date | string <date> |
| to_date | string <date> |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": false,
- "msg": "invalid input",
- "errors": [
- "id is required"
]
}Retrieve the charging status of all EVSEs associated with a specific location.
| location_id required | string Example: 6331276a96ec3fa15d1cb0fc The ID of the location to filter EVSEs by. |
{- "ok": true,
- "data": [
- { }
]
}Cancels a user's place in the queue at a location on behalf of an admin.
| user_id required | string |
| location_id required | string |
{- "user_id": "string",
- "location_id": "string"
}{- "ok": true
}Adds a user to the queue at a location on behalf of an admin.
| user_id required | string |
| location_id required | string |
{- "user_id": "string",
- "location_id": "string"
}{- "ok": true,
- "data": { }
}Returns queue statistics of the given type (total-queuing-turns or total-missed-leave-queuing). When a date range is supplied, missing dates are filled in.
| type required | string Enum: "total-queuing-turns" "total-missed-leave-queuing" Statistic type. |
| from_date | string <date> YYYY-MM-DD |
| to_date | string <date> YYYY-MM-DD |
| location_id | string |
{- "ok": true,
- "data": [
- { }
]
}This API retrieves the total number of charge sessions for each date within a specified date range (from_date to to_date).
The sessions are counted and grouped by date based on the createdAt field. Upcoming, canceled, no-show, and deleted sessions are excluded.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string <string> The type of request (e.g., number-of-sessions) |
{- "ok": true,
- "data": {
- "2024-01-10": 1,
- "2024-01-16": 1,
- "2024-01-18": 2,
- "2024-02-21": 1,
- "2024-02-22": 1,
- "2024-02-24": 2,
- "2024-03-16": 2,
- "2024-03-18": 3,
- "2024-03-22": 5,
- "2024-03-26": 3,
- "2024-04-04": 2,
- "2024-04-05": 4,
- "2024-04-08": 1,
- "2024-04-09": 1,
- "2024-04-10": 1,
- "2024-04-11": 1,
- "2024-04-12": 2,
- "2024-04-13": 3
}
}This API retrieves the total idling fee from charge sessions for each date within a specified date range (from_date to to_date).
The idling fee is summed and grouped by the session_ended_at field.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string <string> The type of request (e.g., idling-revenue) |
{- "ok": true,
- "data": {
- "2024-05-16": 0,
- "2024-05-21": 0,
- "2024-05-22": 0,
- "2024-05-23": 0,
- "2024-05-28": 0,
- "2024-05-29": 0,
- "2024-05-30": 0,
- "2024-06-03": 1.3,
- "2024-06-05": 0,
- "2024-06-06": 0.95,
- "2024-06-07": 0,
- "2024-06-08": 18.45
}
}This API retrieves a simulated utilization rate (random values between 40 and 100) for each date within a specified date range (from_date to to_date).
The utilization rate is returned for each day in the range based on the provided dates.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string <string> The type of request (e.g., charger-utilization) |
{- "ok": true,
- "data": {
- "2024-01-07": 0.43,
- "2024-01-08": 0.57,
- "2024-01-09": 0.95,
- "2024-01-10": 0.74,
- "2024-01-11": 0.82,
- "2024-01-12": 0.84,
- "2024-01-13": 0.68,
- "2024-01-14": 0.93,
- "2024-01-15": 0.69,
- "2024-01-16": 0.7,
- "2024-01-17": 0.79,
- "2024-01-18": 0.61,
- "2024-01-19": 0.59,
- "2024-01-20": 0.95
}
}This API retrieves the total revenue for each date within a specified date range (from_date to to_date).
The revenue is calculated by summing up the total_with_gst for each session, grouped by the createdAt field. Upcoming, canceled, no-show, and deleted sessions are excluded.
| from_date required | string <date> The start date of the range to fetch data (in |
| to_date required | string <date> The end date of the range to fetch data (in |
| type required | string <string> The type of request (e.g., charging-revenue) |
{- "ok": true,
- "data": {
- "2024-01-10": 0,
- "2024-01-16": 0,
- "2024-01-18": 0,
- "2024-04-22": 0,
- "2024-05-04": 0,
- "2024-05-16": 8.46,
- "2024-05-21": 14.41,
- "2024-05-22": 27.6,
- "2024-05-28": 34.51,
- "2024-05-29": 47.79,
- "2024-05-30": 31.86,
- "2024-06-03": 0.69,
- "2024-06-05": 3,
- "2024-06-06": 15.93,
- "2024-06-07": 85.57,
- "2024-06-08": 44.33
}
}Retrieve the total earnings for charge sessions grouped by date within the specified time range.
| from_date required | string <date> The start date of the range in YYYY-MM-DD format. |
| to_date required | string <date> The end date of the range in YYYY-MM-DD format. |
| type required | string <string> The type of request (e.g., total-earning) |
{- "ok": true,
- "data": {
- "2024-12-01": 1500,
- "2024-12-02": 2000
}
}Retrieve statistics of reservations that were marked as "no-show" or "canceled" within a specified date range. Results are grouped by date, showing the count of such sessions for each date.
| from_date required | string <date> The start date of the range in YYYY-MM-DD format. |
| to_date required | string <date> The end date of the range in YYYY-MM-DD format. |
| type required | string <string> The type of request (e.g., total-reservation-no-show) |
{- "ok": true,
- "data": {
- "2024-12-01": 5,
- "2024-12-02": 3,
- "2024-12-03": 8
}
}Retrieve the total charging duration for charge sessions grouped by date within the specified time range.
| from_date required | string <date> The start date of the range in YYYY-MM-DD format. |
| to_date required | string <date> The end date of the range in YYYY-MM-DD format. |
| type required | string <string> The type of request (e.g., charging-duration) |
{- "ok": true,
- "data": {
- "2024-12-01": 58,
- "2024-12-02": 45,
- "2024-12-03": 87,
- "2024-12-04": 120
}
}Returns a paginated list of charge sessions, enriched with user, CPO/seeding-partner, transaction, EVSE and reward data. Seeding Partner and CPO roles are automatically scoped to their own sessions.
| status | string |
| user_id | string |
| user_name | string |
| cpo_id | string |
| cpo_name | string |
| sp_id | string |
| sp_name | string |
| type | string |
| charge_point_id | string |
| charge_point_name | string |
| location | string |
| location_id | string |
| from_date | string <date> Start date filter, format YYYY-MM-DD. |
| to_date | string <date> End date filter, format YYYY-MM-DD. |
| ids | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
| sort_by | string Enum: "session_started_at" "session_ended_at" "idling_started_at" "createdAt" "updatedAt" |
| sort_order | string Enum: "asc" "desc" |
{- "ok": true,
- "data": [
- { }
]
}Charges a manual fee amount to a user for a given charge session via the charging service. The amount is converted to cents before being forwarded.
| user_id required | string |
| charge_session_id required | string |
| amount required | number |
{- "user_id": "string",
- "charge_session_id": "string",
- "amount": 0
}{- "ok": true
}Returns an XLSX file of charge sessions matching the given filters. Seeding Partner and CPO roles are automatically scoped to their own sessions.
| status | string |
| user_id | string |
| user_name | string |
| cpo_id | string |
| cpo_name | string |
| sp_id | string |
| sp_name | string |
| type | string |
| charge_point_id | string |
| charge_point_name | string |
| location | string |
| location_id | string |
| from_date | string <date> |
| to_date | string <date> |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": false,
- "msg": "invalid input",
- "errors": [
- "id is required"
]
}One-off maintenance endpoint that proxies to the charging service to correct energy values for January sessions.
{ }{- "ok": true
}Triggers the charging service job that automatically flushes hanging (stuck) charge sessions.
{ }{- "ok": true
}Maintenance job that iterates completed charge sessions missing duration fields and backfills charging_duration, total_charging_duration and denormalized user fields.
| limit | integer Default: 1000 Batch size per iteration. |
{- "ok": true,
- "msg": "string"
}Maintenance job that backfills charger_name, charge_point_name and location_name on charge sessions missing them, by looking up related EVSE, charge point and location records.
| limit | integer Default: 1000 Batch size per iteration. |
{- "ok": true,
- "msg": "string"
}Returns aggregated charge session statistics for the given type (e.g. number of sessions,
idling revenue, charger utilization, charging revenue, total earning, energy supplied).
Supports optional date range and location scoping; Seeding Partner and CPO roles are scoped
to their own data.
| type required | string Statistic type to compute. |
| from_date | string <date> |
| to_date | string <date> |
| skip_missing_dates | boolean |
| location_id | string |
{- "ok": true,
- "data": { }
}Refreshes tallied energy for completed charge sessions from Ampeco. Either targets a list of IDs or a filtered/paginated set of completed sessions.
| from_date | string <date> |
| to_date | string <date> |
| ids | Array of strings |
| page | integer |
| per_page | integer |
{- "from_date": "2019-08-24",
- "to_date": "2019-08-24",
- "ids": [
- "string"
], - "page": 0,
- "per_page": 0
}{- "ok": true,
- "msg": "string"
}Repairs charge sessions in the given date range that have NaN charging_duration or an epoch (1970) session_stopped_at, by re-reading energy and timing data from Ampeco.
| from_date required | string <date> |
| to_date required | string <date> |
{- "from_date": "2019-08-24",
- "to_date": "2019-08-24"
}{- "ok": true,
- "msg": "string"
}Recomputes and reconciles per-transaction energy for completed sessions in a given month/year (optionally scoped to a location) that have multiple fee_charging transactions.
| month required | integer [ 1 .. 12 ] |
| year required | integer >= 2000 |
| location_id | string |
{- "month": 1,
- "year": 2000,
- "location_id": "string"
}{- "ok": true
}Recalculates and settles a charge session identified by its Ampeco session ID, provided it has no existing fee_charging transaction. Marks the session flushed and triggers payment.
| ampeco_session_id required | string |
{- "ok": true
}Computes an energy settlement for the given charge session (dry run) via the charging service and records an admin activity log.
| charge_session_id required | string |
{ }{- "ok": true,
- "data": { }
}Applies the energy settlement for the given charge session via the charging service and records an admin activity log.
| charge_session_id required | string |
{ }{- "ok": true,
- "data": { }
}Returns a single charge session with joined CPO and seeding-partner details. Seeding Partner and CPO roles can only access their own sessions.
| session_id required | string |
{- "ok": true,
- "msg": "string",
- "data": { }
}Force-flushes an active/holding/pending charge session: marks it as flushed, triggers payment processing using the user's default payment method, and advances the EVSE queue.
| session_id required | string |
{- "ok": true,
- "msg": "string"
}Triggers payment processing for an unpaid charge session from the admin portal, using the user's default payment method. Reverts the session to completed/unpaid if payment fails.
| session_id required | string |
{- "ok": true
}Returns a paginated list of charge sessions built via a MongoDB aggregation with joined user, CPO, seeding-partner and charge point/location data. Seeding Partner and CPO roles are automatically scoped to their own sessions.
| status | string |
| user_id | string |
| user_name | string |
| cpo_id | string |
| cpo_name | string |
| sp_id | string |
| sp_name | string |
| charge_point_id | string |
| charge_point_name | string |
| location | string |
| location_id | string |
| from_date | string <date> |
| to_date | string <date> |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
], - "total": 0,
- "page": 0,
- "per_page": 0
}Returns a single charge session with joined CPO and seeding-partner details. Seeding Partner and CPO roles can only access their own sessions.
| session_id required | string |
{- "ok": true,
- "msg": "string",
- "data": { }
}Retrieve multiple charge sessions in a single request by passing an array of their IDs.
Each returned session is enriched with its related Evse, ChargePoint, and Location details.
Soft-deleted sessions are excluded; an empty or missing ids array returns an empty list.
| ids required | Array of strings <objectId> [ items <objectId > ] Array of charge session IDs (MongoDB ObjectIds) to fetch. |
{- "ids": [
- "645c99b3c4aa3d518c24b2ac",
- "645c99b3c4aa3d518c24b2ad"
]
}{- "ok": true,
- "data": [
- { }
]
}| type required | string Enum: "evse" "location" The type of the report (evse, location). |
| evse_id | string <uuid> EVSE ID. |
| charge_point_id | string <uuid> Charge point ID. |
| location_id | string <uuid> Location ID. |
| evse_name | string Name of the EVSE. |
| charge_point_name | string Name of the charge point. |
| location_name | string Name of the location. |
| cpo_name | string Name of the CPO. |
| sp_name | string Name of the Seeding Partner. |
| month | integer [ 1 .. 12 ] Month for the report. |
| year | integer >= 2000 Year for the report. |
| cpo_email | string <email> Email of the CPO. |
| sp_email | string <email> Email of the Seeding Partner. |
| per_page | integer >= 1 Number of reports per page. |
| page | integer >= 1 Page number for pagination. |
{- "ok": true,
- "data": [
- {
- "type": "evse",
- "month": 12,
- "year": 2024,
- "evse_id": "123e4567-e89b-12d3-a456-426614174000",
- "evse_name": "EVSE-001",
- "charge_point_id": "123e4567-e89b-12d3-a456-426614174001",
- "charge_point_name": "CP-001",
- "location_id": "123e4567-e89b-12d3-a456-426614174002",
- "location_name": "Location-001",
- "cpo_id": "123e4567-e89b-12d3-a456-426614174003",
- "cpo_name": "CPO-001",
- "sp_id": "123e4567-e89b-12d3-a456-426614174004",
- "sp_name": "SP-001",
- "number_of_charge_sessions": 50,
- "total_charging_duration": 1200,
- "total_idling_duration": 300,
- "total_energy": 350.5,
- "total_charging_fee": 100,
- "total_charging_fee_with_gst": 107,
- "total_idling_fee": 20,
- "total_idling_fee_with_gst": 21.4,
- "total_earning": 120,
- "total_earning_with_gst": 128.4,
- "total_tariff": 80,
- "total_tariff_with_gst": 85.6,
- "subscription_fee": 10,
- "subscription_fee_with_gst": 10.7,
- "total_transaction_fee": 5,
- "total_transaction_fee_with_gst": 5.35,
- "total_expense": 50,
- "profit": 70,
- "cpo_profit_sharing_percentage": 50,
- "cpo_profit_sharing": 35,
- "sp_profit_sharing_percentage": 50,
- "sp_profit_sharing": 35
}
]
}| type required | string Enum: "evse" "location" The type of the report (evse, location). |
| month | integer Month for the report (1-12). |
| year | integer Year for the report (>= 2000). |
| location_id | string <uuid> Location ID (valid MongoDB ID). |
| cpo_id | string <uuid> CPO ID (valid MongoDB ID). |
| evse_id | string <uuid> EVSE ID (optional, valid MongoDB ID). |
| evse_name | string Name of the EVSE (optional). |
| charge_point_id | string <uuid> Charge point ID (optional, valid MongoDB ID). |
| charge_point_name | string Name of the charge point (optional). |
| location_name | string Name of the location (optional). |
| cpo_name | string Name of the CPO (optional). |
| cpo_email | string <email> Email of the CPO (optional). |
| cpo_phone | string Phone number of the CPO (optional). |
| sp_id | string <uuid> Seeding Partner ID (optional, valid MongoDB ID). |
| sp_name | string Name of the Seeding Partner (optional). |
| sp_email | string <email> Email of the Seeding Partner (optional). |
| sp_phone | string Phone number of the Seeding Partner (optional). |
| number_of_charge_sessions | integer Number of charge sessions (optional). |
| total_charging_duration | integer Total charging duration (optional). |
| total_idling_duration | integer Total idling duration (optional). |
| total_energy | number <float> Total energy consumed in kWh (optional). |
| total_charging_fee | number <float> Total charging fee (optional). |
| total_charging_fee_with_gst | number <float> Total charging fee with GST (optional). |
| total_idling_fee | number <float> Total idling fee (optional). |
| total_idling_fee_with_gst | number <float> Total idling fee with GST (optional). |
| total_earning | number <float> Total earnings (optional). |
| total_earning_with_gst | number <float> Total earnings with GST (optional). |
| total_tariff | number <float> Total tariff (optional). |
| total_tariff_with_gst | number <float> Total tariff with GST (optional). |
| subscription_fee | number <float> Subscription fee (optional). |
| subscription_fee_with_gst | number <float> Subscription fee with GST (optional). |
| total_transaction_fee | number <float> Total transaction fee (optional). |
| total_transaction_fee_with_gst | number <float> Total transaction fee with GST (optional). |
| total_expense | number <float> Total expense (optional). |
| profit | number <float> Profit (optional). |
| cpo_profit_sharing_percentage | number <float> CPO profit sharing percentage (optional). |
| cpo_profit_sharing | number <float> CPO profit sharing (optional). |
| sp_profit_sharing_percentage | number <float> SP profit sharing percentage (optional). |
| sp_profit_sharing | number <float> SP profit sharing (optional). |
{- "month": 5,
- "year": 2024,
- "location_id": "60d0fe4f5311236168a109ca",
- "cpo_id": "60d0fe4f5311236168a109cd",
- "evse_id": "60d0fe4f5311236168a109cf",
- "evse_name": "EVSE-001",
- "charge_point_id": "60d0fe4f5311236168a109ce",
- "charge_point_name": "Charge Point 1",
- "location_name": "Location A",
- "cpo_name": "CPO XYZ",
- "cpo_phone": "+123456789",
- "sp_id": "60d0fe4f5311236168a109d1",
- "sp_name": "Seeding Partner A",
- "sp_phone": "+987654321",
- "number_of_charge_sessions": 100,
- "total_charging_duration": 5000,
- "total_idling_duration": 3000,
- "total_energy": 200.5,
- "total_charging_fee": 100,
- "total_charging_fee_with_gst": 107,
- "total_idling_fee": 50,
- "total_idling_fee_with_gst": 53.5,
- "total_earning": 150,
- "total_earning_with_gst": 160.5,
- "total_tariff": 200,
- "total_tariff_with_gst": 214,
- "subscription_fee": 20,
- "subscription_fee_with_gst": 21.2,
- "total_transaction_fee": 10,
- "total_transaction_fee_with_gst": 10.7,
- "total_expense": 80,
- "profit": 70,
- "cpo_profit_sharing_percentage": 0.2,
- "cpo_profit_sharing": 14,
- "sp_profit_sharing_percentage": 0.1,
- "sp_profit_sharing": 7
}{- "ok": true,
- "data": {
- "type": "evse",
- "month": 12,
- "year": 2024,
- "evse_id": "123e4567-e89b-12d3-a456-426614174000",
- "evse_name": "EVSE-001",
- "charge_point_id": "123e4567-e89b-12d3-a456-426614174001",
- "charge_point_name": "CP-001",
- "location_id": "123e4567-e89b-12d3-a456-426614174002",
- "location_name": "Location-001",
- "cpo_id": "123e4567-e89b-12d3-a456-426614174003",
- "cpo_name": "CPO-001",
- "sp_id": "123e4567-e89b-12d3-a456-426614174004",
- "sp_name": "SP-001",
- "number_of_charge_sessions": 50,
- "total_charging_duration": 1200,
- "total_idling_duration": 300,
- "total_energy": 350.5,
- "total_charging_fee": 100,
- "total_charging_fee_with_gst": 107,
- "total_idling_fee": 20,
- "total_idling_fee_with_gst": 21.4,
- "total_earning": 120,
- "total_earning_with_gst": 128.4,
- "total_tariff": 80,
- "total_tariff_with_gst": 85.6,
- "subscription_fee": 10,
- "subscription_fee_with_gst": 10.7,
- "total_transaction_fee": 5,
- "total_transaction_fee_with_gst": 5.35,
- "total_expense": 50,
- "profit": 70,
- "cpo_profit_sharing_percentage": 50,
- "cpo_profit_sharing": 35,
- "sp_profit_sharing_percentage": 50,
- "sp_profit_sharing": 35
}
}Updates an existing performance report for a given type (evse or location) and report ID.
| type required | string Enum: "evse" "location" The type of the report (either "evse" or "location"). |
| id required | string^[a-fA-F0-9]{24}$ The unique ID of the performance report (MongoDB ObjectId). |
| month | integer The month of the report (1 to 12). |
| year | integer The year of the report (must be 2000 or later). |
| location_id | string The location ID (MongoDB ObjectId). |
| cpo_id | string The CPO ID (MongoDB ObjectId). |
| evse_id | string The EVSE ID (MongoDB ObjectId). |
| evse_name | string The name of the EVSE. |
| charge_point_id | string The charge point ID (MongoDB ObjectId). |
| charge_point_name | string The name of the charge point. |
| location_name | string The name of the location. |
| cpo_name | string The name of the CPO. |
| cpo_email | string <email> The email of the CPO. |
| cpo_phone | string The phone number of the CPO. |
| sp_id | string The SP ID (MongoDB ObjectId). |
| sp_name | string The name of the SP. |
| sp_email | string <email> The email of the SP. |
| sp_phone | string The phone number of the SP. |
| number_of_charge_sessions | integer The number of charge sessions. |
| total_charging_duration | integer The total charging duration in minutes. |
| total_idling_duration | integer The total idling duration in minutes. |
| total_energy | number <float> The total energy used in the session in watt-hours. |
| total_charging_fee | number <float> The total charging fee in cents. |
| total_charging_fee_with_gst | number <float> The total charging fee including GST in cents. |
| total_idling_fee | number <float> The total idling fee in cents. |
| total_idling_fee_with_gst | number <float> The total idling fee including GST in cents. |
| total_earning | number <float> The total earnings in cents. |
| total_earning_with_gst | number <float> The total earnings including GST in cents. |
| total_tariff | number <float> The total tariff in cents. |
| total_tariff_with_gst | number <float> The total tariff including GST in cents. |
| subscription_fee | number <float> The subscription fee in cents. |
| subscription_fee_with_gst | number <float> The subscription fee including GST in cents. |
| total_transaction_fee | number <float> The total transaction fee in cents. |
| total_transaction_fee_with_gst | number <float> The total transaction fee including GST in cents. |
| total_expense | number <float> The total expenses in cents. |
| profit | number <float> The profit in cents. |
| cpo_profit_sharing_percentage | number <float> The CPO's profit-sharing percentage (0 to 1). |
| cpo_profit_sharing | number <float> The CPO's profit-sharing amount in cents. |
| sp_profit_sharing_percentage | number <float> The SP's profit-sharing percentage (0 to 1). |
| sp_profit_sharing | number <float> The SP's profit-sharing amount in cents. |
{- "month": 12,
- "year": 2024,
- "location_id": "605c72ef1532071b1c13062b",
- "cpo_id": "605c72ef1532071b1c13062c",
- "evse_id": "605c72ef1532071b1c13062d",
- "evse_name": "EVSE 1",
- "charge_point_id": "605c72ef1532071b1c13062e",
- "charge_point_name": "Charge Point 1",
- "location_name": "Location A",
- "cpo_name": "CPO Name",
- "cpo_phone": "+123456789",
- "sp_id": "605c72ef1532071b1c13062f",
- "sp_name": "SP Name",
- "sp_phone": "+987654321",
- "number_of_charge_sessions": 150,
- "total_charging_duration": 1200,
- "total_idling_duration": 300,
- "total_energy": 5000,
- "total_charging_fee": 2000,
- "total_charging_fee_with_gst": 2200,
- "total_idling_fee": 500,
- "total_idling_fee_with_gst": 550,
- "total_earning": 2500,
- "total_earning_with_gst": 2750,
- "total_tariff": 1000,
- "total_tariff_with_gst": 1100,
- "subscription_fee": 300,
- "subscription_fee_with_gst": 330,
- "total_transaction_fee": 100,
- "total_transaction_fee_with_gst": 110,
- "total_expense": 500,
- "profit": 2000,
- "cpo_profit_sharing_percentage": 0.1,
- "cpo_profit_sharing": 200,
- "sp_profit_sharing_percentage": 0.15,
- "sp_profit_sharing": 300
}{- "ok": true,
- "data": {
- "type": "evse",
- "month": 12,
- "year": 2024,
- "evse_id": "123e4567-e89b-12d3-a456-426614174000",
- "evse_name": "EVSE-001",
- "charge_point_id": "123e4567-e89b-12d3-a456-426614174001",
- "charge_point_name": "CP-001",
- "location_id": "123e4567-e89b-12d3-a456-426614174002",
- "location_name": "Location-001",
- "cpo_id": "123e4567-e89b-12d3-a456-426614174003",
- "cpo_name": "CPO-001",
- "sp_id": "123e4567-e89b-12d3-a456-426614174004",
- "sp_name": "SP-001",
- "number_of_charge_sessions": 50,
- "total_charging_duration": 1200,
- "total_idling_duration": 300,
- "total_energy": 350.5,
- "total_charging_fee": 100,
- "total_charging_fee_with_gst": 107,
- "total_idling_fee": 20,
- "total_idling_fee_with_gst": 21.4,
- "total_earning": 120,
- "total_earning_with_gst": 128.4,
- "total_tariff": 80,
- "total_tariff_with_gst": 85.6,
- "subscription_fee": 10,
- "subscription_fee_with_gst": 10.7,
- "total_transaction_fee": 5,
- "total_transaction_fee_with_gst": 5.35,
- "total_expense": 50,
- "profit": 70,
- "cpo_profit_sharing_percentage": 50,
- "cpo_profit_sharing": 35,
- "sp_profit_sharing_percentage": 50,
- "sp_profit_sharing": 35
}
}Returns performance reports for a given month and year, optionally filtered by admin or location. Monetary and energy values are transformed for display.
| month required | integer [ 1 .. 12 ] |
| year required | integer |
| admin_id | string |
| location_id | string |
{- "ok": true,
- "data": [
- { }
]
}Retrieve a list of reward programs with optional filters and pagination.
| name | string Filter by program name (case-insensitive, partial match). |
| status | boolean Filter by status. |
| per_page | integer Default: 10 Number of records per page for pagination (default is 10). |
| page | integer Default: 1 Page number for pagination (default is 1). |
{- "ok": true,
- "data": [
- {
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "name": "Loyalty Rewards",
- "code": "LOYALTY2024",
- "description": "Earn points for every charge session.",
- "type": "points",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "total": 50,
- "page": 1,
- "per_page": 10
}Create a new reward program with the specified details.
| name | string Name of the reward program. |
| description | string Description of the reward program. |
| status | string Enum: "active" "inactive" "pending" "ended" "expired" Status of the reward program. |
| images | Array of strings <uri> <= 20 items [ items <uri > ] List of reward program image URLs. |
{- "name": "Loyalty Rewards",
- "description": "Earn points for every charge session.",
- "status": "active",
}{- "ok": true,
- "data": {
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "name": "Loyalty Rewards",
- "code": "LOYALTY2024",
- "description": "Earn points for every charge session.",
- "type": "points",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Retrieve details of a specific reward program by its ID.
| id required | string <uuid> The unique identifier of the reward program. |
{- "ok": true,
- "data": {
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "name": "Loyalty Rewards",
- "code": "LOYALTY2024",
- "description": "Earn points for every charge session.",
- "type": "points",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Update the details of a specific reward program by its ID.
| id required | string <uuid> The unique identifier of the reward program. |
| name | string Name of the reward program. |
| description | string Description of the reward program. |
| status | string Enum: "active" "inactive" "pending" "ended" "expired" Status of the reward program. |
| images | Array of strings <uri> <= 20 items [ items <uri > ] List of reward program image URLs. |
{- "name": "Loyalty Rewards",
- "description": "Earn points for every charge session.",
- "status": "active",
}{- "ok": true,
- "data": {
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "name": "Loyalty Rewards",
- "code": "LOYALTY2024",
- "description": "Earn points for every charge session.",
- "type": "points",
- "status": "active",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}Delete a specific reward program by its ID.
| id required | string <uuid> The unique identifier of the reward program. |
{- "ok": true,
- "message": "Reward program deleted successfully."
}Forwards a request to the charging service to sync the given Ampeco charge point into the local system.
| ampeco_chargepoint_id required | string |
{- "ampeco_chargepoint_id": "12345"
}{- "ok": true
}Proxies to the audit log service to list audit log entries. Results are scoped to the authenticated admin, and further scoped by CPO or Seeding Partner when applicable. Admin and CPO/seeding partner data is mapped onto the returned records.
| page | integer >= 1 |
| per_page | integer >= 1 |
| search | string |
{- "ok": true,
- "data": [
- { }
]
}Proxies to the audit log service to list audit log entries for a specific EVSE. Results are scoped by CPO or Seeding Partner when the admin has that role.
| id required | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Proxies to the audit log service to list audit log entries of a given type. Results are scoped by CPO or Seeding Partner when the admin has that role.
| type required | string |
{- "ok": true,
- "data": [
- { }
]
}Proxies to the subscription service to list merchants. Supports pagination and filtering via query parameters.
| page | integer >= 1 |
| per_page | integer >= 1 |
| search | string |
{- "ok": true,
- "data": [
- { }
]
}Looks up a user by email via the user service and sends them a push notification with the given title and body. Optional notification_data is forwarded to the device.
| email required | string <email> |
| title required | string |
| body required | string |
| notification_data | object Arbitrary key/value payload delivered with the notification. |
{- "title": "Your charge is complete",
- "body": "Your vehicle has finished charging.",
- "notification_data": { }
}{- "ok": true
}Forwards a batch notification request to the notification service. Notifications may be sent as push notifications or emails to the provided list of recipient emails.
| emails required | Array of strings <email> [ items <email > ] |
| title required | string |
| body required | string |
| notification_type required | string Enum: "push-notification" "email" |
{- "title": "Scheduled maintenance",
- "body": "Chargers will be offline tonight.",
- "notification_type": "push-notification"
}{- "ok": true
}Forwards a payment request to the payment service for the given user, amount and payment method (wallet, stripe or card).
| user_id required | string |
| amount required | number |
| payment_method required | string Enum: "wallet" "stripe" "card" |
| payment_card_id | string Required when paying with a saved card. |
| type | string Payment type/category. |
| description | string |
| additional_data | object Extra metadata forwarded to the payment service. |
{- "user_id": "60f7a9b8c1234567890abcde",
- "amount": 25.5,
- "payment_method": "wallet",
- "payment_card_id": "string",
- "type": "string",
- "description": "string",
- "additional_data": { }
}{- "ok": true
}Refunds the given amount for a transaction via the payment service. The amount is converted to cents before being forwarded.
| transaction_id required | string |
| amount required | number |
| description | string |
{- "transaction_id": "60f7a9b8c1234567890abcde",
- "amount": 10,
- "description": "string"
}{- "ok": true
}Proxies to the loyalty service to fetch points statistics for the given user.
| user_id required | string Valid Mongo ID of the user. |
{- "ok": true,
- "data": { }
}Auto-generates monthly reports for the given month and year, recording the requesting admin as the creator. Monetary values in the response are converted to dollars.
| year required | integer |
| month required | integer |
| created_from | string Default: "admin-auto-generate" |
{- "year": 0,
- "month": 0,
- "created_from": "admin-auto-generate"
}{- "ok": true,
- "data": [
- { }
]
}Triggers generation of all reports for the given year and month by proxying to the report service.
| year required | string |
| month required | string |
{- "ok": true
}Registers Google Drive download links for generated reports. Only Superadmins may perform this action.
required | Array of objects non-empty |
{- "google_link_list": [
- {
- "year": 0,
- "month": 1,
- "admin_id": "string",
- "file_id": "string",
- "download_link": "string"
}
]
}{- "ok": true
}Returns a paginated list of published monthly reports. Seeding Partner and CPO roles are scoped to their own records; Superadmins see all statuses.
| page | integer Default: 1 |
| per_page | integer Default: 10 |
{- "ok": true,
- "data": [
- { }
]
}Creates a new monthly report for an admin. Only Superadmins may perform this action. The server resolves the admin's locations, charge points and EVSEs before persisting the report.
| admin_id required | string Admin Mongo ID |
| total_earning required | number |
| total_earning_with_gst | number |
| total_expense required | number |
| total_expense_with_gst | number |
| total_transaction_fee required | number |
| total_transaction_fee_with_gst | number |
| profit required | number |
| payout_with_gst | number |
required | object |
| file_url | string |
{- "admin_id": "string",
- "total_earning": 0,
- "total_earning_with_gst": 0,
- "total_expense": 0,
- "total_expense_with_gst": 0,
- "total_transaction_fee": 0,
- "total_transaction_fee_with_gst": 0,
- "profit": 0,
- "payout_with_gst": 0,
- "period": {
- "from": "2024-01-01",
- "to": "2024-01-31"
}, - "file_url": "string"
}{- "ok": true,
- "data": { }
}Returns a single aggregated dashboard metric for monthly reports. Superadmins see all admins; other roles are scoped to their own admin id. Monetary values are converted to dollars.
| type required | string Enum: "total_earning" "total_expense" "total_transaction_fee" "total_electricity_reimbursement" "total_payout" Metric to return. |
{- "ok": true,
- "data": { }
}Publishes the monthly reports for the given month and year.
| month required | integer [ 1 .. 12 ] |
| year required | integer |
{- "month": 1,
- "year": 0
}{- "ok": true
}Updates the financial figures of an existing monthly report by ID.
| id required | string |
| total_earning required | number |
| total_expense required | number |
| profit required | number |
| total_transaction_fee required | number |
| total_payout | number |
| total_electricity_reimbursement | number |
{- "total_earning": 0,
- "total_expense": 0,
- "profit": 0,
- "total_transaction_fee": 0,
- "total_payout": 0,
- "total_electricity_reimbursement": 0
}{- "ok": true,
- "data": { }
}Returns a paginated list of reward categories, proxied from the Loyalty service.
| name | string |
| code | string |
| ids | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Creates a new reward category via the Loyalty service after checking the code is unique, and records an admin log entry.
| code required | string |
| name required | string |
| description | string |
{- "code": "string",
- "name": "string",
- "description": "string"
}{- "ok": true,
- "data": { },
- "msg": "string"
}Updates an existing reward category via the Loyalty service and records an admin log entry.
| id required | string |
| name required | string |
| code required | string |
| description | string |
{- "name": "string",
- "code": "string",
- "description": "string"
}{- "ok": true,
- "data": { }
}Returns the reward programs matching the supplied list of IDs by proxying the request to the Loyalty service.
| ids required | Array of strings List of reward program MongoIDs. |
{- "ids": [
- "string"
]
}{- "ok": true,
- "data": [
- { }
]
}Triggers a recalculation of the aggregated statistics for the given reward program by proxying the request to the Loyalty service.
| id required | string |
{ }{- "ok": true,
- "data": { }
}Returns a paginated list of reward types, proxied from the Loyalty service.
| reward_program_id | string |
| reward_program_name | string |
| reward_type_code | string |
| reward_type_name | string |
| code | string |
| ids | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Creates a new reward type via the Loyalty service after checking the code is unique, and records an admin log entry.
| code required | string |
| name required | string |
| description | string |
{- "code": "string",
- "name": "string",
- "description": "string"
}{- "ok": true,
- "data": { },
- "msg": "string"
}Returns a paginated list of reward vendors, proxied from the Loyalty service.
| name | string |
| code | string |
| ids | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Creates a new reward vendor via the Loyalty service after checking the code is unique, and records an admin log entry.
| code required | string |
| name required | string |
| description | string |
{- "code": "string",
- "name": "string",
- "description": "string"
}{- "ok": true,
- "data": { },
- "msg": "string"
}Updates an existing reward vendor via the Loyalty service and records an admin log entry.
| id required | string |
| name required | string |
| code required | string |
| description | string |
{- "name": "string",
- "code": "string",
- "description": "string"
}{- "ok": true,
- "data": { }
}Returns a paginated list of rewards from the Loyalty service, filterable by reward program, reward type, user, code, and status.
| reward_program_id | string |
| reward_program_name | string |
| reward_type_code | string |
| reward_type_name | string |
| user_id | string |
| code | string |
| status | string Enum: "new" "redeemed" "expired" "used" |
| ids | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Generates a batch of reward codes under a reward program via the Loyalty service and records an admin activity log.
| reward_program_id required | string |
| value required | number |
| reward_type_code required | string |
| expiry_datetime required | string <date-time> |
| quantity_codes required | integer >= 1 |
{- "reward_program_id": "string",
- "value": 0,
- "reward_type_code": "string",
- "expiry_datetime": "2019-08-24T14:15:22Z",
- "quantity_codes": 1
}{- "ok": true,
- "data": { }
}Uploads an Excel file of rewards and imports them under the given reward program via the Loyalty service.
| file required | string <binary> Excel file to import |
| reward_program_id required | string |
{- "ok": true,
- "msg": "Rewards imported successfully",
- "data": { }
}Maintenance job that iterates over rewards missing denormalized user fields and backfills
user_name, user_email, and user_phone from the users collection in batches.
| limit | integer Default: 1000 Batch size per iteration |
{- "ok": true,
- "msg": "Processed all rewards successfully"
}Assigns the specified reward to a user via the Loyalty service, attaching the acting admin's identity, and records an admin activity log.
| id required | string |
| user_id required | string ID of the user to assign the reward to |
{- "user_id": "string"
}{- "ok": true,
- "data": { }
}Looks up the reward and its associated user, then marks the reward as used via the Loyalty service and records an admin activity log.
| id required | string |
{- "ok": true,
- "msg": "Reward marked as used successfully.",
- "data": { }
}Assigns the specified reward to a charge session via the Loyalty service, attaching the acting admin's identity, and records an admin activity log.
| reward_id required | string |
| charge_session_id required | string |
{- "charge_session_id": "string"
}{- "ok": true,
- "data": { }
}Returns a paginated list of subscription plans, proxied from the subscription service. Supports filtering by keyword, merchant and status.
| keyword | string |
| merchant_id | string Filter by merchant ID (Mongo ObjectId). |
| merchant_code | string Merchant code (starts with "M"). |
| status | string Enum: "active" "inactive" "deleted" |
| deleteAt | string |
| page | integer >= 1 |
| per_page | integer >= 1 |
{- "ok": true,
- "data": [
- { }
]
}Creates a new subscription plan. The code must be unique. Records an admin log entry on success.
| code required | string Unique plan code |
| name required | string |
| description required | string |
| status required | string Enum: "active" "inactive" "draft" |
| quotation required | object |
| merchant_id | string |
| expiration_type | string Enum: "month" "year" |
| expiration_duration | number |
| payment_status | string |
| prices | Array of objects |
{- "code": "string",
- "name": "string",
- "description": "string",
- "status": "active",
- "quotation": { },
- "merchant_id": "string",
- "expiration_type": "month",
- "expiration_duration": 0,
- "payment_status": "string",
- "prices": [
- { }
]
}{- "ok": true,
- "data": { }
}Generates a batch of activation codes for a subscription plan and merchant. Records an admin log entry on success.
| subscription_plan_id | string |
| subscription_plan_name | string |
| subscription_plan_code | string |
| merchant_id required | string |
| number_of_codes required | integer |
| prefix | string |
| expired_date required | string <date> |
| plan_price | object |
| quotation | object |
{- "subscription_plan_id": "string",
- "subscription_plan_name": "string",
- "subscription_plan_code": "string",
- "merchant_id": "string",
- "number_of_codes": 0,
- "prefix": "string",
- "expired_date": "2019-08-24",
- "plan_price": { },
- "quotation": { }
}{- "ok": true,
- "data": { }
}Subscribes a user to a subscription plan at a given price. Records an admin log entry on success.
| subscription_plan_id required | string Mongo ObjectId of the plan |
| user_id required | string Mongo ObjectId of the user |
object | |
| active_date | string <date> yyyy-mm-dd |
{- "subscription_plan_id": "string",
- "user_id": "string",
- "plan_price": {
- "price": 0
}, - "active_date": "2019-08-24"
}{- "ok": true,
- "data": { }
}Updates an existing subscription plan. If code is supplied it must remain unique.
Records an admin log entry capturing old and new state.
| subscription_plan_id required | string |
| code | string |
| description | string |
| status | string Enum: "active" "inactive" "draft" |
| quotation | object |
| merchant_id | string |
| expiration_type | string Enum: "month" "year" |
| expiration_duration | number |
| prices | Array of objects |
| payment_status | string |
{- "code": "string",
- "description": "string",
- "status": "active",
- "quotation": { },
- "merchant_id": "string",
- "expiration_type": "month",
- "expiration_duration": 0,
- "prices": [
- { }
], - "payment_status": "string"
}{- "ok": true,
- "data": { }
}Deletes the given subscription plan via the subscription service and records an admin log entry.
| subscription_plan_id required | string |
{- "ok": true
}Verifies the user exists via the user service, then proxies to the payment service to list the tokenized (saved) cards for that user.
| user_id required | string |
{- "ok": true,
- "data": [
- { }
]
}Retrieve multiple reward types in a single request by passing an array of their IDs.
| ids required | Array of strings <objectId> [ items <objectId > ] Array of reward type IDs (MongoDB ObjectIds) to fetch. |
{- "ids": [
- "60d9f1145b9e3a1c4f9d8a45",
- "60d9f1145b9e3a1c4f9d8a46"
]
}{- "ok": true,
- "data": [
- {
- "_id": "60d9f1145b9e3a1c4f9d8a45",
- "code": "POINTS",
- "name": "Points",
- "description": "Points-based reward type."
}
]
}Retrieve multiple rewards in a single request by passing an array of their IDs.
Note: the response returns a projected subset of each reward
(_id, name, value, value_type, status).
| ids required | Array of strings <objectId> [ items <objectId > ] Array of reward IDs (MongoDB ObjectIds) to fetch. |
{- "ids": [
- "60d9f1145b9e3a1c4f9d8a45",
- "60d9f1145b9e3a1c4f9d8a46"
]
}{- "ok": true,
- "data": [
- {
- "_id": "string",
- "reward_program_id": "string",
- "reward_program_name": "string",
- "value": 10,
- "reward_type": "points",
- "status": "new",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "expiry_datetime": "2024-12-31T23:59:59Z",
- "user_id": "string",
- "redeemed_at": "2024-01-01T12:00:00Z",
- "redeemed_by": "string"
}
]
}