GET api/Products/Inventory?startdate={startdate}&enddate={enddate}&productid={productid}&servicecode={servicecode}
从景区获取可以预定(预购)的产品(门票)列表(包括分时段和不分时段的模式) 为向下兼容,同功能的WebForms接口访问地址为~/Source/GetProductsInventory.aspx。
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| startdate |
起始日期,必须是当天及当天以后的日期,不输入时默认为当天。 |
string |
Default value is |
| enddate |
截止日期,不输入时默认为当天几天以后的日期,起始日期和截止日期之间的跨度不能超过7天。 |
string |
Default value is |
| productid |
产品ID,不指定时表示返回您可以销售的全部票型的库存。 |
string |
Default value is |
| servicecode |
线路ID,仅在分时段景区中这个项。非分时段的景区将不理会这个参数。在分时段景区系统指定这个参数时,将仅返回对应线路的门票类型。 |
string |
Default value is |
Body Parameters
None.
Response Information
Resource Description
从景区获取可以预定(预购)的产品(门票)列表(包括分时段和不分时段的模式) 为向下兼容,同功能的WebForms接口访问地址为~/Source/GetProductsInventory.aspx。
Collection of ProductInventory| Name | Description | Type | Additional information |
|---|---|---|---|
| productId |
产品ID |
string |
None. |
| productName |
产品名称 |
string |
None. |
| date |
日期 格式YYYYMMDD |
string |
None. |
| quantity |
当前可以销售的最大数量,0表示无限制,-1表示已售完,其他值表示当前库存余量 |
integer |
None. |
Response Formats
application/json, text/json
Sample:
[
{
"productId": "sample string 1",
"productName": "sample string 2",
"date": "sample string 3",
"quantity": 4
},
{
"productId": "sample string 1",
"productName": "sample string 2",
"date": "sample string 3",
"quantity": 4
}
]
application/xml, text/xml
Sample:
<ArrayOfProductInventory xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Result.WebInterface">
<ProductInventory>
<date>sample string 3</date>
<productId>sample string 1</productId>
<productName>sample string 2</productName>
<quantity>4</quantity>
</ProductInventory>
<ProductInventory>
<date>sample string 3</date>
<productId>sample string 1</productId>
<productName>sample string 2</productName>
<quantity>4</quantity>
</ProductInventory>
</ArrayOfProductInventory>