List the conditions a method can carry
const options = {
method: 'GET',
headers: {'X-Spree-Seller-Id': '<x-spree-seller-id>', Authorization: 'Bearer <token>'}
};
fetch('http://{defaultHost}/api/v3/seller/delivery_methods/rule_types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v3/seller/delivery_methods/rule_types \
--header 'Authorization: Bearer <token>' \
--header 'X-Spree-Seller-Id: <x-spree-seller-id>'{
"data": [
{
"type": "item_total_rule",
"name": "Item total",
"description": "Limits the delivery method to carts within an item total range",
"preference_schema": [
{
"key": "minimum_amount",
"type": "decimal",
"default": null
},
{
"key": "maximum_amount",
"type": "decimal",
"default": null
}
]
},
{
"type": "weight_rule",
"name": "Weight",
"description": "Limits the delivery method to packages within a weight range",
"preference_schema": [
{
"key": "minimum_weight",
"type": "decimal",
"default": null
},
{
"key": "maximum_weight",
"type": "decimal",
"default": null
}
]
},
{
"type": "volume_rule",
"name": "Volume",
"description": "Limits the delivery method to shipments within a volume range, in cubic meters",
"preference_schema": [
{
"key": "minimum_volume",
"type": "decimal",
"default": null
},
{
"key": "maximum_volume",
"type": "decimal",
"default": null
}
]
},
{
"type": "company_rule",
"name": "Company",
"description": "Offers the delivery method only to orders placed for a company, or only to orders that are not",
"preference_schema": [
{
"key": "company_orders_only",
"type": "boolean",
"default": true
}
]
}
]
}List the conditions a method can carry
The eligibility rules a seller may put on their own method, with the preference schema each form is rendered from.
GET
/
api
/
v3
/
seller
/
delivery_methods
/
rule_types
List the conditions a method can carry
const options = {
method: 'GET',
headers: {'X-Spree-Seller-Id': '<x-spree-seller-id>', Authorization: 'Bearer <token>'}
};
fetch('http://{defaultHost}/api/v3/seller/delivery_methods/rule_types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v3/seller/delivery_methods/rule_types \
--header 'Authorization: Bearer <token>' \
--header 'X-Spree-Seller-Id: <x-spree-seller-id>'{
"data": [
{
"type": "item_total_rule",
"name": "Item total",
"description": "Limits the delivery method to carts within an item total range",
"preference_schema": [
{
"key": "minimum_amount",
"type": "decimal",
"default": null
},
{
"key": "maximum_amount",
"type": "decimal",
"default": null
}
]
},
{
"type": "weight_rule",
"name": "Weight",
"description": "Limits the delivery method to packages within a weight range",
"preference_schema": [
{
"key": "minimum_weight",
"type": "decimal",
"default": null
},
{
"key": "maximum_weight",
"type": "decimal",
"default": null
}
]
},
{
"type": "volume_rule",
"name": "Volume",
"description": "Limits the delivery method to shipments within a volume range, in cubic meters",
"preference_schema": [
{
"key": "minimum_volume",
"type": "decimal",
"default": null
},
{
"key": "maximum_volume",
"type": "decimal",
"default": null
}
]
},
{
"type": "company_rule",
"name": "Company",
"description": "Offers the delivery method only to orders placed for a company, or only to orders that are not",
"preference_schema": [
{
"key": "company_orders_only",
"type": "boolean",
"default": true
}
]
}
]
}Was this page helpful?
⌘I

