POST /v1/commerce/delivery-methods
POST
/v1/commerce/delivery-methodsAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredRequest body
requiredapplication/jsonblackout_datesstring[] | nullcodestringrequiredfee_amountinteger<int64>requiredmin 0
method_typestringrequiredAllowed:
deliverypickupnamestringrequiredpickup_address_labelstringschedule_enabledbooleanservice_hoursServiceHour[] | nullShow propertiesHide properties
Array of
ServiceHourclosestringrequiredopenstringrequiredweekdayinteger<int64>requiredsort_orderinteger<int32>timeslotsstring[] | nullResponses
201Created
activebooleanrequiredblackout_datesstring[] | nullcodestringrequiredfee_amountinteger<int64>requiredidstringrequiredmethod_typestringrequirednamestringrequiredpickup_address_labelstringschedule_enabledbooleanrequiredservice_hoursServiceHour[] | nullShow propertiesHide properties
Array of
ServiceHourclosestringrequiredopenstringrequiredweekdayinteger<int64>requiredsort_orderinteger<int32>requiredtimeslotsstring[] | nulldefaultError
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/commerce/delivery-methods" \
-H "Content-Type: application/json" \
-d '{
"blackout_dates": [
"string"
],
"code": "string",
"fee_amount": 0,
"method_type": "delivery",
"name": "string",
"pickup_address_label": "string",
"schedule_enabled": true,
"service_hours": [
{
"close": "string",
"open": "string",
"weekday": 0
}
],
"sort_order": 0,
"timeslots": [
"string"
]
}'const response = await fetch("/v1/commerce/delivery-methods", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"blackout_dates": [
"string"
],
"code": "string",
"fee_amount": 0,
"method_type": "delivery",
"name": "string",
"pickup_address_label": "string",
"schedule_enabled": true,
"service_hours": [
{
"close": "string",
"open": "string",
"weekday": 0
}
],
"sort_order": 0,
"timeslots": [
"string"
]
})
});import requests
response = requests.post(
"/v1/commerce/delivery-methods",
headers={
"Content-Type": "application/json"
},
json={
"blackout_dates": [
"string"
],
"code": "string",
"fee_amount": 0,
"method_type": "delivery",
"name": "string",
"pickup_address_label": "string",
"schedule_enabled": True,
"service_hours": [
{
"close": "string",
"open": "string",
"weekday": 0
}
],
"sort_order": 0,
"timeslots": [
"string"
]
},
)Response
{
"active": true,
"blackout_dates": [
"string"
],
"code": "string",
"fee_amount": 0,
"id": "string",
"method_type": "string",
"name": "string",
"pickup_address_label": "string",
"schedule_enabled": true,
"service_hours": [
{
"close": "string",
"open": "string",
"weekday": 0
}
],
"sort_order": 0,
"timeslots": [
"string"
]
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}