openapi: 3.0.3
info:
title: 'mylightmobile API Documentation'
description: ''
version: 1.0.0
servers:
-
url: 'https://api2.mylightmobile.com'
tags:
-
name: Authentication
description: ''
-
name: Endpoints
description: ''
components:
securitySchemes:
default:
type: http
scheme: bearer
description: 'You can retrieve your token by calling login method.'
security:
-
default: []
paths:
/api/customer/check-email:
post:
summary: 'POST api/customer/check-email'
operationId: pOSTApicustomercheckEmail
description: 'This endpoint checks whether a customer account exists with the provided email address.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: true
message: 'Customer already exists with this email.'
data:
exists: true
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Customer already exists with this email.'
data:
type: object
properties:
exists:
type: boolean
example: true
-
description: ''
type: object
example:
success: false
message: 'Customer not exists with this email.'
data:
exists: false
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Customer not exists with this email.'
data:
type: object
properties:
exists:
type: boolean
example: false
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Validation errors'
data:
email:
- 'The email field is required.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Validation errors'
data:
type: object
properties:
email:
type: array
example:
- 'The email field is required.'
items:
type: string
tags:
- Authentication
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'A valid email address.'
example: john@example.com
required:
- email
/api/login:
post:
summary: 'POST api/login'
operationId: pOSTApilogin
description: 'This endpoint allows you to fetch your access token..'
parameters: []
responses:
200:
description: ''
content:
text/plain:
schema:
type: string
example: "{\n \"success\": true,\n \"message\": \"Login Successful\",\n \"data\": {\n \"token\": \"xyzAbc374672346\",\n \"name\": \"Cassie\",\n \"address\": \"Gujarat \",\n }\n}"
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'The email of the user.'
example: cassie52@example.net
password:
type: string
description: 'The password of the user.'
example: password
required:
- email
- password
security: []
/api/contact/send-email:
post:
summary: 'POST api/contact/send-email'
operationId: pOSTApicontactsendEmail
description: 'This endpoint allows users to submit a contact form'
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
status: true
message: 'Contact form submitted successfully.'
data:
id: 1
name: 'John Doe'
email: john@example.com
phone: '9876543210'
message: 'I need help with my order.'
created_at: '2025-01-01T10:00:00.000000Z'
updated_at: '2025-01-01T10:00:00.000000Z'
properties:
status:
type: boolean
example: true
message:
type: string
example: 'Contact form submitted successfully.'
data:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: 'John Doe'
email:
type: string
example: john@example.com
phone:
type: string
example: '9876543210'
message:
type: string
example: 'I need help with my order.'
created_at:
type: string
example: '2025-01-01T10:00:00.000000Z'
updated_at:
type: string
example: '2025-01-01T10:00:00.000000Z'
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Validation errors'
data:
email:
- 'The email field is required.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Validation errors'
data:
type: object
properties:
email:
type: array
example:
- 'The email field is required.'
items:
type: string
500:
description: ''
content:
application/json:
schema:
type: object
example:
status: false
message: 'Something went wrong.'
error: 'Server error message'
properties:
status:
type: boolean
example: false
message:
type: string
example: 'Something went wrong.'
error:
type: string
example: 'Server error message'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'Full name of the user.'
example: 'John Doe'
email:
type: string
description: 'Valid email address.'
example: john@example.com
phone:
type: string
description: 'optional Phone number.'
example: '9876543210'
message:
type: string
description: 'Message or inquiry.'
example: 'I need help with my order.'
required:
- name
- email
- message
/api/brands:
get:
summary: 'GET api/brands'
operationId: gETApibrands
description: 'This Endpoint Allows you to fetch the brands'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
status_code: 401
success: false
message: Unauthenticated.
data: null
properties:
status_code:
type: integer
example: 401
success:
type: boolean
example: false
message:
type: string
example: Unauthenticated.
data:
type: string
example: null
tags:
- Endpoints
'/api/brand/{id}':
get:
summary: 'GET api/brand/{id}'
operationId: gETApibrandid
description: 'This Endpoint Allows you to fetch the brand detail using the id.'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
status_code: 401
success: false
message: Unauthenticated.
data: null
properties:
status_code:
type: integer
example: 401
success:
type: boolean
example: false
message:
type: string
example: Unauthenticated.
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'The ID of the brand.'
example: '564'
required: true
schema:
type: string
'/api/nmi-data/{id}':
get:
summary: 'GET api/nmi-data/{id}'
operationId: gETApinmiDataid
description: 'This endpoint retrieves the NMI tokenization key and gateway type for a specific brand.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'NMI Token fetched successfully'
data:
id: 5
gateway: nmi
nmi_tokenization: your-tokenization-key
properties:
success:
type: boolean
example: true
message:
type: string
example: 'NMI Token fetched successfully'
data:
type: object
properties:
id:
type: integer
example: 5
gateway:
type: string
example: nmi
nmi_tokenization:
type: string
example: your-tokenization-key
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Brand not found'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Brand not found'
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'Brand ID.'
example: 5
required: true
schema:
type: integer
'/api/activation/plans/{brand_id}':
get:
summary: 'GET api/activation/plans/{brand_id}'
operationId: gETApiactivationplansbrandId
description: 'This Endpoint allows you to fetch plans brand wise'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
status_code: 401
success: false
message: Unauthenticated.
data: null
properties:
status_code:
type: integer
example: 401
success:
type: boolean
example: false
message:
type: string
example: Unauthenticated.
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: brand_id
description: 'The ID of the brand.'
example: '564'
required: true
schema:
type: string
'/api/activation/plans-by-mdn/{mdn}':
get:
summary: 'GET api/activation/plans-by-mdn/{mdn}'
operationId: gETApiactivationplansByMdnmdn
description: 'This Endpoint allows you to fetch the plans of the mdn'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
status_code: 401
success: false
message: Unauthenticated.
data: null
properties:
status_code:
type: integer
example: 401
success:
type: boolean
example: false
message:
type: string
example: Unauthenticated.
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: mdn
description: ''
example: architecto
required: true
schema:
type: string
'/api/refill/plans/{brand_id}':
get:
summary: 'GET api/refill/plans/{brand_id}'
operationId: gETApirefillplansbrandId
description: 'This Endpoint allows you to fetch the refill plans based on the brand id'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
status_code: 401
success: false
message: Unauthenticated.
data: null
properties:
status_code:
type: integer
example: 401
success:
type: boolean
example: false
message:
type: string
example: Unauthenticated.
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: brand_id
description: 'The ID of the brand.'
example: '564'
required: true
schema:
type: string
'/api/activation/plan/{id}':
get:
summary: 'GET api/activation/plan/{id}'
operationId: gETApiactivationplanid
description: 'This Endpoint allows you to fetch the activation plan details'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
status_code: 401
success: false
message: Unauthenticated.
data: null
properties:
status_code:
type: integer
example: 401
success:
type: boolean
example: false
message:
type: string
example: Unauthenticated.
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'The ID of the plan.'
example: architecto
required: true
schema:
type: string
'/api/refill/plan/{id}':
get:
summary: 'GET api/refill/plan/{id}'
operationId: gETApirefillplanid
description: 'This Endpoint allows you to fetch the refill plan details'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
status_code: 401
success: false
message: Unauthenticated.
data: null
properties:
status_code:
type: integer
example: 401
success:
type: boolean
example: false
message:
type: string
example: Unauthenticated.
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'The ID of the plan.'
example: architecto
required: true
schema:
type: string
/api/activation:
post:
summary: 'POST api/activate'
operationId: pOSTApiactivate
description: 'This endpoint is used to activate a new SIM for a customer.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Activation request submitted successfully'
data:
transaction_id: uuid
status: processing
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Activation request submitted successfully'
data:
type: object
properties:
transaction_id:
type: string
example: uuid
status:
type: string
example: processing
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Validation failed'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Validation failed'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'Brand ID.'
example: 5
plan_id:
type: integer
description: 'Plan ID.'
example: 12
imei:
type: string
description: 'Must be between 14 and 16 digits.'
example: '13744917136806'
nullable: true
first_name:
type: string
description: ''
example: John
last_name:
type: string
description: ''
example: Doe
email:
type: string
description: ''
example: john@example.com
address:
type: string
description: 'Example : NW 9th Street'
example: architecto
city:
type: string
description: 'Example : Miami'
example: architecto
state:
type: string
description: 'Only Two letters allowed Example : WA'
example: architecto
zipcode:
type: string
description: 'Must match the regex /^[A-Za-z0-9\- ]+$/. Must not be greater than 10 characters.'
example: hwaykc
sim_type:
type: string
description: ''
example: physical
enum:
- physical
- esim
source:
type: string
description: 'Must not be greater than 50 characters.'
example: m
nullable: true
month:
type: integer
description: 'optional Subscription month. Default: 1'
example: 1
nullable: true
autopay:
type: boolean
description: 'optional Enable autopay (0 or 1). Default: 0'
example: true
nullable: true
partnerTransactionId:
type: string
description: 'optional Partner reference ID'
example: architecto
nullable: true
addon_plans:
type: array
description: 'optional Add-on plans'
example:
- architecto
items:
type: string
nullable: true
sim_no:
type: string
description: 'SIM number.'
example: '8901120200000000000'
taxResponsePublic_id:
type: string
description: 'optional Tax response ID'
example: architecto
required:
- brand_id
- plan_id
- first_name
- last_name
- email
- address
- city
- state
- zipcode
- sim_type
- sim_no
/api/activation-calculation:
post:
summary: 'GET api/activation-calculation'
operationId: gETApiactivationCalculation
description: 'This Endpoint is used to calculate activation-related values for a specific plan based on the selected duration (month).'
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
plan_id:
type: number
description: 'The id of an existing record in the plans table.'
example: 4326.41688
month:
type: number
description: ''
example: '1'
enum:
- '1'
- '3'
- '6'
- '12'
required:
- plan_id
- month
/api/refill:
post:
summary: 'POST api/refill'
operationId: pOSTApirefill
description: 'This Endpoint allows you to perform refill/reacharge'
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
mdn:
type: string
description: 'Must not be greater than 10 characters.'
example: bngzmi
plan_id:
type: integer
description: 'The id of an existing record in the plans table.'
example: 16
amount:
type: number
description: ''
example: 4326.41688
nullable: true
coupon_code:
type: string
description: ''
example: null
nullable: true
required:
- mdn
- plan_id
/api/refill-with-card:
post:
summary: 'POST api/refill-with-card'
operationId: pOSTApirefillWithCard
description: 'This endpoint allows customers to recharge/refill their plan using a card via Stripe payment.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Refill completed successfully.'
data:
transaction_id: uuid
status: success
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Refill completed successfully.'
data:
type: object
properties:
transaction_id:
type: string
example: uuid
status:
type: string
example: success
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Stripe key not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Stripe key not found.'
409:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'This payment has already been processed.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'This payment has already been processed.'
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Payment intent not found or invalid.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Payment intent not found or invalid.'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
mdn:
type: string
description: 'Customer phone number.'
example: '9876543210'
plan_id:
type: integer
description: 'Plan ID.'
example: 10
amount:
type: number
description: ''
example: 4326.41688
nullable: true
coupon_code:
type: string
description: ''
example: null
nullable: true
brand_id:
type: integer
description: 'optional Brand ID. Default: 5'
example: 5
payment_intent_id:
type: string
description: 'Stripe Payment Intent ID.'
example: pi_123456
first_name:
type: string
description: ''
example: John
last_name:
type: string
description: ''
example: Doe
email:
type: string
description: ''
example: john@example.com
address:
type: string
description: ''
example: '123 Main St'
city:
type: string
description: ''
example: 'New York'
state:
type: string
description: ''
example: NY
zip_code:
type: string
description: ''
example: '10001'
taxResponsePublic_id:
type: string
description: "optional Tax response reference ID\n\n---"
example: architecto
required:
- mdn
- plan_id
- payment_intent_id
- first_name
- last_name
- email
- address
- city
- state
- zip_code
/api/portin:
post:
summary: 'POST api/portin'
operationId: pOSTApiportin
description: 'This endpoint creates a port-in request without processing payment.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Port-in request created successfully.'
data:
transaction_id: uuid
status: pending
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Port-in request created successfully.'
data:
type: object
properties:
transaction_id:
type: string
example: uuid
status:
type: string
example: pending
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Validation error'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Validation error'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'Brand ID.'
example: 5
plan_id:
type: integer
description: 'Plan ID.'
example: 10
imei:
type: string
description: 'Must be 15 digits.'
example: '822569775449171'
nullable: true
first_name:
type: string
description: ''
example: John
last_name:
type: string
description: ''
example: Doe
email:
type: string
description: ''
example: john@example.com
address:
type: string
description: ''
example: '123 Main St'
city:
type: string
description: ''
example: 'New York'
state:
type: string
description: ''
example: NY
zipcode:
type: number
description: ''
example: 4326.41688
sim_type:
type: string
description: ''
example: esim
enum:
- physical
- esim
mdn:
type: string
description: 'Number to port.'
example: '9876543210'
account_number:
type: string
description: 'Carrier account number.'
example: architecto
account_password:
type: string
description: ''
example: architecto
authorizer_first_name:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_last_name:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_address:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_city:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_state:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_zipcode:
type: number
description: 'This field is required when brand_id is 16 or 18.'
example: 4326.41688
nullable: true
phone:
type: string
description: 'Must be between 10 and 15 digits.'
example: '1374491716806'
nullable: true
taxResponsePublic_id:
type: string
description: "optional Tax response reference ID\n\n---"
example: architecto
nullable: true
sim_no:
type: string
description: 'SIM number.'
example: '8901122334455'
pin:
type: string
description: 'Carrier PIN.'
example: architecto
zip_code:
type: string
description: ''
example: '10001'
required:
- brand_id
- plan_id
- first_name
- last_name
- email
- address
- city
- state
- zipcode
- sim_type
- mdn
- account_number
- account_password
- sim_no
- pin
- zip_code
/api/portin-with-card:
post:
summary: 'POST api/portin-with-card'
operationId: pOSTApiportinWithCard
description: 'This endpoint handles porting a number into the system using card payment (Stripe).'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Port-in request created successfully.'
data:
transaction_id: uuid
status: pending
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Port-in request created successfully.'
data:
type: object
properties:
transaction_id:
type: string
example: uuid
status:
type: string
example: pending
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Stripe key not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Stripe key not found.'
409:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'This payment has already been processed.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'This payment has already been processed.'
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Payment intent not found or invalid.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Payment intent not found or invalid.'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'optional Brand ID. Default: 5'
example: 5
plan_id:
type: integer
description: 'Plan ID.'
example: 10
imei:
type: string
description: 'Must be 15 digits.'
example: '822569775449171'
nullable: true
first_name:
type: string
description: ''
example: John
last_name:
type: string
description: ''
example: Doe
email:
type: string
description: ''
example: john@example.com
address:
type: string
description: ''
example: '123 Main St'
city:
type: string
description: ''
example: 'New York'
state:
type: string
description: ''
example: NY
zipcode:
type: number
description: ''
example: 4326.41688
sim_type:
type: string
description: ''
example: esim
enum:
- physical
- esim
mdn:
type: string
description: 'Number to port.'
example: '9876543210'
account_number:
type: string
description: 'Carrier account number.'
example: architecto
account_password:
type: string
description: ''
example: architecto
authorizer_first_name:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_last_name:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_address:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_city:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_state:
type: string
description: 'This field is required when brand_id is 16 or 18.'
example: architecto
nullable: true
authorizer_zipcode:
type: number
description: 'This field is required when brand_id is 16 or 18.'
example: 4326.41688
nullable: true
phone:
type: string
description: 'Must be between 10 and 15 digits.'
example: '1374491716806'
nullable: true
taxResponsePublic_id:
type: string
description: 'Must be a valid UUID.'
example: c90237e9-ced5-3af6-88ea-84aeaa148878
nullable: true
sim_no:
type: string
description: 'SIM number.'
example: '8901122334455'
pin:
type: string
description: 'Carrier PIN.'
example: architecto
payment_intent_id:
type: string
description: 'Stripe Payment Intent ID.'
example: pi_123456
zip_code:
type: string
description: ''
example: '10001'
coupon_code:
type: string
description: optional
example: SAVE10
autopay:
type: boolean
description: optional
example: true
required:
- plan_id
- first_name
- last_name
- email
- address
- city
- state
- zipcode
- sim_type
- mdn
- account_number
- account_password
- sim_no
- pin
- payment_intent_id
- zip_code
/api/simswap:
post:
summary: 'POST api/simswap'
operationId: pOSTApisimswap
description: 'This endpoint allows swapping an existing SIM with a new SIM'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Sim Swap request sent successfully.'
data:
status: success
reference_id: abc123
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Sim Swap request sent successfully.'
data:
type: object
properties:
status:
type: string
example: success
reference_id:
type: string
example: abc123
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'customer is not active'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'customer is not active'
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'mdn not found in the system'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'mdn not found in the system'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'Brand ID.'
example: 1
mdn:
type: string
description: 'Existing phone number.'
example: '9876543210'
sim_no:
type: string
description: 'New SIM number.'
example: '890112233445566'
required:
- brand_id
- mdn
- sim_no
/api/number-change:
post:
summary: 'POST api/number-change'
operationId: pOSTApinumberChange
description: "This endpoint allows changing the phone number (MDN) of an active customer.\n\nChange customer phone number."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: true
message: 'Number Change request sent successfully.'
data:
status: success
reference_id: abc123
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Number Change request sent successfully.'
data:
type: object
properties:
status:
type: string
example: success
reference_id:
type: string
example: abc123
-
description: ''
type: object
example:
success: false
message: 'customer is not active'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'customer is not active'
data:
type: string
example: null
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'no customer found with provided mdn'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'no customer found with provided mdn'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'Brand ID.'
example: 1
mdn:
type: string
description: 'Existing phone number.'
example: '9876543210'
zip_code:
type: string
description: 'ZIP code.'
example: '10001'
required:
- brand_id
- mdn
- zip_code
/api/helix/suspend:
post:
summary: 'POST api/helix/suspend'
operationId: pOSTApihelixsuspend
description: 'This endpoint allows you to suspend your mdn.'
parameters: []
responses:
200:
description: ''
content:
text/plain:
schema:
type: string
example: "{\n \"success\": true,\n \"message\": \"Suspended Successfully\",\n\n}"
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'Enter The Brand Id.'
example: 1
mdns:
type: string
description: 'Enter Your Mdn.'
example: '4534213423'
required:
- brand_id
- mdns
/api/helix/deactivate:
post:
summary: ''
operationId: postApiHelixDeactivate
description: ''
parameters: []
responses: { }
tags:
- Endpoints
/api/helix/restore:
post:
summary: ''
operationId: postApiHelixRestore
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
mdn:
type: string
description: ''
example: architecto
required:
- mdn
/api/nmi/activate-with-card:
post:
summary: 'POST api/nmi/activate-with-card'
operationId: pOSTApinmiactivateWithCard
description: 'This endpoint processes SIM activation with card payment.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Activation completed successfully.'
data:
transaction_id: uuid
status: success
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Activation completed successfully.'
data:
type: object
properties:
transaction_id:
type: string
example: uuid
status:
type: string
example: success
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Payment Failed Reason - Insufficient funds'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Payment Failed Reason - Insufficient funds'
409:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'This payment has already been processed.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'This payment has already been processed.'
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Payment intent not found or invalid.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Payment intent not found or invalid.'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'optional Brand ID.'
example: 5
plan_id:
type: integer
description: 'Plan ID.'
example: 12
imei:
type: string
description: 'Must be between 14 and 16 digits.'
example: '13744917136806'
nullable: true
first_name:
type: string
description: 'First name.'
example: John
last_name:
type: string
description: 'Last name.'
example: Doe
email:
type: string
description: 'Email address.'
example: john@example.com
address:
type: string
description: Address.
example: '123 Main St'
city:
type: string
description: City.
example: 'New York'
state:
type: string
description: State.
example: NY
zipcode:
type: string
description: 'Must match the regex /^[A-Za-z0-9\- ]+$/. Must not be greater than 10 characters.'
example: hwaykc
sim_type:
type: string
description: ''
example: physical
enum:
- physical
- esim
source:
type: string
description: 'Must not be greater than 50 characters.'
example: m
nullable: true
month:
type: integer
description: 'optional Plan duration. Default: 1'
example: 16
nullable: true
autopay:
type: boolean
description: ''
example: true
nullable: true
partnerTransactionId:
type: string
description: 'Must not be greater than 100 characters.'
example: u
nullable: true
addon_plans:
type: array
description: 'optional Add-ons list'
example:
- architecto
items:
type: string
nullable: true
sim_no:
type: string
description: 'SIM number.'
example: '890123456789'
payment_token:
type: string
description: 'Required for NMI payments.'
example: architecto
payment_intent_id:
type: string
description: 'optional Required for Stripe payments.'
example: architecto
phone:
type: string
description: 'Phone number.'
example: '9876543210'
zip_code:
type: string
description: 'ZIP code.'
example: '10001'
coupon_code:
type: string
description: 'optional Coupon code.'
example: SAVE10
total_price:
type: number
description: 'Total payable amount.'
example: 120.5
required:
- plan_id
- first_name
- last_name
- email
- address
- city
- state
- zipcode
- sim_type
- sim_no
- payment_token
- phone
- zip_code
- total_price
'/api/transaction/{public_id}':
get:
summary: 'GET api/transaction/{public_id}'
operationId: gETApitransactionpublicId
description: 'This endpoint retrieves detailed information about a transaction using its public transaction ID..'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: ''
data:
id: 1
transaction_id: 550e8400-e29b-41d4-a716-446655440000
plan_id: 12
plan:
id: 12
plan_name: 'Unlimited Plan'
description: 'Unlimited calls & data'
price: 30
brand_id: 1
brand:
id: 1
name: BrandX
month: 12
price: 30
sim_type: esim
sim_no: '890123456789'
status: success
mdn: '9876543210'
total_price: 330
totalTaxRate: 5.5
coupon_code: SAVE10
addon_plans_price: 10
activationcode: 'LPA:1$code'
activation_date: '2025-01-01'
properties:
success:
type: boolean
example: true
message:
type: string
example: ''
data:
type: object
properties:
id:
type: integer
example: 1
transaction_id:
type: string
example: 550e8400-e29b-41d4-a716-446655440000
plan_id:
type: integer
example: 12
plan:
type: object
properties:
id:
type: integer
example: 12
plan_name:
type: string
example: 'Unlimited Plan'
description:
type: string
example: 'Unlimited calls & data'
price:
type: integer
example: 30
brand_id:
type: integer
example: 1
brand:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: BrandX
month:
type: integer
example: 12
price:
type: integer
example: 30
sim_type:
type: string
example: esim
sim_no:
type: string
example: '890123456789'
status:
type: string
example: success
mdn:
type: string
example: '9876543210'
total_price:
type: integer
example: 330
totalTaxRate:
type: number
example: 5.5
coupon_code:
type: string
example: SAVE10
addon_plans_price:
type: integer
example: 10
activationcode:
type: string
example: 'LPA:1$code'
activation_date:
type: string
example: '2025-01-01'
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Transaction not found'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Transaction not found'
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: public_id
description: 'The ID of the public.'
example: architecto
required: true
schema:
type: string
-
in: path
name: id
description: 'Transaction public UUID.'
example: 550e8400-e29b-41d4-a716-446655440000
required: true
schema:
type: string
/api/esim/qr:
post:
summary: 'POST api/esim/qr'
operationId: pOSTApiesimqr
description: 'This endpoint retrieves the eSIM QR code using a SIM number and brand ID.'
parameters: []
responses:
200:
description: 'Success (PNG Image)'
content:
text/plain:
schema:
type: string
example: '(Binary PNG image response)'
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'brand_id field is required'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'brand_id field is required'
data:
type: string
example: null
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'No transaction found.'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'No transaction found.'
data:
type: string
example: null
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'Brand ID. Must exist in brands table.'
example: 1
sim_no:
type: string
description: 'SIM number.'
example: "8901234567890123456\n\n---"
required:
- brand_id
- sim_no
'/api/esim/qr/{public_id}':
get:
summary: 'GET api/esim/qr/{public_id}'
operationId: gETApiesimqrpublicId
description: 'This endpoint retrieves the eSIM QR code for a given transaction'
parameters: []
responses:
200:
description: 'Brand 16 - QR Image'
content:
text/plain:
schema:
type: string
example: '(Binary PNG Image Response)'
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'No transaction found.'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'No transaction found.'
data:
type: string
example: null
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Invalid public_id format. Must be UUID.'
errors:
public_id:
- 'The public id must be a valid UUID.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Invalid public_id format. Must be UUID.'
errors:
type: object
properties:
public_id:
type: array
example:
- 'The public id must be a valid UUID.'
items:
type: string
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
public_id:
type: string
description: 'Must be a valid UUID.'
example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed
required:
- public_id
parameters:
-
in: path
name: public_id
description: 'Transaction public UUID.'
example: 550e8400-e29b-41d4-a716-446655440000
required: true
schema:
type: string
/api/coupon-referral-code:
post:
summary: 'POST api/coupon-referral-code'
operationId: pOSTApicouponReferralCode
description: 'This endpoint validates and applies a coupon code (and optional add-ons) to calculate the final payable amount for a selected plan.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: true
message: 'Code Found Successfully'
data:
coupon:
success: true
coupon_id: 1
coupon_amount: 10
amount_type: fixed
total_discount_price: 90
referral: null
final_price: 95.5
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Code Found Successfully'
data:
type: object
properties:
coupon:
type: object
properties:
success:
type: boolean
example: true
coupon_id:
type: integer
example: 1
coupon_amount:
type: integer
example: 10
amount_type:
type: string
example: fixed
total_discount_price:
type: integer
example: 90
referral:
type: string
example: null
final_price:
type: number
example: 95.5
-
description: ''
type: object
example:
success: true
message: 'Code Found Successfully'
data:
coupon: null
referral: null
final_price: 120
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Code Found Successfully'
data:
type: object
properties:
coupon:
type: string
example: null
referral:
type: string
example: null
final_price:
type: integer
example: 120
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'brand_id field is required'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'brand_id field is required'
data:
type: string
example: null
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'Brand ID.'
example: 1
plan_id:
type: integer
description: 'Plan ID.'
example: 12
month:
type: integer
description: 'Plan duration in months.'
example: 12
taxResponsePublic_id:
type: string
description: 'optional Tax reference ID.'
example: tx_12345
nullable: true
coupon_code:
type: string
description: 'optional Coupon code.'
example: SAVE10
addon_plans:
type: array
description: 'optional List of add-ons.'
example:
- architecto
items:
type: string
required:
- brand_id
- plan_id
- month
'/api/helix/send-ota/{mdn}':
post:
summary: 'POST api/helix/send-ota/{mdn}'
operationId: pOSTApihelixsendOtamdn
description: 'This endpoint sends an OTA (Over-The-Air) configuration message to a device based on the provided mobile number (MDN).'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: true
message: 'OTA sent successfully.'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'OTA sent successfully.'
-
description: ''
type: object
example:
success: false
message: 'Failed to send OTA.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Failed to send OTA.'
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
data: null
message: 'Transaction not found.'
properties:
success:
type: boolean
example: false
data:
type: string
example: null
message:
type: string
example: 'Transaction not found.'
tags:
- Endpoints
parameters:
-
in: path
name: mdn
description: 'Mobile number associated with the device.'
example: '9876543210'
required: true
schema:
type: string
/api/device/check-imei:
post:
summary: 'POST api/device/check-imei'
operationId: pOSTApidevicecheckImei
description: 'This endpoint checks whether a device (based on IMEI number) is eligible for activation under a specific brand.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: true
message: 'IMEI check completed.'
data:
imei: '123456789012345'
brand_id: 1
aggregator: nexus
sim_support:
physical_sim: true
esim: false
properties:
success:
type: boolean
example: true
message:
type: string
example: 'IMEI check completed.'
data:
type: object
properties:
imei:
type: string
example: '123456789012345'
brand_id:
type: integer
example: 1
aggregator:
type: string
example: nexus
sim_support:
type: object
properties:
physical_sim:
type: boolean
example: true
esim:
type: boolean
example: false
-
description: ''
type: object
example:
success: false
message: 'IMEI not eligible or not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'IMEI not eligible or not found.'
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Aggregator not supported for IMEI check.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Aggregator not supported for IMEI check.'
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Brand not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Brand not found.'
500:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Error during IMEI check: Something went wrong'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Error during IMEI check: Something went wrong'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
imei:
type: string
description: 'Device IMEI number.'
example: '123456789012345'
brand_id:
type: integer
description: 'Brand ID.'
example: 1
required:
- imei
- brand_id
'/api/activation/addon-plans/{brand_id}':
get:
summary: 'GET api/activation/addon-plans/{brand_id}'
operationId: gETApiactivationaddonPlansbrandId
description: "This endpoint returns a list of active addon plans for a specific brand.\n\nAddon plans are typically used as additional services or top-ups that customers can purchase along with their main plan."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: integer
example: 1
plan_type:
type: string
example: addon
sku:
type: string
example: ADDON001
plan_name:
type: string
example: '1GB Data Addon'
description:
type: string
example: 'Extra 1GB high-speed data'
price:
type: string
example: '10.00'
m1_spiff:
type: string
example: '1.00'
m2_spiff:
type: string
example: '1.50'
m3_spiff:
type: string
example: '2.00'
m6_spiff:
type: string
example: '3.00'
m9_spiff:
type: string
example: '4.00'
m12_spiff:
type: string
example: '5.00'
processing_fees:
type: string
example: '0.50'
brand_id:
type: integer
example: 1
example:
-
id: 1
plan_type: addon
sku: ADDON001
plan_name: '1GB Data Addon'
description: 'Extra 1GB high-speed data'
price: '10.00'
m1_spiff: '1.00'
m2_spiff: '1.50'
m3_spiff: '2.00'
m6_spiff: '3.00'
m9_spiff: '4.00'
m12_spiff: '5.00'
processing_fees: '0.50'
brand_id: 1
tags:
- Endpoints
parameters:
-
in: path
name: brand_id
description: 'Optional parameter. optional The ID of the brand.'
required: true
schema:
type: integer
examples:
omitted:
summary: 'When the value is omitted'
value: ''
present:
summary: 'When the value is present'
value: 1
/api/customer/login:
post:
summary: 'POST api/customer/login'
operationId: pOSTApicustomerlogin
description: 'This endpoint authenticates a customer using email and password.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Login successful.'
data:
customer:
id: 1
email: john@example.com
first_name: John
last_name: Doe
token:
access_token: 1|abcxyz...
token_type: Bearer
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Login successful.'
data:
type: object
properties:
customer:
type: object
properties:
id:
type: integer
example: 1
email:
type: string
example: john@example.com
first_name:
type: string
example: John
last_name:
type: string
example: Doe
token:
type: object
properties:
access_token:
type: string
example: 1|abcxyz...
token_type:
type: string
example: Bearer
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Invalid credentials.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Invalid credentials.'
data:
type: object
properties:
customer:
type: string
example: null
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Customer email address.'
example: john@example.com
password:
type: string
description: 'Customer password.'
example: secret123
required:
- email
- password
/api/customer/register:
post:
summary: 'POST api/customer/register'
operationId: pOSTApicustomerregister
description: 'This endpoint registers a new customer account using basic details.'
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Customer registered successfully.'
data:
customer:
id: 1
first_name: John
last_name: Doe
email: john@example.com
gender: male
phone: '9876543210'
created_at: '2025-01-01T10:00:00.000000Z'
updated_at: '2025-01-01T10:00:00.000000Z'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Customer registered successfully.'
data:
type: object
properties:
customer:
type: object
properties:
id:
type: integer
example: 1
first_name:
type: string
example: John
last_name:
type: string
example: Doe
email:
type: string
example: john@example.com
gender:
type: string
example: male
phone:
type: string
example: '9876543210'
created_at:
type: string
example: '2025-01-01T10:00:00.000000Z'
updated_at:
type: string
example: '2025-01-01T10:00:00.000000Z'
422:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: false
message: 'Email already exists.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Email already exists.'
data:
type: object
properties:
customer:
type: string
example: null
-
description: ''
type: object
example:
message: 'The given data was invalid.'
errors:
email:
- 'The email has already been taken.'
properties:
message:
type: string
example: 'The given data was invalid.'
errors:
type: object
properties:
email:
type: array
example:
- 'The email has already been taken.'
items:
type: string
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
description: 'Customer first name.'
example: John
last_name:
type: string
description: 'Customer last name.'
example: Doe
email:
type: string
description: 'Customer email address (must be unique).'
example: john@example.com
password:
type: string
description: 'Password (minimum 6 characters).'
example: secret123
gender:
type: string
description: 'Gender of the customer. Allowed values: male, female, other.'
example: male
phone:
type: string
description: 'Customer phone number.'
example: '9876543210'
required:
- first_name
- last_name
- email
- password
- gender
- phone
/api/customer/send-otp:
post:
summary: 'POST api/customer/send-otp'
operationId: pOSTApicustomersendOtp
description: "This endpoint generates and sends a One-Time Password (OTP) to a customer via email or mobile number (MDN).\n\nOTP is valid for 5 minutes.\n\nSend OTP to customer via email or mobile number."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'OTP sent successfully.'
data:
customer:
email: john@example.com
mdn: '9876543210'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'OTP sent successfully.'
data:
type: object
properties:
customer:
type: object
properties:
email:
type: string
example: john@example.com
mdn:
type: string
example: '9876543210'
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'No customer found for the provided information.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'No customer found for the provided information.'
data:
type: object
properties:
customer:
type: string
example: null
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Email or MDN is required'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Email or MDN is required'
500:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Failed to send OTP. Please try again later.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Failed to send OTP. Please try again later.'
data:
type: object
properties:
customer:
type: string
example: null
tags:
- Endpoints
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'optional Customer email address. Required if mdn is not provided.'
example: john@example.com
nullable: true
mdn:
type: string
description: 'optional Customer mobile number. Required if email is not provided.'
example: '9876543210'
nullable: true
brand_id:
type: integer
description: 'optional Brand ID (used for OTP provider routing).'
example: 1
/api/customer/verify-otp:
post:
summary: 'POST api/customer/verify-otp'
operationId: pOSTApicustomerverifyOtp
description: "This endpoint verifies a One-Time Password (OTP) sent to a customer via email or mobile number (MDN). Upon successful verification,\nit authenticates the customer and returns an access token."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'OTP verified successfully.'
data:
customer:
id: 1
email: john@example.com
mdn: '9876543210'
first_name: John
last_name: Doe
date_of_birth: '1995-05-10'
address: 'New York'
token:
access_token: 1|abcxyz...
token_type: Bearer
properties:
success:
type: boolean
example: true
message:
type: string
example: 'OTP verified successfully.'
data:
type: object
properties:
customer:
type: object
properties:
id:
type: integer
example: 1
email:
type: string
example: john@example.com
mdn:
type: string
example: '9876543210'
first_name:
type: string
example: John
last_name:
type: string
example: Doe
date_of_birth:
type: string
example: '1995-05-10'
address:
type: string
example: 'New York'
token:
type: object
properties:
access_token:
type: string
example: 1|abcxyz...
token_type:
type: string
example: Bearer
400:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: false
message: 'Invalid OTP. Please try again.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Invalid OTP. Please try again.'
data:
type: object
properties:
customer:
type: string
example: null
-
description: ''
type: object
example:
success: false
message: 'OTP expired. Please request a new one.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'OTP expired. Please request a new one.'
data:
type: object
properties:
customer:
type: string
example: null
404:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: false
message: 'No OTP found for this customer.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'No OTP found for this customer.'
data:
type: object
properties:
customer:
type: string
example: null
-
description: ''
type: object
example:
success: false
message: 'Customer record not found after OTP verification.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Customer record not found after OTP verification.'
data:
type: object
properties:
customer:
type: string
example: null
422:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Either email or MDN is required.'
data:
customer: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Either email or MDN is required.'
data:
type: object
properties:
customer:
type: string
example: null
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'optional Customer email address. Required if mdn is not provided.'
example: john@example.com
nullable: true
mdn:
type: string
description: 'optional Customer mobile number. Required if email is not provided.'
example: '9876543210'
nullable: true
otp:
type: string
description: 'The OTP sent to the customer.'
example: '123456'
brand_id:
type: integer
description: ''
example: 16
required:
- otp
- brand_id
/api/customer/cards:
get:
summary: 'GET api/customer/cards'
operationId: gETApicustomercards
description: "This endpoint retrieves all saved payment cards for the authenticated customer based on the provided brand.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters:
-
in: query
name: brand_id
description: 'The brand ID to filter cards.'
example: 1
required: true
schema:
type: integer
description: 'The brand ID to filter cards.'
example: 1
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Cards retrieved successfully.'
data:
-
id: 1
customer_id: 10
brand_id: 1
last_four: '4242'
expiry_month: '12'
expiry_year: '2028'
is_default: 1
created_at: '2026-04-18 12:00:00'
updated_at: '2026-04-18 12:30:00'
-
id: 2
customer_id: 10
brand_id: 1
last_four: '1111'
expiry_month: '11'
expiry_year: '2027'
is_default: 0
created_at: '2026-03-01 10:00:00'
updated_at: '2026-03-01 10:00:00'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Cards retrieved successfully.'
data:
type: array
example:
-
id: 1
customer_id: 10
brand_id: 1
last_four: '4242'
expiry_month: '12'
expiry_year: '2028'
is_default: 1
created_at: '2026-04-18 12:00:00'
updated_at: '2026-04-18 12:30:00'
-
id: 2
customer_id: 10
brand_id: 1
last_four: '1111'
expiry_month: '11'
expiry_year: '2027'
is_default: 0
created_at: '2026-03-01 10:00:00'
updated_at: '2026-03-01 10:00:00'
items:
type: object
properties:
id:
type: integer
example: 1
customer_id:
type: integer
example: 10
brand_id:
type: integer
example: 1
last_four:
type: string
example: '4242'
expiry_month:
type: string
example: '12'
expiry_year:
type: string
example: '2028'
is_default:
type: integer
example: 1
created_at:
type: string
example: '2026-04-18 12:00:00'
updated_at:
type: string
example: '2026-04-18 12:30:00'
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'brand_id is required.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'brand_id is required.'
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
post:
summary: 'POST api/customer/cards'
operationId: pOSTApicustomercards
description: "This endpoint allows an authenticated customer to add a new payment card using Stripe.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Card added successfully.'
data:
card:
id: 1
customer_id: 10
brand_id: 1
last_four: '4242'
expiry_month: '12'
expiry_year: '2028'
created_at: '2026-04-18 12:00:00'
stripe_customer_id: cus_ABC123
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Card added successfully.'
data:
type: object
properties:
card:
type: object
properties:
id:
type: integer
example: 1
customer_id:
type: integer
example: 10
brand_id:
type: integer
example: 1
last_four:
type: string
example: '4242'
expiry_month:
type: string
example: '12'
expiry_year:
type: string
example: '2028'
created_at:
type: string
example: '2026-04-18 12:00:00'
stripe_customer_id:
type: string
example: cus_ABC123
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
422:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'The given data was invalid.'
errors:
payment_method_id:
- 'The payment method id field is required.'
properties:
message:
type: string
example: 'The given data was invalid.'
errors:
type: object
properties:
payment_method_id:
type: array
example:
- 'The payment method id field is required.'
items:
type: string
500:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Failed to add card'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Failed to add card'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
card_name:
type: string
description: 'Must not be greater than 255 characters.'
example: b
card_type:
type: string
description: 'Must not be greater than 50 characters.'
example: 'n'
name:
type: string
description: 'Customer name.'
example: 'John Doe'
email:
type: string
description: 'Customer email.'
example: john@example.com
phone_number:
type: string
description: 'optional Customer phone number.'
example: '1234567890'
country_code:
type: string
description: 'Must not be greater than 10 characters.'
example: pwlvqw
address:
type: string
description: 'Must not be greater than 255 characters.'
example: r
city:
type: string
description: 'Must not be greater than 255 characters.'
example: s
state:
type: string
description: 'Must not be greater than 255 characters.'
example: i
zip_code:
type: string
description: 'Must not be greater than 20 characters.'
example: tcpscqldzsnrwtuj
card_number:
type: string
description: ''
example: architecto
payment_method_id:
type: string
description: 'Stripe payment method ID.'
example: pm_123456789
brand_id:
type: integer
description: 'The brand ID.'
example: 1
is_default:
type: string
description: ''
example: '0'
enum:
- '0'
- '1'
nullable: true
stripe_customer_id:
type: string
description: 'optional Existing Stripe customer ID.'
example: cus_ABC123
required:
- card_name
- card_type
- name
- email
- country_code
- address
- city
- state
- zip_code
- card_number
- payment_method_id
- brand_id
'/api/customer/cards/{id}':
get:
summary: 'Get api/customer/cards'
operationId: getApicustomercards
description: "This endpoint retrieves details of a specific saved card for the authenticated customer.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Card retrieved successfully.'
data:
id: 1
customer_id: 10
brand_id: 1
last_four: '1111'
expiry_month: '12'
expiry_year: '2028'
is_default: 1
created_at: '2026-04-18 12:00:00'
updated_at: '2026-04-18 12:30:00'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Card retrieved successfully.'
data:
type: object
properties:
id:
type: integer
example: 1
customer_id:
type: integer
example: 10
brand_id:
type: integer
example: 1
last_four:
type: string
example: '1111'
expiry_month:
type: string
example: '12'
expiry_year:
type: string
example: '2028'
is_default:
type: integer
example: 1
created_at:
type: string
example: '2026-04-18 12:00:00'
updated_at:
type: string
example: '2026-04-18 12:30:00'
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Card not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Card not found.'
tags:
- Endpoints
put:
summary: 'PUT/PATCH api/customer/cards/{id}'
operationId: pUTPATCHApicustomercardsid
description: "This endpoint allows an authenticated customer to update a saved card,\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Card updated successfully.'
data:
id: 1
customer_id: 10
brand_id: 1
last_four: '1111'
expiry_month: '12'
expiry_year: '2028'
is_default: 1
created_at: '2026-04-18 12:00:00'
updated_at: '2026-04-18 12:30:00'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Card updated successfully.'
data:
type: object
properties:
id:
type: integer
example: 1
customer_id:
type: integer
example: 10
brand_id:
type: integer
example: 1
last_four:
type: string
example: '1111'
expiry_month:
type: string
example: '12'
expiry_year:
type: string
example: '2028'
is_default:
type: integer
example: 1
created_at:
type: string
example: '2026-04-18 12:00:00'
updated_at:
type: string
example: '2026-04-18 12:30:00'
400:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'brand_id is required.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'brand_id is required.'
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Card not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Card not found.'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'The brand ID associated with the card.'
example: 1
is_default:
type: integer
description: 'optional Set to 1 to make this card default, 0 otherwise.'
example: 1
required:
- brand_id
delete:
summary: 'DELETE api/customer/cards/{id}'
operationId: dELETEApicustomercardsid
description: "This endpoint allows an authenticated customer to delete one of their saved payment cards.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Card deleted successfully.'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Card deleted successfully.'
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Card not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Card not found.'
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'The ID of the card.'
example: 1
required: true
schema:
type: integer
/api/customer/profile:
get:
summary: 'GET api/customer/profile'
operationId: gETApicustomerprofile
description: "This endpoint retrieves the profile details of the authenticated customer.\n\nš Authentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Profile fetch successfully.'
data:
id: 10
first_name: John
last_name: Doe
email: john@example.com
phone: '1234567890'
dob: '1995-05-20'
created_at: '2026-01-01 10:00:00'
updated_at: '2026-04-18 12:00:00'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Profile fetch successfully.'
data:
type: object
properties:
id:
type: integer
example: 10
first_name:
type: string
example: John
last_name:
type: string
example: Doe
email:
type: string
example: john@example.com
phone:
type: string
example: '1234567890'
dob:
type: string
example: '1995-05-20'
created_at:
type: string
example: '2026-01-01 10:00:00'
updated_at:
type: string
example: '2026-04-18 12:00:00'
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
put:
summary: 'PUT api/customer/profile'
operationId: pUTApicustomerprofile
description: "This endpoint allows an authenticated customer to update their profile details.\nOnly the provided fields will be updated (partial update supported).\n\nš Authentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Profile updated successfully.'
data:
id: 10
first_name: John
last_name: Doe
email: john@example.com
phone: '1234567890'
dob: '1995-05-20'
created_at: '2026-01-01 10:00:00'
updated_at: '2026-04-18 12:00:00'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Profile updated successfully.'
data:
type: object
properties:
id:
type: integer
example: 10
first_name:
type: string
example: John
last_name:
type: string
example: Doe
email:
type: string
example: john@example.com
phone:
type: string
example: '1234567890'
dob:
type: string
example: '1995-05-20'
created_at:
type: string
example: '2026-01-01 10:00:00'
updated_at:
type: string
example: '2026-04-18 12:00:00'
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
422:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'The given data was invalid.'
errors:
email:
- 'The email has already been taken.'
properties:
message:
type: string
example: 'The given data was invalid.'
errors:
type: object
properties:
email:
type: array
example:
- 'The email has already been taken.'
items:
type: string
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
description: "optional Customer's first name."
example: John
last_name:
type: string
description: "optional Customer's last name."
example: Doe
address:
type: string
description: 'Must not be greater than 255 characters.'
example: g
nullable: true
city:
type: string
description: 'Must not be greater than 255 characters.'
example: z
nullable: true
state:
type: string
description: 'Must not be greater than 255 characters.'
example: m
nullable: true
zip_code:
type: string
description: 'Must not be greater than 20 characters.'
example: iyvdljnikhwaykcm
nullable: true
date_of_birth:
type: string
description: 'optional Customer DOB (any valid date format).'
example: '1995-05-20'
gender:
type: string
description: ''
example: male
enum:
- male
- female
- other
password:
type: string
description: 'optional New password (will be hashed).'
example: secret123
nullable: true
email:
type: string
description: "optional Customer's email address."
example: john@example.com
phone:
type: string
description: "optional Customer's phone number."
example: '1234567890'
required:
- gender
/api/customer/orders:
get:
summary: 'GET api/customer/orders'
operationId: gETApicustomerorders
description: "This endpoint retrieves a paginated list of orders (transactions)\nfor the authenticated customer.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: true
message: 'Orders fetched successfully.'
data:
-
transaction_id: PUB123456
mdn: '1234567890'
sim_no: SIM123456
sim_type: physical
status: success
price: '50.00'
total_price: '55.00'
type: activation
plan_id: 5
plan_details: { }
customer_id: 10
brand_id: 1
created_at: '2026-04-01 10:00:00'
plan:
id: 5
plan_name: 'Unlimited Plan'
brands:
id: 1
name: MyBrand
pagination:
total: 25
per_page: 10
current_page: 1
last_page: 3
next_page_url: 'https://your-domain.com/api/customer/orders?page=2'
prev_page_url: null
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Orders fetched successfully.'
data:
type: array
example:
-
transaction_id: PUB123456
mdn: '1234567890'
sim_no: SIM123456
sim_type: physical
status: success
price: '50.00'
total_price: '55.00'
type: activation
plan_id: 5
plan_details: []
customer_id: 10
brand_id: 1
created_at: '2026-04-01 10:00:00'
plan:
id: 5
plan_name: 'Unlimited Plan'
brands:
id: 1
name: MyBrand
items:
type: object
properties:
transaction_id:
type: string
example: PUB123456
mdn:
type: string
example: '1234567890'
sim_no:
type: string
example: SIM123456
sim_type:
type: string
example: physical
status:
type: string
example: success
price:
type: string
example: '50.00'
total_price:
type: string
example: '55.00'
type:
type: string
example: activation
plan_id:
type: integer
example: 5
plan_details:
type: object
properties: { }
customer_id:
type: integer
example: 10
brand_id:
type: integer
example: 1
created_at:
type: string
example: '2026-04-01 10:00:00'
plan:
type: object
properties:
id:
type: integer
example: 5
plan_name:
type: string
example: 'Unlimited Plan'
brands:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: MyBrand
pagination:
type: object
properties:
total:
type: integer
example: 25
per_page:
type: integer
example: 10
current_page:
type: integer
example: 1
last_page:
type: integer
example: 3
next_page_url:
type: string
example: 'https://your-domain.com/api/customer/orders?page=2'
prev_page_url:
type: string
example: null
-
description: ''
type: object
example:
success: true
message: 'No orders found.'
data: []
pagination:
total: 0
per_page: 10
current_page: 1
last_page: 1
properties:
success:
type: boolean
example: true
message:
type: string
example: 'No orders found.'
data:
type: array
example: []
pagination:
type: object
properties:
total:
type: integer
example: 0
per_page:
type: integer
example: 10
current_page:
type: integer
example: 1
last_page:
type: integer
example: 1
500:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Error fetching orders'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Error fetching orders'
tags:
- Endpoints
'/api/customer/orders/{public_id}':
get:
summary: 'GET api/customer/orders/{public_id}'
operationId: gETApicustomerorderspublicId
description: "This endpoint retrieves the details of a specific order (transaction)\nfor the authenticated customer using the transaction's public ID.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: ''
type: object
example:
success: true
message: 'Orders fetched successfully.'
data:
transaction_id: PUB123456
mdn: '1234567890'
sim_no: SIM123456789
sim_type: physical
status: success
price: '50.00'
total_price: '55.00'
type: activation
plan_id: 5
plan_details:
plan_name: 'Unlimited Plan'
data: 10GB
validity: '30 days'
created_at: '2026-04-01 10:00:00'
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Orders fetched successfully.'
data:
type: object
properties:
transaction_id:
type: string
example: PUB123456
mdn:
type: string
example: '1234567890'
sim_no:
type: string
example: SIM123456789
sim_type:
type: string
example: physical
status:
type: string
example: success
price:
type: string
example: '50.00'
total_price:
type: string
example: '55.00'
type:
type: string
example: activation
plan_id:
type: integer
example: 5
plan_details:
type: object
properties:
plan_name:
type: string
example: 'Unlimited Plan'
data:
type: string
example: 10GB
validity:
type: string
example: '30 days'
created_at:
type: string
example: '2026-04-01 10:00:00'
-
description: ''
type: object
example:
success: false
message: 'No orders found.'
data: []
properties:
success:
type: boolean
example: false
message:
type: string
example: 'No orders found.'
data:
type: array
example: []
500:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Error fetching orders'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Error fetching orders'
tags:
- Endpoints
parameters:
-
in: path
name: public_id
description: 'The public ID of the transaction.'
example: PUB123456
required: true
schema:
type: string
'/api/customer/usage/{id}':
post:
summary: 'POST api/customer/usage/{id}'
operationId: pOSTApicustomerusageid
description: "This endpoint retrieves usage data (such as data, talk, and text usage)\nfor a specific transaction using its public ID.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**.\n\nFetch usage details for a transaction."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
data:
mdn: '1234567890'
data_used: 2.5GB
data_remaining: 7.5GB
talk_used: '120 mins'
text_used: '50'
plan: 'Unlimited Plan'
expiry_date: '2026-04-30'
properties:
success:
type: boolean
example: true
data:
type: object
properties:
mdn:
type: string
example: '1234567890'
data_used:
type: string
example: 2.5GB
data_remaining:
type: string
example: 7.5GB
talk_used:
type: string
example: '120 mins'
text_used:
type: string
example: '50'
plan:
type: string
example: 'Unlimited Plan'
expiry_date:
type: string
example: '2026-04-30'
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Transaction not found.'
data: null
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Transaction not found.'
data:
type: string
example: null
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'The public ID of the transaction.'
example: "PUB123456\n\n---"
required: true
schema:
type: string
/api/customer/autopays:
get:
summary: 'GET api/customer/autopays'
operationId: gETApicustomerautopays
description: "This endpoint retrieves a paginated list of autopay records for the authenticated customer.\nIt includes related transaction and plan details for each autopay.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**.\n\nFetch all autopays for the logged-in customer by brand."
parameters:
-
in: query
name: brand_id
description: 'The ID of the brand.'
example: 1
required: true
schema:
type: integer
description: 'The ID of the brand.'
example: 1
-
in: query
name: page
description: 'optional The page number for pagination.'
example: 1
required: false
schema:
type: integer
description: 'optional The page number for pagination.'
example: 1
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Autopays fetched successfully.'
data:
-
id: 1
trans_id: TXN123456
status: active
brand_id: 1
customer_id: 10
refill_date: '2026-04-20'
plan_id: 5
transaction:
id: 100
public_id: PUB123
status: completed
price: '50.00'
total_price: '55.00'
mdn: '1234567890'
created_at: '2026-04-01 10:00:00'
plan:
id: 5
plan_name: 'Unlimited Plan'
pagination:
total: 25
per_page: 10
current_page: 1
last_page: 3
next_page_url: 'https://your-domain.com/api/customer/autopays?page=2'
prev_page_url: null
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Autopays fetched successfully.'
data:
type: array
example:
-
id: 1
trans_id: TXN123456
status: active
brand_id: 1
customer_id: 10
refill_date: '2026-04-20'
plan_id: 5
transaction:
id: 100
public_id: PUB123
status: completed
price: '50.00'
total_price: '55.00'
mdn: '1234567890'
created_at: '2026-04-01 10:00:00'
plan:
id: 5
plan_name: 'Unlimited Plan'
items:
type: object
properties:
id:
type: integer
example: 1
trans_id:
type: string
example: TXN123456
status:
type: string
example: active
brand_id:
type: integer
example: 1
customer_id:
type: integer
example: 10
refill_date:
type: string
example: '2026-04-20'
plan_id:
type: integer
example: 5
transaction:
type: object
properties:
id:
type: integer
example: 100
public_id:
type: string
example: PUB123
status:
type: string
example: completed
price:
type: string
example: '50.00'
total_price:
type: string
example: '55.00'
mdn:
type: string
example: '1234567890'
created_at:
type: string
example: '2026-04-01 10:00:00'
plan:
type: object
properties:
id:
type: integer
example: 5
plan_name:
type: string
example: 'Unlimited Plan'
pagination:
type: object
properties:
total:
type: integer
example: 25
per_page:
type: integer
example: 10
current_page:
type: integer
example: 1
last_page:
type: integer
example: 3
next_page_url:
type: string
example: 'https://your-domain.com/api/customer/autopays?page=2'
prev_page_url:
type: string
example: null
500:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Error fetching autopays.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Error fetching autopays.'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'The id of an existing record in the brands table.'
example: 16
required:
- brand_id
'/api/customer/autopays/cancel/{id}':
post:
summary: 'POST api/customer/autopays/cancel/{id}'
operationId: pOSTApicustomerautopayscancelid
description: "This endpoint allows a customer to cancel an active autopay request.\n\nAuthentication:\nThis API requires authentication using a **Customer Bearer Token**.\n\nCancel an existing autopay using transaction ID."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
message: 'Autopay canceled successfully.'
data:
trans_id: TXN123456
status: disable
properties:
success:
type: boolean
example: true
message:
type: string
example: 'Autopay canceled successfully.'
data:
type: object
properties:
trans_id:
type: string
example: TXN123456
status:
type: string
example: disable
404:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Autopay not found.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Autopay not found.'
409:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Autopay is already canceled.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Autopay is already canceled.'
500:
description: ''
content:
application/json:
schema:
type: object
example:
success: false
message: 'Something went wrong while canceling the autopay.'
properties:
success:
type: boolean
example: false
message:
type: string
example: 'Something went wrong while canceling the autopay.'
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
brand_id:
type: integer
description: 'The ID of the brand.'
example: 1
required:
- brand_id
parameters:
-
in: path
name: id
description: 'The transaction ID of the autopay.'
example: TXN123456
required: true
schema:
type: string
/api/forgot-password:
post:
summary: ''
operationId: postApiForgotPassword
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address. The email of an existing record in the customers table.'
example: gbailey@example.net
required:
- email
/api/reset-password:
post:
summary: 'GET api/reset-password'
operationId: gETApiresetPassword
description: 'This API requires authentication using a customer token.This Endpoint allows you to reset your password'
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: "The user's email."
example: test@example.com
token:
type: string
description: 'Password reset token.'
example: abc123
password:
type: string
description: 'The new password. Must be at least 8 characters.'
example: secret123
password_confirmation:
type: string
description: 'Must match password.'
example: secret123
required:
- email
- token
- password
- password_confirmation
/api/validate-reset-token:
post:
summary: 'GET api/validate-reset-token'
operationId: gETApivalidateResetToken
description: 'This API requires authentication using a customer token.This Endpoint validate your token'
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address.'
example: gbailey@example.net
token:
type: string
description: ''
example: architecto
required:
- email
- token