GET api/TimeSegment?startdate={startdate}&enddate={enddate}&servicecode={servicecode}

获取供应商电子门票时段分配表。仅在供应商启用时段设置时,此函数才可以被调用。 认证方式:HAWK,密钥:KEY+UPPER(MD5(密码))。 为向下兼容,同功能的WebForms接口访问地址为~/Source/GetTimeSegment.aspx。

Request Information

URI Parameters

NameDescriptionTypeAdditional information
startdate

起始日期,YYYYMMDD。当仅指定指定起始日期时,表示仅检索该日数据;当仅指定截止日期时,表示检索当日至该日的数据;当两者均不指定时,表示检索当日数据。不论如何指定,系统均只能受理至多7天时间跨度的数据检索。

string

Default value is

enddate

截止日期,YYYYMMDD。当仅指定指定起始日期时,表示仅检索该日数据;当仅指定截止日期时,表示检索当日至该日的数据;当两者均不指定时,表示检索当日数据。不论如何指定,系统均只能受理至多7天时间跨度的数据检索。

string

Default value is

servicecode

服务项目ID(线路ID),指定需要返回时段表的线路,若不指定时,返回系统中全部可用的线路。

string

Default value is

Body Parameters

None.

Response Information

Resource Description

获取供应商电子门票时段分配表。仅在供应商启用时段设置时,此函数才可以被调用。 认证方式:HAWK,密钥:KEY+UPPER(MD5(密码))。 为向下兼容,同功能的WebForms接口访问地址为~/Source/GetTimeSegment.aspx。

Collection of TimeSegment
NameDescriptionTypeAdditional information
servicecode

服务项目(线路)ID,如01,02。

string

None.

servicename

线路或服务项目名称(如A线,B线)。

string

None.

date

日期,YYYYMMDD,指明当前实例所属的日期。

string

None.

timespanindex

时段的序号,自然数。

integer

None.

starttime

时段的起始时间,HH:MM,此时间表示的是预计正常情况下,游客检票的起始时间。

string

None.

endtime

时段的截止时间,HH:MM,此时间表示的是预计正常情况下,游客检票的截止时间。

string

None.

totalcapacity

总通量容量(INT),单位“人次”,指明当前线路当前时段总接待能力。

integer

None.

freecapacityfornet

余量,可以用于互联网票取票的容量额度(INT),单位“人次”,这个额度是共享给所有的接口方的量。

integer

None.

totalfreecapacity

总余量,可以理解为前台总可用余量,在我们的电子门票系统中,前台有最高优先级,可以使用其他各部分的余额。网络票余量总是小于等于前台余量。当您获取的产品列表中,时段额度类型为“前台额度”时,可以参照这个量判定是否仍可订票。否则只能参照freecapacityfornet来判定是否仍可订票。在电子门票系统中,供应商可以为不同的票型指定消耗的额度的类型,如团队票消耗网络票额度(减freecapacityfronet的值,此值为零时不可订购),散客票消耗前台额度(减totalfreecapacity的值,freecapacityfornet为零,但totalfreecapacity不为零时仍可以订购)。

integer

None.

resvercapacity

保留余量,指示当前供应商为您本人保留的时段余额,这一部分是别人(前台销售除外)无法占用的,当您没有被供应商设置保留时,您是看不到这个值的。如果这个值大于零,您可以依据这个值来判定是否仍然可以发起预订。这个值的优先级要高于freecapacityfornet,但低于totalfreecapacity。

integer

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "servicecode": "sample string 1",
    "servicename": "sample string 2",
    "date": "sample string 3",
    "timespanindex": 4,
    "starttime": "sample string 5",
    "endtime": "sample string 6",
    "totalcapacity": 7,
    "freecapacityfornet": 8,
    "totalfreecapacity": 9,
    "resvercapacity": 10
  },
  {
    "servicecode": "sample string 1",
    "servicename": "sample string 2",
    "date": "sample string 3",
    "timespanindex": 4,
    "starttime": "sample string 5",
    "endtime": "sample string 6",
    "totalcapacity": 7,
    "freecapacityfornet": 8,
    "totalfreecapacity": 9,
    "resvercapacity": 10
  }
]

application/xml, text/xml

Sample:
<ArrayOfTimeSegment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Result.WebInterface">
  <TimeSegment>
    <date>sample string 3</date>
    <endtime>sample string 6</endtime>
    <freecapacityfornet>8</freecapacityfornet>
    <resvercapacity>10</resvercapacity>
    <servicecode>sample string 1</servicecode>
    <servicename>sample string 2</servicename>
    <starttime>sample string 5</starttime>
    <timespanindex>4</timespanindex>
    <totalcapacity>7</totalcapacity>
    <totalfreecapacity>9</totalfreecapacity>
  </TimeSegment>
  <TimeSegment>
    <date>sample string 3</date>
    <endtime>sample string 6</endtime>
    <freecapacityfornet>8</freecapacityfornet>
    <resvercapacity>10</resvercapacity>
    <servicecode>sample string 1</servicecode>
    <servicename>sample string 2</servicename>
    <starttime>sample string 5</starttime>
    <timespanindex>4</timespanindex>
    <totalcapacity>7</totalcapacity>
    <totalfreecapacity>9</totalfreecapacity>
  </TimeSegment>
</ArrayOfTimeSegment>