An object representing a delivery method.
Property | Type | Description |
---|---|---|
uid | integer | The unique identifier of the delivery method. |
name | object | Name of the delivery method, by language. |
description | object | Description of the delivery method, by language. |
limitToCustomergroups | array | A list of Customergroup uid's which the delivery method are limited to. If the property is null then there are no limitation set. |
freeDeliveryMinimumSpend | object | The minimum amount to spend on an order to get free delivery with this delivery method, by currency. |
preferred | boolean | If this is the preferred delivery method according to the shop. |
allowBulky | boolean | If this delivery method allows delivery of bulky articles. |
allowCod | boolean | If this delivery method allows cash on delivery as a means to pay for the order. |
codCountry | string | For which country cash on delivery is available for. |
rates | array | An array of delivery rates. See Rates. |
These are the properties for the rates object.
Property | Type | Description |
---|---|---|
name | string | Name of the delivery rate. |
countryVatRates | array | VAT-rate, by country. See CountryVatRate. |
weightIntervals | array | Weight intervals. See WeightInterval. |
Property | Type | Description |
---|---|---|
vatRate | number | VAT-rate. |
states | object | VAT-rate, by state. |
Property | Type | Description |
---|---|---|
weightMin | number | Minimum weight for the interval. |
weightMax | number | Maximum weight for the interval. |
price | object | Price for the interval, by currency. |
Takes a filter object and returns the number of shipment methods found, as an integer.
A filter object specifying which shipment methods to count. See Filter objects on the page List selection.
The request below returns the number of delivery methods found where the name in English starts with "My delivery"
.
DeliveryMethod.count({
"/name/en": {
"startsWith": "My delivery"
}
})
Fetches information about a delivery method.
Parameter | Description |
---|---|
uid | The unique identifier of a shipment method. |
query | Which info to return. See Query language. |
The request below returns the name of the shipment method with the unique identifier 123122
.
DeliveryMethod.get(123122, [
"name"
])
Fetches the JSON Schema which can be used for client-side validation.
The unique identifier of a shipment method or null
for a new instance.
Returns an array of objects representing delivery methods. Limited to administrators only.
Parameter | Description |
---|---|
query | A query object specifying what to fetch from each shipment method. This is the same as for get. See Query language. |
selection | A list selection specifying which shipment methods to fetch. See List selection. |
The following request returns an array of max two delivery methods with the properties name and uid:
DeliveryMethod.list([
"name",
"uid"
], {
"limit": 2
})
Updates a delivery method.
Parameter | Description |
---|---|
uid | The unique identifier of a shipment method to update. |
patch | An object containing the properties and values to set for the shipment method. |
query | A query specifying what to return after a successful set (optional). |
Validates the data to be set. The performed validation is the same as in set; it validates the resulting object and includes all the required properties. However, nothing is saved.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shipment method or null . |
patch | An object containing the properties and values to set before validating. |
An array of validation-error objects, each containing the keys pointer
(a property referenced using a JSON Pointer) and message
(a readable text in the language of the context). If there are no validation errors, then an empty array is returned.