catalog
1.1 Create a conference ticket interface 1.2 Update the conference ticket information interface
2.1 Create scenic spots tickets
4.1 Create an air ticket interface
4.2 Update the air ticket information interface
# 1. Conference / Show Tickets
Developers are supported to invoke the interface to create conference / performance tickets.
When a user collects a ticket, call the updated ticket interface to update the seats, entrances, and other information to the ticket.
# 1.1 Create conference tickets
Dxplaination of Interface Call Request
Http request method: POST URL: https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN
Parameter explaination
parameter | Do I have to? | Introductions |
---|---|---|
access_token | yes | Call Interface Credentials |
POST data | yes | JSON data |
Examples of POST data:
{ "card": {
"card_type": "MEETING_TICKET",
"meeting_ticket": {
"base_info": {
"logo_url": "http://mmbiz.qpic.cn/mmbiz/iaL1LJM1mF9aRKPZJkmG8xXhiaHqkKSVMMWeN3hLut7X7hicFNjakmxibMLGWpXrEXB33367o7zHN0CwngnQY7zb7g/0",
"brand_name":"票务公司",
"code_type":"CODE_TYPE_TEXT",
"title": "XX会议",
"color": "Color010",
"notice": "使用时向检票员出示此券",
"service_phone": "020-88888888",
"description": "请务必准时入场",
"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": "查看更多",
"custom_url": "http://www.qq.com",
"custom_url_sub_title": "6个汉字tips",
},
"meeting_detail": "会议时间:xxx;地点:xxx "}
}
}
Fields dedicated to conference tickets:
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
card_type | yes | string(24) | MEETING_TICKET | The types of tickets for the conference. |
base_info | yes | JSON structure | See the above example. | For basic voucher data, see the table below. All vouchers are generic. |
meeting_detail | yes | string(3072) | The meeting was held in Guangzhou on May 10th, 2015. Venue: xxxx. | Details of the meeting. |
map_url | no | string(128) | URL Address | A tour map of the venue. |
Base_info field:
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
logo_url | yes | string(128) | http://mmbiz.qpic.cn/ | The merchant logo of the card coupon is recommended to be 300\ * 300 pixels. |
code_type | yes | string(16) | CODE_TYPE_TEXT | Code display type "CODE_TYPE_TEXT," text; "CODE_TYPE_BARCODE," one dimensional code; "CODE_TYPE_QRCODE," two dimensional code; "CODE_TYPE_ONLY_QRCODE," binary code without code display; "CODE_TYPE_ONLY_BARCODE," one-dimensional code without code display; |
brand_name | yes | string(36) | XX Ticketing Company | The name of the merchant is limited to 12 Chinese characters. |
title | yes | string(27) | XX Conference Tickets | The name of the card is limited to 9 Chinese characters. (Recommendations cover card attributes, service and amount). |
color | yes | string(16) | Color010 | The color of the ticket. Fill in Color010-Color100 according to color specification. |
notice | yes | string(48) | Please present a QR code to cancel the card | The coupons use reminders and the number of characters is limited to 16 Chinese characters. |
description | yes | string(3072) | Cannot be shared with other offers / n If you need a coupon invoice, please ask the shop assistant. | Instructions for using the voucher are limited to 1024 Chinese characters. |
sku | yes | JSON structure | See the above example. | Information about commodities. |
quantity | yes | int | 100000 | The number of coupons in stock, do not support to fill in 0, the maximum is 100000000. |
date_info | yes | JSON structure | See the above example. | Date of use, expiration information. |
type | yes | int | 1 | Type of time to use, only 1 or 2 can be filled in. 1 is a fixed date range and 2 is a period of time (in days from the date of receipt). |
begin_timestamp | no | unsigned int | 14300000 | Type is used for 1 hour, indicating the start time. From January 1, 1970 00: 00: 00: 00 to the start of the seconds, and eventually converted to the form of a character string. (UTC + 8 in seconds) |
end_timestamp | no | unsigned int | 15300000 | The type is used for 1 hour, indicating the end time, and it is recommended to set the expiration date to 235959. (UTC + 8 in seconds) |
fixed_term | no | int | 0 | The type is 2 hours, which means that it is valid for several days after receiving it, and it is valid for 0 on the day after receiving it. (In units of heavens) |
fixed_begin_term | no | int | 15 | The type is used for 2 hours, indicating how many days after collection. (In units of heavens) |
use_custom_code | no | bool | true | Whether to customize the Code code. Fill in true or false, which defaults to false. Usually the developers of their own coupon code system choose to customize the Code, which is brought in when the card coupon is placed. |
bind_openid | no | bool | true | Whether to specify the user to receive, fill in true or false. Defaults to false. |
service_phone | no | string(24) | 40012234 | Call customer service. |
location_id_list | no | array | 1234,2312 | Store Location ID. Call the POI store management interface to get the store location ID. |
source | no | string(36) | Volkswagen Review | Third party source name, such as Tongcheng Travel, Volkswagen Comment. |
custom_url_name | no | string(15) | Use it now | Customize the name of the portal to the bounce outer link. |
custom_url | no | string(128) | "URL address" | Custom jump URL. |
custom_url_sub_title | no | string(18) | More surprises | The prompt appears on the right side of the entrance. |
promotion_url_name | no | string(15) | Product Description | Custom entry name for a marketing scene. |
promotion_url | no | string(128) | URL Address | Enter Jump to the address link of the external link. |
promotion_url_sub_title | no | string(18) | There's a big deal on sale. | The prompt appears on the right side of the marketing entrance. |
get_limit | no | int | 1 | There is a limit on the number of tickets per person. |
can_share | no | bool | false | Is the coupon collection page shareable? |
can_give_friend | no | bool | false | Are the coupons redeemable? |
Return instructions
Data examples:
{
"errcode":0,
"errmsg":"ok",
"card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI"
}
Parameter Name | describe |
---|---|
errcode | Error code, 0 is normal. |
errmsg | Error message. |
card_id | Voucher ID. |
# 1.2 Update Meeting Tickets
Support calling the "Update Conference Ticket" interface to update information such as admission time, area, seat, etc.
Dxplaination of Interface Call Request
Http request method: POST URL: https://api.weixin.qq.com/card/meetingticket/updateuser?access_token=TOKEN
Parameter explaination
parameter | Do I have to? | Introductions |
---|---|---|
access_token | yes | Call Interface Credentials |
POST data | yes | JSON data |
{
"code": "717523732898",
"card_id": "pXch-jvdwkJjY7evUFV-sGsoMl7A",
"zone" : "C区",
"entrance" : "东北门",
"seat_number" : "2排15号"
}
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
code | yes | string(20) | 1231123 | Card Voucher Code Code. |
card_id | no | string(32) | pXch-jvdwkJjY7evUFV-sGsoMl7A | To update the card_id as described in the ticket serial number, use_custom_code is required to fill in true when generating the ticket. |
begin_time | no | unsigned int | 1433432201 | Opening time, WeChat will be two hours before the opening time through the ticketing public imam or service notice under the opening reminder, Unix timestamp format. |
end_time | no | unsigned int | 1433432401 | End time, Unix timestamp format. |
zone | yes | string(12) | Zone C | The region. |
entrance | yes | string(12) | Door 3 | The entrance. |
seat_number | yes | string(12) | 2 rows 15 | Seat number. |
Return instructions
Data examples:
{
"errcode":0,
"errmsg":"ok"
}
Parameter Name | describe |
---|---|
errcode | Error code, 0 is normal. |
errmsg | Error message. |
# 2. Scenic Attractions Tickets
# 2.1 Create scenic spots tickets
Dxplaination of Interface Call Request
Http request method: POST URL: https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN
Parameter explaination
parameter | Do I have to? | Introductions |
---|---|---|
access_token | yes | Call Interface Credentials |
POST data | yes | JSON data |
{ "card": {
"card_type": "SCENIC_TICKET",
"scenic_ticket": {
"base_info": {
},
"ticket_class": "全日票"
}
}
}
Fields dedicated to scenic attractions tickets:
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
card_type | yes | string(24) | SCENIC_TICKET | The types of scenic attractions tickets. |
base_info | yes | JSON structure | See the above example. | For basic voucher data, see the table below. All vouchers are generic. |
ticket_class | yes | string(3072) | All tickets on weekdays | Ticket type, such as daily full tickets, combo tickets, etc. |
guide_url | no | string(128) | URL Address | Navigation map url |
See 1.1 for details of the base_info field Create a Conference Ticket Interface
Return instructions
{
"errcode":0,
"errmsg":"ok",
"card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI"
}
Parameter Name | describe |
---|---|
errcode | Error code, 0 is normal. |
errmsg | Error message. |
card_id | Voucher ID. |
# 3 Movie Tickets
Movie ticketing is mainly divided into the following two types:
(1) Movie ticket exchange coupons are classified as group buying coupons.
(2) Seat selection movie tickets, when purchasing, need to select the movie, the venue, the seat, and have strong timeliness and speciality, and such movie tickets are movie tickets in the document.
# 3.1 Create a movie ticket
Dxplaination of Interface Call Request
Http request method: POST URL: https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN
Parameter explaination
parameter | Do I have to? | Introductions |
---|---|---|
access_token | yes | Call Interface Credentials |
POST data | yes | JSON data |
{ "card": {
"card_type": "MOVIE_TICKET",
"movie_ticket": {
"base_info": {
},
"detail": "电影名:xxx,电影简介:xxx"
}
}
}
Fields dedicated to movie tickets:
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
card_type | yes | string(24) | MOVIE_TICKET | The movie ticket type. |
base_info | yes | JSON structure | See the above example. | For basic voucher data, see the table below. All vouchers are generic. |
detail | yes | string(3072) | Movie Title: xxx, movie synopsis: xxx. | Movie ticket details |
See 1.1 Create a Conference Ticket for details of the base_info field
# 3.2 Update movie tickets
After receiving the movie ticket, update the movie information and user seat information by calling the "update movie ticket" interface.
Dxplaination of Interface Call Request
Http request method: POST URL: https://api.weixin.qq.com/card/movieticket/updateuser?access_token=TOKEN
Parameter explaination
parameter | Do I have to? | Introductions |
---|---|---|
access_token | yes | Call Interface Credentials |
POST data | yes | JSON data |
{
"code" : "277217129962",
"card_id": "p1Pj9jr90_SQRaVqYI239Ka1erkI",
"ticket_class": "4D",
"show_time": 1408493192,
"duration":120,
"screening_room": "5号影厅",
"seat_number": [ "5 排14 号" , "5排15号" ]
}
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
code | yes | string(20) | 1231123 | Card Voucher Code Code. |
card_id | yes | string(32) | When you visit the store with a platinum member card, you get an 8 percent discount. | To update the card_id as described in the ticket serial number, use_custom_code is required to fill in true when generating the ticket. |
ticket_class | yes | string(12) | 2D | Movie tickets, such as 2D, 3D. |
screening_room | no | string(12) | Hall A | Theater information for the film. |
seat_number | no | string(12) | 5 rows 10 seats | Seat number. |
show_time | yes | unsigned int | 14300000 | The movie's running time, Unix timestamp format. |
duration | yes | int | 120 | The length of the show, fill in the whole number. |
Return instructions
Data examples:
{ "errcode":0, "errmsg":"ok"}
Parameter Name | describe |
---|---|
errcode | Error code, 0 is normal. |
errmsg | Error message. |
# 4. A plane ticket
Compared with other tickets, air tickets have stronger timeliness and particularity, so the ticket generation does not need to go through WeChat audit, effective immediately.The ticket use scenarios are mainly divided into the following two:
1, through WeChat purchase directly added to the card package, the check-in period can be handled online by the card package boarding card.
2, in WeChat merchants (generally airlines) Service Account after completing the check-in, add to the WeChat card package.
The first scenario: After the user clicks on the merchant H5 page "Add to Card Package," the merchant creates a card voucher according to the user's ticket information, calls the interface, obtains the card_id, and sends the ticket to the user.During the check-in period, the user clicks the URL specified by the merchant to apply for the boarding card online.After the processing was successful, the merchant called the update flight information interface to synchronize the check-in information.
The second scenario: after the user clicks on the JSAPI provided by the merchant H5 page, the merchant generates a card coupon according to the user's ticket information, calls the interface, obtains the card_id, and sends the ticket to the user. And update the ticket interface immediately to synchronize check-in information.
# 4.1 Create an air ticket interface
Examples of airfares
** **
Dxplaination of Interface Call Request
HTTPS request method: POST URL: https://api.weixin.qq.com/card/create?access_token=ACCESS_TOKEN
Parameter explaination
parameter | Do I have to? | Introductions |
---|---|---|
access_token | yes | Call Interface Credentials |
POST data | yes | JSON data |
{"card": {
"card_type": "BOARDING_PASS",
"boarding_pass": {
"base_info": {
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx
},
"from": "成都",
"to": "广州",
"flight": "CE123",
"departure_time": "1434507901",
"landing_time": "1434909901",
"air_model": "空客A320"
}
}
}
Fields dedicated to airfares:
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
card_type | yes | string(24) | BOARDING_PASS | The type of plane ticket. |
base_info | yes | JSON structure | See examples | Basic voucher data, which is common to all vouchers. Detailed fields are shown in the table below. |
from | yes | string(54) | Chengdu | The starting point and upper limit is 18 Chinese characters. |
to | yes | string(54) | Guangzhou | At the end, the maximum limit is 18 Chinese characters. |
flight | yes | string(24) | CE123 | flight |
gate | no | string(12) | A11 | The entrance is limited to 4 Chinese characters. |
check_in_url | no | string(128) | URL Address | Links to online check-in. |
air_model | yes | string(24) | Airbus A320 | The maximum size of the aircraft is 8 Chinese characters. |
departure_time | yes | string(128) | 1434507901 | The time of the departure. Unix timestamp format. |
landing_time | yes | string(128) | 1434909901 | The time of the landing. Unix timestamp format. |
See 1.1 Create a Conference Ticket for details of the base_info field
Return instructions
Data examples:
{
"errcode":0,
"errmsg":"ok",
"card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI"
}
Parameter Name | describe |
---|---|
errcode | Error code, 0 is normal. |
errmsg | Error message. |
card_id | Voucher ID. |
# 4.2 Update the air ticket information interface
Dxplaination of Interface Call Request
Http Request Method: POST URL:https://api.weixin.qq.com/card/boardingpass/checkin?access_token=TOKEN
Parameter explaination
parameter | Do I have to? | Introductions |
---|---|---|
access_token | yes | Call Interface Credentials |
POST data | yes | JSON data |
{
"code": "198374613512",
"card_id":"p1Pj9jr90_SQRaVqYI239Ka1erkI",
"passenger_name": "乘客姓名",
"class": "舱等",
"seat": "座位号",
"etkt_bnr": "电子客票号",
"qrcode_data": "二维码数据",
"is_cancel ": false
}
Parameter Name | Required to fill in | type | Example values | describe |
---|---|---|---|---|
code | yes | string(20) | 1231123 | Card Voucher Code Code. |
card_id | no | string(32) | p1Pj9jr90_SQRaVqYI239Ka1erkI | Card voucher ID, custom Code Card voucher required. |
etkt_bnr | yes | string(14) | 1234567 | Electronic ticket number, with a maximum of 14 digits. |
class | yes | string(15) | Economy class. | Class, such as first class, is limited to 5 Chinese characters. |
qrcode_data | no | string(3072) | 12345 | QR code data.The QR code character string that the passenger uses to check in. WeChat uses this data to generate the QR code for check-in. |
seat | no | string(12) | 5 Row C | The passenger seat number. |
is_cancel | no | bool | false | Do you want to cancel your check-in? Fill in true or false. If the above fields (such as calss, etc.) are not judged by filling in true, the ticket will return to the unchecked state, and the passenger can re-check in. Fill in false by default. |
Return instructions
Data examples:
{
"errcode":0,
"errmsg":"ok"
}
Parameter Name | describe |
---|---|
errcode | Error code, 0 is normal. |
errmsg | Error message. |