Download OpenAPI specification:
This is the API documentation for Novowatt app.
Get all merchant
| keyword | string Get merchants by name, code |
| page | integer Page number |
| per_page | integer Number of items per page |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "name": "Merchant one"
}
]
}Get all subscription plans
| keyword | string Get subscription plans by name or code |
| merchant_id | string Merchant ID |
| merchant_code | string Merchant code |
| status | string Enum: "active" "inactive" "deleted" Status of the subscription plan |
| per_page | integer Number of items per page |
| page | integer Page number |
| deleteAt | string <date-time> Deletion date |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "_id": {
- "$oid": "668c0cf8c6be695249b6a54b"
}, - "code": "TINOOOpo",
- "name": "VIP User",
- "description": "WHQ-1",
- "status": "active",
- "quotation": {
- "max_duration_per_day": 2,
- "max_duration_per_month": 60,
- "max_energy_per_day": 0,
- "max_energy_per_month": 100
}, - "prices": [
- {
- "name": "1 month",
- "code": "1_MONTH",
- "price": 100
}
], - "deletedAt": "2024-07-08T16:00:04.284Z"
}
]
}Get a subscription plan by ID
| id required | string ID of the subscription plan to get |
{- "ok": true,
- "data": {
- "_id": {
- "$oid": "668c0cf8c6be695249b6a54b"
}, - "code": "TINOOOpo",
- "name": "VIP User",
- "description": "WHQ-1",
- "status": "active",
- "quotation": {
- "max_duration_per_day": 2,
- "max_duration_per_month": 60,
- "max_energy_per_day": 0,
- "max_energy_per_month": 100
}, - "prices": [
- {
- "name": "1 month",
- "code": "1_MONTH",
- "price": 100
}
], - "deletedAt": "2024-07-08T16:00:04.284Z"
}
}Subscribe to a subscription plan. The request is rejected when the user already has a same-scope effective subscription. Effective checks ignore deleted records and match records with status=active or records where subscribe_to is non-null and still in the future. Global effective duplicates are also rejected for global-scope flows.
| subscription_plan_id | string ID of the subscription plan |
| user_id | string ID of the user |
| location_id | string Location ID that bounds where the purchased subscription can receive subscription pricing. Required for all regular purchases. Global-scope (null location_id) is valid only for activation-code subscriptions (generated via /generate-activation-codes, redeemed via /activate-by-code). |
object Plan price details | |
| active_date | string <date-time> Activation date |
| is_auto_renew | boolean Enable automatic renewal after this subscription becomes active. Defaults to false. |
{- "subscription_plan_id": "string",
- "user_id": "string",
- "location_id": "string",
- "plan_price": {
- "name": "string",
- "price": 0
}, - "active_date": "2019-08-24T14:15:22Z",
- "is_auto_renew": false
}{- "ok": true,
- "data": { }
}Get all subscriptions. Callers that need charging subscription selection should fetch a user's active subscriptions with user_id and status=active, then order the returned data client-side by nearest subscribe_to first, then subscribe_from, then _id, with missing subscribe_to sorted last.
| user_id | string Filter subscriptions by user ID. Use together with |
| subscription_plan_id | string Subscription plan ID |
| merchant_id | string Merchant ID |
| status | string Subscription status |
| include_subscription_plan | boolean Include populated subscription plan data. Charging-selection callers use this with |
| per_page | integer Number of items per page |
| page | integer Page number |
| active_from | string <date> Active from date |
| active_to | string <date> Active to date |
{- "ok": true,
- "total": 25,
- "page": 1,
- "data": [
- {
- "_id": {
- "$oid": "668e541d135096d2c3b2f59c"
}, - "subscription_plan_id": {
- "$oid": "668a960adb4cd9bf088e5dc1"
}, - "subscription_plan_code": "DEV1PLAN",
- "subscription_plan_name": "Plan of DEV1",
- "user_id": {
- "$oid": "667ae4df75ed5e17162fdcea"
}, - "merchant_id": null,
- "location_id": "668e541d135096d2c3b2f59d",
- "location": {
- "_id": "668e541d135096d2c3b2f59d",
- "name": "Watt Hub",
- "address": "77 Enterprise Rd, Singapore 629824",
- "city": "Singapore",
- "latitude": 1.3483,
- "longitude": 103.6831
}, - "subscribe_from": "2024-07-10T09:31:30.000Z",
- "subscribe_to": "2025-07-10T09:31:30.000Z",
- "subscription_time": null,
- "quotation": {
- "max_duration_per_day": 2,
- "max_duration_per_month": 60,
- "max_energy_per_day": 0,
- "max_energy_per_month": 100
}, - "active_date": null,
- "subscription_price": null,
- "promo_code": null,
- "discounted_price": 0,
- "payable_price": null,
- "transaction_id": null,
- "status": "active",
- "payment_status": "paid",
- "is_auto_renew": false
}
]
}Make a payment for a subscription. Activation is rejected when the user already has a same-scope effective subscription. Effective checks ignore deleted records and match records with status=active or records where subscribe_to is non-null and still in the future.
| subscription_id | string Subscription ID |
| promo_code_id | string Promo code ID |
{- "subscription_id": "string",
- "promo_code_id": "string"
}{- "ok": true,
- "msg": "Subscription already paid",
- "data": {
- "_id": {
- "$oid": "668e541d135096d2c3b2f59c"
}, - "subscription_plan_id": {
- "$oid": "668a960adb4cd9bf088e5dc1"
}, - "subscription_plan_code": "DEV1PLAN",
- "subscription_plan_name": "Plan of DEV1",
- "user_id": {
- "$oid": "667ae4df75ed5e17162fdcea"
}, - "merchant_id": null,
- "location_id": "668e541d135096d2c3b2f59d",
- "location": {
- "_id": "668e541d135096d2c3b2f59d",
- "name": "Watt Hub",
- "address": "77 Enterprise Rd, Singapore 629824",
- "city": "Singapore",
- "latitude": 1.3483,
- "longitude": 103.6831
}, - "subscribe_from": "2024-07-10T09:31:30.000Z",
- "subscribe_to": "2025-07-10T09:31:30.000Z",
- "subscription_time": null,
- "quotation": {
- "max_duration_per_day": 2,
- "max_duration_per_month": 60,
- "max_energy_per_day": 0,
- "max_energy_per_month": 100
}, - "active_date": null,
- "subscription_price": null,
- "promo_code": null,
- "discounted_price": 0,
- "payable_price": null,
- "transaction_id": null,
- "status": "active",
- "payment_status": "paid",
- "is_auto_renew": false
}
}Internal endpoint used by Admin API to update controlled support-managed subscription fields. Supported fields are location_id, user_email, and user_phone only. When location_id is provided, the service loads the subscription, validates the target location through Charging service, verifies the location enables the subscription's own plan using the same EVSE-level source as the location-fetch API, checks same-location active/effective conflicts, and updates the allowed fields only. The generic internal PUT /subscriptions/{subscription_id} remains available for existing service-to-service updates.
| subscription_id required | string Subscription ID |
| 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": "string",
- "user_phone": "string"
}{- "ok": true,
- "data": {
- "_id": {
- "$oid": "668e541d135096d2c3b2f59c"
}, - "subscription_plan_id": {
- "$oid": "668a960adb4cd9bf088e5dc1"
}, - "subscription_plan_code": "DEV1PLAN",
- "subscription_plan_name": "Plan of DEV1",
- "user_id": {
- "$oid": "667ae4df75ed5e17162fdcea"
}, - "merchant_id": null,
- "location_id": "668e541d135096d2c3b2f59d",
- "location": {
- "_id": "668e541d135096d2c3b2f59d",
- "name": "Watt Hub",
- "address": "77 Enterprise Rd, Singapore 629824",
- "city": "Singapore",
- "latitude": 1.3483,
- "longitude": 103.6831
}, - "subscribe_from": "2024-07-10T09:31:30.000Z",
- "subscribe_to": "2025-07-10T09:31:30.000Z",
- "subscription_time": null,
- "quotation": {
- "max_duration_per_day": 2,
- "max_duration_per_month": 60,
- "max_energy_per_day": 0,
- "max_energy_per_month": 100
}, - "active_date": null,
- "subscription_price": null,
- "promo_code": null,
- "discounted_price": 0,
- "payable_price": null,
- "transaction_id": null,
- "status": "active",
- "payment_status": "paid",
- "is_auto_renew": false
}
}Activate a subscription
| subscription_id required | string Subscription ID |
{- "ok": true,
- "data": {
- "_id": {
- "$oid": "668e541d135096d2c3b2f59c"
}, - "subscription_plan_id": {
- "$oid": "668a960adb4cd9bf088e5dc1"
}, - "subscription_plan_code": "DEV1PLAN",
- "subscription_plan_name": "Plan of DEV1",
- "user_id": {
- "$oid": "667ae4df75ed5e17162fdcea"
}, - "merchant_id": null,
- "location_id": "668e541d135096d2c3b2f59d",
- "location": {
- "_id": "668e541d135096d2c3b2f59d",
- "name": "Watt Hub",
- "address": "77 Enterprise Rd, Singapore 629824",
- "city": "Singapore",
- "latitude": 1.3483,
- "longitude": 103.6831
}, - "subscribe_from": "2024-07-10T09:31:30.000Z",
- "subscribe_to": "2025-07-10T09:31:30.000Z",
- "subscription_time": null,
- "quotation": {
- "max_duration_per_day": 2,
- "max_duration_per_month": 60,
- "max_energy_per_day": 0,
- "max_energy_per_month": 100
}, - "active_date": null,
- "subscription_price": null,
- "promo_code": null,
- "discounted_price": 0,
- "payable_price": null,
- "transaction_id": null,
- "status": "active",
- "payment_status": "paid",
- "is_auto_renew": false
}
}Deactivate a subscription
| subscription_id required | string Subscription ID |
{- "ok": true,
- "data": {
- "_id": {
- "$oid": "668e541d135096d2c3b2f59c"
}, - "subscription_plan_id": {
- "$oid": "668a960adb4cd9bf088e5dc1"
}, - "subscription_plan_code": "DEV1PLAN",
- "subscription_plan_name": "Plan of DEV1",
- "user_id": {
- "$oid": "667ae4df75ed5e17162fdcea"
}, - "merchant_id": null,
- "location_id": "668e541d135096d2c3b2f59d",
- "location": {
- "_id": "668e541d135096d2c3b2f59d",
- "name": "Watt Hub",
- "address": "77 Enterprise Rd, Singapore 629824",
- "city": "Singapore",
- "latitude": 1.3483,
- "longitude": 103.6831
}, - "subscribe_from": "2024-07-10T09:31:30.000Z",
- "subscribe_to": "2025-07-10T09:31:30.000Z",
- "subscription_time": null,
- "quotation": {
- "max_duration_per_day": 2,
- "max_duration_per_month": 60,
- "max_energy_per_day": 0,
- "max_energy_per_month": 100
}, - "active_date": null,
- "subscription_price": null,
- "promo_code": null,
- "discounted_price": 0,
- "payable_price": null,
- "transaction_id": null,
- "status": "active",
- "payment_status": "paid",
- "is_auto_renew": false
}
}Toggles recurring renewal for one owned, active, paid, unexpired subscription whose plan supports renewal.
| subscription_id required | string Subscription ID |
| is_auto_renew required | boolean |
| user_id required | string Authenticated user ID supplied by the mobile forwarder. |
{- "is_auto_renew": true,
- "user_id": "507f1f77bcf86cd799439011"
}{- "ok": true,
- "msg": "string"
}{- "ok": true,
- "data": {
- "subscription_detail": {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "name": "Merchant one"
}, - "subscription_consumption": {
- "total_energy": 0,
- "total_amount": 0,
- "total_session": 0,
- "total_duration": 0
}
}
}Returns locations that can be selected for subscription usage. Runtime pricing eligibility is still bound to the subscription's stored location_id when present; legacy subscriptions without location_id use temporary plan-only fallback until migration is finalized.
| page | integer Default: 1 Page number |
| per_page | integer Default: 100 Number records/page |
{- "ok": true,
- "data": [
- {
- "name": "Tribecar",
- "longitude": 103.8978969,
- "latitude": 1.3257982,
- "status": "active",
- "ampeco_location_id": 84,
- "description": "51 Ubi Ave 1, Singapore 408933",
- "address": "51 Ubi Ave 1, Singapore 408933",
- "region": "East",
- "city": "Singapore",
- "postal": "408933",
- "country": "SG",
- "image": "apj3sMi4FBOdBhs6dA.jpg",
- "ChargePoints": [
- "string"
], - "is_enabled": true,
- "createdAt": "2022-11-13T14:46:08.709Z",
- "updatedAt": "2022-11-13T14:46:08.709Z",
- "__v": 0
}
], - "msg": "",
- "total": 30,
- "page": 1,
- "per_page": 100
}| id required | string Subscription ID (UUID) |
| page | integer Default: 1 Page number |
| per_page | integer Default: 100 Number records/page |
{- "ok": true,
- "data": [
- {
- "transaction_id": "string",
- "User": "string",
- "gst": 9,
- "amount": 1000,
- "current_balance": 97929,
- "new_balance": 96893.5,
- "type": "subscription_payment",
- "status": "Approved",
- "payment_type": "wallet",
- "is_paid": true,
- "remarks": "",
- "promo_code_id": "string",
- "discount_value": 50,
- "total": 950,
- "total_with_gst": 1035.5,
- "subscription_id": "string",
- "createdAt": "2024-07-12T10:12:28.488Z",
- "updatedAt": "2024-07-12T10:12:28.488Z",
- "__v": 0
}
], - "msg": "",
- "total": 30,
- "page": 1,
- "per_page": 100
}{- "ok": true,
- "data": {
- "subscription_detail": {
- "_id": "665e8f15ebf7d56c133612ab",
- "code": "M1234",
- "name": "Merchant one"
}, - "subscription_consumption": {
- "total_energy": 0,
- "total_amount": 0,
- "total_session": 0,
- "total_duration": 0
}
}
}Returns locations that can be selected for subscription usage. Runtime pricing eligibility is still bound to the subscription's stored location_id when present; legacy subscriptions without location_id use temporary plan-only fallback until migration is finalized.
| page | integer Default: 1 Page number |
| per_page | integer Default: 100 Number records/page |
{- "ok": true,
- "data": [
- {
- "name": "Tribecar",
- "longitude": 103.8978969,
- "latitude": 1.3257982,
- "status": "active",
- "ampeco_location_id": 84,
- "description": "51 Ubi Ave 1, Singapore 408933",
- "address": "51 Ubi Ave 1, Singapore 408933",
- "region": "East",
- "city": "Singapore",
- "postal": "408933",
- "country": "SG",
- "image": "apj3sMi4FBOdBhs6dA.jpg",
- "ChargePoints": [
- "string"
], - "is_enabled": true,
- "createdAt": "2022-11-13T14:46:08.709Z",
- "updatedAt": "2022-11-13T14:46:08.709Z",
- "__v": 0
}
], - "msg": "",
- "total": 30,
- "page": 1,
- "per_page": 100
}| id required | string Subscription ID (UUID) |
| page | integer Default: 1 Page number |
| per_page | integer Default: 100 Number records/page |
{- "ok": true,
- "data": [
- {
- "transaction_id": "string",
- "User": "string",
- "gst": 9,
- "amount": 1000,
- "current_balance": 97929,
- "new_balance": 96893.5,
- "type": "subscription_payment",
- "status": "Approved",
- "payment_type": "wallet",
- "is_paid": true,
- "remarks": "",
- "promo_code_id": "string",
- "discount_value": 50,
- "total": 950,
- "total_with_gst": 1035.5,
- "subscription_id": "string",
- "createdAt": "2024-07-12T10:12:28.488Z",
- "updatedAt": "2024-07-12T10:12:28.488Z",
- "__v": 0
}
], - "msg": "",
- "total": 30,
- "page": 1,
- "per_page": 100
}| keyword | string Search by keyword - code, name, ... |
| code | string Filter by code |
| 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,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "expiry_date": "2021-07-31",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "activated_at": "2021-07-01T00:00:00.000Z",
- "activated_by": "665e8f15ebf7d56c133612ab",
- "activated_by_name": "User ABC"
}
]
}{- "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,
- "discount_type": "percent",
- "max_discount": 50,
- "max_discount_type": "fixed",
- "expiry_date": "2021-07-31",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "activated_at": "2021-07-01T00:00:00.000Z",
- "activated_by": "665e8f15ebf7d56c133612ab",
- "activated_by_name": "User ABC"
}
]
}| id required | string Promo code ID |
Calculate discount request body
| invoice_type | string Type of invoice |
| amount | number Amount for which discount is to be calculated |
{- "invoice_type": "Subscription",
- "amount": 100
}{- "ok": true,
- "data": {
- "original_price": 100,
- "discounted_price": 10,
- "discounted_type": "percent",
- "discounted_value": 10,
- "final_price": 90
}
}| keyword | string Keyword to search promo programs |
| code | string Filter by code |
| merchant_id | string Merchant ID |
| promo_type | string Promo type |
| used_codes | integer Number of used codes |
| start_date | string <date> Start date |
| end_date | string <date> End date |
| per_page | integer >= 1 Items per page |
| page | integer >= 1 Page number |
{- "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-01",
- "end_date": "2021-07-31",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "number_of_codes": 10,
- "used_codes": 5
}
]
}| 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-01",
- "end_date": "2021-07-31",
- "status": "active",
- "created_at": "2021-07-01T00:00:00.000Z",
- "updated_at": "2021-07-01T00:00:00.000Z",
- "number_of_codes": 10,
- "used_codes": 5
}
]
}