curl --request POST \
--url https://api.example.com/vendor/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"is_automatic": false,
"status": "draft",
"campaign_id": "<string>",
"campaign": {
"name": "<string>",
"campaign_identifier": "<string>",
"description": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"budget": {
"type": "spend",
"limit": 123,
"currency_code": "<string>"
}
},
"type": "standard",
"application_method": {
"description": "<string>",
"value": 123,
"max_quantity": "<string>",
"apply_to_quantity": "<string>",
"buy_rules_min_quantity": "<string>",
"type": "percentage",
"target_type": "items",
"allocation": "each",
"target_rules": [
{
"description": "<string>",
"attribute": "<string>",
"operator": "in",
"values": [
"<string>"
]
}
]
},
"rules": [
{
"description": "<string>",
"attribute": "<string>",
"operator": "in",
"values": [
"<string>"
]
}
]
}
'{
"promotion": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"is_automatic": true,
"type": "<string>",
"application_method": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"value": 123,
"max_quantity": "<string>",
"apply_to_quantity": "<string>",
"buy_rules_min_quantity": "<string>",
"type": "<string>",
"target_type": "<string>",
"allocation": "<string>",
"target_rules": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"attribute": "<string>",
"operator": "<string>",
"values": [
{
"value": "<string>"
}
]
}
]
},
"rules": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"attribute": "<string>",
"operator": "<string>",
"values": [
{
"value": "<string>"
}
]
}
]
}
}Creates a new promotion for the authenticated vendor.
curl --request POST \
--url https://api.example.com/vendor/promotions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"is_automatic": false,
"status": "draft",
"campaign_id": "<string>",
"campaign": {
"name": "<string>",
"campaign_identifier": "<string>",
"description": "<string>",
"starts_at": "<string>",
"ends_at": "<string>",
"budget": {
"type": "spend",
"limit": 123,
"currency_code": "<string>"
}
},
"type": "standard",
"application_method": {
"description": "<string>",
"value": 123,
"max_quantity": "<string>",
"apply_to_quantity": "<string>",
"buy_rules_min_quantity": "<string>",
"type": "percentage",
"target_type": "items",
"allocation": "each",
"target_rules": [
{
"description": "<string>",
"attribute": "<string>",
"operator": "in",
"values": [
"<string>"
]
}
]
},
"rules": [
{
"description": "<string>",
"attribute": "<string>",
"operator": "in",
"values": [
"<string>"
]
}
]
}
'{
"promotion": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"is_automatic": true,
"type": "<string>",
"application_method": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"value": 123,
"max_quantity": "<string>",
"apply_to_quantity": "<string>",
"buy_rules_min_quantity": "<string>",
"type": "<string>",
"target_type": "<string>",
"allocation": "<string>",
"target_rules": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"attribute": "<string>",
"operator": "<string>",
"values": [
{
"value": "<string>"
}
]
}
]
},
"rules": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"attribute": "<string>",
"operator": "<string>",
"values": [
{
"value": "<string>"
}
]
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The code of the promotion.
Whether the promotion is applied automatically.
The status of the promotion.
draft, active, inactive The campaign id.
Show child attributes
The type of the promotion.
standard Show child attributes
Promotion rules.
Show child attributes
Created
Promotion object
Show child attributes