3.1 跟团游_产品规格及价格获取
<h3>获取产品规格</h3>
<p>> 请求URL</p>
<p><strong>[post]</strong> <code>{{base_url}}/api/open_service/v1/travel_product/specifications</code></p>
<p>> 接口描述</p>
<p><code>获取产品规格</code></p>
<p>> 请求参数 header参数</p>
<p><code>请求头参数, 详见请求约定中的鉴权说明.</code></p>
<p>> 请求参数 body参数</p>
<p><code>注意, 此请求参数为json格式. 放置在post请求体中, 以raw格式数据请求</code></p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">product_type</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td style="text-align: left;">产品类型 (固定值: 1) <br> 1:跟团游 4:EBooking旅游</td>
</tr>
<tr>
<td style="text-align: left;">product_id</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td style="text-align: left;">产品id</td>
</tr>
<tr>
<td style="text-align: left;">spec_name</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">规格名称 <br> 默认: 查询全部 <br> 其他: 查询指定规格</td>
</tr>
</tbody>
</table>
<p>> 请求示例</p>
<pre><code class="language-json">{&quot;product_type&quot;:2,&quot;product_id&quot;:1,&quot;spec_name&quot;:&quot;规格名称1&quot;}</code></pre>
<p>> 返回示例</p>
<pre><code class="language-json">{
&quot;code&quot;: 0,
&quot;message&quot;: &quot;成功&quot;,
&quot;data&quot;: [
{
&quot;spec_name&quot;:&quot;规格名称1&quot;, // 规格名称
&quot;prices&quot;: [
{
&quot;spec_id&quot;: 1, // 规格id
&quot;sale_date&quot;: &quot;2024-06-22&quot;, // 销售日期
&quot;adult_market_price&quot;: 12.33, // 成人市场价
&quot;child_market_price&quot;: 10.11, // 儿童市场价
&quot;one_room_price&quot;: 9.11, // 单房差
&quot;inventory_num&quot;: 11 // 库存数量
},
{
&quot;spec_id&quot;: 2, // 规格id
&quot;sale_date&quot;: &quot;2024-06-23&quot;, // 销售日期
&quot;adult_market_price&quot;: 12.33, // 成人市场价
&quot;child_market_price&quot;: 10.11, // 儿童市场价
&quot;one_room_price&quot;: 9.11, // 单房差
&quot;inventory_num&quot;: 10 // 库存数量
}
]
},
{
&quot;spec_name&quot;:&quot;规格名称2&quot;, // 规格名称
&quot;prices&quot;: [
{
&quot;spec_id&quot;: 3, // 规格id
&quot;sale_date&quot;: &quot;2024-06-22&quot;, // 销售日期
&quot;adult_market_price&quot;: 12.33, // 成人市场价
&quot;child_market_price&quot;: 10.11, // 儿童市场价
&quot;one_room_price&quot;: 9.11, // 单房差
&quot;inventory_num&quot;: 11 // 库存数量
},
{
&quot;spec_id&quot;: 4, // 规格id
&quot;sale_date&quot;: &quot;2024-06-23&quot;, // 销售日期
&quot;adult_market_price&quot;: 12.33, // 成人市场价
&quot;child_market_price&quot;: 10.11, // 儿童市场价
&quot;one_room_price&quot;: 9.11, // 单房差
&quot;inventory_num&quot;: 10 // 库存数量
}
]
}
]
}</code></pre>
<p>> 返回参数说明</p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td style="text-align: left;">0:成功 1:失败 其他:详见约定说明</td>
</tr>
<tr>
<td style="text-align: left;">message</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">消息内容, 成功/错误提示</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">array</td>
<td style="text-align: left;">返回值</td>
</tr>
</tbody>
</table>
<p>> 备注</p>
<p>跟团游 规格
spec_name // 规格名</p>
<p>prices.inventory_price_id // 规格id
prices.sale_date // 销售日期
prices.adult_market_price // 成人市场价
prices.child_market_price // 儿童市场价
prices.one_room_price // 单房差</p>
<p>prices.inventory_num // 库存数量</p>