1.0 API Overview

The purpose of this documentation is to provide a programmer’s guide to connect with MEZZOFY COUPON PORTAL. To do this, SOME MINOR PROGRAMMING VIA JAVA or any programming language (PHP, ASP.NET or Ruby, etc) that interfaces with the web server must be performed by the merchant’s. This documentation provides sample code to demonstrate how to connect and receive the relevant information variables back into your website or apps (iOS and Android) via some programming.


1.1 What is Mezzofy Digital Coupon

The MEZZOFY COUPON PORTAL is a secure customer engagement engine that provides an interface for website or apps that requires real-time digital coupon and digital payment processing. The merchant’s server can connect via https with the MEZZOFY COUPON PORTAL to get a real-time digital coupon and digital payment authorization. It is up to the merchant to do whatever pre and post-processing that is required, such as storing coupon / wallet information, sending email notification, and logging of coupon / wallet transactions.


1.2 General Use

The merchant's website or apps must be able to generate a unique Userid and Running Number for the coupon transaction and have a URL that is a working script for the MEZZOFY COUPON PORTAL to return the authorization information.

What can I do with the MEZZOFY COUPON PORTAL API?

With the APIs, you can:

Merchant

Module Description
Merchant Merchant Profile Management
View/Create/Update
Merchant Site Merchant Site Management
View/Create/Update
Merchant User Merchant User Management
View/Create/Update
Coupon Coupon Management
View/Create/Update
Payment Payment Management
Support PayPal Express
Support GlobalPay
Customer Customer Management
View/Create/Update
Push Notification Push Notification Management for Merchant and Customer
View/Create

Customer

Module Description
Customer Customer Profile Management
Membership Membership Management
Membership Tier
Loyalty Points Loyalty Points Management
Reward Points
Support Top Up
Support Redeem
Welcome Points
Birthday Points

1.3 Development Requirement

The responsibility of linking a web site with Mezzofy to the owner of the apps or website or whoever is responsible for the website in general. Thoughts Igniter support staff will try their best to assist, but not responsible for ensuring that a website or apps is programmed properly for use with Mezzofy. Merchants that are unable to implement the HTML/CGI/ASP/JSP/PHP/ASP.NET requirements for using Mezzofy should consult with a web designer/web programmer/apps designer/apps programmer for assistance.

In order to use Mezzofy, you must have a few additional lines of HTML code placed in the web page file that represents the final coupon page of a website or native apps programming code.

The following guidelines are intended to identify the Mezzofy requirements and provide basic HTML code snippet examples of how to implement these requirements.


1.4 API Endpoints and SSL

API endpoints are mapped to your account domain:

http://domain.mezzofy.com/path/to/api

When you have configured SSL in your account (see how to configure SSL), your API calls must point to the SSL endpoint—simply change the http:// part of the endpoint to https://.

https://domain.mezzofy.com/path/to/api

For brevity, all further references in document relating to API endpoints will use the default http.


1.5 Authentication

How does it work? Who can access my CRM? Can everybody see my data?

"Thou shall not pass." Unless you authenticate your ID

Mezzofy uses Oauth1.0a Authorization with HMAC-SHA1. This means, for authentication, you can use the same username and password you use when logging into your CRM. Or, you can use your personal API key and secret provided by us.

https://domain.mezzofy.com/path/to/api

Where can I find my API key?
  • Login to your Mezzofy Account
  • Go to Settings > API Keys
  • Your API Key is already pre-generated

How do I access the information? What are the resources available via the API?

Every single piece of information or data - be it a customer's ID or the coupon ID - can be identified by its own unique identifier or "URL". If you want your data from the CRM, whether via your smartphone app or via a third party service, you need this identifier. All URIs follow a specific format and that format is:

http://domain.mezzofy.com/resource_name

Note:

We have shortened API resource URL throughout this document. Prefix your support domain name to the resource handle.

What API commands are used by Mezzofy?

Mezzofy APIs have been implemented as plain JSON over HTTP and use the following REST Commands:

Method / Command Purpose
POST Create one or more records
GET Fetch one or more records
PUT Update one or more records
DELETE Remove one or more records

Will everyone have the same access rights?

No, certainly not. You can access the data depends on the permissions available in the Mezzofy profile and you can able to view the data that belongs to you.


1.6 Pagination

Whenever API response returns a list like coupon listing, merchant list requires paginated. Instead of scroll through the responses, add GET request parameter page=[n] (n=page number) to your request. By default Page number starts with 1 and each page size contains 20 records.



2.0 Country / Location

Represents a country and location(s) within a country. Merchant is associated with a country and merchant outlet is associated with a location(s). Merchant will be created along with country via "Create New Merchant" API. The id of the country will be same as that of associated merchant id if not explictly set. Merchant Outlet will be created along with location via "Create New Merchant Outlet" API. The id of the location will be same as that of associated merchant id if not explictly set.

2.1 View Country List

Retrieves the list of Countries.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Country Attributes

Field Type Description
countryCode CHAR[2] Country Code
countryName CHAR[250] Country Name
countryStatus CHAR[1] Country Status
"A" = Active
"N" = Not Active
Country Code Country Name
HK Hong Kong
MC Macau
CN China
SG Singapore
TW Taiwan
KR Korea
JP Japan
TH Thailand
MY Malaysia
PH Philippines
ID Indonesia
IN India
AU Australia
US United States
EU Europe
Method: GET
2.1.1 - Returns the number of total records.
URL: http://platform.mezzofy.com/api/v1/countries

2.1.2 - Get the Country list.
URL: http://platform.mezzofy.com/api/v1/countries?page=[n]
RESPONSE
{
 "countries": [
  {
   "country": {
    "countryCode": "SG",
    "countryName": "Singapore",
    "countryStatus": "A"
   }
  },
  {
   "country": {
    "countryCode": "HK",
    "countryName": "Hong Kong",
    "countryStatus": "A"
   }
  }
 ],
 "size": {
  "pagesize": 1,
  "totalsize": 2,
  "resultsize": 2
 }
}

3.0 Merchant

Currently two types of Merchants used in Mezzofy, namely "Master Merchant" and "Generic Merchant". Master Merchant is referred as a market place which manage a group of Generic Merchant product and service with Coupons. Generic Merchant manages their own product and service with Coupons.

Merchant Attributes

Field Type Description
country_code CHAR[2]
Read Only
Country Code
merchant_id CHAR[4]
Read Only
Merchant ID
merchant_code VARCHAR[100]
Mandatory
Merchant Code
merchant_type VARCHAR[1]
Mandatory
Merchant Type
"G" = Generic
"A" = Aggregator
merchant_name VARCHAR[250]
Mandatory
Merchant Name
merchant_desc VARCHAR[500]
Mandatory
Merchant Description
merchant_logourl VARCHAR[255] Merchant Logo URL
Format JPG/PNG
Max Size 300KB
merchant_imageurl VARCHAR[255] Merchant Image URL
Format JPG/PNG
Max Size 300KB
merchant_remark VARCHAR[250] Merchant Remark
merchant_tc VARCHAR[2000] Merchant Terms and Conditions
profile_status VARCHAR[1] Merchant Profile Status
merchant_email VARCHAR[100] Merchant Profile Status
merchant_hotline VARCHAR[250] Merchant Hotline
merchant_status VARCHAR[1]
Mandatory
Merchant Status
"A" = Active
"N" = Not Active
expiry_date DATETIME
Read Only
Expiry Date and Time
channel_code VARCHAR[20]
Mandatory
Channel Code
currency VARCHAR[10]
Mandatory
Currency
youtube_url VARCHAR[255]
Mandatory
Youtube URL
facebook_url VARCHAR[255]
Mandatory
Facebook URL
twitter_url VARCHAR[255]
Mandatory
Twitter URL
website_url VARCHAR[255]
Mandatory
Website URL
instagram_url VARCHAR[255]
Mandatory
Instagram URL
whatsup_url VARCHAR[255]
Mandatory
WhatsApp URL
online_shop_url VARCHAR[255]
Mandatory
Online Shop URL
merchant_timezone VARCHAR[100]
Mandatory
Merchant UTC Time Zone
hashCode VARCHAR[12]
Read Only
Merchant Hash Code
update_by VARCHAR[100]
Read Only
Last Updated Date and Time
createdOn DATETIME
Read Only
Created Date and Time
updateOn DATETIME
Read Only
Last Updated Date and Time

3.1 Create a Merchant

Create a Merchant details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
3.1.1 - Create a Merchant details.
URL: http://platform.mezzofy.com/api/v1/merchants
REQUEST
{
 "merchant": {
  "countryCode": "HK",
  "countryName": "Hong Kong",
  "merchantCode": "10000101",
  "merchantType": "A",
  "merchantName": "Starbucks",
  "merchantDesc": "The best coffee shop",
  "merchantLogourl": "http://.../logo.png",
  "merchantImageurl": "http://.../image.png",
  "merchantRemark": "Hotline 8888 8888",
  "merchantTc": "Terms and Conditions",
  "merchantStatus": "A",
  "profileStatus": "A",
  "merchantTimezone": "Asia/Hong_Kong",
  "expiryDate": "2017-12-31T11:59:59+08:00",
  },
   "user":{
   "userEmail":"test@next.com",
   "userPwd":"123456789"
  }
}
RESPONSE
{
 "merchant": {
  "countryCode": "HK",
  "countryName": "Hong Kong",
  "merchantId": "IWEH",
  "merchantCode": "10000101",
  "merchantType": "A",
  "merchantName": "Starbucks",
  "merchantDesc": "The best coffee shop",
  "merchantLogourl": "http://.../logo.png",
  "merchantImageurl": "http://.../image.png",
  "merchantRemark": "Hotline 8888 8888",
  "merchantTc": "Terms and Conditions",
  "merchantStatus": "A",
  "profileStatus": "A",
  "merchantTimezone": "Asia/Hong_Kong",
  "expiryDate": "2017-12-31T11:59:59+08:00",
  "hashCode": "1475825276",
  "updatedOn": "2017-08-01T19:19:19+08:00"
  },
   "user":{
   "userId":"Z8DC5",
   "merchantId":"8JHY",
   "merchantCode":"test@next.com",
   "roleId":"3",
   "userFirstName":"testmerchant",
   "userEmail":"test@next.com",
   "userLogin":"test@next.com",
   "userPwd":"xxxxxxxx",
   "userStatus":"A",
   "userType":"M",
   "createdOn":"M",
   "createdBy":"2017-08-01T19:19:19+08:00",
   "updatedOn":"2017-08-01T19:19:19+08:00",
   "profileStatus":"M"
  }
}

3.2 View a Merchant Details

To view a Merchant details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
3.2.1 - View Merchant details.
URL: http://platform.mezzofy.com/api/v1/merchants/[merchantId]
RESPONSE
{
 "merchant": {
  "countryCode": "HK",
  "countryName": "Hong Kong",
  "merchantId": "IWEH",
  "merchantCode": "Z4FT",
  "merchantType": "A",
  "merchantName": "Starbucks",
  "merchantEmail": "4899979010303@gmail.com",
  "merchantDesc": "The best coffee shop",
  "merchantLogourl": "http://.../logo.png",
  "merchantImageurl": "http://.../image.png",
  "merchantRemark": "Hotline 8888 8888",
  "merchantTc": "Terms and Conditions",
  "merchantStatus": "A",
  "profileStatus": "A",
  "merchantTimezone": "Asia/Hong_Kong",
  "expiryDate": "2017-12-31T11:59:59+08:00",
  "couponUrl": "http://Z4FT.mezzofy.com",
  "hashCode": "1475825276",
  "updatedOn": "2017-08-01T19:19:19+08:00"
  }
}

3.3 Update a Merchant

Update a Merchant details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
3.3.1 - Update a Merchant details.
URL: http://platform.mezzofy.com/api/v1/merchants/[merchantId]
REQUEST
{
 "merchant": {
  "countryCode": "HK",
  "countryName": "Hong Kong",
  "merchantId": "IWEH",
  "merchantCode": "Z4FT",
  "merchantType": "A",
  "merchantName": "Starbucks",
  "merchantDesc": "The best coffee shop",
  "merchantLogourl": "http://.../logo.png",
  "merchantImageurl": "http://.../image.png",
  "merchantRemark": "Hotline 8888 8888",
  "merchantTc": "Terms and Conditions",
  "merchantStatus": "A",
  "profileStatus": "A",
  "merchantTimezone": "Asia/Hong_Kong,"
  "expiryDate": "2017-12-31T11:59:59+08:00,"
  "couponUrl": "http://Z4FT.mezzofy.com"
 }
}
RESPONSE
{
 "merchant": {
  "countryCode": "HK",
  "countryName": "Hong Kong",
  "merchantId": "IWEH",
  "merchantCode": "10000101",
  "merchantType": "A",
  "merchantName": "Starbucks",
  "merchantDesc": "The best coffee shop in Jordan",
  "merchantLogourl": "http://.../logo.png",
  "merchantImageurl": "http://.../image.png",
  "merchantRemark": "Hotline 8888 8888",
  "merchantTc": "Terms and Conditions",
  "merchantStatus": "A",
  "profileStatus": "A",
  "expiryDate": "2017-12-31T11:59:59+08:00",
  "couponUrl": "http://Z4FT.mezzofy.com",
  "hashCode": "812345678909",
  "updatedOn": "2016-11-10T19:19:19+08:00"
 }
}

3.4 View Merchant List

Get the merchant list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
3.4.1 - View list of Merchants.
URL: http://platform.mezzofy.com/api/v1/merchants?[countryCode]
RESPONSE
{
 "merchants": [
  {
  "merchant": {
   "countryCode": "HK",
   "countryName": "Hong Kong",
   "merchantId": "IWEH",
   "merchantCode": "10000101",
   "merchantType": "A",
   "merchantName": "Starbucks",
   "merchantDesc": "The best coffee shop",
   "merchantLogourl": "http://.../logo.png",
   "merchantImageurl": "http://.../image.png",
   "merchantRemark": "Hotline 8888 8888",
   "merchantTc": "Terms and Conditions",
   "merchantStatus": "A",
   "profileStatus": "A",
   "merchantTimezone": "UTC+08:00",
   "expiryDate": "2017-12-31T11:59:59+08:00",
   "couponUrl": "http://Z4FT.mezzofy.com",
   "updatedOn": "2016-11-10T19:19:19+08:00"
   }
  },
 {
 "merchant": {
   "countryCode": "HK",
   "countryName": "Hong Kong",
   "merchantId": "KMLC",
   "merchantCode": "10000102",
   "merchantType": "A",
   "merchantName": "Nike",
   "merchantDesc": "Branded Sport Shoes",
   "merchantLogourl": "http://.../logo.png",
   "merchantImageurl": "http://.../image.png",
   "merchantRemark": "Hotline 8888 8888",
   "merchantTc": "Terms and Conditions",
   "merchantStatus": "A",
   "profileStatus": "A",
   "expiryDate": "2017-12-31T11:59:59+08:00",
   "couponUrl": "http://Z4FT.mezzofy.com",
   "updatedOn": "2016-11-10T19:19:19+08:00"
    }
   }
 ],
 "size": {
  "pagesize": 1,
  "totalsize": 2,
  "resultsize": 2
 }
}

3.5 Subscribe

Create new subscription details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
3.5.1 - To create new subscription details.
URL: http://platform.mezzofy.com/api/v1/[merchantCode]/subscribes
REQUEST
{
 "subscribe": {
  "paymentAmount": "50",
  "merchantId": "8JHY",
  "expiryDate": "22-02-2010 12:12:12",
  "paymentDate": "22-01-2010 12:12:12"
 }
}
RESPONSE
{
 "subscribe": {
  "subscribeId": "JFJCHV",
  "merchantId": "JDXJ",
  "serverDate": "29-07-2018",
  "paymentDate": "16-07-2018",
  "paymentAmount": 29.99,
  "status": "A",
  "expiryDate": "2018-02-20T11:59:59+08:00"
 }
}

3.6 Error Codes

The followings are the error codes used in the Merchant module or function.

Error Code Description
4201 Invalid credential - Email or password is not found / matching
4202 Invalid credential - Email is empty
4203 Merchant is not found
4204 Requested Merchant details are not found
4205 Failed to create new merchant. Please check the input parameters
4206 Merchant code is found already
4207 Failed to update merchant details. Please check the input parameters
4208 Requested campaign details are not found

4.0 Merchant Site

Merchant Site is assoicated to Merchant directly where each Merchant could operates and manage multiple sites.

Merchant Site Attributes

Field Type Description
merchant_id CHAR[4]
Read Only
Merchant ID
site_id CHAR[5]
Read Only
Merchant Site ID
site_name VARCHAR[250]
Mandatory
Merchant Site Name
site_desc VARCHAR[500] Merchant Site Description
site_address VARCHAR[300] Merchant Site Address
site_latitude DOUBLE Merchant Site Latitude
site_longitude DOUBLE Merchant Site Longtitude
site_location CHAR[3] Location ID
site_contact CHAR[100] Merchant Site Contact
site_email_id VARCHAR[150] Merchant Site Email
site_imageurl CHAR[248] Merchant Site Image URL
Format JPG/PNG
Max Size 300KB
site_seq_no INTEGER[11] Merchant Site Sequence Number
site_redeem_pass VARCHAR[10] Merchant Site Redemm Pass Code
site_display_wallet VARCHAR[10] Merchant Site Wallet Display
location_id CHAR[6] Merchant Site Location ID
pickup_delivery VARCHAR[1] Merchant Site Pickup Details
member_gln VARCHAR[20] Merchant Member GLN
remote_type VARCHAR[1] Merchant Site RemoteType
redemption_site_id CHAR[6] Redemption SiteID
siteOnlineStatus CHAR[1]
Mandatory
Merchant Site Online Status
"A" = Active
"N" = Not Active
siteStatus VARCHAR[1]
Mandatory
Merchant Site Status
"A" = Active
"N" = Not Active
hashCode CHAR[12]
Read Only
Merchant Site Hash Code
updated_by VARCHAR[100] Merchant Site Last Updated Name
created_on DATETIME
Read Only
Created Date and Time
updated_on DATETIME
Read Only
Last Updated Date and Time
Filter By Handle
Site Online Status siteOnlineStatus
Site Status siteStatus
Site Location siteLocation
Sort By Handle
Site Sequence Number siteSeqNo
Site Name siteName

4.1 Create a Merchant Site

Create a Merchant Site details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
4.1.1 - Create a Merchant Site details.
URL: https://platform.mezzofy.com/api/v1/[merchantId]/sites
REQUEST
{
 "site": {
  "merchantId": "DMHA",
  "siteName": "New Demo Site",
  "siteDesc": "New Demo Merchant Site Description",
  "siteAddress": "New Demo Merchant Site Address",
  "siteLatitude": 2.930840298423,
  "siteLongtitude": 1.0938410293840,
  "siteLocation": "21 St Nicholas View, Singapore 567984",
  "siteContact": "88888888",
  "siteEmailId": "newsite@email.com",
  "siteImageurl": "http://.../image.png",
  "siteSeqNo": 8,
  "siteRedeemPass": "8888",
  "siteOnlineStatus": "A",
  "siteStatus": "A"
 }
}
RESPONSE
{
 "site": {
  "siteId": "KQWDS",
  "merchantId": "DMHA",
  "siteName": "New Demo Site",
  "siteDesc": "New Demo Merchant Site Description",
  "siteAddress": "New Demo Merchant Site Address",
  "siteLatitude": 2.930840298423,
  "siteLongtitude": 1.0938410293840,
  "siteLocation": "21 St Nicholas View, Singapore 567984",
  "siteContact": "88888888",
  "siteEmailId": "newsite@email.com",
  "siteImageurl": "http://.../image.png",
  "siteSeqNo": 8,
  "siteRedeemPass": "8888",
  "siteOnlineStatus": "A",
  "siteStatus": "A",
  "hashCode": "812345678908",
  "createdOn": "2018-07-30T18:18:18+08:00",
  "updatedOn": "2018-07-30T18:18:18+08:00"
 }
}

4.2 View a Merchant Site Details

View a Merchant Site details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
4.2.1 - View Merchant Site details.
URL: https://platform.mezzofy.com/api/v1/[merchantId]/sites/[siteId]
RESPONSE
{
 "site": {
  "siteId": "KQWDS",
  "merchantId": "DMHA",
  "siteName": "New Demo Site",
  "siteDesc": "New Demo Merchant Site Description",
  "siteAddress": "New Demo Merchant Site Address",
  "siteLatitude": 2.930840298423,
  "siteLongtitude": 1.0938410293840,
  "siteLocation": "21 St Nicholas View, Singapore 567984",
  "siteContact": "88888888",
  "siteEmailId": "newsite@email.com",
  "siteImageurl": "http://.../image.png",
  "siteSeqNo": 8,
  "siteRedeemPass": "8888",
  "siteOnlineStatus": "A",
  "siteStatus": "A",
  "hashCode": "812345678908",
  "updatedOn": "2018-07-30T18:25:18+08:00"
 }
}

4.3 Update a Merchant Site

Update a Merchant Site details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
4.3.1 - Update a Merchant Site details.
URL: https://platform.mezzofy.com/api/v1/[merchantId]/sites/[siteId]
REQUEST
{
 "site": {
  "siteId": "KQWDS",
  "merchantId": "DMHA",
  "siteName": "New Demo Site",
  "siteDesc": "New Demo Merchant Site Description",
  "siteAddress": "New Demo Merchant Site Address",
  "siteLatitude": 2.930840298423,
  "siteLongtitude": 1.0938410293840,
  "siteLocation": "21 St Nicholas View, Singapore 567901",
  "siteContact": "88888888",
  "siteEmailId": "newsite@email.com",
  "siteImageurl": "http://.../image.png",
  "siteSeqNo": 8,
  "siteRedeemPass": "8888",
  "siteOnlineStatus": "A",
  "siteStatus": "A"
 }
}
RESPONSE
{
 "site": {
  "siteId": "KQWDS",
  "merchantId": "DMHA",
  "siteName": "New Demo Site",
  "siteDesc": "New Demo Merchant Site Description",
  "siteAddress": "New Demo Merchant Site Address",
  "siteLatitude": 2.930840298423,
  "siteLongtitude": 1.0938410293840,
  "siteLocation": "21 St Nicholas View, Singapore 787901",
  "siteContact": "88888888",
  "siteEmailId": "newsite@email.com",
  "siteImageurl": "http://.../image.png",
  "siteSeqNo": 8,
  "siteRedeemPass": "8888",
  "siteOnlineStatus": "A",
  "siteStatus": "A",
  "hashCode": "812345678908",
  "createdOn": "2018-07-30T18:18:18+08:00",
  "updatedOn": "2018-07-30T18:24:18+08:00"
 }
}

4.4 View Merchant Site List

View a Merchant Site list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
4.4.1 - Returns the number of total records.
URL: https://platform.mezzofy.com/api/v1/sites

4.4.2 - View Merchant site list.
URL: https://platform.mezzofy.com/api/v1/[merchantId]/sites?page[n]
URL: https://platform.mezzofy.com/api/v1/[merchantId]/sites?page[n]&filter=[options]
URL: https://platform.mezzofy.com/api/v1/[merchantId]/sites?page[n]&filter=[options]&sortby=[options]

Note:
- Apply Filter with reference to Filter Table.
- Apply Sort By with reference to Sorting Table.
RESPONSE
{
 "sites": [
  {
   "site": {
    "siteId": "KQWDS",
    "merchantId": "DMHA",
    "siteName": "New Demo Site",
    "siteDesc": "New Demo Merchant Site Description",
    "siteAddress": "New Demo Merchant Site Address",
    "siteLatitude": 2.930840298423,
    "siteLongtitude": 1.0938410293840,
    "siteLocation": "21 St Nicholas View, Singapore 567901",
    "siteContact": "88888888",
    "siteEmailId": "newsite@email.com",
    "siteImageurl": "http://.../image.png",
    "siteSeqNo": 8,
    "siteRedeemPass": "8888",
    "siteOnlineStatus": "A",
    "siteStatus": "A",
    "hashCode": "812345678908",
    "createdOn": "2018-07-30T18:18:18+08:00",
    "updatedOn": "2018-07-30T18:24:18+08:00"
  },
  "sitetimes": [
   {
    "sitetime": {
     "sitetimeId": "WAKx47",
     "siteId": "5Zcq6",
     "sitetimeType": "D",
     "siteStartTime": "3",
     "siteEndTime": "4"
      }
    }
   ]
  },
  {
  "site": {
    "siteId": "EDA65",
    "merchantId": "BIYZ",
    "siteName": "New Demo Site 1",
    "siteDesc": "New Demo Merchant Site 1",
    "siteAddress": "New Demo Merchant Address 1",
    "siteLatitude": 2.930840298423,
    "siteLongtitude": 1.0938410293840,
    "siteLocation": "KLW",
    "siteContact": "88888888",
    "siteEmailId": "newsite@email.com",
    "siteImageurl": "http://.../image.png",
    "siteSeqNo": 8,
    "siteRedeemPass": "8888",
    "siteOnlineStatus": "A",
    "siteStatus": "A",
    "hashCode": "812345678908",
    "createdOn": "2018-07-30T18:18:18+08:00",
    "updatedOn": "2018-07-30T18:24:18+08:00"
   },
   "sitetimes": []
  }
 ],
 "size": {
  "pagesize": 1,
  "resultsize": 2,
  "totalsize": 2
   }
 }

4.5 Select Merchant Site

Select a Merchant Site details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
4.5.1 - Select a Merchant Site details.
URL: https://platform.mezzofy.com/api/v1/[merchantId]/sites/Choose
REQUEST
{
 "device": {
  "siteId": "REDEM",
  "deviceToken": "sfs3353545",
  "deviceName": "A",
  "deviceUuid": "1475587273"
 }
}
RESPONSE
{
 "site": {
  "siteId": "REDEM",
  "merchantId": "DMHA",
  "siteName": "New Demo Site",
  "siteDesc": "New Demo Merchant Site Description",
  "siteAddress": "New Demo Merchant Site Address",
  "siteLatitude": 2.930840298423,
  "siteLongtitude": 1.0938410293840,
  "siteLocation": "21 St Nicholas View, Singapore 567901",
  "siteContact": "88888888",
  "siteEmailId": "newsite@email.com",
  "siteImageurl": "http://.../image.png",
  "siteSeqNo": 8,
  "siteRedeemPass": "8888",
  "siteOnlineStatus": "A",
  "siteStatus": "A",
  "hashCode": "812345678908",
  "updatedOn": "2018-07-30T18:18:18+08:00"
 }
}

4.6 Merchant Site Log Out

Perform log out.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
4.6.1 - Perform log out from Merchant Site.
URL: https://platform.mezzofy.com/api/v1//sites/logout/[siteID]?device=[deviceID]
RESPONSE
TRUE

4.7 Error Codes

The followings are the error codes used in the Merchant Site module or function.

Error Code Description
4301 No site is found
4302 Requested Site details are not found
4303 Site is found
4304 Failed to select or choose the site. Please check the input parameters
4305 Redeem site is already in use.
4306 Failed to create new site. Please check the input parameters
4307 Failed to update site details. Please check the input parameters
4308 Requested resource (or) merchant code is already found

5.0 Merchant User

There are two types of Merchant in Mezzofy. The Master Merchant and Generic Merchant. Master Merchant is refer as a market place which manage a group of Generic Merchant product and service with Coupons. Generic Merchant manage their own product and service with Coupons.

Merchant User Attributes

Field Type Description
merchantId CHAR[5]
Read Only
Merchant ID
sitetId CHAR[5] Site ID
userId CHAR[5]
Read Only
User ID
userCode CHAR[50]
Mandatory
User Code
userLogin CHAR[40]
Mandatory
User Login
userFirstName CHAR[50]
Mandatory
User First Name
userLastName CHAR[50] User Last Name
userDisplayName CHAR[100]
Mandatory
User Display Name
userDoj DDMMYYYY User Date of Join
userAddress CHAR[250] User Address
userCountry CHAR[50] User Country
userPostalCode CHAR[10] User Postal Code
userEmail CHAR[40] User Email
userMobile CHAR[15] User Mobile
userImageurl CHAR[250] User Image URL
userStatus CHAR[1]
Mandatory
User Status
"A" = Active
"N" = Not Active
hashCode CHAR[12]
Read Only
Merchant Site Hash Code
updateOn CHAR[30]
Read Only
Last Updated Date and Time

5.1 Create a Merchant User

Create a Merchant User details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
5.1.1 - Create a Merchant User details.
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/users
REQUEST
{
 "user": {
  "merchantCode": "DMHA",
  "siteId": "C1D2",
  "roleId": "3",
  "userLogin": "demouser3",
  "userFirstName": "Demo 3",
  "userLastName": "Name",
  "userDisplayName": "Demo User 3",
  "userDob": "18102006",
  "userEmail": "hello@mezzofy.com",
  "userPwd": "12345678",
  "userAddress": "User Address",
  "userCountry": "Hong Kong",
  "userPinCode": "",
  "userEmail": "demouser3@email.com",
  "userMobile": "99998989",
  "userImageurl": "http://.../image.jpg",
  "userStatus": "A",
  "userType": "M",
  "userSiteSelection": "Y",
  "profileStatus": "A"
 }
}
RESPONSE
{
 "user": {
  "userId": "DHXSF",
  "merchantId": "A1B2",
  "merchantCode": "A1B2",
  "roleId": "3",
  "siteId": "C1D2",
  "userCode": "E99999",
  "userLogin": "demouser3",
  "userFirstName": "Demo 3",
  "userLastName": "Name",
  "userDisplayName": "Demo User 3",
  "userDob": "18102006",
  "userEmail": "hello@mezzofy.com",
  "userPwd": "12345678",
  "userAddress": "User Address",
  "userCountry": "Hong Kong",
  "userPinCode": "",
  "userEmail": "demouser3@email.com",
  "userMobile": "99998989",
  "userImageurl": "http://.../image.jpg",
  "userStatus": "A",
  "userType": "M",
  "userSiteSelection": "Y",
  "profileStatus": "A",
  "hashCode": "812345678908",
  "CreatedOn": "2018-06-30T18:18:18+08:00",
  "CreatedBy": "Admin"
 }
}

5.2 View a Merchant User

View a Merchant User details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
5.2.1 - View Merchant User details.
URL: https://{merchantCode}.mezzofy.com/api/v1/users/[userId]
RESPONSE
{
 "user": {
  "merchantId": "DMHA",
  "userId": "DHXSF",
  "roleID": "3",
  "userLogin": "demouser1",
  "userFirstName": "Demo 1",
  "userLastName": "Name",
  "userDisplayName": "Demo User 1",
  "userDoj": "18092016",
  "userAddress": "User Address",
  "userCountry": "Hong Kong",
  "userPostalCode": "",
  "userEmail": "demouser1@email.com",
  "userMobile": "89898989",
  "userImageurl": "http://.../image.jpg",
  "userStatus": "A",
  "profileStatus": "A",
  "hashCode": "812345678908",
  "CreatedOn": "2018-06-30T18:18:18+08:00",
  "createdBy": "Admin",
  "CreatedOn": "2018-06-30T18:18:18+08:00",
  "updatedBy": "Admin"
 }
}

5.3 Update a Merchant User

Update a Merchant User details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
5.3.1 - Update a Merchant details.
URL: https://{merchantCode}.mezzofy.com/api/v1/users/[userId]
REQUEST
{
 "user": {
  "userId": "DHXSF",
  "merchantId": "DMHA",
  "merchantCode": "DMHA",
  "roleId": "3",
  "userLogin": "demouser3",
  "userFirstName": "Demo 3",
  "userLastName": "Name",
  "userDisplayName": "Demo User 3",
  "userDoj": "18102016",
  "userAddress": "22, Kawloon",
  "userCountry": "Hong Kong",
  "userPostalCode": "",
  "userEmail": "demouser3@email.com",
  "userMobile": "99998989",
  "userImageurl": "http://.../image.jpg",
  "userType": "M",
  "profileStatus": "A"
 }
}
RESPONSE
{
 "user": {
  "userId": "DHXSF",
  "merchantId": "DMHA",
  "merchantCode": "DMHA",
  "roleId": "3",
  "userCode": "E99999",
  "userLogin": "demouser3",
  "userFirstName": "Demo 3",
  "userLastName": "Name",
  "userDisplayName": "Demo User 3",
  "userDoj": "18102016",
  "userAddress": "76, Tim Shai Sui",
  "userCountry": "Hong Kong",
  "userPostalCode": "",
  "userEmail": "demouser3@email.com",
  "userMobile": "99998989",
  "userImageurl": "http://.../image.jpg",
  "profileStatus": "A",
  "hashCode": "812345678908",
  "createdOn": "2018-06-30T18:18:18+08:00",
  "createdBy": "Admin"
 }
}

5.4 View a Merchant User List

View a Merchant User list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
5.4.1 - Returns the number of total records.
URL: https://{merchantCode}.mezzofy.com/api/v1/users

5.4.2 - View Merchant User list.
URL: https://{merchantCode}.mezzofy.com/api/v1/users?page[n]
RESPONSE
{
 "users": [
  {
   "user": {
     "merchantId": "DMHA",
     "userId": "DHXSF",
     "merchantCode": "DMHA",
     "roleId": "3",
     "userLogin": "demouser1",
     "userFirstName": "Demo 1",
     "userLastName": "Name",
     "userDisplayName": "Demo User 1",
     "userDoj": "18092016",
     "userAddress": "User Address",
     "userCountry": "Hong Kong",
     "userPostalCode": "",
     "userEmail": "demouser1@email.com",
     "userMobile": "89898989",
     "userImageurl": "http://.../image.jpg",
     "userStatus": "A",
     "hashCode": "812345678908",
     "createdOn": "2016-09-01T18:18:18+08:00",
     "createdBy": "Admin",
     "updatedOn": "2018-06-30T18:18:18+08:00",
     "updatedBy": "Admin"
    }
   }
  ],
  "size": {
   "pagesize": 1,
   "totalsize": 1,
   "resultsize": 1
  }
}

5.5 Merchant User Authorization

Authorization for a Merchant User.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
5.5.1 - Authoization for a Merchant.
URL: https://{merchantCode}.mezzofy.com/api/v1/users/auth

Note:
- Merchant can use either one of the field (userLogin/userEmail/userMobile) with Password to login.
- Password need to be encoded with base64.
REQUEST
{
 "user": {
  "userId": "DHXSF",
  "merchantId": "DMHA",
  "merchantCode": "DMHA",
  "roleId": "3",
  "userLogin": "demouser3",
  "userFirstName": "Demo 3",
  "userLastName": "Name",
  "userDisplayName": "Demo User 3",
  "userDoj": "18102016",
  "userAddress": "Update User Address",
  "userCountry": "Hong Kong",
  "userPostalCode": "",
  "userEmail": "demouser3@email.com",
  "userMobile": "99998989",
  "userImageurl": "http://.../image.jpg",
  "profileStatus": "A",
  "createdOn": "2018-06-30T18:18:18+08:00",
  "createdBy": "Admin",
  "updatedOn": "2018-06-30T18:18:18+08:00"
 }
}
RESPONSE
{
 "user": {
  "userId": "DHXSF",
  "merchantId": "DMHA",
  "merchantCode": "DMHA",
  "roleId": "3",
  "userCode": "E99999",
  "userLogin": "demouser3",
  "userFirstName": "Demo 3",
  "userLastName": "Name",
  "userDisplayName": "Demo User 3",
  "userDoj": "18102016",
  "userAddress": "Update User Address",
  "userCountry": "Hong Kong",
  "userPostalCode": "",
  "userEmail": "demouser3@email.com",
  "userMobile": "99998989",
  "userImageurl": "http://.../image.jpg",
  "profileStatus": "A",
  "createdOn": "2018-06-30T18:18:18+08:00",
  "createdBy": "Admin",
  "updatedOn": "2018-06-30T18:18:18+08:00"
 }
}

6.0 Coupon

Coupon management helps the business to market their services (promote sales) and attract new customers. In other words, one of the best way to engage customers and drive sales through the use of coupons. This module allows to create, distribute and track the generated coupons.

Coupon is generated by Campaign (Campaign assoicated with Merchants and Products. Also it can be from Campaign Group). While creation of Coupon, the type is defined as either "Charge" or "Free". Charge coupons should go through the payment (by default Paypal gateway is integrated) before coupon issue. When the customer redeemed the Coupon to get the discount while purchasing the product application perform the validation in one of the followings:
a) Scan - By scanning the embedded bar code will redeem
b) Code - An unique coupon code is embedded with coupon
c) Pin - Validate the Pin with server
d) Mass Redeem - This can be done by QR scanner, customer will be able to redeem coupons in-store in seconds

Coupon module is integrated with Campaign module which allows user to create and allocate coupon(s).

6.1 Campaign

Campaign Attributes

Field Type Description
campaignId CHAR[6]
Campaign ID
merchantId CHAR[4]
Merchant ID
campaign_code VARCHAR[100]
Campaign Code
campaign_name VARCHAR[250]
Campaign Name
campaign_desc VARCHAR[2500]
Campaign Description
selling_price DOUBLE
Selling Price
orginal_price DOUBLE
Original Price
brand VARCHAR[1]
Brand Type
campaign_status VARCHAR[1]
Campaign Status
campaign_tc VARCHAR[2000]
Campaign Terms & Condition
campaign_remark VARCHAR[250]
Campaign Remark
campaign_note1 VARCHAR[250]
Campaign Notes
campaign_note2 VARCHAR[250]
Campaign Notes
campaign_note3 VARCHAR[250]
Campaign Notes
campaign_uuid VARCHAR[50]
Campaign Universal Unique Identifier
daily_limit INTERGER[10]
Campaign Daily Limit
pack_qty INTERGER[10]
Pack Quantity
booking VARCHAR[1]
Booking
outcall VARCHAR[1]
OutCall
type_service VARCHAR[1]
Type of Service
review_url VARCHAR[256]
Read Only
Review URL
video_url VARCHAR[256]
Read Only
Video URL
email_staff VARCHAR[1]
Email Staff
coupon_over VARCHAR[1]
Coupon Over
expiry_days INTEGER[11]
Expiry Days
day_filter VARCHAR[1]
Day Filter
from_date DATETIME
From Date
to_date DATETIME
To Date
campaign_type VARCHAR[1]
Campaign Type
total_redeem INTEGER[11]
Total Redeem
allocation_count INTEGER[11]
Allocation Count
coupon_url INTEGER[11]
Coupon URL
daily_limit_type VARCHAR[1]
Daily Limit Type
online_redeem VARCHAR[100]
Online Redeem
online_shop_url VARCHAR[255]
Online Redeem
qr_url VARCHAR[255]
QR URL
youtube_url LONGTEXT
youtube URL
gtin VARCHAR[20]
GTIN
publish VARCHAR{1}
Publish Status
custom_data LONGTEXT
Custom Data
hash_code CHAR[12]
Campaign Hashcode
created_on DATETIME
Read Only
Created Date and Time
updateOn DATETIME
Read Only
Last Updated Date and Time

Note: Campgrp = Campaign Group

6.1.1 Create Campaign

Create a Campaign details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
6.1.1.1 - Create Campaign details.
URL: https://platform.mezzofy.com/api/v1/[merchantCode]/campaigns
REQUEST
{
 "campaign": {
  "merchantId": "DMHA",
  "productmerchantId": "DMHA",
  "campaignCode": "Test 01",
  "campaignType": "C",
  "brand": "C",
  "campaignName": "Test Campaign",
  "campaignDesc": "IOS and Android",
  "sellingPrice": 20,
  "orginalPrice": 25,
  "campaignTc": "1. buy 2 get 12. buy min amount of 5003. max amount of discount 100",
  "campaignStatus": "A",
  "dailyLimit": 10,
  "dailyLimitType": "A",
  "packQty": 1,
  "emailStaff":"I",
  "couponOver":"I",
  "dayFilter":"N",
  "expiryDays": 15,
  "totalRedeem":100,
  "allocationCount": 100,
  "startDate":"27-12-2017 00:00:01",
  "endDate":"29-12-2017 00:00:01",
  "couponUrl":"DMHA.uat.mezzofy.com/coupons/1001877",
  "issuedcoupon": 0,
  "redeemcoupon": 0,
  "ratecoupon": 0,
  "distance": 0,
  "expirydue": "-15",
  "expiryname": "H",
  "pickup": "A",
  "delivery": "A",
  "booking": "I",
  "outcall": "I",
  "emailStaff": "I,"
  "videoUrl": "",
  "couponOver": "I,"
  "campaignUuid": "664f0655-f0dd-44bc-ad75-b0f5058c9589",
  "redemptionQuota": 2,
  "onlineRedeem": "",
  "onlineShopUrl": "www.mezzofy.com/download/",
  "availableCoupon": 0,
  "qrUrl": "https://..../qrcode/1001877.png",
  "gtin": "",
  "publish": "I",
  "branchioUrl": "https://mzmerchant...link/nRAMnuY78M",
  "customData": "{\"name\":\"man\"}",
  "campaignimages": [
    {
    "campaignimage": {
     "pimageId": "F8XS93",
     "campaignId": "NAX6JB",
     "campaignImage": "https://.../ProductImg/e14bef82-1aeaf35a817f08.png",
     "imageSeq": 1,
     "imageStatus": "A"
     }
    }
   ],
  "sites": [
   {
    "site": {
     "siteId": "LZBEN"
      }
    }
   ],
  "redemsites": [
   {
     "site": {
     "siteId": "IDALR"
       }
     }
   ]
   }
 }
RESPONSE
{
 "campaign": {
  campaignId": ""EVU44C",
  "merchantId": "DMHA",
  "productmerchantId": "DMHA",
  "campaignCode": "Test 01",
  "campaignType": "C",
  "brand": "C",
  "campaignName": "Test Campaign",
  "campaignDesc": "IOS and Android",
  "sellingPrice": 20,
  "orginalPrice": 25,
  "campaignTc": "1. buy 2 get 12. buy min amount of 5003. max amount of discount 100",
  "campaignStatus": "A",
  "dailyLimit": 10,
  "dailyLimitType": "A",
  "packQty": 1,
  "emailStaff":"I",
  "couponOver":"I",
  "dayFilter":"N",
  "expiryDays": 15,
  "totalRedeem":100,
  "allocationCount": 100,
  "startDate":"27-12-2017 00:00:01",
  "endDate":"29-12-2017 00:00:01",
  "couponUrl":"DMHA.uat.mezzofy.com/coupons/1001877",
  "issuedcoupon": 0,
  "redeemcoupon": 0,
  "ratecoupon": 0,
  "distance": 0,
  "expirydue": "-15",
  "expiryname": "H",
  "pickup": "A",
  "delivery": "A",
  "booking": "I",
  "outcall": "I",
  "emailStaff": "I,"
  "videoUrl": "",
  "couponOver": "I,"
  "campaignUuid": "664f0655-f0dd-44bc-ad75-b0f5058c9589",
  "redemptionQuota": 2,
  "onlineRedeem": "",
  "onlineShopUrl": "www.mezzofy.com/download/",
  "availableCoupon": 0,
  "qrUrl": "https://..../qrcode/1001877.png",
  "gtin": "",
  "publish": "I",
  "branchioUrl": "https://mzmerchant...link/nRAMnuY78M",
  "customData": "{\"name\":\"man\"}",
  "campaignimages": [
    {
    "campaignimage": {
     "pimageId": "F8XS93",
     "campaignId": "NAX6JB",
     "campaignImage": "https://.../ProductImg/e14bef82-1aeaf35a817f08.png",
     "imageSeq": 1,
     "imageStatus": "A"
     }
    }
   ],
  "sites": [
   {
    "site": {
     "siteId": "LZBEN"
      }
    }
   ],
  "redemsites": [
   {
     "site": {
     "siteId": "IDALR"
       }
     }
   ]
   }
 }

6.1.2 View Campaign Details

View a specific Campaign details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.1.2.1 - View a specific Campaign details.
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/campaigns/[campaignId]
RESPONSE
{
 "campaign": {
  "campaignId": "NAX6JB",
  "merchantId": "DMHA",
  "productmerchantId": "DMHA",
  "campaignCode": "1001877",
  "campaignType": "C",
  "brand": "F",
  "campaignName": "Mysour Sandal Soap",
  "campaignDesc": "Cosmetic sandal wood",
  "campaignTc": "Terms",
  "campaignStatus": "A",
  "dailyLimit": 2,
  "dailyLimitType": "A",
  "packQty": 1,
  "totalRedeem": 5,
  "allocationCount": 50,
  "startDate": "27-12-2017 00:00:01",
  "endDate": "29-12-2017 23:59:59",
  "couponUrl": "DMHA.uat.mezzofy.com/coupons/1001877",
  "dayFilter": "D",
  "fromDate": 1514332801000,
  "toDate": 1514591999000,
  "issuedcoupon": 0,
  "redeemcoupon": 0,
  "allocationcoupon": 50,
  "ratecoupon": 0,
  "hashCode": "1530864813",
  "createdOn": 1530864813000,
  "distance": 0,
  "expirydue": "-15",
  "expiryname": "H",
  "pickup": "A",
  "delivery": "A",
  "booking": "I",
  "outcall": "I",
  "videoUrl": "",
  "emailStaff": "I",
  "couponOver": "I",
  "campaignUuid": "664f0655-f0dd-44bc-ad75-b0f5058c9589",
  "redemptionQuota": 2,
  "onlineRedeem": "",
  "onlineShopUrl": "www.mezzofy.com/download/",
  "availableCoupon": 0,
  "qrUrl": "https://s3-ap-southeast-1.amazonaws.com/mzcouponuat/coupon/qrcode/1001877.png",
  "gtin": "",
  "publish": "I",
  "branchioUrl": "https://mzmerchant.test-app.link/nRAMnuY78M",
  "customData": "{\"name\":\"man\"}",
  "campaignimages": [
   {
    "campaignimage": {
      "pimageId": "F8XS93",
      "campaignId": "NAX6JB",
      "campaignImage": "https://coupon/ProductImg/Sample.png",
      "imageSeq": 1,
      "imageStatus": "A"
      }
    }
   ],
   "sites": [
    {
     "site": {
      "siteId": "LZBEN"
       }
     }
   ],
   "redemsites": [
    {
     "site": {
      "siteId": "IDALR"
     }
    }
   ]
  }
 }

6.1.3 Update Campaign

Update a Campaign details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
6.1.3.1 - Update Campaign details.
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/campaigns/[campaignId]
REQUEST
{
 "campaign": {
  "campaignId": "NAX6JB",
  "merchantId": "DMHA",
  "productmerchantId": "DMHA",
  "campaignCode": "1001877",
  "campaignType": "C",
  "brand": "F",
  "campaignName": "Mysour Sandal Soap",
  "campaignDesc": "Cosmetic sandal wood",
  "campaignTc": "Terms",
  "campaignStatus": "A",
  "dailyLimit": 2,
  "dailyLimitType": "A",
  "packQty": 1,
  "totalRedeem": 5,
  "allocationCount": 50,
  "startDate": "27-12-2017 00:00:01",
  "endDate": "29-12-2017 23:59:59",
  "couponUrl": "DMHA.uat.mezzofy.com/coupons/1001877",
  "dayFilter": "D",
  "fromDate": 1514332801000,
  "toDate": 1514591999000,
  "issuedcoupon": 0,
  "redeemcoupon": 0,
  "allocationcoupon": 50,
  "ratecoupon": 0,
  "hashCode": "1530864813",
  "createdOn": 1530864813000,
  "distance": 0,
  "expirydue": "-15",
  "expiryname": "H",
  "pickup": "A",
  "delivery": "A",
  "booking": "I",
  "outcall": "I",
  "videoUrl": "",
  "emailStaff": "I",
  "couponOver": "I",
  "campaignUuid": "664f0655-f0dd-44bc-ad75-b0f5058c9589",
  "redemptionQuota": 2,
  "onlineRedeem": "",
  "onlineShopUrl": "www.mezzofy.com/download/",
  "availableCoupon": 0,
  "qrUrl": "https://..../coupon/qrcode/1001877.png",
  "gtin": "",
  "publish": "I",
  "branchioUrl": "https://mzmerchant.test-app.link/nRAMnuY78M",
  "customData": "{\"name\":\"man\"}",
  "campaignimages": [
   {
    "campaignimage": {
     "pimageId": "F8XS93",
     "campaignId": "NAX6JB",
     "campaignImage": "https://coupon/ProductImg/Sample.png",
     "imageSeq": 1,
     "imageStatus": "A"
      }
    }
  ],
  "sites":[
   {
    "site":{
     "siteId": "LZBEN"
     }
    }
  ],
  "redemsites":[
   {
   "site":{
    "siteId": "IDALR"
    }
   }
  ]
 }
}
RESPONSE
{
 "campaign": {
  "campaignId": "NAX6JB",
  "merchantId": "DMHA",
  "productmerchantId": "DMHA",
  "campaignCode": "1001877",
  "campaignType": "C",
  "brand": "F",
  "campaignName": "Mysour Sandal Soap",
  "campaignDesc": "Cosmetic sandal wood",
  "campaignTc": "Terms",
  "campaignStatus": "A",
  "dailyLimit": 2,
  "dailyLimitType": "A",
  "packQty": 1,
  "totalRedeem": 5,
  "allocationCount": 50,
  "startDate": "27-12-2017 00:00:01",
  "endDate": "29-12-2017 23:59:59",
  "couponUrl": "DMHA.uat.mezzofy.com/coupons/1001877",
  "dayFilter": "D",
  "fromDate": 1514332801000,
  "toDate": 1514591999000,
  "issuedcoupon": 0,
  "redeemcoupon": 0,
  "allocationcoupon": 50,
  "ratecoupon": 0,
  "hashCode": "1530864813",
  "createdOn": 1530864813000,
  "distance": 0,
  "expirydue": "-15",
  "expiryname": "H",
  "pickup": "A",
  "delivery": "A",
  "booking": "I",
  "outcall": "I",
  "videoUrl": "",
  "emailStaff": "I",
  "couponOver": "I",
  "campaignUuid": "664f0655-f0dd-44bc-ad75-b0f5058c9589",
  "redemptionQuota": 2,
  "onlineRedeem": "",
  "onlineShopUrl": "www.mezzofy.com/download/",
  "availableCoupon": 0,
  "qrUrl": "https://s3-ap-southeast-1.amazonaws.com/mzcouponuat/coupon/qrcode/1001877.png",
  "gtin": "",
  "publish": "I",
  "branchioUrl": "https://mzmerchant.test-app.link/nRAMnuY78M",
  "customData": "{\"name\":\"man\"}",
  "campaignimages": [
   {
    "campaignimage": {
     "pimageId": "F8XS93",
     "campaignId": "NAX6JB",
     "campaignImage": "https://coupon/ProductImg/Sample.png",
     "imageSeq": 1,
     "imageStatus": "A"
      }
    }
  ],
  "sites":[
   {
    "site":{
     "siteId": "LZBEN"
     }
    }
  ],
  "redemsites":[
   {
   "site":{
    "siteId": "IDALR"
    }
   }
  ]
 }
}

6.1.4 View Merchant Campaign List

View a Campaign list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.1.4.1 - Returns the number of total records.
URL: https://{merchantCode}.mezzofy.com/api/v1/campaigns

6.1.4.2 - View campaign list.
URL: https://{merchantCode}.mezzofy.com/api/v1/campaigns?page=[n]
RESPONSE
 {
  "campaigns": [
   {
    "campaign": {
      "campaignId": "GH9NHQ",
      "merchantId": "DMHA",
      "productmerchantId": "DMHA",
      "campaignCode": "1002420",
      "campaignType": "C",
      "brand": "F",
      "campaignName": "as",
      "campaignDesc": "ahj",
      "campaignTc": "WS",
      "campaignStatus": "A",
      "dailyLimit": 1,
      "dailyLimitType": "A",
      "packQty": 1,
      "totalRedeem": 4,
      "allocationCount": 4,
      "couponUrl": "DMHA.uat.mezzofy.com/coupons/1002420",
      "dayFilter": "N",
      "expiryDays": 1,
      "issuedcoupon": 2,
      "redeemcoupon": 0,
      "allocationcoupon": 4,
      "ratecoupon": 0,
      "hashCode": "1532078276",
      "createdOn": 1532078276000,
      "distance": 0,
      "videoUrl": "",
      "emailStaff": "I",
      "couponOver": "I",
      "campaignUuid": "d4008159-c32b-4d74-9b1c-de50a518e118",
      "redemptionQuota": 1,
      "onlineRedeem": "",
      "onlineShopUrl": "",
      "availableCoupon": 2,
      "qrUrl": "https://s3-ap-southeast-1.amazonaws.com/mzcouponuat/coupon/qrcode/1002420.png",
      "publish": "A",
      "sites": [
       {
       "site": {
        "siteId": "7QFNM"
         }
        },
        {
        "site": {
         "siteId": "YVTVE"
        }
      }
     ]
    }
   },
   "groups": [
   {
    "campaignId": "W9PLNC",,
    "campgrpId": "JU6U"
   },
 ],
  "campaigngroups": [
   {
    "campaigngroup": {
     "campgrpId": "JU6U",
     "merchantId": "DMHA",
     "campgrpName": "Campaign Group One",
     "campgrpImageurl": "https://.../F1A56DB2-A860-437E-ACB6-00EFF71A0484.jpg",
     "campgrpSeq": 1,
     "campgrpStatus": "A",
     "hashCode": "1510311516",
     "updatedOn": 1510311516000
      }
    },
   {
    "campaigngroup": {
     "campgrpId": "RODY",
     "merchantId": "DMHA",
     "campgrpName": "Campaing Group 2",
     "campgrpImageurl": "https://.../Screen Shot 2017-10-25 at 6.29.41 PM.png",
     "campgrpSeq": 2,
     "campgrpStatus": "A",
     "hashCode": "1509522368",
     "updatedOn": 1509522369000
   }
  ],
  "size": {
   "pagesize": 1,
   "resultsize": 1,
   "totalsize": 1
  }
 }

Note: The response will give the assoicated Campagin group details along with Campaign details

6.1.5 View Merchant Campaign Publish List

View a Merchant Campaign published list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.1.5.1 - View published campaign list.
URL: https://{merchantCode}.mezzofy.com/api/v1/campaigns/publish?status=[Value]
RESPONSE
 {
  "campaigns": [
   {
    "campaign": {
      "campaignId": "GH9NHQ",
      "merchantId": "DMHA",
      "productmerchantId": "DMHA",
      "campaignCode": "1002420",
      "campaignType": "C",
      "brand": "F",
      "campaignName": "as",
      "campaignDesc": "ahj",
      "campaignTc": "WS",
      "campaignStatus": "A",
      "dailyLimit": 1,
      "dailyLimitType": "A",
      "packQty": 1,
      "totalRedeem": 4,
      "allocationCount": 4,
      "couponUrl": "DMHA.uat.mezzofy.com/coupons/1002420",
      "dayFilter": "N",
      "expiryDays": 1,
      "issuedcoupon": 2,
      "redeemcoupon": 0,
      "allocationcoupon": 4,
      "ratecoupon": 0,
      "hashCode": "1532078276",
      "createdOn": 1532078276000,
      "distance": 0,
      "videoUrl": "",
      "emailStaff": "I",
      "couponOver": "I",
      "campaignUuid": "d4008159-c32b-4d74-9b1c-de50a518e118",
      "redemptionQuota": 1,
      "onlineRedeem": "",
      "onlineShopUrl": "",
      "availableCoupon": 2,
      "qrUrl": "https://s3-ap-southeast-1.amazonaws.com/mzcouponuat/coupon/qrcode/1002420.png",
      "publish": "A",
      "sites": [
       {
       "site": {
        "siteId": "7QFNM"
         }
        },
        {
        "site": {
         "siteId": "YVTVE"
        }
      }
     ]
    }
   },
   "groups": [
   {
    "campaignId": "W9PLNC",,
    "campgrpId": "JU6U"
   },
 ],
  "campaigngroups": [
   {
    "campaigngroup": {
     "campgrpId": "JU6U",
     "merchantId": "DMHA",
     "campgrpName": "Campaign Group One",
     "campgrpImageurl": "https://.../F1A56DB2-A860-437E-ACB6-00EFF71A0484.jpg",
     "campgrpSeq": 1,
     "campgrpStatus": "A",
     "hashCode": "1510311516",
     "updatedOn": 1510311516000
      }
    },
   {
    "campaigngroup": {
     "campgrpId": "RODY",
     "merchantId": "DMHA",
     "campgrpName": "Campaing Group 2",
     "campgrpImageurl": "https://.../Screen Shot 2017-10-25 at 6.29.41 PM.png",
     "campgrpSeq": 2,
     "campgrpStatus": "A",
     "hashCode": "1509522368",
     "updatedOn": 1509522369000
   }
  ],
  "size": {
   "pagesize": 1,
   "resultsize": 1,
   "totalsize": 1
  }
 }

Note: The response will give the assoicated Campagin group details along with Campaign details

6.1.6 View Customer Campaign List

To view a Customer Campaign list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.1.6.1 - Returns the number of total customer campaign records based on the latitude and longitude.
URL: http://{merchantCode}/api/v1/campaigns/customercampaigns?page=[n]&status=[value]&latitude=[value]&longitude=value]

RESPONSE
 {
  "campaigns": [
   {
    "campaign": {
     "campaignId": "NZHDCD",
     "merchantId": "BIYZ",
     "productmerchantId": "BIYZ",
     "campaignCode": "1001135",
     "campaignType": "C",
     "brand": "F",
     "campaignName": "30% Off Midnight Discount",
     "campaignDesc": "Besta Coupon in Town",
     "campaignTc": "Terms ",
     "campaignStatus": "A",
     "dailyLimit": 10,
     "packQty": 1,
     "totalRedeem": 10,
     "allocationCount": 10,
     "couponUrl": "BIYZ.mezzofy.com/coupons/1001135",
     "dayFilter": "N",
     "expiryDays": 3,
     "issuedcoupon": 15,
     "redeemcoupon": 0,
     "allocationcoupon": 60,
     "ratecoupon": 0,
     "hashCode": "1505898984",
     "createdOn": 1505898984000,
     "distance": 0,
     "outletDistance": "170 M",
     "expirydue": "3",
     "expiryname": "D",
     "campaignNote1": "",
     "campaignNote2": "",
     "campaignNote3": "",
     "campaignUuid": "1a089daa-954f-4bf2-8b04-c921cb1606ba",
     "pickup": "I",
     "delivery": "A",
     "booking": "I",
     "outcall": "I",
     "typeService": "P",
     "reviewUrl": "",
     "videoUrl": "",
     "emailStaff": "I",
     "couponOver": "I",
     "campaignimages": [
      {
       "campaignimage": {
       "pimageId": "NS3EYZ",
       "campaignId": "NZHDCD",
       "campaignImage": "https://coupon/ProductImg/Testimage.png",
       "imageSeq": 1,
       "imageStatus": "A"
         }
       }
     ],
     "sites": [
      {
       "site": {
        "siteId": "ED0S6"
         }
      }
     ]
    },
    "groups": [
     {
      "campaignId": "NZHDCD",
      "campgrpId": "HGR8"
     }
    ]
   }
   "size": {
    "pagesize": 1,
    "resultsize": 1,
    "totalsize": 1
    }
 }

6.1.7 View Customer Campaign

To view a Customer Campaign.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.1.7.1 - Returns the specific customer campaign details.
URL: http://{merchantCode}/api/v1/campaigns/campaigndistance/{campaignId}?latitude=[value]&longitude=[value]

RESPONSE
 {
  "campaign": {
   "campaignId": "GAQEH1",
   "merchantId": "BIYZ",
   "productmerchantId": "BIYZ",
   "campaignCode": "1001381",
   "campaignType": "C",
   "brand": "C",
   "campaignName": "test charge coupon",
   "campaignDesc": "test",
   "sellingPrice": 25,
   "orginalPrice": 27,
   "campaignTc": "test",
   "campaignStatus": "A",
   "dailyLimit": 4,
   "dailyLimitType": "A",
   "packQty": 1,
   "totalRedeem": 10,
   "allocationCount": 10,
   "couponUrl": "BIYZ.mezzofy.com/coupons/1001381",
   "dayFilter": "N",
   "expiryDays": 12,
   "issuedcoupon": 7,
   "redeemcoupon": 1,
   "allocationcoupon": 25,
   "ratecoupon": 0,
   "hashCode": "1499339192",
   "createdOn": 1499319392000,
   "distance": 0,
   "outletDistance": "0 M",
   "expirydue": "12",
   "expiryname": "D",
   "emailStaff": "I",
   "couponOver": "I",
   "campaignUuid": "f66506c5-b6b9-4d8d-a1b2-320f660e74ae",
   "redemptionQuota": 4,
   "campaignimages": [
    {
     "campaignimage": {
      "pimageId": "RKIIDI",
      "campaignId": "GAQEH1",
      "campaignImage": "https://..../test123.png",
      "imageSeq": 1,
      "imageStatus": "A"
      }
    }
   ],
   "sites": [
    {
     "site": {
     "siteId": "ED0S6"
    }
   }
  ]
 }
}

6.2 Campaign Group

Field Type Description
campgrpId CHAR[6]
Campaign Group ID
campgrpName CHAR[6]
Campaign Group Name
campgrpIdImageurl CHAR[250]
Campaign Group Image Url
campgrpSeq Integer
Campaign Group Sequence Number
campgrpStatus CHAR[1]
Campaign Group Status
A - Active
N - Not Active
hashCode CHAR[12]
Campaign Group Hash Code
updateOn CHAR[30]
Read Only
Last Updated Date and Time

Note: Campgrp = Campaign Group

6.2.1 Create Campaign Group

Create a Campaign group details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
6.2.1.1 - Create a Campaign group details.
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/campaigngroups
REQUEST
 {
  "campaigngroup": {
   "merchantId": "WZR3",
   "campgrpName": "Test M Oct20",
   "campgrpSeq": "2",
   "campgrpImageurl": "https://..../F1A56DB2-A860-437E-ACB6-00EFF71A0484.jpg",
   "campgrpStatus": "A",
   "hashCode": "1477289849",
   "updatedOn": "2018-06-30T18:18:18+08:00"
  }
 }
RESPONSE
 {
  "campaigngroup": {
   "campgrpId": "JU6U",
   "merchantId": "DMHA",
   "campgrpName": "Test M Oct20",
   "campgrpSeq": "2",
   "campgrpImageurl": "https://..../F1A56DB2-A860-437E-ACB6-00EFF71A0484.jpg",
   "campgrpStatus": "A",
   "hashCode": "1477289849",
   "updatedOn": "2018-06-30T18:18:18+08:00"
  },
  "campGrpDetails": []
 }

6.2.2 View Campaign Group

View a specific Campaign group details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Campaign Groups Attributes

Method: GET
6.2.2.1 - View a particular Campaign group details.
URL : https://{merchantCode}.mezzofy.com/api/v1/campaigngroups/[campgrpId]
RESPONSE
 {
  "campaigngroup": {
   "campgrpId": "JU6U",
   "merchantId": "DMHA",
   "campgrpName": "Test M Oct20",
   "campgrpSeq": "2",
   "campgrpImageurl": "https://..../F1A56DB2-A860-437E-ACB6-00EFF71A0484.jpg",
   "campgrpStatus": "A",
   "hashCode": "1477289849",
   "updatedOn": "2016-11-11T18:18:18+08:00"
  };
  "campGrpDetails": [
   {
    "campGrpDetail": {
    "campaignId": "ZSOSNA",
    "campgrpId": "JU6U"
    }
   }
  ]
 }

6.2.3 Update Campaign Group

Update a Campaign group details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
6.2.3.1 - Update a Campaign group details.
URL: https://{merchantCode}.mezzofy.com/api/v1/campaigngroups /[campgrpId]

6.2.4 View Campaign Group List

View a Campaign group list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.2.4.1 - Returns the number of total records.
URL: https://{merchantCode}.mezzofy.com/api/v1/campaigngroups

6.2.4.2 - View campaigngroup list.
URL: https://{merchantCode}.mezzofy.com/api/v1/campaigngroups?page=n
RESPONSE
{
 "campaigngroups":
  {
   "campgrpId": "JU6U",
   "merchantId": "DMHA",
   "campgrpName": "Test M Oct20",
   "campgrpSeq": "2",
   "campgrpImageurl": "https://..../F1A56DB2-A860-437E-ACB6-00EFF71A0484.jpg",
   "campgrpStatus": "A",
   "hashCode": "1477289849",
   "updatedOn": "2016-11-11T18:18:18+08:00"
  },
  "campGrpDetails": [
   {
    "campGrpDetail": {
    "campaignId": "4CH9HN",
    "campgrpId": "JU6U",
    }
   },
  ]
 }
 "size": {
  "pagesize": 1,
  "totalsize": 1,
  "resultsize": 1
 }
}

6.3 Campaign Allocation (Reserves Coupon Range)

Campaign Allocation Attributes

Field Type Description
allocationId CHAR[6]
Allocation ID
allocationCount Integer
Allocation Count
A - Active
N - Not Active
allocationRefers CHAR[100]
Allocation Reference
allocationRemark CHAR[2000]
Allocation Remarks
updateOn CHAR[30]
Read Only
Last Updated Date and Time

6.3.1 Create Campaign Allocation Details

To Create a Campaign allocation (Reserves Coupon Range) details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
6.3.1.1 - Create Campaign Allocation details.
URL: https://{merchantCode}.mezzofy.com/api/v1/coupons/alloc
REQUEST
 {
  "couponalloc": {
   "campaignId": "1ATO33",
   "allocationCount": 5,
   "allocationRefer": "Test Campaign",
   "allocationRemark": "Remarks for Test Campaign"
   }
 }
RESPONSE
 {
  "couponalloc": {
   "allocationId": "34BADN",
   "campaignId": "1ATO33",
   "allocationCount": 5,
   "allocationRefer": "Test Campaign",
   "allocationRemark": "Remarks for Test Campaign",
   "updatedOn": 1477034461000
   }
 }

6.4 Customer Coupon

Customer Coupon Attributes

Field Type Description
couponId CHAR[10]
Coupon ID
productId CHAR[10]
Product ID
poId CHAR[10]
Purchase Order ID
podetailId CHAR[10]
Purchase Order Detail ID
merchantId CHAR[4]
Merchant ID
customerId CHAR[6]
Customer ID
couponName CHAR[200]
Coupon Name
couponNo CHAR[50]
Coupon No
expiryDate DATE
Expiry Date
startDate DATE
Start Date
couponStatus CHAR[1]
Coupon Status
C - Created or Issued
R - Reedeemed
A - Available
L - Allocated??
productNote1 CHAR[250]
Product Note1
productNote2 CHAR[250]
Product Note2
productNote3 CHAR[250]
Product Note3
productDesc CHAR[250]
Product Description
productImageurl CHAR[250]
Product Image URL
referencesEmail CHAR[150]
ReferencesEmail
masscouponId CHAR[100]
Mass Coupon ID
sellingPrice Double
Selling Price
originalPrice Dobule
Original Price
productTc CHAR[200]
Prodct Terms and Conditions
hashCode CHAR[12]
?????
updateOn CHAR[30]
Read Only
Last Updated Date and Time

6.4.1 View Customer Coupon

View a Customer Coupon details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.4.1.1 - View Customer Coupon details.
URL: https://{merchantCode}.mezzofy.com/api/v1/customercoupons/[couponId]
RESPONSE
{
 "customercoupon": {
  "couponId": "2BAqxEiwn3",
  "customerId": "JSDS9U",
  "couponNo": "122",
  "couponStatus": "A",
  "passbookUrl": "https://.../coupon/passbook/1MIKYSLBFJ.pkpass",
  "barcodeUrl": "https://.../mzcouponuat/coupon/passbook/ZHYVRS-1MIKYSLBFJ.png",
  "qrcodeUrl": "https://.../mzcouponuat/coupon/qrcode/ZHYVRS-1MIKYSLBFJ.png",
  "createdOn": 1478264597000,
  "updatedOn": 1478264597000
  },
 "campaign": {
  "campaignId": "C5LZN1",
  "merchantId": "DMHA",
  "productmerchantId": "DMHA",
  "campaignCode": "1002370",
  "campaignType": "C",
  "brand": "F",
  "campaignName": "VIP Voucher A",
  "campaignDesc": ""Pay $400 for $500 Worth of Dining Vouchers.",
  "campaignTc": "- Voucher can be Transferable. Voucher Valid till Expiry Date",
  "campaignStatus": "A",
  "dailyLimit": 100,
  "packQty": 5,
  "totalRedeem": 100,
  "allocationCount": 100,
  "couponUrl": "DMHA.uat.mezzofy.com/coupon/1002370",
  "dayFilter": "N",
  "expiryDays": 30,
  "issuedcoupon": 0,
  "redeemcoupon": 0,
  "allocationcoupon": 0,
  "ratecoupon": 0,
  "distance": 0,
  "videoUrl": "",
  "emailStaff": "I",
  "couponOver": "I",
  "campaignUuid": "79a087c9-872f-4b31-91b2-be9bc15f2a1f",
  "redemptionQuota": 0,
  "onlineRedeem": "",
  "onlineShopUrl": "www.mezzofy.com/download/",
  "availableCoupon": 0,
  "qrUrl": "https://.../mzcouponuat/coupon/qrcode/1002370.png",
  "gtin": "",
  "publish": "A",
  "customData": "",
  "hashCode": "1531924341",
  "createdOn": 1477386808000
  },
 "coupon": {
  "couponId": "2BAqxEiwn3",
  "allocationId": "XkAUDz",
  "campaignId": "rnT4tZ",
  "couponNo": "9341280374",
  "purchaseDate": 1479882921000,
  "redeemDate": 1476272308000,
  "startDate": 1478111401000,
  "endDate": 1479839399000,
  "couponName": "REstless",
  "couponStatus": "A",
  "productDesc": "Pay $400 for $500 Worth of Dining Vouchers.",
  "productImageurl": "https://.../coupon/ProductImg/45dae81ce3cb19.jpg",
  "hashCode": "1478264597",
  "createdOn": 1478264597000,
  "updatedOn": 1478264597000
  }
 }

6.4.2 View Customer Coupon List

View a Customer list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.4.2.1 - View Customer Coupon List.
URL: https://{merchantCode}.mezzofy.com/api/v1/customercoupons?customerid=[value]&status=[value]&page=[n]
RESPONSE
{
 "customercoupons": [
  {
   "customercoupon": {
      "couponId": "2BAqxEiwn3",
      "customerId": "JSDS9U",
      "couponNo": "122",
      "couponStatus": "A",
      "passbookUrl": "https://.../coupon/passbook/1MIKYSLBFJ.pkpass",
      "barcodeUrl": "https://.../mzcouponuat/coupon/passbook/ZHYVRS-1MIKYSLBFJ.png",
      "qrcodeUrl": "https://.../mzcouponuat/coupon/qrcode/ZHYVRS-1MIKYSLBFJ.png",
      "createdOn": 1478264597000,
      "updatedOn": 1478264597000
     },
     "campaign": {
      "campaignId": "C5LZN1",
      "merchantId": "DMHA",
      "productmerchantId": "DMHA",
      "campaignCode": "1002370",
      "campaignType": "C",
      "brand": "F",
      "campaignName": "VIP Voucher A",
      "campaignDesc": ""Pay $400 for $500 Worth of Dining Vouchers.",
      "campaignTc": "- Voucher can be Transferable. Voucher Valid till Expiry Date",
      "campaignStatus": "A",
      "dailyLimit": 100,
      "packQty": 5,
      "totalRedeem": 100,
      "allocationCount": 100,
      "couponUrl": "DMHA.uat.mezzofy.com/coupon/1002370",
      "dayFilter": "N",
      "expiryDays": 30,
      "issuedcoupon": 0,
      "redeemcoupon": 0,
      "allocationcoupon": 0,
      "ratecoupon": 0,
      "distance": 0,
      "videoUrl": "",
      "emailStaff": "I",
      "couponOver": "I",
      "campaignUuid": "79a087c9-872f-4b31-91b2-be9bc15f2a1f",
      "redemptionQuota": 0,
      "onlineRedeem": "",
      "onlineShopUrl": "www.mezzofy.com/download/",
      "availableCoupon": 0,
      "qrUrl": "https://.../mzcouponuat/coupon/qrcode/1002370.png",
      "gtin": "",
      "publish": "A,"
      "customData": "",
      "hashCode": "1531924341",
      "createdOn": 1477386808000
     },
     "coupon": {
       "couponId": "2BAqxEiwn3",
       "allocationId": "XkAUDz",
       "campaignId": "rnT4tZ",
       "couponNo": "9341280374",
       "purchaseDate": 1479882921000,
       "redeemDate": 1476272308000,
       "startDate": 1478111401000,
       "endDate": 1479839399000,
       "couponName": "REstless",
       "couponStatus": "A",
       "productDesc": "Pay $400 for $500 Worth of Dining Vouchers.",
       "productImageurl": "https://.../coupon/ProductImg/45dae81ce3cb19.jpg",
       "hashCode": "1478264597",
       "createdOn": 1478264597000,
       "updatedOn": 1478264597000
       }
     }
   ],
   "size": {
     "pagesize": 1,
     "resultsize": 1,
     "totalsize": 1
   }
}

6.5 Coupon Purchase Order

A purchase order is a source document to place an order with a Merchant. It typically lists the date of the order, shipping information, shipping date, discount terms, description of the goods, price, quantity, and PO number. So basically, an order includes everything about the transaction.

Purchase Order Attributes

Field Type Description
poId CHAR[10]
Product Order ID
customerId CHAR[6]
Customer ID
A - Active
N - Not Active
poDate Date/Time
Purchase Order Date
poNo CHAR[50]
Purchase Order No
poTotal Double
Purchase Order Total
poStatus CHAR[6]
Place Order Status
A - Active Not Yet Paid
P - Paid
payReceipt CHAR[200]
Pay Receipt
payResponse CHAR[5]
Pay Response
txnFrom CHAR[6]
Transaction From
txnTo CHAR[6]
Transaction To
payToken CHAR[50]
Pay Token
rewardPoints Double
Reward Points
hashCode CHAR[12]
?????
updateOn CHAR[30]
Read Only
Last Updated Date and Time

6.5.1 Create Coupon Purchase Order

Create Coupon Purchase Order details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
6.5.1.1 - Create Coupon Purchase Order details
URL: http://{merchantCode}.mezzofy.com/mzcoupon/api/v1/pos
RESPONSE
 {
  "po": {
    "customerId": "JSDS9U",
    "poDate": 1476729000000,
    "poNo": "2235119",
    "poTotal": 1234,
    "poStatus": "A",
    "payReceipt": "CHECK",
    "payResponse": "0",
    "hashCode": "1478064824",
    "couponType": "C",
    "updatedOn": 1478064824000
   },
   "podetails": [
    {
     "podetail": {
        "campaignName": "Test",
        "campaignId": "rnT4tZ",
        "campaignPrice": 25,
        "campaignQty": 1,
        "campaignTotal": 12,
        "updatedOn": 1478064831000
       }
     }
   ]
 }

6.5.2 View Coupon Purchase Order

View a Coupon Purchase Order details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.5.2.1 - View Coupon a Purchase Order details
URL: http://{merchantCode}.mezzofy.com/mzcoupon/api/v1/pos/[purchaseorderId]
RESPONSE
 {
  "po": {
    "poId": "OJVBW0NE0V",
    "merchantId": "WZR3",
    "customerId": "JSDS9U",
    "poDate": 1476729000000,
    "poNo": "2233457",
    "poTotal": 1234,
    "poStatus": "A",
    "payReceipt": "cHECK",
    "payResponse": "0",
    "hashCode": "1478064824",
    "updatedOn": 1478064824000,
    "couponType": "C"
   },
   "podetails": [
    {
     "podetail": {
        "podtlId": "AHH6GZJWYR",
        "poId": "OJVBW0NE0V",
        "campaignName": "eere",
        "campaignPrice": 25,
        "campaignQty": 1,
        "campaignTotal": 12,
        "status": "P",
        "updatedOn": 1478064831000
       }
     }
   ]
 }

6.5.3 Update Coupon Purchase Order

Update a Coupon Purchase Order details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
6.5.3.1 - Update a Merchant details.
URL: https://{merchantCode}.mezzofy.com/api/v1/pos/[purchaseorderId]
REQUEST
RESPONSE

6.5.4 View Coupon Purchase Order List

View Coupon Purchase Order list details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.5.4.1 - View Coupon Purchase Order list details
URL: https://{merchantCode}.mezzofy.com/api/v1/pos
RESPONSE
 {
  "pos": [
   {
    "po": {
      "poId": "OJVBW0NE0V",
      "merchantId": "WZR3",
      "customerId": "JSDS9U",
      "poDate": 1476729000000,
      "poNo": "2233457",
      "poTotal": 1234,
      "poStatus": "A",
      "payReceipt": "cHECK",
      "payResponse": "0",
      "hashCode": "1478064824",
      "updatedOn": 1478064824000,
      "couponType": "C"
      },
      "podetails": [
       {
        "podetail": {
         "podtlId": "AHH6GZJWYR",
         "poId": "OJVBW0NE0V",
         "campaignName": "eere",
         "campaignPrice": 25,
         "campaignQty": 1,
         "campaignTotal": 12,
         "status": "P",
         "updatedOn": 1478064831000
         }
       }
     ]
   }
   "size": {
    "pagesize": 1,
    "resultsize": 1,
    "totalsize": 1
    }
  }

6.6 Get Coupon Campaign

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/customercoupons/campaign/{campaignId}?customerid=[Value]&status=[Value]
RESPONSE
{
 "customercoupons": [
  {
  "customercoupon": {
    "couponId": "2BAqxEiwn3",
    "customerId": "JSDS9U",
    "couponNo": "122",
    "couponStatus": "A",
    "passbookUrl": "https://.../coupon/passbook/1MIKYSLBFJ.pkpass",
    "barcodeUrl": "https://.../mzcouponuat/coupon/passbook/ZHYVRS-1MIKYSLBFJ.png",
    "qrcodeUrl": "https://.../mzcouponuat/coupon/qrcode/ZHYVRS-1MIKYSLBFJ.png",
    "createdOn": 1478264597000,
    "updatedOn": 1478264597000
    },
  "campaign": {
    "campaignId": "C5LZN1",
    "merchantId": "DMHA",
    "productmerchantId": "DMHA",
    "campaignCode": "1002370",
    "campaignType": "C",
    "brand": "F",
    "campaignName": "VIP Voucher A",
    "campaignDesc": ""Pay $400 for $500 Worth of Dining Vouchers.",
    "campaignTc": "- Voucher can be Transferable. Voucher Valid till Expiry Date",
    "campaignStatus": "A",
    "dailyLimit": 100,
    "packQty": 5,
    "totalRedeem": 100,
    "allocationCount": 100,
    "couponUrl": "DMHA.uat.mezzofy.com/coupon/1002370",
    "dayFilter": "N",
    "expiryDays": 30,
    "issuedcoupon": 0,
    "redeemcoupon": 0,
    "allocationcoupon": 0,
    "ratecoupon": 0,
    "distance": 0,
    "videoUrl": "",
    "emailStaff": "I",
    "couponOver": "I",
    "campaignUuid": "79a087c9-872f-4b31-91b2-be9bc15f2a1f"
    "redemptionQuota": 0
    "onlineRedeem": ""
    "onlineShopUrl": "www.mezzofy.com/download/"
    "availableCoupon": 0
    "qrUrl": "https://.../mzcouponuat/coupon/qrcode/1002370.png"
    "gtin": ""
    "publish": "A"
    "customData": ""
    "hashCode": "1531924341"
    "createdOn": 1477386808000
   },
  "coupon": {
    "couponId": "2BAqxEiwn3",
     "allocationId": "XkAUDz",
     "campaignId": "rnT4tZ",
     "couponNo": "9341280374",
     "purchaseDate": 1479882921000,
     "redeemDate": 1476272308000,
     "startDate": 1478111401000,
     "endDate": 1479839399000,
     "couponName": "REstless",
     "couponStatus": "A",
     "productDesc": "Pay $400 for $500 Worth of Dining Vouchers.",
     "productImageurl": "https://.../coupon/ProductImg/45dae81ce3cb19.jpg",
     "hashCode": "1478264597",
     "createdOn": 1478264597000,
     "updatedOn": 1478264597000
     }
   }
  ],
  "size": {
   "pagesize": 1,
   "resultsize": 1,
   "totalsize": 1
  }
 }

6.7 Campaign by Group

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/campaigngroups?customerid=[Value]&status=[Value]&page=[n]
RESPONSE
{
 "campaigngroups": [
  {
  "campaigngroup": {
    "campgrpId": "JU6U",
    "merchantId": "DMHA",
    "campgrpName": "Campaign Group One",
    "campgrpImageurl": "https://..../mzcouponuat/F1A56DB2-437E-ACB6-00EFF71A0484.jpg",
    "campgrpSeq": 1,
    "campgrpStatus": "A",
    "hashCode": "1510311516",
    "createdOn": 1478264597000,
    "updatedOn": 1478264597000
    },
  "campGrpDetails": [
   {
   "campGrpDetail":{
    "campaignId": "4CH9HN",
    "campgrpId": "JU6U"
     }
    },
   "campGrpDetail":{
    "campaignId": "ZSOSNA",
    "campgrpId": "JU6U"
     }
    }
   ],
  }
 ],
  "size": {
   "pagesize": 1,
   "resultsize": 1,
   "totalsize": 1
  }
 }

6.8 Get Coupon by Coupon ID

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
6.8.1 - Get Coupon details by Coupon No.
URL: https://platform.mezzofy.com/api/v1/{mechantCode}/coupons/[couponNo]?[pcustomerid=value]
RESPONSE
 {
  "coupon": {
   "couponId": "94FSLQM94M",
   "allocationId": "XTMKVI",
   "campaignId": "OWCAFK",
   "campaignCode": "1001875",
   "couponNo": 1530020218000,
   "purchaseDate": 1479882921000,
   "redeemDate": 1476272308000,
   "startDate": 1478111401000,
   "endDate": 1479839399000,
   "couponName": "Birthday",
   "couponStatus": "A",
   "productNote1": "",
   "productNote2": "",
   "productNote3": "",
   "productDesc": "Desc1",
   "productImageurl": "https://..../coupon/ProductImg/bb6fc91a-4437-8e5e-4ac444171a2c41.png"
   "hashCode": "1478264597",
   "createdOn": 1478264597000,
   "updatedOn": 1478264597000,
  }
 }

6.9 Coupon Redeem by Scanner

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/orders/redeem
REQUEST
{
 "order": {
  "couponId": "3GRK9IMIP4",
  "siteId":"7QFNM"
   }
}
RESPONSE
{
 "order": {
  "couponId": "3GRK9IMIP4",
  "merchantId":"DMHA",
  "siteId":"7QFNM",
  "customerId":"ZHYVRS",
  "customerName":"vasanth",
  "trackId":"EMAKG",
  "orderType":"R",
  "orderNo":"HKFA7MMSPA",
  "orderStatus":"A",
  "hashCode":"1533192527",
  "updatedOn":1533192527000
  "createdOn":1533192527000
   }
}

6.10 Coupon Redeem by Outlet Pin Code

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/sites/sitepass/[siteRedeemPass]
RESPONSE
 {
  "site": {
    "siteId": "7QFNM",
    "merchantId": "DMHA",
    "siteName": "Test Outlet for Camp",
    "siteAddress": "Singapore Demo Shop Address",
    "siteContact": "34343434",
    "siteDesc": "Feature shop",
    "siteEmailId": "Shanshop@gmail.com",
    "siteSeqNo": 0,
    "siteImageurl": "https://.../coupon/outlet/a0a3-19d99f89665013.png",
    "siteOnlineStatus": "A",
    "siteStatus": "A",
    "siteRedeemPass": "1001",
    "hashCode": "1479899714"
    "updatedOn":1533192527000
    "createdOn":1533192527000
   }
 }

6.11 Share Coupon

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/customercoupons/sharecoupon
REQUEST
 {
  "sharecoupon": {
    "couponId": "94FSLQM94M",
    "email": "Shanshop@gmail.com",
    "notes": "Test Share Coupon",
    "customerId": "ZHYVRS",
   }
 }
RESPONSE
 {
  "sharecoupon": {
    "couponId": "94FSLQM94M",
    "email": "Shanshop@gmail.com",
    "notes": "Test Share Coupon",
    "customerId": "ZHYVRS",
   }
 }

6.12 Update Coupon

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
URL: https://platform.mezzofy.com/api/v1/{merchantCode}/customercoupons/voidcoupon
RESPONSE
 {
  "customercoupon": {
    "couponId": "94FSLQM94M",
    "customerId": "ZHYVRS",
    "couponStatus": "D"
   }
 }

6.13 Error Codes

The followings are the error codes used in the Coupon module or function.

Error Code Description
4101 No purchase order is found
4102 No coupon is found
4103 No open coupon is found
4104 No allocation coupon is found
4105 Coupon allocation is failed Please check the input parameters
4106 No audit trail records are found
4107 Requested resource (or) merchant code is already found
4108 Coupons are not found
4109 Referred user is not found
4110 Guest user is not allowed to do this transaction
4111 Failed to create purchase order. Please check the input parameters
4112 The coupon is not valid

7.0 Payment

Merchant can leveage on our integrated payment gateway with PayPal. Simplpy create your own account witht the payment service provider. Get the merchant account details from PayPal and input use it to pass as a parameter to process payment. All payment will be credit directly to your own PayPal account. No middle man or another mark up fees. However, normal PayPal fees applies for using their service.

No PayPal account yet? Sign Up Now.

7.1 Payment Setup

Field Type Description
merchantId CHAR[5]
Read Only
Merchant ID
paymentId CHAR[3] Payment ID
paymentName CHAR[150] Payment Name
paymentLogourl CHAR[250] Payment Logo URL
paymentType CHAR[150] Payment Type
paymentEnviornment CHAR[1] Payment Enviornment
"P" = Production
"S" = Sandbox
paymentStatus CHAR[1]
Mandatory
Payment Status
"A" = Active
"N" = Not Active
hashCode CHAR[12]
Read Only
Product Hash Code
updateOn CHAR[30]
Read Only
Last Updated Date and Time

7.1.1 View a Payment Setup

View a Payment Setup details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Product Attributes

Method: GET
7.1.1.1 - View Product Setup details.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments/[paymentId]
RESPONSE
{
 "payment": {
  "paymentId": "C1234",
  "paymentName": "C1234",
  "paymentLogourl": "http://.../image.png",
  "paymentType": "PayPal",
  "paymentEnviornment": "P",
  "paymentStatus": "A",
  "hashcode": "88878987876",
  "updatedOn": "2016-09-01T18:18:18+08:00"
 }
}

7.1.2 View a Payment Setup List

View a Payment Setup list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
7.1.2.1 - Returns the number of total records.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments/stat
RESPONSE
{
 "stat": {
  "size": [n]
 }
}
Method: GET
7.1.2.2 - View Payment Setup list.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments?page[n]
RESPONSE
[
 }
  "payment": {
   "paymentId": "C1234",
   "paymentName": "C1234",
   "paymentLogourl": "http://.../image.png",
   "paymentType": "PayPal",
   "paymentEnviornment": "P",
   "paymentStatus": "A",
   "hashcode": "88878987876",
   "updatedOn": "2016-09-01T18:18:18+08:00"
  }
 },
 {
  "payment": {
   "paymentId": "C1234",
   "paymentName": "C1234",
   "paymentLogourl": "http://.../image.png",
   "paymentType": "PayPal",
   "paymentEnviornment": "P",
   "paymentStatus": "A",
   "hashcode": "88878987876",
   "updatedOn": "2016-09-01T18:18:18+08:00"
  }
 },
]

7.1.3 Create a Payment Setup

Create a Payment Setup details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
7.1.3.1 - Create a Payment Setup details.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments
REQUEST
{
 "paymentdetail": {
  "merchantId": "DMHA",
  "paymentId": "YeuC",
  "paymentName": "Paypal Express"",
  "paymentLogourl": "https://..../86b7-f605b28ca63000.png",
  "paymentMerchantId": "hello_api1.mezzofy.com"",
  "paymentToken": "AFcWxV21C7fd0v3bYYYRCpSSRl31A7UKoiaRppyWFyDwuL1qyvPweFO0",
  "paymentStatus": "A",
  "paymentType": "Paypal",
  "paymentEnviornment": "Test",
  "currency": "HKD"
 }
}
RESPONSE
{
 "paymentdetail": {
  "paymentDetailId": "57XF",
  "merchantId": "DMHA",
  "paymentId": "YeuC",
  "paymentName": "Paypal Express"",
  "paymentLogourl": "https://..../86b7-f605b28ca63000.png",
  "paymentMerchantId": "hello_api1.mezzofy.com"",
  "paymentToken": "AFcWxV21C7fd0v3bYYYRCpSSRl31A7UKoiaRppyWFyDwuL1qyvPweFO0",
  "paymentStatus": "A",
  "paymentType": "Paypal",
  "paymentEnviornment": "Test",
  "currency": "HKD"
 }
}

7.1.4 Update a Payment Setup

Update a Payment Setup details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
7.1.4.1 - Update a Payment Setup details.
URL: https://{merchantCode}.mezzofy.com/api/v1/products/[productId]
REQUEST
{
 "payment": {
  "paymentId": "C1234",
  "paymentName": "C1234",
  "paymentLogourl": "http://.../image.png",
  "paymentType": "PayPal",
  "paymentEnviornment": "P",
  "paymentStatus": "A",
 }
}
RESPONSE
{
 "payment": {
  "paymentId": "C1234",
  "paymentName": "C1234",
  "paymentLogourl": "http://.../image.png",
  "paymentType": "PayPal",
  "paymentEnviornment": "P",
  "paymentStatus": "A",
  "hashcode": "88878987876",
  "updatedOn": "2016-09-01T18:18:18+08:00"
 }
}

7.2 Payment Type Setup

Field Type Description
merchantId CHAR[5]
Read Only
Merchant ID
paymentId CHAR[3] Payment ID
paymentmerchantId CHAR[150] Payment Merchant ID
paymentdetailId CHAR[6] Payment Detail ID
paymentKey CHAR[150] Payment Key
paymentToken CHAR[250] Payment Token
paymentUrl CHAR[250] Payment URL
paymentStatus CHAR[1]
Mandatory
Payment Status
"A" = Active
"N" = Not Active
hashCode CHAR[12]
Read Only
Product Hash Code
updateOn CHAR[30]
Read Only
Last Updated Date and Time

7.2.1 View a Payment Type Setup

View a Payment Type Setup details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Product Attributes

Method: GET
7.2.1.1 - View Product Type Setup details.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments/[paymentId]
RESPONSE
{
 "paymentdetail": {
  "paymentId": "C1234",
  "paymentmerchantId": "MP123",
  "paymentKey": "P12388889984",
  "paymentToken": "PayPal Token",
  "paymentUrl": "http://.../paypal",
  "paymentStatus": "A",
  "hashcode": "88878987876",
  "updatedOn": "2016-09-01T18:18:18+08:00"
 }
}

7.2.2 View a Payment Type Setup List

View a Payment Type Setup list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
7.2.2.1 - Returns the number of total records.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments/stat
RESPONSE
{
 "stat": {
  "size": [n]
 }
}
Method: GET
7.2.2.2 - View Payment Setup list.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments?page[n]
RESPONSE
[
 }
  "paymentdetail": {
   "paymentId": "C1234",
   "paymentmerchantId": "MP123",
   "paymentKey": "P12388889984",
   "paymentToken": "PayPal Token",
   "paymentUrl": "http://.../paypal",
   "paymentStatus": "A",
   "hashcode": "88878987876",
   "updatedOn": "2016-09-01T18:18:18+08:00"
  }
 },
 {
  "paymentdetail": {
   "paymentId": "C1234",
   "paymentmerchantId": "MP123",
   "paymentKey": "P12388889984",
   "paymentToken": "PayPal Token",
   "paymentUrl": "http://.../paypal",
   "paymentStatus": "A",
   "hashcode": "88878987876",
   "updatedOn": "2016-09-01T18:18:18+08:00"
  }
 },
]

7.2.3 Create a Payment Type Setup

Create a Payment Type Setup details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
7.2.3.1 - Create a Payment Type Setup details.
URL: https://{merchantCode}.mezzofy.com/api/v1/products
REQUEST
{
 "paymentdetail": {
  "paymentId": "C1234",
  "paymentmerchantId": "MP123",
  "paymentKey": "P12388889984",
  "paymentToken": "PayPal Token",
  "paymentUrl": "http://.../paypal",
  "paymentStatus": "A",
 }
}
RESPONSE
{
 "paymentdetail": {
  "paymentId": "C1234",
  "paymentmerchantId": "MP123",
  "paymentKey": "P12388889984",
  "paymentToken": "PayPal Token",
  "paymentUrl": "http://.../paypal",
  "paymentStatus": "A",
  "hashcode": "88878987876",
  "updatedOn": "2016-09-01T18:18:18+08:00"
 }
}

7.2.4 Update a Payment Type Setup

Update a Payment Type Setup details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
7.2.4.1 - Update a Payment Type Setup details.
URL: https://{merchantCode}.mezzofy.com/api/v1/products/[productId]
REQUEST
{
 "paymentdetail": {
  "paymentId": "C1234",
  "paymentmerchantId": "MP123",
  "paymentKey": "P12388889984",
  "paymentToken": "PayPal Token",
  "paymentUrl": "http://.../paypal",
  "paymentStatus": "A",
 }
}
RESPONSE
{
 "paymentdetail": {
  "paymentId": "C1234",
  "paymentmerchantId": "MP123",
  "paymentKey": "P12388889984",
  "paymentToken": "PayPal Token",
  "paymentUrl": "http://.../paypal",
  "paymentStatus": "A",
  "hashcode": "88878987876",
  "updatedOn": "2016-09-01T18:18:18+08:00"
 }
}

7.3 View a Customer Payment

View a Customer Payment.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Customer Payment Attributes

Field Type Description
merchantId CHAR[5]
Read Only
Merchant ID
siteId CHAR[5]
Read Only
Merchant Site ID
custpayId CHAR[10] Customer Payment ID
transactionAmount DOUBLE Transaction Amount
referencesNo CHAR[50] Reference Number
remark CHAR[250] Payment Remarks
userId CHAR[5] Merchant User ID
userLogin CHAR[40] Merchant User Login
hashCode CHAR[12] Hash Code
updateOn CHAR[30]
Read Only
Last Updated Date and Time
Method: GET
7.3.1 - View a Customer Payment details.
URL: https://{merchantCode}.mezzofy.com/api/v1/payments
RESPONSE
{
 "payments": [
   {
    "payment": {
     "paymentId": "YeuC",
     "paymentType": "Paypal",
     "paymentEnviornment": "Production",
     "paymentStatus": "A"
    }
   }
  ],
  "paymentdetails": [
   {
    "paymentdetail": {
      "paymentDetailId": "57XF",
      "merchantId": "DMHA",
      "paymentId": "YeuC",
      "paymentName": "Paypal Express",
      "paymentLogourl": "https://..../payment/a341aa08-62d0-4627-86b7-f605b28ca63000.png",
      "paymentMerchantId": "hello_api1.mezzofy.com",
      "paymentKey": "3TZFUV9ZTDNK7K3Q",
      "paymentToken": "AFcWxV21C7fd0v3bYYYRCpSSRl31A7UKoiaRppyWFyDwuL1qyvPweFO0",
      "paymentStatus": "A",
      "paymentType": "Paypal",
      "paymentEnviornment": "Production",
      "currency": "HKD"
      }
    }
   ],
   "size": {
     "pagesize": 1,
     "resultsize": 1,
     "totalsize": 1
   }
}

8.0 Customer

We provide the Customer data table to capture and assoicate with the coupons for link up in order to display what coupons does a customer have and profiling of the customer is possible as you expand the data to collect. It will work together with you existing CRM too.

Customer Attributes

Field Type Description
merchant_id VARCHAR[4]
Read Only
Merchant ID
customer_id VARCHAR[6]
Read Only
Customer ID
customer_group_id VARCHAR[6] Customer Group ID
customer_first_name VARCHAR[100] Customer First Name
customer_last_name VARCHAR[100] Customer Last Name
customer_username VARCHAR[100] Customer Username
customer_password CHAR[32] Customer Password
customer_email VARCHAR[200] Customer Email
country_code VARCHAR[2] Customer Country
customer_dob DATE Customer Date of Birth
customer_mobile VARCHAR[20] Customer Mobile
customer_gender VARCHAR[1] Customer Gender
"M" = Male
"F" = Female
customer_address VARCHAR[200] Customer Address
user_type VARCHAR[1] Customer Type
"C" - Customer
"A" - Agent
"S" - Staff
vip_no VARCHAR[50] Customer VIP Number
dgvip_no VARCHAR[50] Customer DGVIP Number
fb_token VARCHAR[1000] Customer Facebook Token
customer_status CHAR[1]
Mandatory
Customer Status
"A" = Active
"N" = Not Active
customer_image_url VARCHAR[258]
Read Only
Customer Image URL
member_id VARCHAR[100]
Read Only
Product Hash Code
updated_by CHAR[12]
Read Only
Product Hash Code
hash_code CHAR[12]
Read Only
Product Hash Code
created_on DATETIME
Read Only
Created Date and Time
update_on DATETIME
Read Only
Last Updated Date and Time

Customer Group Attributes

Field Type Description
merchantId CHAR[5]
Read Only
Merchant ID
customerId CHAR[6]
Read Only
Customer ID
customergroupId CHAR[6] Customer Group ID
customergroupName CHAR[100] Customer Group Name
dollarSpending DOUBLE Customer Dollar Spending
rewardPoints DOUBLE Customer Rewards Points
welcomePoints DOUBLE Customer Welcome Points
customergroupStatus CHAR[1]
Mandatory
Customer Status
"A" = Active
"N" = Not Active
hashCode CHAR[12]
Read Only
Product Hash Code
updateOn CHAR[30]
Read Only
Last Updated Date and Time

8.1 Create a Customer

Create a Customer details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
8.1.1 - Create a Customer details.
URL: https://{merchantCode}.mezzofy.com/api/v1/customers
REQUEST
{
 "customer": {
  "merchantId": "DMHA",
  "customerGroupId": "OKG",
  "customerFirstName": "Test Customer 01",
  "customerLastName": "Nov 01",
  "customerUsername": "TestCustomer01",
  "customerPassword": "9656734523874134",
  "customerEmail": "testcustomer1@email.com",
  "countryCode": "HK",
  "customerDob": "03051986",
  "customerMobile": "88889999",
  "customerGender": "M",
  "customerAddress": "Customer Address",
  "customerType": "C",
  "customerVipNo": "VIP123458",
  "customerReferNo": "",
  "customerFbToken": "",
  "customerStatus": "A",
  "customerStatus": "A",
  "customerImageUrl": "https://..../customer/f75e2155-b0a8-44d7-a8a1-036949a2a07d00.JPG",
  "couponCount": 0,
  "customData": "{\"productId\":\"GIGJFBG\",\"FUNCTION\":\"delete\"}"
 }
}
RESPONSE
{
 "customer": {
  "customerId": "1D4Q1Y",
  "merchantId": "WZR3",
  "customerFirstName": "Test Customer 01",
  "customerLastName": "Nov 01",
  "customerUsername": "TestCustomer01",
  "customerPassword": "12345378",
  "customerEmail": "Testcustomer01@email.com",
  "countryCode": "HK",
  "customerDob": "01011982",
  "customerMobile": "99999999",
  "customerGender": "M",
  "customerAddress": "Customer Address",
  "customerType": "C",
  "customerVipNo": "VIP123458",
  "customerReferNo": "",
  "customerFbToken": "",
  "customerStatus": "A",
  "customerStatus": "A",
  "customerImageUrl": "https://..../customer/f75e2155-b0a8-44d7-a8a1-036949a2a07d00.JPG",
  "couponCount": 0,
  "groupName": "VIP",
  "memberId": "",
  "countryName": "Hong Kong",
  "customData": "{\"productId\":\"GIGJFBG\",\"FUNCTION\":\"delete\"}",
  "hashcode": "88878987876",
  "updatedOn": "2016-11-11T18:18:18+08:00",
  "updatedBy": "Test Customer 01"
 }
}

8.2 View a Customer

View a Customer details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
8.2.1 - View a Customer details.
URL: https://{merchantCode}.mezzofy.com/api/v1/customers/[customerId]
REQUEST
{
 "customer": {
  "customerId": "1D4Q1Y",
  "merchantId": "WZR3",
  "customerFirstName": "Test Customer 01",
  "customerLastName": "Nov 01",
  "customerUsername": "TestCustomer01",
  "customerPassword": "12345378",
  "customerEmail": "Testcustomer01@email.com",
  "countryCode": "HK",
  "customerDob": "01011982",
  "customerMobile": "99999999",
  "customerGender": "M",
  "customerAddress": "Customer Address",
  "customerType": "C",
  "customerVipNo": "VIP123458",
  "customerReferNo": "",
  "customerFbToken": "",
  "customerStatus": "A",
  "customerStatus": "A",
  "customerImageUrl": "https://..../customer/f75e2155-b0a8-44d7-a8a1-036949a2a07d00.JPG",
  "couponCount": 0,
  "groupName": "VIP",
  "memberId": "",
  "customData": "{\"productId\":\"GIGJFBG\",\"FUNCTION\":\"delete\"}"
 }
}
RESPONSE
{
 "customer": {
  "customerId": "1D4Q1Y",
  "merchantId": "WZR3",
  "customerFirstName": "Test Customer 01",
  "customerLastName": "Nov 01",
  "customerUsername": "TestCustomer01",
  "customerPassword": "12345378",
  "customerEmail": "Testcustomer01@email.com",
  "countryCode": "HK",
  "customerDob": "01011982",
  "customerMobile": "99999999",
  "customerGender": "M",
  "customerAddress": "Customer Address",
  "customerType": "C",
  "customerVipNo": "VIP123458",
  "customerReferNo": "",
  "customerFbToken": "",
  "customerStatus": "A",
  "customerStatus": "A",
  "customerImageUrl": "https://..../customer/f75e2155-b0a8-44d7-a8a1-036949a2a07d00.JPG",
  "couponCount": 0,
  "groupName": "VIP",
  "memberId": "",
  "customData": "{\"productId\":\"GIGJFBG\",\"FUNCTION\":\"delete\"}",
  "hashcode": "88878987876",
  "updatedOn": "2016-11-11T18:18:18+08:00",
  "updatedBy": "Test Customer 01"
 }
}

8.3 Update a Customer

Update a Customer details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
8.3.1 - Update a Customer details.
URL: https://{merchantCode}.mezzofy.com/api/v1/customers/[customerId]
REQUEST
{
 "customer": {
  "customerId": "1D4Q1Y",
  "merchantId": "WZR3",
  "customerFirstName": "Test Customer 01",
  "customerLastName": "Nov 01",
  "customerUsername": "TestCustomer01",
  "customerPassword": "12345378",
  "customerEmail": "Testcustomer01@email.com",
  "countryCode": "HK",
  "customerDob": "01011982",
  "customerMobile": "99999999",
  "customerGender": "M",
  "customerAddress": "Customer Address",
  "customerType": "C",
  "customerVipNo": "VIP123458",
  "customerReferNo": "",
  "customerFbToken": "",
  "customerStatus": "A",
  "customerStatus": "A",
  "customerImageUrl": "https://..../customer/f75e2155-b0a8-44d7-a8a1-036949a2a07d00.JPG",
  "couponCount": 0,
  "groupName": "VIP",
  "memberId": "",
  "customData": "{\"productId\":\"GIGJFBG\",\"FUNCTION\":\"delete\"}",
 }
}
RESPONSE
{
 "customer": {
  "customerId": "1D4Q1Y",
  "merchantId": "WZR3",
  "customerFirstName": "Test Customer 01",
  "customerLastName": "Nov 01",
  "customerUsername": "TestCustomer01",
  "customerPassword": "12345378",
  "customerEmail": "Testcustomer01@email.com",
  "countryCode": "HK",
  "customerDob": "01011982",
  "customerMobile": "99999999",
  "customerGender": "M",
  "customerAddress": "Customer Address",
  "customerType": "C",
  "customerVipNo": "VIP123458",
  "customerReferNo": "",
  "customerFbToken": "",
  "customerStatus": "A",
  "customerStatus": "A",
  "customerImageUrl": "https://..../customer/f75e2155-b0a8-44d7-a8a1-036949a2a07d00.JPG",
  "couponCount": 0,
  "groupName": "VIP",
  "memberId": "",
  "customData": "{\"productId\":\"GIGJFBG\",\"FUNCTION\":\"delete\"}"
 }
}

8.4 View a Customer List

View a Customer list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
8.4.1 - View the Customers List.
URL: https://{merchantCode}.mezzofy.com/api/v1/customers
URL: https://{merchantCode}.mezzofy.com/api/v1/customers?page[n]
RESPONSE
{
 "customers": [
 {
  "customer": {
   "customerId": "CID123",
   "merchantId": "WZR3",
   "customergroupId": "CGID12",
   "customerFirstName": "Customer",
   "customerLastName": "Name 1",
   "customerUsername": "customer1",
   "customerPassword": "9813479123874134",
   "customerEmail": "customer1@email.com",
   "customerCountry": "Hong Kong",
   "customerDob": "01011980",
   "customerMobile": "99998888",
   "customerGender": "M",
   "customerAddress": "Customer Address",
   "customerType": "C",
   "customerVipNo": "VIP123456",
   "customerReferNo": "",
   "customerFbToken": "",
   "customerStatus": "A",
   "couponCount": 0,
   "groupName": "Default Group"
   }
  },
  {
  "customer": {
   "customerId": "CID456",
   "merchantId": "ZKRN",
   "customergroupId": "CGID21",
   "customerFirstName": "Customer",
   "customerLastName": "Name 2",
   "customerUsername": "customer2",
   "customerPassword": "1236547893874134",
   "customerEmail": "testcustomer2@email.com",
   "customerCountry": "Hong Kong",
   "customerDob": "03031985",
   "customerMobile": "77744466",
   "customerGender": "M",
   "customerAddress": "Customer Address",
   "customerType": "C",
   "customerVipNo": "VIP123456",
   "customerReferNo": "",
   "customerFbToken": "",
   "customerStatus": "A",
   "couponCount": 4,
   "groupName": "Default Group",
   "hashcode": "88878987876",
   "updatedOn": "2016-09-01T18:18:18+08:00",
   "updatedBy": "Customer"
   }
  }
 ],
 "size": {
  "pagesize": 1,
  "totalsize": 2,
  "resultsize": 2
 }
}

8.5 Create a Customer Group

Create a Customer Group details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
8.5.1 - Create a Customer Group details.
URL: https://{merchantCode}.mezzofy.com/api/v1/membership
REQUEST
{
 "customergroup": {
  "merchantId": "DMHA",
  "groupName": "Customer",
  "groupDesc": "Special Membership Grade",
  "groupImage": "https://..../coupon/outlet/153d3c9f-c5a4-4a61-a70b-882a24d04cb142.png",
  "merchantName": "Test Customer",
  "couponCount": "0",
  "defaultStatus": "",
  "seqNo": 1,
  "groupStatus": "A"
 }
}
RESPONSE
{
 "customergroup": {
  "customerGroupId": "TUZ",
  "merchantId": "DMHA",
  "groupName": "Customer",
  "groupDesc": "Special Membership Grade",
  "groupImage": "https://..../coupon/outlet/153d3c9f-c5a4-4a61-a70b-882a24d04cb142.png",
  "merchantName": "Test Customer",
  "couponCount": "0",
  "defaultStatus": "",
  "seqNo": 1,
  "dollarSpending": 0,
  "groupStatus": "A",
  "updatedOn": 1533193215000,
  "updatedBy": "self"
 }
}

8.6 View a Customer Group

View a Customer Group details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
8.6.1 - View a Customer Group details.
URL: https://{merchantCode}.mezzofy.com/api/v1/membership/[customerGroupId]
RESPONSE
{
 "customergroup": {
  "customerGroupId": "TUZ",
  "merchantId": "DMHA",
  "groupName": "Customer",
  "groupDesc": "Special Membership Grade",
  "groupImage": "https://..../coupon/outlet/153d3c9f-c5a4-4a61-a70b-882a24d04cb142.png",
  "merchantName": "Test Customer",
  "couponCount": "0",
  "defaultStatus": "",
  "seqNo": 1,
  "dollarSpending": 0,
  "groupStatus": "A",
  "updatedOn": 1533193215000,
  "updatedBy": "self"
 }
}

8.7 Update a Customer Group

Update a Customer Group details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (PUT method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: PUT
8.7.1 - Update a Customer Group details.
URL: https://{merchantCode}.mezzofy.com/api/v1/membership/[customergroupId]
REQUEST
{
 "customergroup": {
  "customerGroupId": "TUZ",
  "merchantId": "DMHA",
  "groupName": "Customer",
  "groupDesc": "Special Membership Grade",
  "groupImage": "https://..../coupon/outlet/153d3c9f-c5a4-4a61-a70b-882a24d04cb142.png",
  "merchantName": "Test Customer Group",
  "couponCount": "0",
  "defaultStatus": "",
  "seqNo": 1,
  "dollarSpending": 0,
  "groupStatus": "A",
  "updatedOn": 1533193215000,
  "updatedBy": "self"
 }
}
RESPONSE
{
 "customergroup": {
  "customerGroupId": "TUZ",
  "merchantId": "DMHA",
  "groupName": "Customer",
  "groupDesc": "Special Membership Grade",
  "groupImage": "https://..../coupon/outlet/153d3c9f-c5a4-4a61-a70b-882a24d04cb142.png",
  "merchantName": "Test Customer Group",
  "couponCount": "0",
  "defaultStatus": "",
  "seqNo": 1,
  "dollarSpending": 0,
  "groupStatus": "A",
  "updatedOn": 1533193215000,
  "updatedBy": "self"
 }
}

8.8 View a Customer Group List

View a Customer Group list.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
8.8.1 - Returns the number of total records.
URL: https://{merchantCode}.mezzofy.com/api/v1/membership
URL: https://{merchantCode}.mezzofy.com/api/v1/membership?page[n]&status[value]
RESPONSE
{
 "customergroups": [
 {
  "customergroup": {
   "customerGroupId": "TUZ",
   "merchantId": "DMHA",
   "groupName": "Customer",
   "groupDesc": "Special Membership Grade",
   "groupImage": "https://..../coupon/outlet/153d3c9f-c5a4-4a61-a70b-882a24d04cb142.png",
   "merchantName": "Test Customer Group",
   "couponCount": "0",
   "defaultStatus": "",
   "seqNo": 1,
   "dollarSpending": 0,
   "groupStatus": "A",
   "updatedOn": 1533193215000,
   "updatedBy": "self"
    }
   },
 {
  "customergroup": {
   "customerGroupId": "LJ7",
   "merchantId": "DMHA",
   "groupName": "Default Group",
   "groupDesc": "Guest Account Testing",
   "groupImage": "https://..../coupon/outlet/153d3c9f-c5a4-4a61-a70b-882a24d04cb133.png",
   "merchantName": "Customer Group Test",
   "email": "testgroup@gmail.com",
   "name": "Test User",
   "gender": "M",
   "address": "Kawloon, Singapore",
   "dob": "23-08-2000",
   "mobile": "123456789",
   "defaultStatus": "A",
   "seqNo": 0
    }
   }
  ],
  "size": {
   "pagesize": 1",
   "resultsize": 1",
   "totalsize": 1"
   }
}

8.9 Error Codes

The followings are the error codes used in the Customer module or function.

Error Code Description
4001 Merchant Code is not found
4002 No Customer is found
4003 Merchant is not found
4004 Invalid credential - E-mail or password is not found / matching
4005 Invalid credential - Customer Email is empty
4006 Invalid Customer ID - Customer ID is not available
4007 Profile - Change password update is failed
4008 Profile - Customer Email already exists
4009 Profile - Requested Customer details are not found
4010 Profile - Customer Mobile is available
4011 Profile - Customer user name is available
4012 Failed to create new merchant. Please check the input parameters
4013 Failed to update customer details. Please check the input parameters

9.0 Push Notification

We provide the Push Notificaitons for Customer and Merchant for communicaiton purpose.

9.1 Push Notification for Customer

A push notification is a message that pops up on a mobile device. Merchants can send them at any time to their customers.

Customer Push Notification Attributes

Field Type Description
notificationId CHAR[20] Notification ID
customerId CHAR[6] Customer ID
notificationTitle CHAR[250] Notification Title
notificationDesc CHAR[250] Notification Description
notificationType CHAR[1]
Mandatory
Device Type
"E" = Enable
"D" = Disable
eventId CHAR[4] Event ID
couponId CHAR[10] Coupon ID
createdOn CHAR[30]
Read Only
Last Updated Date and Time

9.1.1 Create Push Notification for Customer

Create Push Notification for Customer details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
9.1.1.1 - Create Push Notification for Customer details.
URL: https://{merchantCode}.mezzofy.com/api/v1/customers/[customerId]/devices/[deviceId]
REQUEST
{
 "device": {
  "deviceId": "CID123",
  "deviceUuid": "1834712983479812347",
  "deviceToken": "Customer",
  "deviceType": "I",
  "deviceMsg": "Some Text Here.",
 }
}
RESPONSE
{
 "device": {
  "deviceId": "CID123",
  "deviceUuid": "1834712983479812347",
  "deviceToken": "Customer",
  "deviceType": "I",
  "deviceMsg": "Some Text Here.",
  "hashcode": "88878987876",
  "updatedOn": "2016-09-01T18:18:18+08:00"
 }
}

9.1.2 View a Customer Push Notification

View a Customer Push Notificaiton details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
9.1.2.1 - View a Customer Push Notification details.
URL: https://{merchantCode}.mezzofy.com/api/v1/notifications[notificationId]
RESPONSE
 {
  "notifications": [
   {
    "notification": {
      "notificationId": "WWWW",
      "customerId": "JSDS9U",
      "notificationTitle": "Weekend Offer",
      "notificationDesc": "Notification Desc",
      "notificationType": "E",
      "eventId": "Test Event",
      "couponId": "123456",
      "createdOn": 1479910039000
      }
   }
 ],
 "size": {
  "pagesize": 1,
  "resultsize": 1,
  "totalsize": 1
  }
 }

9.1.3 Push Notification for Customer

Push Notification for Customer.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
9.2.3.1 - View Customer Push Notificaiton list.
URL: https://{merchantCode}.mezzofy.com/api/v1/notifications?[customerid=value]
RESPONSE
 {
  "notifications": [
   {
    "notification": {
      "notificationId": "WWWW",
      "customerId": "JSDS9U",
      "notificationTitle": "Weekend Offer",
      "notificationDesc": "Notification Desc",
      "notificationType": "E",
      "eventId": "Test Event",
      "couponId": "123456",
      "createdOn": 1479910039000
      }
   }
 ],
 "size": {
  "pagesize": 1,
  "resultsize": 1,
  "totalsize": 1
  }
 }

9.2 Push Notification for Merchant

TBD

Merchant Push Notification Attributes

Field Type Description
notificationId CHAR[20] Notification ID
customerId CHAR[6] Customer ID
notificationTitle CHAR[250] Notification Title
notificationDesc CHAR[250] Notification Description
notificationType CHAR[1]
Mandatory
Device Type
"E" = Enable
"D" = Disable
eventId CHAR[4] Event ID
couponId CHAR[10] Coupon ID
createdOn CHAR[30]
Read Only
Last Updated Date and Time

9.2.1 View a Merchant Push Notification

View a Merchant Push Notificaiton details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
9.2.1.1 - View a Merchant Push Notification details.
URL: https://{merchantCode}.mezzofy.com/api/v1/notifications
RESPONSE
 {
  "notifications": [
   {
    "notification": {
      "notificationId": "wwww",
      "customerId": "JSDS9U",
      "notificationTitle": "www",
      "notificationDesc": "www",
      "notificationType": "E",
      "eventId": "eee",
      "couponId": "ee",
      "createdOn": 1479910039000
      }
   }
 ],
 "size": {
  "pagesize": 1,
  "resultsize": 1,
  "totalsize": 1
  }
 }

9.2.2 Push Notification for Merchant

Push Notification for Merchant.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (GET method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: GET
9.2.2.1 - Returns the number of total records.
URL: https://{merchantCode}.mezzofy.com/api/v1/devices/stat
RESPONSE
{
 "stat": {
  "size": [n]
 }
}
Method: GET
15.2.2 - View Merchant Push Notificaiton list.
URL: https://{merchantCode}.mezzofy.com/api/v1/devices/deviceId?page[n]
RESPONSE
[
 {
  "device": {
   "deviceId": "CID123",
   "deviceUuid": "1834712983479812347",
   "deviceToken": "Customer",
   "deviceType": "I",
   "deviceMsg": "Some Text Here.",
   "hashcode": "88878987876",
   "updatedOn": "2016-09-01T18:18:18+08:00"
  }
 },
 {
  "device": {
   "deviceId": "CID123",
   "deviceUuid": "1834712983479812347",
   "deviceToken": "Customer",
   "deviceType": "I",
   "deviceMsg": "Some Text Here.",
   "hashcode": "88878987876",
   "updatedOn": "2016-09-01T18:18:18+08:00"
  }
 }
]

9.2.3 Create Push Notification for Merchant

Create Push Notification for Merchant details.

You must pass all the following fields (unless it’s stated optional) to the MEZZOFY COUPON PORTAL Form (POST method is advised). To work properly, the fields must be named exactly (case-sensitive) as they are named here:

Method: POST
9.2.3.1 - Create Push Notification for Merchant details.
URL: https://{merchantCode}.mezzofy.com/api/v1/devices/[deviceId]
REQUEST
{
 "device": {
  "deviceId": "CID123",
  "deviceUuid": "1834712983479812347",
  "deviceToken": "Customer",
  "deviceType": "I",
  "deviceMsg": "Some Text Here.",
 }
}
RESPONSE
{
 "device": {
  "deviceId": "CID123",
  "deviceUuid": "1834712983479812347",
  "deviceToken": "Customer",
  "deviceType": "I",
  "deviceMsg": "Some Text Here.",
  "hashcode": "88878987876",
  "updatedOn": "2016-09-01T18:18:18+08:00"
 }
}

Working Sample Code

Tinkering begets innovation. Here are some of our working sample projects to integrate, customise and build amazing digital coupon experiences.

API Integration Tutorials

Reckon there's a way to get started, fast? Sure is. Here are some step-by-step tutorials on using our APIs, to work up some magic with integrations.

Phone

(852) 1234-5678

Address

1234 Somewhere Road #8888
Causeway Bay, 00000
Hong Kong