本文档由 Apifox 自动生成,推荐使用 Apifox - API 文档、API 调试、API Mock、API 自动化测试!
affiliate_id
as a path parameter.marketing.read_write
- Marketing Read & WriteAuthorization: Bearer ********************
fixed
or percentage
.all_orders
or first_order
.{
"code": "frm11",
"marketer_name": "User Name",
"marketer_city": "Medina",
"commission_type": "fixed",
"amount": 100,
"apply_to": "first_order",
"notes": "Notes Here"
}
curl --location --request PUT 'https://echo.apifox.com/anything/affiliates/' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "frm11",
"marketer_name": "User Name",
"marketer_city": "Medina",
"commission_type": "fixed",
"amount": 100,
"apply_to": "first_order",
"notes": "Notes Here"
}'
comission_type
is fixed
, then use a numeric value such as 100
. If comission_type
is percentage
, then use a percentage value such as 15
%.all_orders
or first_order
{
"status": 200,
"success": true,
"data": {
"id": 611208326,
"code": "frm11",
"marketer_name": "User Name",
"marketer_city": "Medina",
"commission_type": "fixed",
"amount": {
"amount": 300,
"currency": "SAR"
},
"profit": {
"amount": 150,
"currency": "SAR"
},
"links": {
"affiliate": "https://salla.sa/dev-wofftr4xsra5xtlv?utm_source=aff&utm_campaign=CXNAZ",
"statistics": "https://salla.sa/dev-wofftr4xsra5xtlv/marketing/statistics/1604086218"
},
"apply_to": "first_order",
"visits_count": 17,
"notes": "Notes Here"
}
}
扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升