Create a shipping option
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
Fields for creating or updating a shipping option.
Display name of the shipping option.
URL-friendly unique identifier. Must be unique across all shipping options.
free-shippingWhether the shipping option is active.
trueCalculator configuration. The object must contain a slug key identifying the calculator. See the Shipping Rules & Calculators guide for available calculators and their parameters.
{"slug":"amount-based-calculator","amounts":[{"min_amount":"0.00","max_amount":"100.00","shipping_amount":"9.99"},{"min_amount":"100.00","max_amount":null,"shipping_amount":"0.00"}]}Rule configuration. The object must contain a slug key identifying the rule. Send {} to apply AnyRule (all baskets are eligible). See the Shipping Rules & Calculators guide for available rules and their parameters.
Sort order. Lower values appear first.
0Optional description of the shipping option.
Delivery type of the shipping option.
The created shipping option.
A shipping option returned by the API.
Unique identifier of the shipping option.
Display name. Returned in the active request language, falling back to the default language.
URL-friendly unique identifier.
free-shippingWhether the shipping option is active. Inactive options are hidden from the storefront.
trueCalculator configuration. Determines how the shipping cost is computed.
The object must contain at minimum a slug key identifying the calculator. See the Shipping Rules & Calculators guide for available calculators and their parameters.
{"slug":"amount-based-calculator","amounts":[{"min_amount":"0.00","max_amount":"100.00","shipping_amount":"9.99"},{"min_amount":"100.00","max_amount":null,"shipping_amount":"0.00"}]}Rule configuration. Determines which baskets are eligible for this shipping option.
The object must contain a slug key identifying the rule. The name key is optional. Send {} to apply AnyRule (all baskets are eligible). See the Shipping Rules & Calculators guide for available rules and their parameters.
{"slug":"any-rule"}Sort order used when listing options. Lower values appear first.
0Optional description of the shipping option.
The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
POST /api/remote/1/shipping_options/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 129
{
"name": "Free Shipping",
"slug": "free-shipping",
"is_active": true,
"calculator": {
"slug": "free-calculator"
},
"rule": {},
"sort_order": 0
}{
"pk": 1,
"name": "Free Shipping",
"slug": "free-shipping",
"is_active": true,
"calculator": {
"slug": "free-calculator"
},
"rule": {
"slug": "any-rule"
},
"sort_order": 0,
"description": null,
"kwargs": {
"required_fields": []
},
"delivery_type": {
"value": "standard",
"label": "Standard"
}
}Last updated
Was this helpful?

