A shipping method has a number of properties, represented by fields. These fields control how shipping options are calculated, displayed, and applied to orders.
| Field name | Description | Default value | Supported values |
|---|---|---|---|
| shipping* | Shipping name | — | string |
| company_id | Company ID | Default company id | integer |
| delivery_time | Delivery time | '' | string |
| icon | Shipping icon | {} | See Main pair |
| localization | String of comma-separated localization IDs | '' | string |
| max_weight | Maximal deliverable weight | 0.00 | float |
| min_weight | Minimal deliverable weight | 0.00 | float |
| position | Payment position in the payment list | 0 | integer |
| rate_calculation | Rate calculation | M | M for Manual R for Real-time |
| rates | Rates | {'rate_value': { 'C': {}, 'I': {}, 'W': {} }, |
Array of rates |
| service_id | Shipping service ID | 0 | Valid shipping service ID |
| service_params | Shipping service parameters | {} | JSON object |
| shipping_id | Shipping ID | Set automatically | integer |
| status | Shipping status | A | A for active D for disabled H for hidden |
| tax_ids | Tax IDs | '' | String of comma-separated tax IDs |
| usergroup_ids | User group IDs | '0' | String of comma-separated user group IDs |
{
"shipping": "Standard Ground Shipping",
"company_id": 1,
"delivery_time": "3-5 business days",
"icon": {},
"localization": "16,18,20",
"max_weight": 25.00,
"min_weight": 0.10,
"position": 10,
"rate_calculation": "M",
"rates": {
"rate_value": {
"C": {
"0": {
"range_from": "0.00",
"range_to": "10.00",
"value": "5.99"
},
"1": {
"range_from": "10.01",
"range_to": "50.00",
"value": "8.99"
},
"2": {
"range_from": "50.01",
"range_to": "",
"value": "0.00"
}
},
"I": {},
"W": {}
}
},
"service_id": 0,
"service_params": {},
"shipping_id": 1,
"status": "A",
"tax_ids": "6",
"usergroup_ids": "0"
}
shipping field is required. Other fields will use their default values if not specified.
rate_calculation, use M for manually defined shipping rates (configured in the rates object) or R for real-time rates from external shipping services (requires a valid service_id).