自我游

自我游


3. 餐饮产品规格详情

<h3>获取产品规格详情</h3> <p>&gt; 请求URL</p> <p><strong>[post]</strong> <code>{{base_url}}/api/open_service/v1/catering_product/specifications</code></p> <p>&gt; 接口描述</p> <p><code>获取产品规格详情接口</code></p> <p>&gt; 请求参数 header参数</p> <p><code>请求头参数, 详见请求约定中的鉴权说明.</code></p> <p>&gt; 请求参数 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;">固定参数:2</td> </tr> <tr> <td style="text-align: left;">id</td> <td style="text-align: left;">是</td> <td style="text-align: left;">int</td> <td style="text-align: left;">产品id</td> </tr> </tbody> </table> <p>&gt; 请求示例</p> <pre><code class="language-json">{&amp;quot;product_type&amp;quot;:2,&amp;quot;id&amp;quot;:525}</code></pre> <p>&gt; 返回示例</p> <pre><code class="language-json">{ &amp;quot;code&amp;quot;: 0, &amp;quot;message&amp;quot;: &amp;quot;成功&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;id&amp;quot;: 525, // 产品id &amp;quot;product_type&amp;quot;: 2, // 产品类型 固定值 2:餐饮 &amp;quot;min_buy_num&amp;quot;: 1, // 起订数量 &amp;quot;inventories&amp;quot;: [ // 规格数据 { &amp;quot;id&amp;quot;: 280, // 规格id &amp;quot;title&amp;quot;: &amp;quot;111&amp;quot;, // 规格名称 &amp;quot;pictures&amp;quot;: &amp;quot;http://dongli-oss.malldongli.com/upload/default/20230714100528/d08a005e1167926cf8dce9166e359043.jpg?imageMogr2/format/jpg&amp;quot;, // 规格图片 &amp;quot;original_price&amp;quot;: 1.02, // 原价 (单位元) &amp;quot;current_price&amp;quot;: 1.01, // 现价 (单位元) &amp;quot;sold_surplus&amp;quot;: 294, // 库存数量 &amp;quot;get_week&amp;quot;: [ // 适用星期 0:周日 1:周一 以此类推 &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;3&amp;quot;, &amp;quot;4&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;6&amp;quot; ],                 &amp;quot;status&amp;quot;: 0, // 0:下架 1:上架 &amp;quot;validity_argument&amp;quot;: [ // 有效期范围 第一个为开始时间 第二个为截至时间 &amp;quot;2023-07-14 00:00:00&amp;quot;, &amp;quot;2023-12-31 23:59:59&amp;quot; ] }, { &amp;quot;id&amp;quot;: 281, &amp;quot;title&amp;quot;: &amp;quot;2222&amp;quot;, &amp;quot;pictures&amp;quot;: &amp;quot;http://dongli-oss.malldongli.com/upload/default/20230714100528/d08a005e1167926cf8dce9166e359043.jpg?imageMogr2/format/jpg&amp;quot;, &amp;quot;original_price&amp;quot;: 2.22, &amp;quot;current_price&amp;quot;: 1, &amp;quot;sold_surplus&amp;quot;: 7, &amp;quot;get_week&amp;quot;: [ &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;3&amp;quot;, &amp;quot;4&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;6&amp;quot; ],                 &amp;quot;status&amp;quot;: 0, // 0:下架 1:上架 &amp;quot;validity_argument&amp;quot;: [ &amp;quot;2023-07-14 00:00:00&amp;quot;, &amp;quot;2023-12-29 23:59:59&amp;quot; ] } ], &amp;quot;sale_status&amp;quot;: 0 // 销售状态:0-可销售;1-未开售;2-已下架;3-无库存; } }</code></pre> <p>&gt; 返回参数说明</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>&gt; 备注</p> <p><code>备注</code></p>

页面列表

ITEM_HTML