Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
cURL
curl --request POST \ --url https://api.wazapin.com/v1/commerce/promotions \ --header 'Content-Type: application/json' \ --data ' { "code": "<string>", "discount_value": 2, "name": "<string>", "auto_apply": true, "bundle_product_ids": [ "<string>" ], "category_ids": [ "<string>" ], "collection_ids": [ "<string>" ], "ends_at": "<string>", "max_uses": 123, "min_subtotal_amount": 123, "product_ids": [ "<string>" ], "starts_at": "<string>" } '
const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ code: '<string>', discount_value: 2, name: '<string>', auto_apply: true, bundle_product_ids: ['<string>'], category_ids: ['<string>'], collection_ids: ['<string>'], ends_at: '<string>', max_uses: 123, min_subtotal_amount: 123, product_ids: ['<string>'], starts_at: '<string>' }) }; fetch('https://api.wazapin.com/v1/commerce/promotions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
import requests url = "https://api.wazapin.com/v1/commerce/promotions" payload = { "code": "<string>", "discount_value": 2, "name": "<string>", "auto_apply": True, "bundle_product_ids": ["<string>"], "category_ids": ["<string>"], "collection_ids": ["<string>"], "ends_at": "<string>", "max_uses": 123, "min_subtotal_amount": 123, "product_ids": ["<string>"], "starts_at": "<string>" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.text)
{ "discount_type": "<string>", "discount_value": 123, "id": "<string>", "auto_apply": true, "bundle_product_ids": [ "<string>" ], "category_ids": [ "<string>" ], "code": "<string>", "collection_ids": [ "<string>" ], "ends_at": "2023-11-07T05:31:56Z", "max_uses": 123, "min_subtotal_amount": 123, "name": "<string>", "product_ids": [ "<string>" ], "starts_at": "2023-11-07T05:31:56Z" }
{ "error": { "code": "<string>", "message": "<string>", "details": [ { "message": "<string>", "code": "<string>", "field": "<string>", "location": "<string>" } ], "request_id": "<string>" } }
percent
fixed_amount
x >= 1
Created