Queries and mutations for managing Shipping Methods in the platform.
Queries
Query Shipping Methods
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
Get Shipping Method
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
Get Shipping Methods By Cart
Get Shipping Methods By Location
Mutations
Create Shipping Method
Update Shipping Method
| Arguments | |
|---|---|
versionLong | |
actionsArray of ShippingMethodUpdateAction | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Delete Shipping Method
| Arguments | |
|---|---|
versionLong | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Output types
ShippingMethod
nameString | Unique name of the ShippingMethod within a Project. |
zoneRatesArray of ZoneRate | Defines ShippingRates (prices) for specific Zones. |
activeBoolean | Indicates if the ShippingMethod is active. If true, the ShippingMethod can be used during the creation or update of a Cart or Order. |
isDefaultBoolean | Whether this ShippingMethod is the Project's default ShippingMethod. When retrieving matching Shipping Methods, it is returned as the first item in the array. This flag does not automatically apply the Shipping Method to Carts. |
predicateString | Valid Cart predicate to select a ShippingMethod for a Cart. |
keyString | User-defined unique identifier of the ShippingMethod. |
carrierString | Name of the carrier that delivers the parcel, for example DHL. |
taxCategoryRef | TaxCategory of all ZoneRates of the ShippingMethod. |
localizedDescriptionAllLocalesArray of LocalizedString | Localized description of the ShippingMethod. |
localizedNameAllLocalesArray of LocalizedString | Localized name of the ShippingMethod. |
storesRefArray of KeyReference | |
storesArray of Store | |
localizedDescriptionString | Localized description of the ShippingMethod. |
localizedNameString | Localized name of the ShippingMethod. |
taxCategory | TaxCategory of all ZoneRates of the ShippingMethod. |
custom | Custom Fields of the ShippingMethod. |
idString | Unique identifier of the ShippingMethod. |
versionLong | Current version of the ShippingMethod. |
createdAt | Date and time (UTC) the ShippingMethod was initially created. |
lastModifiedAt | Date and time (UTC) the ShippingMethod was last updated. |
createdBy | IDs and references that created the ShippingMethod. |
lastModifiedBy | IDs and references that last modified the ShippingMethod. |
ShippingMethodQueryResult
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of ShippingMethod |
ZoneRate
ShippingRate
Shipping Rate
price | Currency amount of the ShippingRate. |
freeAbove | Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value. |
isMatchingBoolean | Whether the ShippingRate matches given Cart or Location.
Only appears in response to requests for Get ShippingMethods for a Cart or
Get ShippingMethods for a Location. |
tiersArray of ShippingRatePriceTier | Price tiers for the ShippingRate. |
ShippingRatePriceTier
typeString |
ShippingRateCartValuePriceTier
minimumCentAmountInt | |
price | |
isMatchingBoolean | |
typeString |
ShippingRateCartScorePriceTier
scoreInt | |
price | |
priceFunction | |
isMatchingBoolean | |
typeString |
PriceFunction
functionString | To calculate a Price based on the score, use
+, -, * and parentheses. The score is inserted with x. The function returns the cent amount.For example, to charge $1.99 for a score of 1, $3.99 for a score of 2, $5.99 for a score of 3 and onwards, the function is: (200 * x) - 1). To charge $4.50, $6.00, and $7.50 for express shipping, the function is: (150 * x) + 300. |
currencyCode | A currency code compliant with ISO 4217 or a non-standard currency. |
ShippingRateCartClassificationPriceTier
valueString | |
price | |
isMatchingBoolean | |
typeString |
Input types
ShippingMethodDraft
nameString | Unique name for the ShippingMethod within a Project. |
localizedNameArray of LocalizedStringItemInputType | Localized name of the ShippingMethod. |
descriptionString | The usage of parameter 'description' is deprecated in favor of using 'localizedDescription' |
localizedDescriptionArray of LocalizedStringItemInputType | Localized description of the ShippingMethod. |
taxCategory | TaxCategory for all ZoneRates of the ShippingMethod. |
zoneRatesArray of ZoneRateDraft | Defines ShippingRates (prices) for specific zones. Default: [] |
activeBoolean | Whether the ShippingMethod can be used during the creation or update of a Cart or Order. |
isDefaultBoolean | Whether the ShippingMethod will be the Project's default ShippingMethod. When retrieving matching Shipping Methods, it is returned as the first item in the array. This flag does not automatically apply the Shipping Method to Carts. |
predicateString | Valid Cart predicate to select a ShippingMethod for a Cart. |
keyString | User-defined unique identifier for the ShippingMethod. |
custom | Custom Fields for the ShippingMethod. |
storesArray of ResourceIdentifierInput |
If the number of referenced Stores exceeds the Stores per Shipping Method limit, an InvalidOperation error is returned. |
carrierString | Name of the carrier that delivers the parcel, for example DHL. |
ZoneRateDraft
zone | Sets the Zone for which the shippng rates are valid. |
shippingRatesArray of ShippingRateDraft | Shipping rates for the Default: currencies configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.[] |
ShippingRateDraft
price | Money value of the ShippingRate. |
freeAbove | Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value. |
tiersArray of ShippingRatePriceTierDraft | Price tiers for the ShippingRate. Default:[] |
ShippingRatePriceTierDraft
CartValue | |
CartClassification | |
CartScore |
ShippingRatePriceTierCartValueDraft
minimumCentAmountInt | |
price |
ShippingRatePriceTierCartClassificationDraft
valueString | |
price |
ShippingRatePriceTierCartScoreDraft
scoreInt | |
price | |
priceFunction |
PriceFunctionDraft
functionString | |
currencyCode |
ShippingMethodUpdateAction
addStore | |
addShippingRate | |
addZone | |
changeActive | |
changeIsDefault | |
changeName | |
changeTaxCategory | |
removeStore | |
removeShippingRate | |
removeZone | |
setCarrier | |
setCustomField | |
setCustomType | |
setDescription | This action is deprecated in favor of using 'setLocalizedDescription' |
setKey | |
setLocalizedDescription | |
setLocalizedName | |
setPredicate | |
setStores |
Update actions
Add Store
Associates the ShippingMethod with a Store.
store | ResourceIdentifier of the Store to add. |
Add Shipping Rate
zone | Zone to which the ShippingRate should be added. |
shippingRate | Value to add to shippingRates. |
Add Zone
zone | Value to add to
zoneRates.Adds a new ZoneRate entry to the zoneRates array with the specified Zone and an empty shippingRates array. After adding the Zone, you can add ShippingRates for this Zone using the Add ShippingRate update action. |
Change Active
activeBoolean | Value to set. If set to false, the ShippingMethod cannot be used during the creation or update of a Cart or Order. |
Change Is Default
isDefaultBoolean | Value to set. Only one ShippingMethod can be default in a Project. |
Change Name
nameString | Unique value to set within a Project. Must not be empty. |
Change Tax Category
taxCategory | Value to set. |
Remove Store
Removes the association to a Store from the ShippingMethod. If no more Stores are assigned, the ShippingMethod becomes a global ShippingMethod.
store | ResourceIdentifier of the Store to remove. |
Remove Shipping Rate
zone | Zone from which the ShippingRate should be removed. |
shippingRate | Value to remove from shippingRates. |
Remove Zone
zone | Value to remove from
zoneRates.Removes the entire ZoneRate entry for the specified Zone from the zoneRates array. This action deletes both the Zone reference and all ShippingRates associated with that Zone. |
Set Carrier
carrierString | Name of the carrier that delivers the parcel, for example DHL. If carrier is absent or null, it is removed if it exists. |
Set Custom Field
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
Set Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Description
descriptionString | Value to set. If omitted, any existing value is removed. |
Set Key
keyString | If key is absent or null, the existing key, if any, will be removed. |
Set Localized Description
localizedDescriptionArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
Set Localized Name
localizedNameArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
Set Predicate
predicateString |
Set Stores
stores to an empty array to make the ShippingMethod a global ShippingMethod.storesArray of ResourceIdentifierInput | ResourceIdentifiers of the Stores to set. Overrides the current list of Stores. Set to an empty array to remove all existing values. |