marketing.read_write- Marketing Read & WriteAuthorization: Bearer ********************{
"title": "Affiliate name",
"status": "active",
"type": "public",
"apply_to": "first_order",
"commission": {
"type": "percent",
"value": 20,
"minimum_apply": null
},
"discount": {
"type": "percent",
"value": 20
},
"scopes": {
"type": "store"
},
"start_date": "2024-09-27",
"end_date": "2024-07-29"
}curl --location --request POST 'https://api.salla.dev/admin/v2/affiliates' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Affiliate name",
"status": "active",
"type": "public",
"apply_to": "first_order",
"commission": {
"type": "percent",
"value": 20,
"minimum_apply": null
},
"discount": {
"type": "percent",
"value": 20
},
"scopes": {
"type": "store"
},
"start_date": "2024-09-27",
"end_date": "2024-07-29"
}'{
"status": 200,
"success": true,
"data": {
"id": 611208326,
"title": "Affiliate Test",
"type": "public",
"apply_to": "first_order",
"commission": {
"type": "fix",
"value": 20,
"minimum_apply": 80
},
"discount": {
"type": "percent",
"value": "10"
},
"scopes": {
"id": 1,
"type": "product"
},
"start_date": "",
"end_date": "",
"status": "",
"hide_total_stats": false,
"statistics": {
"visits": 17,
"sales": {
"amount": 300,
"currency": "SAR"
},
"profit": {
"amount": 150,
"currency": "SAR"
},
"orders_count": 9
}
}
}