Introduction Last updated: 04 March 2025
The Augmigo API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded or JSON request bodies, and returns JSON-encoded responses, with standard HTTP response codes.
The Augmigo API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded or JSON request bodies, and returns JSON-encoded responses, with standard HTTP response codes.
The Augmigo API uses Account Id, API key and basic authentication to authenticate requests. You can view and manage your Account Id and API key in the Settings>Integration.
Please keep Account Id, and API Key secure! Do not share your Account Id, and API key in publicly accessible areas such as GitHub, client-side code, and so forth.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without basic authentication token will also fail.
After successful authentication, a permission check decides if the user is allowed to perform the requested action. This check uses the existing permissions.
POST /api/v1/merchant/auth
| X-ACCT-Id | Account Id, Get it from Account > Integration |
|---|---|
| X-API-KEY | API Key, Get it from Account > Integration |
| X-OUTLET-KEY | Granted outlet key. Get it from Account > Outlet |
| Authorization |
Basic [Base64 encoded(username:password)]
In order to create Basic Authentication token. Then username and password is separated by colon. Which is [username]:[password]. Then base 64 encode the "[username]:[password]". The value of http header Authorization will be "Basic [Basic Authentication token]" |
curl -X POST \ --header "X-ACCT-ID: [Account Id]" \ --header "X-API-KEY:[Application Key]" \ --header "Authorization: Basic [Basic Authentication token]" https://api.augmigo.com//api/v1/auth
{
"x-auth-token": [autenticated token],
"expires_in_seconds": [authenticated token expires in seconds],
"username": [username],
"name": [Name of user],
"outlet_name": [Outlet name],
"granted_access": [Granted Access]
}
| auth_token | Authenticated token, which is required for next APIs call |
|---|---|
| expires_in_second | Length of life in second for authenticated token |
| granted_access | List of granted access. |
The API require auth_token and outlet_key in http header to manage customer details.
outlet_key is used to determine customer is registered from which outlet
POST /api/v1/customers/register GET /api/v1/customers/reference-code/[reference-code] PUT /api/v1/customers/reference-code/[reference-code] DELETE /api/v1/customers/reference-code/[reference-code]
| X-AUTH-TOKEN | Authenticated token |
|---|---|
| X-OUTLET-KEY | Granted outlet key |
Register a new customer account.
POST /api/v1/customers/register
| Field name | Description | Remark |
|---|---|---|
| name | Full name of customer | Mandatory |
| Email of customer | Either mobile phone or email is required | |
| birth_date | Customer date of birth. Format dd/mm/yyyy. E.g. 28/02/1990 | Optional |
| gender | Customer gender. Male - m, Female - f | Optional |
| mobile_phone | Mobile Phone of customer. Must international format e.g. +6012 345 6789 | Either mobile phone or email is required |
| merchant_reference_code | Merchant existing program member card no for reference purpose. | Optional |
| password | Customer signin password. Password must be md5 hashed. | Mandatory |
curl -X POST -H "Content-Type: application/json" \
-H "x-auth-token:[auth_token]" \
-H "x-outlet-key:[outlet_key]" \
-d '{"name":"Customer Test 1","gender": "m","birth_date":"06/10/1961","email":"custtest1@email.com","mobile_phone":"+60123451234","password": "e10adc3949ba59abbe56e057f20f883e"}' \
--url https://api.augmigo.com//api/v1/customers/register
| Type | Description | Remark |
|---|---|---|
| Success | Return created customer details with http code 200 | Reference code is required for read, update and delete API call. |
| Failed | ||
| Missing customer data | Customer data is required in json format in http body | |
| Email or mobile phone must be provided | Either email or mobile phone is required | |
| Email have been taken | If email have been used by other customer creation | |
| Mobile phone have been taken | If mobile phone have been used by other customer creation |
| Field name | Description | Remark |
|---|---|---|
| name | Full name of customer | |
| Email of customer | ||
| mobile_phone | Mobile Phone of customer. | International format e.g. +6012 345 6789 |
| birth_date | Customer date of birth. | Format dd-mm-yyyy. E.g. 28-02-1990 |
| gender | Customer gender. | Male - m, Female - f |
| reference_code | Customer reference code | 16 digits |
| merchant_reference_code | Merchant existing program member card no for reference purpose. | |
| is_email_verified | Boolean value to determine whether the email is verified | |
| is_mobile_phone_verified | Boolean value to determine whether the mobile phone is verified | |
| registered_datetime | Customer registered datetime. | Format dd-mm-yyyy HH:MM:SS. e.g. 09-04-2025 12:09:22 |
Success response with HTTP code 200
{
""birth_date": [birth date in format dd-mm-yyyy],
"customer_key": [customer key],
"email": [registered email],
"mobile_phone": [registered mobile phone],
"gender": [gender],
"is_email_verified": [bool value to determine email is verified],
"is_mobile_phone_verified": [bool value to determine mobile phone is verified],
"merchant_reference_code": [merchant reference code],
"name": [Customer name],
"reference_code": [customer account reference code],
"registered_datetime": [registered date time in format dd-mm-yyyy HH:MM:SS],
}
Failure response with HTTP code 500
{
"msg": ["Email or mobile phone must be provided"]
}
Failure response with HTTP code 500
{
"msg": ["Email have been taken"]
}
Retrieve customer account details.
GET /api/v1/customers/reference-code/[reference-code]
curl -X GET -H "Content-Type: application/json" \ -H "x-acct-id:[account id]" \ -H "x-auth-token:[auth_token]" \ --url https://api.augmigo.com//api/v1/customers/reference-code/[reference-code]
| Field name | Description | Remark |
|---|---|---|
| name | Full name of customer | Mandatory |
| Email of customer | Either mobile phone or email is required | |
| birth_date | Customer date of birth. Format dd/mm/yyyy. E.g. 28/02/1990 | Optional |
| gender | Customer gender. Male - m, Female - f | Optional |
| mobile_phone | Mobile Phone of customer. Must international format e.g. +6012 345 6789 | Either mobile phone or email is required |
| merchant_reference_code | Merchant existing program member card no for reference purpose. | Optional |
| Type | Description | Remark |
|---|---|---|
| Success | Return customer account details with http code 200 | Refer to customer field for details. |
| Failed | ||
| Return with http 400 |
{
""birth_date": [birth date in format dd-mm-yyyy],
"customer_key": [customer key],
"email": [registered email],
"mobile_phone": [registered mobile phone],
"gender": [gender],
"is_email_verified": [bool value to determine email is verified],
"is_mobile_phone_verified": [bool value to determine mobile phone is verified],
"merchant_reference_code": [merchant reference code],
"name": [Customer name],
"reference_code": [customer account reference code],
"registered_datetime": [registered date time in format dd-mm-yyyy HH:MM:SS],
}
Update customer account details.
PUT /api/v1/customers/reference-code/[reference-code]
| Field name | Description | Remark |
|---|---|---|
| name | Full name of customer | Mandatory |
| Email of customer | Either mobile phone or email is required | |
| birth_date | Customer date of birth. Format dd-mm-yyyy. E.g. 28-02-1990 | Optional |
| gender | Customer gender. Male - m, Female - f | Optional |
| mobile_phone | Mobile Phone of customer. Must international format e.g. +6012 345 6789 | Either mobile phone or email is required |
| merchant_reference_code | Merchant existing program member card no for reference purpose. | Optional |
| password | Customer signin password. Password must be md5 hashed. | Mandatory |
curl -X PUT -H "Content-Type: application/json" \
-H "x-auth-token:[auth_token]" \
-d '{"name":"Customer Test 1","gender": "m","birth_date":"06/10/1961","email":"custtest1@email.com","mobile_phone":"+60123451234","password": "e10adc3949ba59abbe56e057f20f883e"}' \
--url https://api.augmigo.com//api/v1/customers/reference-code/[reference-code]
| Type | Description | Remark |
|---|---|---|
| Success | Return HTTP code 200 | Reference code is required for read, update and delete API call. |
| Failed | ||
| Missing customer data | Customer data is required in json format in http body | |
| Email or mobile phone must be provided | Either email or mobile phone is required | |
| Email have been taken | If email have been used by other customer creation | |
| Mobile phone have been taken | If mobile phone have been used by other customer creation |
Success response in empty content with HTTP code 200
Failure response with HTTP code 500
{
'msg': ['Email or mobile phone must be provided']
}
Failure response with HTTP code 500
{
'msg': ['Email have been taken']
}
Delete a customer account.
DELETE /api/v1/customers/reference-code/[reference-code]
curl -X DELETE -H "Content-Type: application/json" \ -H "x-auth-token:[auth_token]" \ --url https://api.augmigo.com//api/v1/customers/reference-code/[reference-code]
| Type | Description | Remark |
|---|---|---|
| Success | Return with http code 204 | |
| Failed | ||
| Return with http 400 |
Give and read reward for customer REST API
GET /api/v1/customers/reward/reference-code/[reference-code] POST /api/v1/customers/reward/reference-code/[reference-code]/give
| X-AUTH-TOKEN | Authenticated token |
|---|---|
| X-OUTLET-KEY | Transact outlet key |
Submit transaction to earn reward based on transaction data. Customer reference_code is required for the API call. The transaction data is JSON format in request body.
POST /api/v1/reward/reference-code/[reference-code]/give
| Field name | Description | Remark | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sales_amount | Sales amount in currency of transaction. E.g. $12.00 | Mandatory | ||||||||||
| tax_amount | Tax amount in currency of transaction. E.g. $0.72 which is 6% of $12.00. Total sales amount to give reward should be sales_amount - tax_amount | Optional | ||||||||||
| transact_datetime |
Transaction datetime. If internet connection is not available, then the transaction record have to keep in local and call API when internet connection is available. Thus, the transaction datetime is important in such condition. Note: The transaction datetime format is dd-mm-yyyy HH:MM:SS. E.g. 15-01-2026 20:07:06 |
Optional | ||||||||||
| remarks | Remarks of transaction. Maximum 300 characters. | Optional | ||||||||||
| invoice_id | Transaction invocie id. | Optional | ||||||||||
| invoice_details |
Invoice details including purchased items in JSON format. Certain reward will be given if purchased certain product or service. Format:
{
"purchased_items": [
{
"SKU" : "SKU_1",
"count" : 1,
"subtotal_sales_amt" : xxxxx,
"subtotal_tax_amt" : xxxxx
},
{
"SKU" : "SKU_2",
"count" : 3,
"subtotal_sales_amt" : xxxxx,
"subtotal_tax_amt" : xxxxx
},
]
"pax_acount": 1
}
|
Optional |
curl -X POST -H "Content-Type: application/json" \
-H "x-auth-token:[auth_token]" \
-H "x-outlet-key:[outlet_key]" \
-d '{"sales_amount":100.00,"invoice_id": "XXXXXXXX","tax_amount": 6.0,"invoice_details":{"purchased_items": [{"SKU" : "SKU_1","count" : 1,"subtotal_sales_amt" : 100.00,"subtotal_tax_amt" : 6.0}],"pax_count":1}}' \
--url https://api.augmigo.com//api/v1/reward/reference-code/[reference-code]/give
| Type | Description | Remark | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Success |
Return transaction id, entitled reward summary and entitled voucher summary with http code 200
|
Transaction Id is required for read transaction API call. | ||||||||
| Failed | Return error message with http code 400 |
Success response with HTTP code 200
{
"entitled_reward_summary": {
"point": {
"amount": 188.0,
"latest_expiry_date": "[expiry date in dd-mm-yyyy format]"
},
"stamp": {
"amount": 1.0,
"latest_expiry_date": "[expiry date in dd-mm-yyyy format]"
}
},
"entitled_voucher_summary":[
{
"voucher_program_key": [Vouche program key],
"amount": 1,
"effective_date" : "[effective date in dd-mm-yyyy format]",
"expiry_date" : "[expiry date in dd-mm-yyyy format]",
"image_url" : "[voucher image url]",
"label" : "XXXXXXXX XXXX"
}
],
"transaction_id": "XXXXXXXXXXXXXXX"
}
Failure response with HTTP code 500
{
"msg":[
"Sales Amount is required"
]
}
Read reward summary to show customers entitled reward such as Point, Stamp, Prepaid Credit and etc.
GET /api/v1/reward/reference-code/[reference-code]
curl -X GET -H "x-auth-token:[auth_token]" \ --url https://api.augmigo.com//api/v1/reward/reference-code/[reference-code]
| Type | Description | Remark | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Success |
Return reward summary with http code 200
|
|||||||||||||||||||
| Failed | Return error message with http code 400 |
Success response with http code 200
{
"entitled_reward_summary": {
"point": 4254.0,
"prepaid": 668.8,
"stamp": 23.0,
"vouchers": [
{
"effective_date": [effective date in format dd-mm-yyyy],
"expiry_date": [expiry date in format dd-mm-yyyy],
"image_url": [voucher image url],
"label": "10% Discount",
"redeem_code": "vQbduaCKGxDe",
"voucher_program_key": [voucher program key]
},
{
"effective_date": [effective date in format dd-mm-yyyy],
"expiry_date": [expiry date in format dd-mm-yyyy],
"image_url": [voucher image url],
"label": "RM10",
"redeem_code": "AWo1T6MxkyGa",
"voucher_program_key": [voucher program key]
},
{
"effective_date": [effective date in format dd-mm-yyyy],
"expiry_date": [expiry date in format dd-mm-yyyy],
"image_url": [voucher image url],
"label": "RM25",
"redeem_code": "UaxhedSP9ms8",
"voucher_program_key": [voucher program key]
},
]
}
Read and redeem voucher REST API
GET /api/v1/vouchers/redeem-code/[redeem code] POST /api/v1/vouchers/redeem
| X-AUTH-TOKEN | Authenticated token |
|---|---|
| X-OUTLET-KEY | Transact outlet key |
Read customer entitled voucher details
GET /api/v1/vouchers/redeem-code/[redeem code]
curl -X GET -H "x-auth-token:[auth_token]" \ --url https://api.augmigo.com//api/v1/vouchers/[voucher redeem code]
| Type | Description | Remark | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Success |
Return voucher details with http code 200
|
|||||||||||||||||||||
| Failed | Return error message with http code 400 |
{
"voucher_details": {
"configuration": {
"cash": 10,
"currency_code": "usd",
"label": "$10 Cash Voucher"
},
"desc": "Allow to rebate $10 in single receipt",
"effective_date": "XX-XX-XXXX",
"expiry_date": "XX-XX-XXXX",
"image_url": "https://www.xxxx.xxxx",
"label": "$ 10 Cash Voucher",
"redeem_code": "XXXXXXXXX",
"terms_and_conditions": "Rebate $ 10 in single receipt"
}
}
Redeem customer entitled voucher with customer reference_code. The redemption data is JSON format in HTTP request body.
POST /api/v1/vouchers/redeem
| Field name | Description | Remark |
|---|---|---|
| redeem_code | Voucher redeem code in array list. E.g. ["xxxxxxxx", "xxxxxxxxx", "xxxxxxxxxxx"] | Mandatory |
| redeem_datetime |
Redeem voucher datetime. If internet connection is not available, then the redemption record have to keep in local and call API when internet connection is available. Thus, the redeem datetime is important in such condition. Note: The redeem datetime format is dd-mm-yyyy HH:MM:SS. E.g. 15-01-2026 20:07:06 |
Optional |
| remarks | Remarks of transaction. Maximum 300 characters. | Optional |
| invoice_id | Redeem invocie id. | Optional |
curl -X GET
-H "x-auth-token:[auth_token]" \
-H "x-outlet-key:[outlet_key]" \
-d '{"redeem_code":['xxxxxx','xxxxxx'],"invoice_id": "XXXXXXXX","remarks": "xxxxxxx"}"' \
--url https://api.augmigo.com//api/v1/vouchers/[customer reference code]
| Type | Description | Remark |
|---|---|---|
| Success | Return transaction ID with http code 200 | |
| Failed | Return error message with http code 400 |
{
"transaction_id": "xxxxxxxxxxxx"
}
The API require auth_token and outlet_key in http header to manage membership.
outlet_key is used to determine membership is managed from which outlet
POST /api/v1/customer-membership/customer/reference-code/[reference-code]/assign-membership GET /api/v1/customer-membership/customer/reference-code/[reference-code] DELETE /api/v1/customer-membership/customer/reference-code/[reference-code]/remove-membership
| X-AUTH-TOKEN | Authenticated token |
|---|---|
| X-OUTLET-KEY | Granted outlet key |
Read customer membership details.
GET /api/v1/customer-membership/customer/reference-code/[reference-code]
curl -X GET -H "Content-Type: application/json" \ -H "x-acct-id:[account id]" \ -H "x-auth-token:[auth_token]" \ --url https://api.augmigo.com//api/v1/customer-membership/customer/reference-code/[reference-code]
| Type | Description | Remark |
|---|---|---|
| Success | Return list of customer membership details | Refer to customer membership response for details. |
| Failed | ||
| Return with http 400 |
| Type | Description | Remark |
|---|---|---|
| desc | Description of membership program | |
| label | Label of membership program card | |
| entitled_date | Entitled date | In format dd-mm-yyyy |
| expiry_date | Expiry date | In format dd-mm-yyyy |
| terms_and_conditions | Terms and conditions of the membership program |
Success reponse with HTTP code 200
[
{
"desc": [Description],
"entitled_date": [entitled date in format dd-mm-yyyy],
"expiry_date": [expiry date in format dd-mm-yyyy],
"label": [Membership card label],
"terms_and_conditions": [Terms and conditions]
}
]
Assign membership to customer.
POST /api/v1/customer-membership/customer/reference-code/[reference-code]/assign-membership
| Field name | Description | Remark |
|---|---|---|
| membership_key | Key of membership program | Mandatory |
| number_of_year | Number of year | Optional |
curl -X POST -H "Content-Type: application/json" \
-H "x-auth-token:[auth_token]" \
-H "x-outlet-key:[outlet_key]" \
-d '{"membership_key":[membership key]}' \
--url https://api.augmigo.com//api/v1/customer-membership/customer/reference-code/[reference-code]/assign-membership
| Type | Description | Remark |
|---|---|---|
| Success | Return http code 200 | |
| Failed | ||
| Missing membership program key, with http code 500 | Merchant membership program key is required in json format in http body | |
| The customer membership has already been assigned, with http code 500 | The membership have been assigned |
Success response with HTTP code 200
Failure response with HTTP code 500
{
"msg": ["Missing membership program key"]
}
Failure response with HTTP code 500
{
"msg": ["The customer membership has already been assigned"]
}