获取广告位置列表

接口描述:

  • 获取广告位置列表。

请求 URL:

  • http|https://host/api/v1/ads_position/method/get.ads.position.list/

请求方式:

  • GET
  • POST

是否授权:

  • 需要授权

业务参数:

参数名 类型 是否必须 范围值 默认值 示例值 描述
name string max:100 首页焦点轮播 广告位置名称
code string max:16 pc_index 广告位置编码
platform integer between:-128,127 0 广告位置平台(自定义)
type integer in:0,1 0 广告位置类型 0=图片 1=代码
display integer in:0,1,2,3 0 广告位置展示方式 0=多个 1=单个 2=随机多个 3=随机单个
status integer in:0,1 1 广告位置状态 0=禁用 1=启用
page_no integer gt:0 1 1 页码
page_size integer gt:0 15 15 每页数量
order_type string in:asc,desc desc asc 排序方式
order_field string 见附属 A ads_position_id status 排序字段

附属 A: in:ads_position_id,name,description,width,height,status

响应参数:

参数名 类型 是否返回 示例值 描述
status integer 200 状态码
message string success 消息信息
data object [] 返回对象
data 类型 是否返回 示例值 描述
items array [] 列表项
total_result integer 3 合计计数
items 类型 是否返回 示例值 描述
ads_position_id integer 4 广告位置编号
code string pc_index 广告位置编码
platform integer 0 广告位置平台(自定义)
name string 首页焦点轮播 广告位置名称
description string 简单说明 广告位置描述
width integer 0 广告位置宽度
height integer 0 广告位置高度
content string image.jpg 广告位置默认内容(图片,代码等)
color string #ffffff 广告位置背景色
type integer 0 广告位置类型 0=图片 1=代码
display integer 0 广告位置展示方式 0=多个 1=单个 2=随机多个 3=随机单个
status integer 1 广告位置状态 0=禁用 1=启用

响应示例:

  1. {
  2. "status": 200,
  3. "message": "success",
  4. "data": {
  5. "items": [
  6. {
  7. "ads_position_id": 4,
  8. "code": "pc_index",
  9. "platform": 0,
  10. "name": "首页焦点轮播",
  11. "description": "简单说明",
  12. "width": 0,
  13. "height": 0,
  14. "content": "image.jpg",
  15. "color": "#ffffff",
  16. "type": 0,
  17. "display": 0,
  18. "status": 1
  19. },
  20. {
  21. "ads_position_id": 3,
  22. "code": "",
  23. "platform": 0,
  24. "name": "首页中层",
  25. "description": "",
  26. "width": 0,
  27. "height": 0,
  28. "content": "",
  29. "color": "#ffffff",
  30. "type": 0,
  31. "display": 0,
  32. "status": 1
  33. }
  34. ],
  35. "total_result": 3
  36. }
  37. }

备注:

  1. 该接口支持条件搜索,如果不带入业务参数则使用默认值。