Commerce
Post v1commercedelivery methods
POST
/
v1
/
commerce
/
delivery-methods
cURL
curl --request POST \
--url https://api.wazapin.com/v1/commerce/delivery-methods \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"fee_amount": 1,
"name": "<string>",
"blackout_dates": [
"<string>"
],
"pickup_address_label": "<string>",
"schedule_enabled": true,
"service_hours": [
{
"close": "<string>",
"open": "<string>",
"weekday": 123
}
],
"sort_order": 123,
"timeslots": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
fee_amount: 1,
name: '<string>',
blackout_dates: ['<string>'],
pickup_address_label: '<string>',
schedule_enabled: true,
service_hours: [{close: '<string>', open: '<string>', weekday: 123}],
sort_order: 123,
timeslots: ['<string>']
})
};
fetch('https://api.wazapin.com/v1/commerce/delivery-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/commerce/delivery-methods"
payload = {
"code": "<string>",
"fee_amount": 1,
"name": "<string>",
"blackout_dates": ["<string>"],
"pickup_address_label": "<string>",
"schedule_enabled": True,
"service_hours": [
{
"close": "<string>",
"open": "<string>",
"weekday": 123
}
],
"sort_order": 123,
"timeslots": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"code": "<string>",
"fee_amount": 123,
"id": "<string>",
"method_type": "<string>",
"name": "<string>",
"schedule_enabled": true,
"sort_order": 123,
"blackout_dates": [
"<string>"
],
"pickup_address_label": "<string>",
"service_hours": [
{
"close": "<string>",
"open": "<string>",
"weekday": 123
}
],
"timeslots": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}Body
application/json
Required range:
x >= 0Available options:
delivery, pickup Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
⌘I
cURL
curl --request POST \
--url https://api.wazapin.com/v1/commerce/delivery-methods \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"fee_amount": 1,
"name": "<string>",
"blackout_dates": [
"<string>"
],
"pickup_address_label": "<string>",
"schedule_enabled": true,
"service_hours": [
{
"close": "<string>",
"open": "<string>",
"weekday": 123
}
],
"sort_order": 123,
"timeslots": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
fee_amount: 1,
name: '<string>',
blackout_dates: ['<string>'],
pickup_address_label: '<string>',
schedule_enabled: true,
service_hours: [{close: '<string>', open: '<string>', weekday: 123}],
sort_order: 123,
timeslots: ['<string>']
})
};
fetch('https://api.wazapin.com/v1/commerce/delivery-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/commerce/delivery-methods"
payload = {
"code": "<string>",
"fee_amount": 1,
"name": "<string>",
"blackout_dates": ["<string>"],
"pickup_address_label": "<string>",
"schedule_enabled": True,
"service_hours": [
{
"close": "<string>",
"open": "<string>",
"weekday": 123
}
],
"sort_order": 123,
"timeslots": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"code": "<string>",
"fee_amount": 123,
"id": "<string>",
"method_type": "<string>",
"name": "<string>",
"schedule_enabled": true,
"sort_order": 123,
"blackout_dates": [
"<string>"
],
"pickup_address_label": "<string>",
"service_hours": [
{
"close": "<string>",
"open": "<string>",
"weekday": 123
}
],
"timeslots": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}