Contents

1. Meeting/Performance Tickets

1.1 Creating Meeting Tickets 1.2 Updating Meeting Tickets

2. Attractions Tickets

2.1 Creating Attractions Tickets

3. Movie Tickets

3.1. Creating Movie Tickets

3.2 Updating Movie Tickets

4. Air Tickets

4.1 Creating Air Tickets

4.2 Updating Air Tickets

1. Meeting/Performance Tickets

Supports developers to call the API for the creation of meeting/performance tickets.

Calls the ticket update API to update the seat, entrance, and other information to the ticket after the user receives the ticket.

1.1 Creating Meeting Tickets

API Request Format

HTTP request method: POSTURL:https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN

Parameters

Parameter Required Description
access_token Yes The credential for API call
POST data Yes JSON data

POST data example:


{ "card": {
   "card_type": "MEETING_TICKET",
   "meeting_ticket": {
       "base_info": {
           "logo_url": "http://mmbiz.qpic.cn/mmbiz/iaL1LJM1mF9aRKPZJkmG8xXhiaHqkKSVMMWeN3hLut7X7hicFNjakmxibMLGWpXrEXB33367o7zHN0CwngnQY7zb7g/0",
           "brand_name":"Ticketing office",
           "code_type":"CODE_TYPE_TEXT",
           "title": "XXMeeting",
           "color": "Color010",
           "notice": "Present this ticket to the ticket inspector at the time of use",
           "service_phone": "020-88888888",
           "description": "Make sure to enter on time",
           "date_info": {
               "type": 1,
               "begin_timestamp": 1397577600 ,
               "end_timestamp": 1422724261
           },
           "sku": {
               "quantity": 50000000
           },
           "get_limit": 3,
           "use_custom_code": false,
           "bind_openid": false,
           "can_share": true,
           "can_give_friend": true,
           "location_id_list" : [123, 12321, 345345],
           "custom_url_name": "View more",
           "custom_url": "http://www.qq.com",
           "custom_url_sub_title": "6 Chinese characterstips",
                  },
       "meeting_detail": "Meeting time: xxx;Venue: xxx "}
 }
}

Fields dedicated to meeting tickets:

Parameter Required Type Example Description
card_type Yes string(24) MEETING_TICKET Meeting ticket type.
base_info Yes JSON structure See the example above. Basic coupon data (applicable to all coupons). See the table below.
meeting_detail Yes string(3072) The meeting is held on May 10, 2015 in Guangzhou, at xxxx. Meeting details.
map_url No string(128) xxx.com Venue map.

Base_info:

Parameter Required Type Example Description
logo_url Yes string(128) http://mmbiz.qpic.cn/ Merchant logo of coupon. Recommended dimension 300*300 pixels.
code_type Yes string(16) CODE_TYPE_TEXT Code display type "CODE_TYPE_TEXT", text; "CODE_TYPE_BARCODE", barcode; "CODE_TYPE_QRCODE", QR code; "CODE_TYPE_ONLY_QRCODE", QR code with no code display; "CODE_TYPE_ONLY_BARCODE", barcode with no code display.
brand_name Yes string (36) xx ticketing office Merchant name, up to 12 Chinese characters.
title Yes string (27) xx meeting ticket Coupon title, with a maximum length of 9 Chinese characters (18 English characters). A combination of coupon attributes, service items and amount is recommended.
color Yes string (16) Color010 Coupon color. Enter a value between Color010 and Color100.
notice Yes string (48) Present the QR code for coupon redemption Coupon usage tip, with a maximum length of 16 Chinese characters (32 English characters).
description Yes string (3072) Using with other coupons is not allowed/nAsk the staff for an invoice for the group purchase. Coupon usage instructions, with a maximum length of 1024 Chinese characters (2048 English characters).
sku Yes JSON structure See example above Product information
quantity Yes int 100000 Coupon inventory. Maximum is 100,000,000. Cannot be 0.
date_info Yes JSON structure See example above. Information of coupon validity period.
type Yes int 1 Coupon validity type. 1: a fixed time range; 2: a fixed number of days (after coupon receipt).
begin_timestamp No unsigned int 14300000 Start time of validity period. This field only takes effect when type = 1. It is expressed as a Unix timestamp, i.e. the number of seconds that have elapsed since 00:00:00 1/1/1970 (UTC+8).
end_timestamp No unsigned int 15300000 End time of validity period. This field only takes effect when type = 1. It is recommended to set the filed value to 23:59:59 on the expiration data. (UTC+8, in sec).
fixed_term No int 0 Indicates the number of days during which the received coupon is valid, and only takes effect when type = 2. Enter 0 if the coupon becomes valid on the day of its receipt.
fixed_begin_term No int 15 Indicates the number of days after which the received couponbecomes valid, and only takes effect when type = 2.
use_custom_code No bool true Whether to use custom code. Enter "true" or "false" (default). Generally, developers owning a coupon code system select custom codes and incorporate the coupons in the coupons for issuance.
bind_openid No bool true Whether to specify the users to receive the coupons. Enter "true" or "false" (default).
service_phone No string(24) 40012234 Customer service number
location_id_list No array 1234, 2312 ID of store location. Obtain the value by calling the POI Store Management API.
source No string (36) Dianping Third-party source name, such as TravelGo, Dianping.
custom_url_name No string (15) Use Now Title of the custom external redirect link.
custom_url No string (128) "xxxx.com" Custom redirect URL
custom_url_sub_title No string (18) More surprise Words shown to the right of the entry button
promotion_url_name No string (15) Product Overview Title of custom entry button to promotional page.
promotion_url No string (128) XXXX.com URL of external redirect link
promotion_url_sub_title No string (18) Big Offers! Words shown to the right of the entry button to the promotional page
get_limit No int 1 Maximum number of coupons that each user can claim
can_share No bool false Indicates whether the coupon claiming page is sharable.
can_give_friend No bool false Indicates whether the coupon is transferable.

Response Description

Example:


{
   "errcode":0,
   "errmsg":"ok",
   "card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI"
}
Parameter Description
errcode Error code. 0 indicates a successful request.
errmsg Error message
card_id Coupon ID

1.2 Updating Meeting Tickets

Calls the "Update Meeting Ticket" API to update the time, area, seat, and other entry information.

API Request Format

HTTP request method: POSTURL:https://api.weixin.qq.com/card/meetingticket/updateuser?access_token=TOKEN

Parameters

Parameter Required Description
access_token Yes The credential for API call
POST data Yes JSON data
{
   "code": "717523732898",
   "card_id": "pXch-jvdwkJjY7evUFV-sGsoMl7A",
   "zone" : Area "C",
   "entrance" : "Northeast gate",
   "seat_number" : Row "2 Seat 15"
}
Parameter Required Type Example Description
code Yes string(20) 1231123 Coupon code.
card_id No string (32) pXch-jvdwkJjY7evUFV-sGsoMl7A Serial number of the ticket to be updated. card_id is required if use_custom_code is true when the coupon is generated.
begin_time No unsigned int 1433432201 Beginning time. WeChat will send a notice through the "A-Hong Tickets" Official Account or the service notification two hours before the event in the Unix timestamp format.
end_time No unsigned int 1433432401 Ending time of the event in the Unix timestamp format.
zone Yes string (12) Area C Area.
entrance Yes string (12) Gate 3 Entrance.
seat_number Yes string (12) Row 2 Seat 15 Seat No.

Response Description

Example:

{
   "errcode":0,
   "errmsg":"ok"
}
Parameter Description
errcode Error code. 0 indicates a successful request.
errmsg Error message

2. Attractions Tickets

2.1 Creating Attractions Tickets

API Request Format

httpRequest method: POSTURL: https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN

Parameters

Parameter Required Description
access_token Yes The credential for API call
POST data Yes JSON data
{ "card": {
   "card_type": "SCENIC_TICKET",
   "scenic_ticket": {
       "base_info": {
          },
       "ticket_class": "Full-day ticket"
   }
  }
}

Fields dedicated to attractions tickets:

Parameter Required Type Example Description
card_type Yes string(24) SCENIC_TICKET Attractions ticket type.
base_info Yes SON structure See the example above. Basic coupon data (applicable to all coupons). See the table below.
ticket_class Yes string(3072) Weekday full-day ticket Ticket type, such as weekday full-day ticket and pass.
guide_url No string(128) xxx.com The URL of the guide map.

Base_info fields (For details, see "1.1 Fields of the Creating Meeting Ticket" API)

Response Description

{
   "errcode":0,
   "errmsg":"ok",
   "card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI"
}
Parameter Description
errcode Error code. 0 indicates a successful request.
errmsg Error message
card_id Coupon ID

3 Movie Tickets

There are two types for movie tickets and coupons:

  1. Movie ticket coupon, a group-purchase coupon.

  2. Movie ticket with seat selected. The ticket is time-sensitive and specific with movie, time, and seat all determined when being purchased. This type of tickets are the movie tickets mentioned in documentation.

3.1 Creating Movie Tickets

API Request Format

HTTP request method: POSTURL:https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN

Parameters

Parameter Required Description
access_token Yes The credential for API call
POST data Yes JSON data
{ "card": {
   "card_type": "MOVIE_TICKET",
   "movie_ticket": {
       "base_info": {
          },
       "detail": "Movie name: xxx, synopsis: xxx"
   }
  }
}

Fields dedicated to movie tickets:

Parameter Required Type Example Description
card_type Yes string(24) MOVIE_TICKET Movie ticket type.
base_info Yes JSON structure See the example above. Basic coupon data (applicable to all coupons). See the table below.
detail Yes string(3072) Movie name: xxx, synopsis: xxx. Movie ticket details.

Base_info fields (For details, see 1.1 Fields of the "Create Meeting Ticket" API )

3.2 Updating Movie Tickets

Calls the "Update Movie Ticket" API to update the movie and seat information after the user claims the ticket.

API Request Format

HTTP request method: POSTURL:https://api.weixin.qq.com/card/movieticket/updateuser?access_token=TOKEN

Parameters

Parameter Required Description
access_token Yes The credential for API call
POST data Yes JSON data
{
	"code" : "277217129962",
	"card_id": "p1Pj9jr90_SQRaVqYI239Ka1erkI",
	"ticket_class": "4D",
	"show_time": 1408493192,
	"duration":120,
	"screening_room": Hall "5",
	"seat_number": [ Row "5 Seat 14" , Row "5 Seat 15" ]
}
Parameter Required Type Example Description
code Yes string(20) 1231123 Coupon code.
card_id Yes string (32) Enjoy a 20% discount on Platinum member cards. Serial number of the ticket to be updated. card_id is required if use_custom_code is true when the coupon is generated.
ticket_class Yes string (12) 2D Movie type, such as 2D and 3D.
screening_room No string (12) Hall A Hall information of the movie.
seat_number No string (12) Row 5 Seat 10 Seat No.
show_time Yes unsigned int 14300000 Movie showtime in the Unix timestamp format.
duration Yes int 120 Movie duration. Enter an integer.

Response Description

Example:

{   "errcode":0,   "errmsg":"ok"}
Parameter Description
errcode Error code. 0 indicates a successful request.
errmsg Error message

4. Air Tickets

Compared to other coupons, air tickets are more time-sensitive and specific, so the ticket comes into effect directly without approval by WeChat. Air tickets are mainly used in two scenes:

  1. The ticket is added to Cards & Offers directly after being purchased through WeChat. The boarding pass can be processed online from Cards & Offers during check-in time.

  2. The ticket is added to WeChat Cards & Offers after the passenger completes check-in via the Official Account of a WeChat merchant (typically airlines).

Scene 1: After the user clicks "Add to Cards & Offers" on the merchant's HTML5 page, the merchant will call the API to create the ticket with the user information, and issue the ticket after obtaining a card_id. During the check-in period, the user can click the URL specified by the merchant to check in the boarding pass online. After that, the merchant will call the "Update Air Ticket" API to sync the check-in information.

Scene 2: After the user clicks the JS API on the merchant's HTML5 page, the merchant will call the API to generate the ticket with the user information, and issue the ticket after obtaining a card_id. The merchant will immediately update the air ticket API to sync the check-in information.

4.1 Creating Air Tickets

Air ticket example

API Request Format

HTTPSRequest method: POSTURL:https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN

Parameters

Parameter Required Description
access_token Yes The credential for API call
POST data Yes JSON data

{"card": {
   "card_type": "BOARDING_PASS",
   "boarding_pass": {
       "base_info": {
        xxxxxxxxxxxxxxxxxxxx
        xxxxxxxxxxxxxxxxxxxxx
       },
       "from": "Chengdu",
       "to": "Guangzhou",
       "flight": "CE123",
       "departure_time": "1434507901",
       "landing_time": "1434909901",
       "air_model": "AirbusA320"
   }
  }
}

Fields dedicated to air ticket:

Parameter Required Type Example Description
card_type Yes string(24) BOARDING_PASS Air ticket type.
base_info Yes JSON structure See the example. Basic coupon data. See the table below. This field is applicable to all coupons.
from Yes string(54) Chengdu Origin, up to 18 Chinese characters.
to Yes string(54) Guangzhou Destination, up to 18 Chinese characters.
flight Yes string(24) CE123 Flight
gate Yes string(12) A11 Gate, up to 4 Chinese characters.
check_in_url No string(128) xxx.com URL for online check-in.
air_model Yes string(24) Airbus A320 Aircraft model, up to 8 Chinese characters.
departure_time Yes string(128) 1434507901 Departure time in the Unix timestamp format.
landing_time Yes string(128) 1434909901 Landing time in the Unix timestamp format.

Base_info fields (For details, see 1.1 Fields of the "Create Meeting Ticket" API )

Response Description

Example:


{
   "errcode":0,
   "errmsg":"ok",
   "card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI"
}
Parameter Description
errcode Error code. 0 indicates a successful request.
errmsg Error message
card_id Coupon ID

4.2 Updating Air Tickets

API Request Format

httpRequest method: POST
URL:https://api.weixin.qq.com/card/boardingpass/checkin?access_token=TOKEN

Parameters

Parameter Required Description
access_token Yes The credential for API call
POST data Yes JSON data
{
"code": "198374613512",
"card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI",
"passenger_name": "Passenger name",
"class": "Class",
"seat": "Seat",
"etkt_bnr": "E-ticket number",
"qrcode_data": "QR code data",
"is_cancel ": false
}
Parameter Required Type Example Description
code Yes string(20) 1231123 Coupon code.
card_id No string (32) p1Pj9jr90_SQRaVqYI239Ka1erkI Coupon ID. Required for coupon with custom code.
etkt_bnr Yes string (14) 1234567 E-ticket number, up to 14 numbers.
class Yes string (15) Economy class Class, such as first class, up to 5 Chinese characters.
qrcode_data No string (3072) 12345 QR code data. The QR code string the passenger used for check-in. WeChat generates the check-in QR code from the data.
seat No string (12) 5C Seat of the passenger.
is_cancel No bool false Indicates whether to cancel the check-in. Enter true or false (default). When the value is true, the check-in will be canceled with all the fields above (such as class) ignored. The ticket will return to the status before check-in and the passenger can check in again.

Response Description

Example:


{
   "errcode":0,
   "errmsg":"ok"
}

Parameter Description
errcode Error code. 0 indicates a successful request.
errmsg Error message