宜选影票这样的小程序特惠电影票全国在线选座API接口

影票接口文档

特惠电影票api接口具体参数密钥数据联系本文做作者。特惠电影票api接口文档参考

修订日期

修订内容

备注

2024/08/14

新增接口

2024/08/16

功能接口补充、新增回调接口规范

见html文件

1、 选择座位,传入原票价信息,计算出售价数据

**接口地址**:`/biz/app/tickets/checkTicketPrices`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "mode": "",

  "prices": [],

  "seatIds": [],

  "showId": ""

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|cps|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|TicketPriceParam|TicketPriceParam|

|  mode|出票模式:0/1/2||false|string||

|  prices|待计算原价列表||true|array|number(float)|

|  seatIds|所选座位Ids||false|array|string|

|  showId|场次Id||false|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

2、 获取影院详情内容-可计算与用户间距离

**接口地址**:`/biz/app/tickets/cinemaDetail`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "search": {

    "cinemaId": "",

    "lat": "",

    "lng": ""

  }

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|商户唯一编号|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqCinemaDetailParam|ReqCinemaDetailParam|

|  search|查询条件||false|RequestCinemaDetailSearch|RequestCinemaDetailSearch|

|    cinemaId|影院ID||false|string||

|    lat|用户当前经度,可计算距离||false|string||

|    lng|用户当前纬度,可计算距离||false|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

3、 获取影院排期信息

**接口地址**:`/biz/app/tickets/getCinemaSchedule`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "search": {

    "cinemaId": 0,

    "date": "",

    "movieId": 0,

    "standardId": ""

  }

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|cps|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqCinemaScheduleParam|ReqCinemaScheduleParam|

|  search|筛选参数||false|RequestCinemaSchedule|RequestCinemaSchedule|

|    cinemaId|影院ID||false|integer||

|    date|影片日期,可选||false|string||

|    movieId|影片ID,可选||false|integer||

|    standardId|影院备案标准编码,二选一参数||false|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

4、 获取影院列表

**接口地址**:`/biz/app/tickets/getCinemas`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "search": {

    "ci": "",

    "date": "",

    "filmId": 0,

    "keywords": "",

    "lat": "",

    "lng": "",

    "pageNum": 0,

    "regionName": ""

  }

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|商户唯一编号|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqCinemaListParam|ReqCinemaListParam|

|  search|筛选参数||false|RequestCinemaSearch|RequestCinemaSearch|

|    ci|城市代码,不填默认上海||false|string||

|    date|上映日期,yyyy-MM-dd ||false|string||

|    filmId|电影ID,非必填||false|integer||

|    keywords|搜索关键词,非必填||false|string||

|    lat|纬度,非必填||false|string||

|    lng|经度,非必填||false|string||

|    pageNum|分页,默认1||false|integer||

|    regionName|区域名,默认上海||false|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

5、 获取全国所有城市列表

**接口地址**:`/biz/app/tickets/getCityList`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|商户唯一编号|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|BaseParams|BaseParams|

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

6、 获取热映列表

**接口地址**:`/biz/app/tickets/getHotMovies`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "ci": 0

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|商户唯一编号|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqHotMovieParam|ReqHotMovieParam|

|  ci|城市ID||false|integer(int32)||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

7、 获取即将上映列表

**接口地址**:`/biz/app/tickets/getInComingMovies`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "page": 0

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|商户唯一编号|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqInComingMovieParam|ReqInComingMovieParam|

|  page|默认分页,从1开始||false|integer(int32)||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

8、 获取影片的场次详情

**接口地址**:`/biz/app/tickets/getMovieScheduleDetail`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "showId": ""

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|cps|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqShowIdParam|ReqShowIdParam|

|  showId|影片排期ID||false|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

9、 获取某场次的座位列

**接口地址**:`/biz/app/tickets/getMovieSeats`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "showId": ""

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|cps|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqShowIdParam|ReqShowIdParam|

|  showId|影片排期ID||false|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«RespSeatsInfo»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|RespSeatsInfo|RespSeatsInfo|

|  movieFilmSeatData||array|MovieFilmSeatData|

|    columnNo||string||

|    discount||number||

|    fastPrice||number||

|    lovestatus||integer||

|    price||number||

|    restrictions||integer||

|    rowNo||string||

|    seatId||string||

|    seatNo||string||

|    sectionId||string||

|    status||string||

|    truePrice||number||

|  movieFilmSeatPrices||MovieFilmSeatPrice|MovieFilmSeatPrice|

|    discount||number||

|    fastPrice||number||

|    maxSpeedPrice||number||

|    price||number||

|    sectionId||string||

|    truePrice||number||

|  restrictions||integer(int32)||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {

"movieFilmSeatData": [

{

"columnNo": "",

"discount": 0,

"fastPrice": 0,

"lovestatus": 0,

"price": 0,

"restrictions": 0,

"rowNo": "",

"seatId": "",

"seatNo": "",

"sectionId": "",

"status": "",

"truePrice": 0

}

],

"movieFilmSeatPrices": {

"additionalProperties1": {

"discount": 0,

"fastPrice": 0,

"maxSpeedPrice": 0,

"price": 0,

"sectionId": "",

"truePrice": 0

}

},

"restrictions": 0

},

"success": true,

"timestamp": 0

}

```

10、 查询影片播放日期列表

**接口地址**:`/biz/app/tickets/moviePlayDate`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "search": {

    "ci": 0,

    "filmId": 0

  }

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|商户唯一编号|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|ReqShowDateQueryParam|ReqShowDateQueryParam|

|  search|查询参数||false|RequestShowDate|RequestShowDate|

|    ci|城市ID,不存在默认上海||false|integer||

|    filmId|电影ID||false|integer||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

## 支付成功回调接口

**接口地址**:`/biz/app/tickets/third/notify/pay/{orderId}`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|body|body|body|true|string||

|cps|cps|header|true|string||

|nonce|随机值|header|true|string||

|orderId|orderId|path|true|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

11、 选座位下单,生成预支付参数,支付完成主动调用订单列表查询接口.

**接口地址**:`/biz/app/tickets/third/preOrder`

**请求方式**:`POST`

**请求数据类型**:`application/json`

**响应数据类型**:`*/*`

**接口描述**:

**请求示例**:

```javascript

{

  "acceptChangeseat": "",

  "buySeats": [],

  "callback": "",

  "cinemaId": "",

  "coupons": [],

  "limitTime": "",

  "mode": "",

  "phoneNo": "",

  "showId": ""

}

```

**请求参数**:

**请求参数**:

| 参数名称 | 参数说明 | 请求类型    | 是否必须 | 数据类型 | schema |

| -------- | -------- | ----- | -------- | -------- | ------ |

|access-token|签名:RSA(MD5(body+nonce+ts))|header|true|string||

|cps|cps|header|true|string||

|nonce|随机值|header|true|string||

|param|param|body|true|SendPreOrderParam|SendPreOrderParam|

|  acceptChangeseat|接受调座:1=可调;0=禁止调座||false|string||

|  buySeats|选座IDs||true|array|string|

|  callback|订单状态回调url||false|string||

|  cinemaId|影院ID||true|string||

|  coupons|选用优惠券ID列表||false|array|string|

|  limitTime|超时时长:分钟||false|string||

|  mode|出票模式:0=特惠出票、1=快速出票、2=极速出票||false|string||

|  phoneNo|联系号码||true|string||

|  showId|场次ID||true|string||

|ts|时间|header|true|string||

**响应状态**:

| 状态码 | 说明 | schema |

| -------- | -------- | ----- |

|200|OK|接口返回对象«object»|

|201|Created||

|401|Unauthorized||

|403|Forbidden||

|404|Not Found||

**响应参数**:

| 参数名称 | 参数说明 | 类型 | schema |

| -------- | -------- | ----- |----- |

|code|返回代码|integer(int32)|integer(int32)|

|message|返回处理消息|string||

|result|返回数据对象|object||

|success|成功标志|boolean||

|timestamp|时间戳|integer(int64)|integer(int64)|

**响应示例**:

```javascript

{

"code": 0,

"message": "",

"result": {},

"success": true,

"timestamp": 0

}

```

  • 8
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
电影票售票的优惠策略描述: 1. 指定电影、指定时间段内购买电影票可享受折扣 2. 周一至周四购买电影票可享受优惠价 3. 学生持有效学生证购买电影票可享受优惠价 4. 会员购买电影票可享受会员优惠价 5. 团购购买电影票可享受团购优惠价 6. 某电影院为新片举办特惠活动,首映日购买该片电影票可享受特惠价 测试点及测试用例: 1. 测试购买指定电影、指定时间段内电影票的折扣是否生效: - 测试用例1:购买指定电影、指定时间段内电影票,验证折扣是否计算正确 - 测试用例2:购买其他电影、指定时间段内电影票,验证折扣是否未被应用 - 测试用例3:购买指定电影、其他时间段内电影票,验证折扣是否未被应用 2. 测试周一至周四购买电影票的优惠价格是否生效: - 测试用例1:购买电影票的日期为周一至周四,验证是否享受到优惠价 - 测试用例2:购买电影票的日期为周五至周日,验证是否未享受到优惠价 3. 测试学生购买电影票的优惠价格是否生效: - 测试用例1:学生持有效学生证购买电影票,验证是否享受到优惠价 - 测试用例2:普通顾客购买电影票,验证是否未享受到优惠价 4. 测试会员购买电影票的优惠价格是否生效: - 测试用例1:会员购买电影票,验证是否享受到会员优惠价 - 测试用例2:非会员购买电影票,验证是否未享受到会员优惠价 5. 测试团购购买电影票的优惠价格是否生效: - 测试用例1:团购购买电影票,验证是否享受到团购优惠价 - 测试用例2:非团购购买电影票,验证是否未享受到团购优惠价 6. 测试新片首映日购买电影票特惠价格是否生效: - 测试用例1:购买新片首映日电影票,验证是否享受到特惠价 - 测试用例2:购买非新片首映日电影票,验证是否未享受到特惠价 通过以上测试用例设计,可以验证电影票售票的优惠策略是否按照要求生效,确保系统在售票时能正确计算折扣和优惠价格。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值