
<div style="text-align: center; font-size: 35px">
MGCC Portal API Documentation
</div>
---
# Copyright Information
**Maxs Group Inc - IT Application Development**<br>
3rd Floor KDC Plaza Building<br>
Chino Roces Avenue. Makati City, 1231<br>
Email: appdev@maxsgroupinc.com
---
# Confidentiality and Usage
<div style="text-align: justify">The information contained in this document (and any attachments) is a confidential information provided
by MGI IT - Application Development. This document is intended only for use by merchants approved by MGI.<br><br>
Any copying, distribution or dissemination of this document by any other parties is prohibited.</div>
---
# Revision History
| Revision | Date | Revision Description |
| -------- | --------------- | -------------------- |
| 0.0 | August 11, 2021 | Final Draft Issue |
| 0.1 | November 2, 2021| Data Dictionary |
| 1.0 | September 1, 2022| Data flow|
| 1.1 | January 20, 2023| Additional Response and Delivery address API|
| 1.2 | January 31, 2023| Additional Data Parameter and Best paired API|
| 1.3 | Febuary 14, 2023| Additional Data Parameter and Notes|
| 1.4 | Febuary 17, 2023| Check store status API change date to time format |
| 1.5 | Febuary 20, 2023| Additional Data Parameter (extended service time) |
| 1.6 | Febuary 20, 2023| Single Customer View, Province and City API |
| 1.7 | Febuary 21, 2023| Delivery Zones API |
| 2.0 | March 01, 2023 | Version 2 |
| 2.1 | March 10, 2023 | Place order error response |
| 2.2 | March 22, 2023 | Additional payment_id parameter |
| 2.3 | April 5, 2023 | Remove brand_id in check store cater |
---
# API
## RTA Map API
### Delivery Zones
<p>This API is used to check stores delivery zones.</p>
For brand list definition
> See full list [here](#Data-Parameter-Definitions).
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/delivery-zones
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/delivery-zones
---
| **FUNCTION** | Check stores delivery zones |
| - | -|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>}|
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/deliveryzonebody.JPG" width="170"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/deliveryzonesuccess1.JPG" width="350"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/deliveryzonefailed.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Store Assignment
<p>This API is used to check store assignment.</p>
For brand list definition
> See full list [here](#Data-Parameter-Definitions).
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/check-store-cater
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/check-store-cater
---
| **FUNCTION** | Check store assignment |
| - | - |
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>}|
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/storecaterbody.JPG" width="200"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/storecatersuccess.JPG" width="350"><br><img src="https://mgi-deliveryportal.s3.amazonaws.com/storecatersuccess1.JPG" width="350"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/ota.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Store Check Status
<p>This API is used to check the store status.</p>
For brand list definition
> See full list [here](#Data-Parameter-Definitions).
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/check-store-status
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/check-store-status
---
| **FUNCTION** | Check store status |
| - | - |
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <br><img src="https://mgi-deliveryportal.s3.amazonaws.com/storecheckbody.JPG" width="300"><br><br><span style="color:red">***Note transaction_date_time - 24hrs time format: (H:i:s)</span>***<br> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/storechecksuccess.JPG" width="400"><br><br><span style="color:red">***Note: add extended_service_time on top of the promise_time</span>***<br> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/storecheckerror.JPG" width="400"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Store Details
<p>This API is to get store details by brand.</p>
For brand list definition
> See full list [here](#Data-Parameter-Definitions).
>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/store-list
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/store-list
| **FUNCTION** | Get store details |
| - | - |
| **METHOD** | GET |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/deliveryzonebody.JPG" width="150"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/storelistsuccess.JPG" width="400"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/storelisterror.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
## Menu API
### Menu Products v1
<p>This API is to check all menu of the store.</p>
For brand list and transaction type definitions
> See full list [here](#Data-Parameter-Definitions).
For menu exploration use 1 as default transaction_id and pricelist_id.
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/menu-products
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/menu-products
---
| **FUNCTION** | Menu Products |
| - | - |
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <br><img src="https://mgi-deliveryportal.s3.amazonaws.com/menubody.JPG" width="240"><br><br><span style="color:red">***Note transaction_date format: (Y-m-d)***</span><br> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/menusuccess.JPG" width="400"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/menuerror.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Menu Best Paired With
<p>This API is used to view best paired product.</p>
For brand list and transaction type definitions
> See full list [here](#Data-Parameter-Definitions).
For menu exploration use 1 as default transaction_id and pricelist_id.
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/best-paired
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/best-paired
---
| **FUNCTION** | Menu Best Paired |
|-|-|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <br><img src="https://mgi-deliveryportal.s3.amazonaws.com/bestpairedbody.JPG" width="250"><br><br><span style="color:red">***Note date format: (Y-m-d h:i:s)***</span><br> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/bestpairedsuccess.JPG" width="400"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/bestpairederror.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
## Customer API
### Registration
<p>This API is used for customer registration.</p>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/customer-registration
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/customer-registration
---
| **FUNCTION** | Customer registration |
|-|-|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <br><img src="https://mgi-deliveryportal.s3.amazonaws.com/registerbody.JPG" width="400"> <br><br><span style="color:red">*Note: scv_id can get in Single Customer View API*</span> |
| **DATA DEFINITION** | Password Encryption: md5 |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/registersuccess1.JPG" width="300"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/registererror.JPG" width="400"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Login v1
<p>This API is used for customer login.</p>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/customer-login
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/customer-login
---
| **FUNCTION** | Customer Login |
|-|-|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/loginbody.JPG" width="350"> |
| **DATA DEFINITION** | Password Encryption: md5 |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/loginv1success.JPG" width="400"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/loginerror.JPG" width="250"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Login v2
<p>This API is used for customer login and get customer delivery addresses.</p>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/customer-login-v2
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/customer-login-v2
---
| **FUNCTION** | Customer Login |
|-|-|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/loginbody.JPG" width="350"> |
| **DATA DEFINITION** | Password Encryption: md5 |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/loginv2success.JPG" width="400"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/loginerror.JPG" width="250"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Update Customer
<p>This API is used for updating customer info.</p>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/customer-update
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/customer-update
---
| **FUNCTION** | Update Customer |
|-|-|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/customerupdatebody.JPG" width="300"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/customerupdatesuccess.JPG" width="400"> |
| **ERROR RESPONSE** | Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Delivery Address
<p>This API is used for customer delivery address.</p>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/customer-addresses
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/customer-addresses
---
| **FUNCTION** | Customer Delivery Address |
|-|-|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/deladdbody.JPG" width="200"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/deladdsuccess.JPG" width="400">
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/deladderror.JPG" width="300">`<br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Update Delivery Address
<p>This API is used for updating customer delivery address.</p>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/update-customer-addresses
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/update-customer-addresses
---
| **FUNCTION** | Update Customer Delivery Address |
|-|-|
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/delupdatebody.JPG" width="350"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/delupdatesuccess.JPG" width="300">
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/delupdateerror.JPG" width="250">`<br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
## Order API
### Place Order
<p>This API is used for saving order</p>
>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/save-orders
---
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/save-orders
---
| **FUNCTION** | Place Order API |
| - | - |
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <br><img src="https://mgi-deliveryportal.s3.amazonaws.com/placeorderbody.JPG" width="350"><br><img src="https://mgi-deliveryportal.s3.amazonaws.com/placeorderbody1.JPG" width="350"><br><br><span style="color:red">***Note: <br> If customer uses exisitng delivery address, the dlvry_address_id can get in Delivery Address API.<br>If customer use new delivery address, dlvry_address_id = NEW<br><br>cutleries values With Cutleries or Without Cutleries<br><br>If item_options is empty. The format should be in a object json. "item_options": [{}]<br>***</span><br>
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/placeordersuccess.JPG" width="350"> |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/placeordererror2.JPG" width="350"><br>Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/placeordererror1.JPG" width="300"><br>Status: 400<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/placeordererror.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Order Tracker
<p>This API is used for order tracking.</p>
For brand list definition
> See full list [here](#Data-Parameter-Definitions).
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/order-tracker
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/order-tracker
---
| **FUNCTION** | Order Tracking |
| - | - |
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/ordertrackerbody.JPG" width="200"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/ordertrackersuccess.JPG" width="400"><br><br><span style="color:red">***Note status_id reference:***</span><br>0 = order float<br>1 = order assigned to store<br>2 = order accepted<br>3 = order on the way<br>4 = completed |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/ordertrackererror.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
### Payment Status
<p>This API is used for checking of payment status.</p>
- DEVELOPMENT
https://913ccbjb8e.execute-api.ap-southeast-1.amazonaws.com/development/check-payment
---
- PRODUCTION
https://mgcc-api.maxsgroupinc.com/check-payment
---
| **FUNCTION** | Payment Status|
| - | - |
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | <img src="https://mgi-deliveryportal.s3.amazonaws.com/paymentbody.JPG" width="200"> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/paymentsuccess.JPG" width="350"><br><br><span style="color:red">***Note payment_status reference:***</span><br>COMPLETED = Customer paid successfully<br>REJECTED = Credit/Debit Card failed<br>INCOMPLETE = Payment Incomplete |
| **ERROR RESPONSE** | Status: 202<br>Sample Response Body:<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/paymenterror.JPG" width="300"><br>Status: 500<br>Sample Response Body<br><img src="https://mgi-deliveryportal.s3.amazonaws.com/missingparam.JPG" width="300"> |
---
## Rider App Timestamps update
<p>This API is used for updating order status timestamps.</p>
- DEVELOPMENT
https://bqnlrsmifj.execute-api.ap-southeast-1.amazonaws.com/Development
---
- PRODUCTION
https://bqnlrsmifj.execute-api.ap-southeast-1.amazonaws.com/Production
---
| **FUNCTION** | RiderApp Update |
| - | - |
| **METHOD** | POST |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | ```{```<br> ```status:""```<br> ```ticket:""```<br> ```datetime:""```<br> ```rider_name:""``` <br>```}``` |
| **DATA DEFINITION** | **Status parameters**: <br> <br> **storein** = rider arrived to the store<br>**storeout** = rider on its way to customer<br> **vicinityin** = rider within the customer vicinity <br> **served** = rider served the order to customer <br> **remit** = rider remit the cash in store <br><br> **ticket number: ** order_id = ticket<br><br> **date time format:** yyyy-mm-dd hh:mm:ss|
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br>```{```<br> ```"code": 200,```<br> ```"message": ""SUCCESS: Successfully Updated Timelogs"",```<br> ``` ``` <br>```}```<br><br>***Note payment_status reference:***<br>COMPLETED = Customer paid successfully<br>REJECTED = Credit/Debit Card failed<br>INCOMPLETE = Payment Incomplete |
| | |
| **ERROR RESPONSE** | Status: 69<br>Sample Response Body:<br>```{```<br> ```"code": 69,```<br> ```"message":"Failed, Order ID Not found" ,```<br> ```"data:{}```<br>```}```
---
## Single Customer View
### Check and Create Customer
<p>This API is used for checking and creating a customer.</p>
>
- DEVELOPMENT
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/DEV/checkcustomer
---
- PRODUCTION
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/Production/createcustomer
---
| **FUNCTION** | Check and Create Customer |
| - | - |
| **METHOD** | GET |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | ```{```<br> ```first_name:"Foo",```<br> ```last_name:"Bar",```<br> ```email_address:"foo@bar.com",```<br> ```mobile_number:"9776592285",```<br> ```municipality:"City of Makati",```<br> ```province:"Metro Manila",```<br> ```birthday:"0000-12-31",```<br> ```gender:"M",```<br> ```source:"PROJECT NAME"``` <br>```}```<br><br><span style="color:red">*Note: Province (from Province List API) & Municipality (from Citylist API)</span> |
| **DATA DEFINITION** |first_name- String <br>last_name- String<br>email_address - String<br>mobile_number- int(10)<br>municipality- String<br>province - String<br>birthday- String(YYYY-MM-DD)<br>gender - String(1)<br>Source - String |
| **SUCCESS RESPONSE** | **<span style="color:blue">If inputted email_address, first_name, and last_name already exist in the database. </span>**<br>Status: 100<br>Sample Response Body:<br>```{```<br> ```"code": 100,```<br> ```"message": "SUCCESS: Successfully created user",```<br> ```"data": {``` <br> ```"id": "MGI126",```<br> ```"status": "exist-accepted",```<br> ```}```<br>```}```<br><br><span style="color:red">*Note: Return id from data is the SCV Customer_id</span><br><br>**<span style="color:blue">If inputted email_address already exist in the database, but first_name, and last_name is not equal .</span>**<br>Status: 69<br>Sample Response Body:<br>```{```<br> ```"code": 69,```<br> ```"message": "Warning: User already exists! (Duplicate customer/contact details)",```<br> ```"data": {``` <br> ```"id": "MGI126",```<br> ```"status": "exist-conflict",```<br> ```}```<br>```}```<br><br><span style="color:red">*Note: Return id from data is the SCV Customer_id</span><br><br>Status: 404<br>Sample Response Body:<br>```{```<br> ```"code": 404,```<br> ```"message": "Insufficient number of arguments passed.Expected 14 got 13"```<br>```}```<br><br> |
| **ERROR RESPONSE** | **Code** : 1000<br>**Description**: Query runtime error. See logs associated with the error response<br><br>**Code** : 2003<br>**Description** : Cannot establish connection to MySQL Server<br><br>|
---
### Update Customer Details
<p>This API is used for updating customer info.</p>
>
- DEVELOPMENT
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/DEV/updatecust
---
- PRODUCTION
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/Production/updatecustomer
---
| **FUNCTION** | Update Customer Details |
| - | - |
| **METHOD** | GET |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | ```{```<br> ```scvid:"MGI11",```<br> ```first_name:"Foo",```<br> ```last_name:"Bar",```<br> ```email_address:"foo@bar.com",```<br> ```other_contact_no:"91111111",```<br> ```mobile_number:"9776592285",```<br> ```country:"PH",```<br> ```municipality:"City of Makati",```<br> ```province:"Metro Manila",```<br> ```town:"Metro Manila",```<br> ```address:"house no, street,brgy, district",```<br> ```birthday:"0000-12-31",```<br> ```gender:"M",```<br> ```source:"PROJECT NAME"``` <br>```}```<br><br><span style="color:red">*Note: Province (from Province List API) & Municipality (from Citylist API)</span> |
| **DATA DEFINITION** | customer_id- String<br>first_name- String<br>last_name- String<br>email_address - String<br>mobile_number- int(10)<br>municipality- String<br>province - String<br>birthday- String(YYYY-MM-DD)<br>gender - String(1)<br>Source - String |
| **SUCCESS RESPONSE** | **<span style="color:blue">If inputted email_address already exist in the database.</span>**<br>Status: 100<br>Sample Response Body:<br>```{```<br> ```"code": 100,```<br> ```"message": "SUCCESS: User Details Successfully Updated",```<br> ```"data": {``` <br> ```"id": "MGI126",```<br> ```"status": "updated",```<br> ```}```<br>```}```<br><br><span style="color:red">*Note: Return value from data is the SCV Customer_id</span><br><br>**<span style="color:blue">If new inputted email_address already exist in the database</span>**<br>Status: 69<br>Sample Response Body:<br>```{```<br> ```"code": 69,```<br> ```"message": "Warning: Email Address Already Taken!",```<br> ```"data": {``` <br> ```"id": "MGI126",```<br> ```"status": "conflict",```<br> ```}```<br>```}```<br><br><span style="color:red">*Note: Return id from data is the SCV Customer_id</span><br><br>Status: 404<br>Sample Response Body:<br>```{```<br> ```"code": 404,```<br> ```"message": "Insufficient number of arguments passed.Expected 14 got 13"```<br>```}```<br><br> |
| **ERROR RESPONSE** | **Code** : 1000<br>**Description**: Query runtime error. See logs associated with the error response<br><br>**Code** : 2003<br>**Description** : Cannot establish connection to MySQL Server<br><br>|
---
### Opt-in
<p>This API is used for sending special offers,news and updates to the customer</p>
>
- DEVELOPMENT
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/DEV/optincustomer
---
- PRODUCTION
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/Production/optincustomer
---
| **FUNCTION** | Opt-in |
| - | - |
| **METHOD** | GET |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | ```{```<br> ```brand:"4",```<br> ```scvid:"143",```<br> ```source:"PROJECT NAME"``` <br>```}```<br><br> |
| **DATA DEFINITION** | brand - Int<br>scvid - int <br>source - String |
| **SUCCESS RESPONSE** | Status: 69<br>Sample Response Body:<br>```{```<br> ```"code": 69,```<br> ```"message": "Warning: Opt-in Failed",```<br> ```"data": False``` <br>```}```<br><br>Status: 200<br>Sample Response Body:<br>```{```<br> ```"code": 200,```<br> ```"message": "SUCCESS: Successfully Opt-in"```<br>```}```<br><br>Status: 404<br>Sample Response Body:<br>```{```<br> ```"code": 404,```<br> ```"message": "Insufficient number of arguments passed.Expected 14 got 13"```<br>```}```<br><br> |
| **ERROR RESPONSE** | **Code** : 1000<br>**Description**: Query runtime error. See logs associated with the error response<br><br>**Code** : 2003<br>**Description** : Cannot establish connection to MySQL Server<br><br>|
---
### Province List
<p>This API is used for getting all the provinces.</p>
>
- DEVELOPMENT
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/DEV/provincelist
---
- PRODUCTION
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/Production/provincelist
---
| **FUNCTION** | Province List |
| - | - |
| **METHOD** | GET |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | ```{}```<br> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br>```{```<br> ```"code": 100,```<br> ```"message": "SUCCESS",```<br> ```"data": {Provinces}```<br>```}```<br><br>Status: 404<br>Sample Response Body:<br>```{```<br> ```"code": 404,```<br> ```"message": "Insufficient number of arguments passed.Expected 14 got 13"```<br>```}```<br><br> |
| **ERROR RESPONSE** | **Code** : 1000<br>**Description**: Query runtime error. See logs associated with the error response<br><br>**Code** : 2003<br>**Description** : Cannot establish connection to MySQL Server<br><br>|
---
### City List
<p>This API is used for getting all the cities per province.</p>
>
- DEVELOPMENT
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/DEV/citylist
---
- PRODUCTION
https://e30852sr65.execute-api.ap-southeast-1.amazonaws.com/Production/citylist
---
| **FUNCTION** | City List |
| - | - |
| **METHOD** | GET |
| **HTTP HEADERS** | Content-Type: application/json<br> x-api-key: {<span style="color:red">*Note: API key to be sent separately*</span>} |
| **DATA PARAMS** | ```{}```<br> |
| **SUCCESS RESPONSE** | Status: 200<br>Sample Response Body:<br>```{```<br> ```"code": 100,```<br> ```"message": "SUCCESS",```<br> ```"data": {Cities}```<br>```}```<br><br>Status: 404<br>Sample Response Body:<br>```{```<br> ```"code": 404,```<br> ```"message": "Insufficient number of arguments passed.Expected 14 got 13"```<br>```}```<br> |
| **ERROR RESPONSE** | **Code** : 1000<br>**Description**: Query runtime error. See logs associated with the error response<br><br>**Code** : 2003<br>**Description** : Cannot establish connection to MySQL Server<br><br>|
---
# Data Parameter Definitions
Table Name: **brands**
Note:
active column ->( 1 = activated, 0 = deactivated)
default_trans -> please refe to the transaction_type table
default_pricelist -> please refer to the
| brand | brand_code | brand_name | active | default_trans | default_pricelist |
| --- | --- | --- | --- | --- | --- |
| 1 | MAXS | Maxs Restaurant | 1 | 1 | 1 |
| 2 | KK | Krispy Kreme | 1 | 1 | 1 |
| 3 | YC | Yellow Cab Pizza - Inactive | 0 | 1 | 1 |
| 4 | PCK | Pancake House | 1 | 1 | 1 |
| 5 | TBOY | Teriyaki Boy | 1 | 1 | 1 |
| 7 | TCRS | The Chicken Rice Soup | 0 | 1 | 1 |
| 8 | JJ | Jamba Juice | 1 | 1 | 1 |
| 9 | DEN | Dencios | 1 | 1 | 1 |
| 10 | MER | Yellow Cab 2 | 0 | 1 | 1 |
| 11 | MCB | Max's Corner Bakery | 0 | 1 | 1 |
| 12 | KABI | Kabisera ni Dencios | 1 | 1 | 1 |
| 13 | MPL | Maple | 0 | 1 | 1 |
| 14 | SING | Singkit | 0 | 1 | 1 |
| 15 | LCDF | Le Coeur De France | 0 | 1 | 1 |
| 16 | MGI | Maxs Group Inc | 1 | 1 | 1 |
| 17 | YC | Yellow Cab Pizza Co. | 1 | 1 | 1 |
| 18 | FC | Fun Chao | 1 | 1 | 1 |
Table Name: **transaction_type**
| id | trans_code | trans_name |
| --- | --- | --- |
| 1 | deliveryNow | Now |
| 2 | deliveryLater | Deliver later |
| 3 | pickup | Inside store |
| 4 | dinein | Dine-in |
| 5 | curbside | Curbside® pick-up point |
Use in Place order API **payment_options** column.
| payment_id | payment_options |
| --- | --- |
| 1 | Cash on Delivery |
| 2 | Credit Card on Delivery |
| 3 | Pay Online via Credit Card/Debit Card |
| 7 | Globe GCash |
| 359 | BPI Bank Online Transfer |
| 357 | ShopeePay |
| 372 | TendoPay |