促销(优惠券)api
| 接口地址 | http://host:port/pospal-api2/openapi/v1/promotionopenapi/querycouponpromotionbyuid | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| promotioncouponuid | 是 | long | 优惠券规则uid |
| appid | 是 | string | pospal配置的访问凭证 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | json | ||
| forrshop | integer | 1:实体店可用,0:实体店不可用 | |
| foreshop | integer | 1:网店可用,0:网店不可用 | |
| forcustomer | integer | 1: 会员专享,0:不限制 | |
| enjoycustomerdiscount | integer | 会员可享受的折扣率,0或空享受折扣优惠。假设enjoycustomerdiscount=90表示享受9九折优惠 | |
| promotioncouponuid | long | 优惠券规则uid | |
| createuseraccount | string | 创建优惠券规则门店的账号 | |
| createuserappid | string | 创建优惠券规则门店的appid | |
| enable | integer | 是否可用,1:可用,0:禁用,-1删除 | |
| name | string | 促销活动(优惠券活动)名称 | |
| startdate | string | 促销活动开始时间,格式为yyyy-mm-dd hh:mm:ss | |
| enddate | string | 促销活动结束时间,格式为yyyy-mm-dd hh:mm:ss | |
| description | string | 促销活动(优惠券活动)描述 | |
| avaliablequantity | integer | 剩余可用优惠券号(核销码)数量 | |
| usedquantity | integer | 已使用(核销)优惠券号(核销码)数量 | |
| createdquantity | integer | 已创建优惠券号(核销码)数量 | |
| codelength | integer | 优惠券号(核销码)建议长度 | |
| salable | integer | 是否可销售,1:是,0或空:否 | |
| sellingprice | bigdecimal | 优惠券号销售价,空或0不收钱 | |
| requiredamount | bigdecimal | 满足多少金额才出券,空或0不限制 | |
| usagelimittype | integer | 使用限制:0/null-不限制,1-每日限制次数,2-每周限制次数,3-每月限制次数 | |
| usagelimittimes | integer | 每日/每周/每月限制使用次数 | |
| usagelimitamounttype | integer | 使用限制:0/null-不限制,1-限制最多优惠金额 | |
| usagelimitamount | integer | 限制最多优惠金额 | |
| promotionruleassignuseraccounts | string[] | 使用门店用户账号(总部帐号发起查询时才有) | |
| promotionruleassignuserappids | string[] | 使用门店用户appid(总部帐号发起查询时才有) | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/promotionopenapi/querycouponpromotions | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | list | 字段描述参考根据优惠券规则uid查询 | |
| 接口地址 | http://host:port/pospal-api/api/auth/openapi/promotion/addcouponcode/ | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| promotioncouponuid | 是 | long | 优惠券规则uid |
| customeruid | 否 | long | 会员uid,如果有值,说明优惠券号挂到会员上 |
| code | 是 | string | 优惠券号(核销码),长度不能超过50(限英文或数字) 注:优惠券号(核销码)必须保证每家门店全局唯一。 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | json | ||
| codeexpireddate | json | 优惠券号(核销码)失效时间,格式为yyyy-mm-dd hh:mm:ss | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/promotionopenapi/querycustomercouponcodepage | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| customeruid | 是 | long | 会员uid |
| appid | 是 | string | pospal配置的访问凭证 |
| postbackparameter | 否 | json | pospal查询ag九游会ag九游会官网首页时可以不传,之后的内容从返回结果中取出 |
| parametertype | 是 | string | 从返回结果中取出 |
| parametervalue | 是 | string | 从返回结果中取出 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | json | ||
| postbackparameter | json | 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页 | |
| parametertype | string | 从返回结果中直接取出用于回传,不能变其值 | |
| parametervalue | string | 从返回结果中直接取出用于回传,不能变其值 | |
| result | list | ||
| createdbyuserappid | string | 创建优惠券号(核销码)用户appid | |
| createdbyuseraccount | string | 创建优惠券号(核销码)用户账号 | |
| code | string | 优惠券号(核销码) | |
| createddatetime | string | 优惠券号(核销码)创建时间,格式为yyyy-mm-dd hh:mm:ss | |
| expireddate | string | 优惠券号(核销码)过期时间,格式为yyyy-mm-dd hh:mm:ss如果为空,以promotioncouponenddate为准 | |
| usedbyuserappid | string | 使用优惠券号(核销码)用户appid | |
| usedbyuseraccount | string | 使用优惠券号(核销码)用户账号 | |
| useddatetime | string | 使用优惠券号(核销码)时间,格式为yyyy-mm-dd hh:mm:ss | |
| usedbyticketuid | string | 使用优惠券号(核销码)的流水单据uid | |
| promotioncouponuid | long | 优惠券规则uid | |
| promotioncouponname | string | 优惠券规则名称 | |
| promotioncouponappid | integer | 优惠券号(核销码)建议长度 | |
| promotioncouponaccount | string | 创建优惠券规则用户账号 | |
| promotioncouponstartdate | string | 优惠券规则-开始时间,格式为yyyy-mm-dd hh:mm:ss | |
| promotioncouponenddate | string | 优惠券规则-结束时间,格式为yyyy-mm-dd hh:mm:ss | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/promotionopenapi/queryusedpromotioncode | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| starttime | 是 | string | 开始时间(包含),格式为yyyy-mm-dd hh:mm:ss |
| excludeendtime | 是 | string | 结束时间(不包含),格式为yyyy-mm-dd hh:mm:ssendtime - starttime <= 5天 |
| appid | 是 | string | pospal配置的访问凭证,任何门店的appid都可以查出所有用用过的核销码 |
| postbackparameter | 否 | json | pospal查询ag九游会ag九游会官网首页时可以不传,之后的内容从返回结果中取出 |
| parametertype | 是 | string | 从返回结果中取出 |
| parametervalue | 是 | string | 从返回结果中取出 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| data | json | ||
| postbackparameter | json | 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页 | |
| parametertype | string | 从返回结果中直接取出用于回传,不能变其值 | |
| parametervalue | string | 从返回结果中直接取出用于回传,不能变其值 | |
| result | list | ||
| createdbyuserappid | string | 创建优惠券号(核销码)用户appid | |
| createdbyuseraccount | string | 创建优惠券号(核销码)用户账号 | |
| code | string | 优惠券号(核销码) | |
| createddatetime | string | 优惠券号(核销码)创建时间,格式为yyyy-mm-dd hh:mm:ss | |
| expireddate | string | 优惠券号(核销码)过期时间,格式为yyyy-mm-dd hh:mm:ss如果为空,以promotioncouponenddate为准 | |
| usedbyuserappid | string | 使用优惠券号(核销码)用户appid | |
| usedbyuseraccount | string | 使用优惠券号(核销码)用户账号 | |
| useddatetime | string | 使用优惠券号(核销码)时间,格式为yyyy-mm-dd hh:mm:ss | |
| usedbyticketuid | string | 使用优惠券号(核销码)的流水单据uid 根据单据uid查询 | |
| usedbyproductorderid | int | 使用优惠券号(核销码)的订单id 根据id查询订单 | |
| promotioncouponuid | long | 优惠券规则uid | |
| promotioncouponname | string | 优惠券规则名称 | |
| promotioncouponappid | integer | 优惠券号(核销码)建议长度 | |
| promotioncouponaccount | string | 创建优惠券规则用户账号 | |
| promotioncouponstartdate | string | 优惠券规则-开始时间,格式为yyyy-mm-dd hh:mm:ss | |
| promotioncouponenddate | string | 优惠券规则-结束时间,格式为yyyy-mm-dd hh:mm:ss | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/promotionopenapi/querypromotionpages | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| postbackparameter | 否 | json | pospal查询ag九游会ag九游会官网首页时可以不传,之后的内容从返回结果中取出 |
| parametertype | 是 | string | 从返回结果中取出 |
| parametervalue | 是 | string | 从返回结果中取出 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |
| pagesize | int | 本次查询预期从库存取出记录数,如果结果集的长度小于pagesize,不需要进行下一页查询 | |
| postbackparameter | json | 分页查询回传到服务器的参数结构,从第二页开始必须回传,如果没传,每次查询都是第一页 | |
| parametertype | long | 从返回结果中直接取出用于回传,不能变其值 | |
| parametervalue | bigdecimal | 从返回结果中直接取出用于回传,不能变其值 | |
| result | list | 促销规则实体列表 | |
| createuserappid | string | 创建促销规则的账号对应的appid | |
| createuseraccount | string | 创建促销规则的账号 | |
| id | long | 促销规则id | |
| type | string | 促销类型 | |
| enable | int | 是否可用,1可用,0禁用,-1删除 | |
| name | string | 销售规则名称 | |
| startdatetime | string | 促销规则开始时间 | |
| enddatetime | string | 促销规则结束时间 | |
| uid | long | 促销规则uid | |
| forrshop | int | 是否实体店可用:1实体店可用,其它不可用 | |
| foreshop | int | 是否网店可用:1网店可用,其它不可用 | |
| promotioncouponuid | long | 促销规则对应的优惠券规则uid | |
| enjoycustomerdiscount | bigdecimal | 会员享受的折扣 | |
| forcustomer | int | 是否针对会员 | |
| 接口地址 | http://host:port/pospal-api/api/auth/openapi/promotioncouponcode/use/ | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | post | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appid | 是 | string | pospal配置的访问凭证 |
| code | 是 | string | 优惠券号(核销码),长度不能超过50(限英文或数字) 注:优惠券号(核销码)必须保证每家门店全局唯一。 |
| customeruid | 否 | long | 会员uid,如果有值,说明优惠券号挂到会员上 |
| usedatetime | 否 | string | 使用时间,默认为服务器时间,格式为yyyy-mm-dd hh:mm:ss |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | string | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | string[] | 处理结果的消息 | |
| errorcode | int | 业务处理的错误代码,参见错误代码表 | |