1. Packages
  2. Commercetools Provider
  3. API Docs
  4. ShippingZoneRate
commercetools 1.19.3 published on Friday, Apr 4, 2025 by labd

commercetools.ShippingZoneRate

Explore with Pulumi AI

Defines shipping rates (prices) for a specific zone.

See also ZoneRate API Documentation

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as commercetools from "@pulumi/commercetools";

const my_tax_category = new commercetools.TaxCategory("my-tax-category", {
    key: "some-tax-category-key",
    description: "Example",
});
const my_shipping_method = new commercetools.ShippingMethod("my-shipping-method", {
    key: "some-shipping-method-key",
    description: "Standard method",
    isDefault: true,
    taxCategoryId: my_tax_category.taxCategoryId,
    predicate: "1 = 1",
});
const my_shipping_zone = new commercetools.ShippingZone("my-shipping-zone", {
    key: "some-shipping-zone-key",
    description: "My shipping zone",
    locations: [{
        country: "DE",
    }],
});
const my_shipping_zone_rate = new commercetools.ShippingZoneRate("my-shipping-zone-rate", {
    shippingMethodId: my_shipping_method.shippingMethodId,
    shippingZoneId: my_shipping_zone.shippingZoneId,
    price: {
        centAmount: 5000,
        currencyCode: "EUR",
    },
    freeAbove: {
        centAmount: 50000,
        currencyCode: "EUR",
    },
    shippingRatePriceTiers: [
        {
            type: "CartScore",
            score: 10,
            price: {
                centAmount: 5000,
                currencyCode: "EUR",
            },
        },
        {
            type: "CartScore",
            score: 20,
            price: {
                centAmount: 2000,
                currencyCode: "EUR",
            },
        },
        {
            type: "CartScore",
            score: 30,
            priceFunction: {
                "function": "x + 1",
                currencyCode: "EUR",
            },
        },
    ],
});
Copy
import pulumi
import pulumi_commercetools as commercetools

my_tax_category = commercetools.TaxCategory("my-tax-category",
    key="some-tax-category-key",
    description="Example")
my_shipping_method = commercetools.ShippingMethod("my-shipping-method",
    key="some-shipping-method-key",
    description="Standard method",
    is_default=True,
    tax_category_id=my_tax_category.tax_category_id,
    predicate="1 = 1")
my_shipping_zone = commercetools.ShippingZone("my-shipping-zone",
    key="some-shipping-zone-key",
    description="My shipping zone",
    locations=[{
        "country": "DE",
    }])
my_shipping_zone_rate = commercetools.ShippingZoneRate("my-shipping-zone-rate",
    shipping_method_id=my_shipping_method.shipping_method_id,
    shipping_zone_id=my_shipping_zone.shipping_zone_id,
    price={
        "cent_amount": 5000,
        "currency_code": "EUR",
    },
    free_above={
        "cent_amount": 50000,
        "currency_code": "EUR",
    },
    shipping_rate_price_tiers=[
        {
            "type": "CartScore",
            "score": 10,
            "price": {
                "cent_amount": 5000,
                "currency_code": "EUR",
            },
        },
        {
            "type": "CartScore",
            "score": 20,
            "price": {
                "cent_amount": 2000,
                "currency_code": "EUR",
            },
        },
        {
            "type": "CartScore",
            "score": 30,
            "price_function": {
                "function": "x + 1",
                "currency_code": "EUR",
            },
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/commercetools/commercetools"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		my_tax_category, err := commercetools.NewTaxCategory(ctx, "my-tax-category", &commercetools.TaxCategoryArgs{
			Key:         pulumi.String("some-tax-category-key"),
			Description: pulumi.String("Example"),
		})
		if err != nil {
			return err
		}
		my_shipping_method, err := commercetools.NewShippingMethod(ctx, "my-shipping-method", &commercetools.ShippingMethodArgs{
			Key:           pulumi.String("some-shipping-method-key"),
			Description:   pulumi.String("Standard method"),
			IsDefault:     pulumi.Bool(true),
			TaxCategoryId: my_tax_category.TaxCategoryId,
			Predicate:     pulumi.String("1 = 1"),
		})
		if err != nil {
			return err
		}
		my_shipping_zone, err := commercetools.NewShippingZone(ctx, "my-shipping-zone", &commercetools.ShippingZoneArgs{
			Key:         pulumi.String("some-shipping-zone-key"),
			Description: pulumi.String("My shipping zone"),
			Locations: commercetools.ShippingZoneLocationArray{
				&commercetools.ShippingZoneLocationArgs{
					Country: pulumi.String("DE"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = commercetools.NewShippingZoneRate(ctx, "my-shipping-zone-rate", &commercetools.ShippingZoneRateArgs{
			ShippingMethodId: my_shipping_method.ShippingMethodId,
			ShippingZoneId:   my_shipping_zone.ShippingZoneId,
			Price: &commercetools.ShippingZoneRatePriceArgs{
				CentAmount:   pulumi.Float64(5000),
				CurrencyCode: pulumi.String("EUR"),
			},
			FreeAbove: &commercetools.ShippingZoneRateFreeAboveArgs{
				CentAmount:   pulumi.Float64(50000),
				CurrencyCode: pulumi.String("EUR"),
			},
			ShippingRatePriceTiers: commercetools.ShippingZoneRateShippingRatePriceTierArray{
				&commercetools.ShippingZoneRateShippingRatePriceTierArgs{
					Type:  pulumi.String("CartScore"),
					Score: pulumi.Float64(10),
					Price: &commercetools.ShippingZoneRateShippingRatePriceTierPriceArgs{
						CentAmount:   pulumi.Float64(5000),
						CurrencyCode: pulumi.String("EUR"),
					},
				},
				&commercetools.ShippingZoneRateShippingRatePriceTierArgs{
					Type:  pulumi.String("CartScore"),
					Score: pulumi.Float64(20),
					Price: &commercetools.ShippingZoneRateShippingRatePriceTierPriceArgs{
						CentAmount:   pulumi.Float64(2000),
						CurrencyCode: pulumi.String("EUR"),
					},
				},
				&commercetools.ShippingZoneRateShippingRatePriceTierArgs{
					Type:  pulumi.String("CartScore"),
					Score: pulumi.Float64(30),
					PriceFunction: &commercetools.ShippingZoneRateShippingRatePriceTierPriceFunctionArgs{
						Function:     pulumi.String("x + 1"),
						CurrencyCode: pulumi.String("EUR"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Commercetools = Pulumi.Commercetools;

return await Deployment.RunAsync(() => 
{
    var my_tax_category = new Commercetools.TaxCategory("my-tax-category", new()
    {
        Key = "some-tax-category-key",
        Description = "Example",
    });

    var my_shipping_method = new Commercetools.ShippingMethod("my-shipping-method", new()
    {
        Key = "some-shipping-method-key",
        Description = "Standard method",
        IsDefault = true,
        TaxCategoryId = my_tax_category.TaxCategoryId,
        Predicate = "1 = 1",
    });

    var my_shipping_zone = new Commercetools.ShippingZone("my-shipping-zone", new()
    {
        Key = "some-shipping-zone-key",
        Description = "My shipping zone",
        Locations = new[]
        {
            new Commercetools.Inputs.ShippingZoneLocationArgs
            {
                Country = "DE",
            },
        },
    });

    var my_shipping_zone_rate = new Commercetools.ShippingZoneRate("my-shipping-zone-rate", new()
    {
        ShippingMethodId = my_shipping_method.ShippingMethodId,
        ShippingZoneId = my_shipping_zone.ShippingZoneId,
        Price = new Commercetools.Inputs.ShippingZoneRatePriceArgs
        {
            CentAmount = 5000,
            CurrencyCode = "EUR",
        },
        FreeAbove = new Commercetools.Inputs.ShippingZoneRateFreeAboveArgs
        {
            CentAmount = 50000,
            CurrencyCode = "EUR",
        },
        ShippingRatePriceTiers = new[]
        {
            new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierArgs
            {
                Type = "CartScore",
                Score = 10,
                Price = new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierPriceArgs
                {
                    CentAmount = 5000,
                    CurrencyCode = "EUR",
                },
            },
            new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierArgs
            {
                Type = "CartScore",
                Score = 20,
                Price = new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierPriceArgs
                {
                    CentAmount = 2000,
                    CurrencyCode = "EUR",
                },
            },
            new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierArgs
            {
                Type = "CartScore",
                Score = 30,
                PriceFunction = new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierPriceFunctionArgs
                {
                    Function = "x + 1",
                    CurrencyCode = "EUR",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.commercetools.TaxCategory;
import com.pulumi.commercetools.TaxCategoryArgs;
import com.pulumi.commercetools.ShippingMethod;
import com.pulumi.commercetools.ShippingMethodArgs;
import com.pulumi.commercetools.ShippingZone;
import com.pulumi.commercetools.ShippingZoneArgs;
import com.pulumi.commercetools.inputs.ShippingZoneLocationArgs;
import com.pulumi.commercetools.ShippingZoneRate;
import com.pulumi.commercetools.ShippingZoneRateArgs;
import com.pulumi.commercetools.inputs.ShippingZoneRatePriceArgs;
import com.pulumi.commercetools.inputs.ShippingZoneRateFreeAboveArgs;
import com.pulumi.commercetools.inputs.ShippingZoneRateShippingRatePriceTierArgs;
import com.pulumi.commercetools.inputs.ShippingZoneRateShippingRatePriceTierPriceArgs;
import com.pulumi.commercetools.inputs.ShippingZoneRateShippingRatePriceTierPriceFunctionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var my_tax_category = new TaxCategory("my-tax-category", TaxCategoryArgs.builder()
            .key("some-tax-category-key")
            .description("Example")
            .build());

        var my_shipping_method = new ShippingMethod("my-shipping-method", ShippingMethodArgs.builder()
            .key("some-shipping-method-key")
            .description("Standard method")
            .isDefault(true)
            .taxCategoryId(my_tax_category.taxCategoryId())
            .predicate("1 = 1")
            .build());

        var my_shipping_zone = new ShippingZone("my-shipping-zone", ShippingZoneArgs.builder()
            .key("some-shipping-zone-key")
            .description("My shipping zone")
            .locations(ShippingZoneLocationArgs.builder()
                .country("DE")
                .build())
            .build());

        var my_shipping_zone_rate = new ShippingZoneRate("my-shipping-zone-rate", ShippingZoneRateArgs.builder()
            .shippingMethodId(my_shipping_method.shippingMethodId())
            .shippingZoneId(my_shipping_zone.shippingZoneId())
            .price(ShippingZoneRatePriceArgs.builder()
                .centAmount(5000)
                .currencyCode("EUR")
                .build())
            .freeAbove(ShippingZoneRateFreeAboveArgs.builder()
                .centAmount(50000)
                .currencyCode("EUR")
                .build())
            .shippingRatePriceTiers(            
                ShippingZoneRateShippingRatePriceTierArgs.builder()
                    .type("CartScore")
                    .score(10)
                    .price(ShippingZoneRateShippingRatePriceTierPriceArgs.builder()
                        .centAmount(5000)
                        .currencyCode("EUR")
                        .build())
                    .build(),
                ShippingZoneRateShippingRatePriceTierArgs.builder()
                    .type("CartScore")
                    .score(20)
                    .price(ShippingZoneRateShippingRatePriceTierPriceArgs.builder()
                        .centAmount(2000)
                        .currencyCode("EUR")
                        .build())
                    .build(),
                ShippingZoneRateShippingRatePriceTierArgs.builder()
                    .type("CartScore")
                    .score(30)
                    .priceFunction(ShippingZoneRateShippingRatePriceTierPriceFunctionArgs.builder()
                        .function("x + 1")
                        .currencyCode("EUR")
                        .build())
                    .build())
            .build());

    }
}
Copy
resources:
  my-tax-category:
    type: commercetools:TaxCategory
    properties:
      key: some-tax-category-key
      description: Example
  my-shipping-method:
    type: commercetools:ShippingMethod
    properties:
      key: some-shipping-method-key
      description: Standard method
      isDefault: true
      taxCategoryId: ${["my-tax-category"].taxCategoryId}
      predicate: 1 = 1
  my-shipping-zone:
    type: commercetools:ShippingZone
    properties:
      key: some-shipping-zone-key
      description: My shipping zone
      locations:
        - country: DE
  my-shipping-zone-rate:
    type: commercetools:ShippingZoneRate
    properties:
      shippingMethodId: ${["my-shipping-method"].shippingMethodId}
      shippingZoneId: ${["my-shipping-zone"].shippingZoneId}
      price:
        centAmount: 5000
        currencyCode: EUR
      freeAbove:
        centAmount: 50000
        currencyCode: EUR
      shippingRatePriceTiers:
        - type: CartScore
          score: 10
          price:
            centAmount: 5000
            currencyCode: EUR
        - type: CartScore
          score: 20
          price:
            centAmount: 2000
            currencyCode: EUR
        - type: CartScore
          score: 30
          priceFunction:
            function: x + 1
            currencyCode: EUR
Copy

Create ShippingZoneRate Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ShippingZoneRate(name: string, args: ShippingZoneRateArgs, opts?: CustomResourceOptions);
@overload
def ShippingZoneRate(resource_name: str,
                     args: ShippingZoneRateArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def ShippingZoneRate(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     price: Optional[ShippingZoneRatePriceArgs] = None,
                     shipping_method_id: Optional[str] = None,
                     shipping_zone_id: Optional[str] = None,
                     free_above: Optional[ShippingZoneRateFreeAboveArgs] = None,
                     shipping_rate_price_tiers: Optional[Sequence[ShippingZoneRateShippingRatePriceTierArgs]] = None,
                     shipping_zone_rate_id: Optional[str] = None)
func NewShippingZoneRate(ctx *Context, name string, args ShippingZoneRateArgs, opts ...ResourceOption) (*ShippingZoneRate, error)
public ShippingZoneRate(string name, ShippingZoneRateArgs args, CustomResourceOptions? opts = null)
public ShippingZoneRate(String name, ShippingZoneRateArgs args)
public ShippingZoneRate(String name, ShippingZoneRateArgs args, CustomResourceOptions options)
type: commercetools:ShippingZoneRate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ShippingZoneRateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ShippingZoneRateArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ShippingZoneRateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ShippingZoneRateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ShippingZoneRateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var shippingZoneRateResource = new Commercetools.ShippingZoneRate("shippingZoneRateResource", new()
{
    Price = new Commercetools.Inputs.ShippingZoneRatePriceArgs
    {
        CentAmount = 0,
        CurrencyCode = "string",
    },
    ShippingMethodId = "string",
    ShippingZoneId = "string",
    FreeAbove = new Commercetools.Inputs.ShippingZoneRateFreeAboveArgs
    {
        CentAmount = 0,
        CurrencyCode = "string",
    },
    ShippingRatePriceTiers = new[]
    {
        new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierArgs
        {
            Type = "string",
            MinimumCentAmount = 0,
            Price = new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierPriceArgs
            {
                CentAmount = 0,
                CurrencyCode = "string",
            },
            PriceFunction = new Commercetools.Inputs.ShippingZoneRateShippingRatePriceTierPriceFunctionArgs
            {
                CurrencyCode = "string",
                Function = "string",
            },
            Score = 0,
            Value = "string",
        },
    },
    ShippingZoneRateId = "string",
});
Copy
example, err := commercetools.NewShippingZoneRate(ctx, "shippingZoneRateResource", &commercetools.ShippingZoneRateArgs{
Price: &.ShippingZoneRatePriceArgs{
CentAmount: pulumi.Float64(0),
CurrencyCode: pulumi.String("string"),
},
ShippingMethodId: pulumi.String("string"),
ShippingZoneId: pulumi.String("string"),
FreeAbove: &.ShippingZoneRateFreeAboveArgs{
CentAmount: pulumi.Float64(0),
CurrencyCode: pulumi.String("string"),
},
ShippingRatePriceTiers: .ShippingZoneRateShippingRatePriceTierArray{
&.ShippingZoneRateShippingRatePriceTierArgs{
Type: pulumi.String("string"),
MinimumCentAmount: pulumi.Float64(0),
Price: &.ShippingZoneRateShippingRatePriceTierPriceArgs{
CentAmount: pulumi.Float64(0),
CurrencyCode: pulumi.String("string"),
},
PriceFunction: &.ShippingZoneRateShippingRatePriceTierPriceFunctionArgs{
CurrencyCode: pulumi.String("string"),
Function: pulumi.String("string"),
},
Score: pulumi.Float64(0),
Value: pulumi.String("string"),
},
},
ShippingZoneRateId: pulumi.String("string"),
})
Copy
var shippingZoneRateResource = new ShippingZoneRate("shippingZoneRateResource", ShippingZoneRateArgs.builder()
    .price(ShippingZoneRatePriceArgs.builder()
        .centAmount(0)
        .currencyCode("string")
        .build())
    .shippingMethodId("string")
    .shippingZoneId("string")
    .freeAbove(ShippingZoneRateFreeAboveArgs.builder()
        .centAmount(0)
        .currencyCode("string")
        .build())
    .shippingRatePriceTiers(ShippingZoneRateShippingRatePriceTierArgs.builder()
        .type("string")
        .minimumCentAmount(0)
        .price(ShippingZoneRateShippingRatePriceTierPriceArgs.builder()
            .centAmount(0)
            .currencyCode("string")
            .build())
        .priceFunction(ShippingZoneRateShippingRatePriceTierPriceFunctionArgs.builder()
            .currencyCode("string")
            .function("string")
            .build())
        .score(0)
        .value("string")
        .build())
    .shippingZoneRateId("string")
    .build());
Copy
shipping_zone_rate_resource = commercetools.ShippingZoneRate("shippingZoneRateResource",
    price={
        "cent_amount": 0,
        "currency_code": "string",
    },
    shipping_method_id="string",
    shipping_zone_id="string",
    free_above={
        "cent_amount": 0,
        "currency_code": "string",
    },
    shipping_rate_price_tiers=[{
        "type": "string",
        "minimum_cent_amount": 0,
        "price": {
            "cent_amount": 0,
            "currency_code": "string",
        },
        "price_function": {
            "currency_code": "string",
            "function": "string",
        },
        "score": 0,
        "value": "string",
    }],
    shipping_zone_rate_id="string")
Copy
const shippingZoneRateResource = new commercetools.ShippingZoneRate("shippingZoneRateResource", {
    price: {
        centAmount: 0,
        currencyCode: "string",
    },
    shippingMethodId: "string",
    shippingZoneId: "string",
    freeAbove: {
        centAmount: 0,
        currencyCode: "string",
    },
    shippingRatePriceTiers: [{
        type: "string",
        minimumCentAmount: 0,
        price: {
            centAmount: 0,
            currencyCode: "string",
        },
        priceFunction: {
            currencyCode: "string",
            "function": "string",
        },
        score: 0,
        value: "string",
    }],
    shippingZoneRateId: "string",
});
Copy
type: commercetools:ShippingZoneRate
properties:
    freeAbove:
        centAmount: 0
        currencyCode: string
    price:
        centAmount: 0
        currencyCode: string
    shippingMethodId: string
    shippingRatePriceTiers:
        - minimumCentAmount: 0
          price:
            centAmount: 0
            currencyCode: string
          priceFunction:
            currencyCode: string
            function: string
          score: 0
          type: string
          value: string
    shippingZoneId: string
    shippingZoneRateId: string
Copy

ShippingZoneRate Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ShippingZoneRate resource accepts the following input properties:

Price This property is required. ShippingZoneRatePrice
ShippingMethodId This property is required. string
ShippingZoneId This property is required. string
FreeAbove ShippingZoneRateFreeAbove
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
ShippingRatePriceTiers List<ShippingZoneRateShippingRatePriceTier>
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
ShippingZoneRateId string
The ID of this resource.
Price This property is required. ShippingZoneRatePriceArgs
ShippingMethodId This property is required. string
ShippingZoneId This property is required. string
FreeAbove ShippingZoneRateFreeAboveArgs
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
ShippingRatePriceTiers []ShippingZoneRateShippingRatePriceTierArgs
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
ShippingZoneRateId string
The ID of this resource.
price This property is required. ShippingZoneRatePrice
shippingMethodId This property is required. String
shippingZoneId This property is required. String
freeAbove ShippingZoneRateFreeAbove
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
shippingRatePriceTiers List<ShippingZoneRateShippingRatePriceTier>
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shippingZoneRateId String
The ID of this resource.
price This property is required. ShippingZoneRatePrice
shippingMethodId This property is required. string
shippingZoneId This property is required. string
freeAbove ShippingZoneRateFreeAbove
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
shippingRatePriceTiers ShippingZoneRateShippingRatePriceTier[]
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shippingZoneRateId string
The ID of this resource.
price This property is required. ShippingZoneRatePriceArgs
shipping_method_id This property is required. str
shipping_zone_id This property is required. str
free_above ShippingZoneRateFreeAboveArgs
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
shipping_rate_price_tiers Sequence[ShippingZoneRateShippingRatePriceTierArgs]
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shipping_zone_rate_id str
The ID of this resource.
price This property is required. Property Map
shippingMethodId This property is required. String
shippingZoneId This property is required. String
freeAbove Property Map
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
shippingRatePriceTiers List<Property Map>
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shippingZoneRateId String
The ID of this resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the ShippingZoneRate resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ShippingZoneRate Resource

Get an existing ShippingZoneRate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ShippingZoneRateState, opts?: CustomResourceOptions): ShippingZoneRate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        free_above: Optional[ShippingZoneRateFreeAboveArgs] = None,
        price: Optional[ShippingZoneRatePriceArgs] = None,
        shipping_method_id: Optional[str] = None,
        shipping_rate_price_tiers: Optional[Sequence[ShippingZoneRateShippingRatePriceTierArgs]] = None,
        shipping_zone_id: Optional[str] = None,
        shipping_zone_rate_id: Optional[str] = None) -> ShippingZoneRate
func GetShippingZoneRate(ctx *Context, name string, id IDInput, state *ShippingZoneRateState, opts ...ResourceOption) (*ShippingZoneRate, error)
public static ShippingZoneRate Get(string name, Input<string> id, ShippingZoneRateState? state, CustomResourceOptions? opts = null)
public static ShippingZoneRate get(String name, Output<String> id, ShippingZoneRateState state, CustomResourceOptions options)
resources:  _:    type: commercetools:ShippingZoneRate    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
FreeAbove ShippingZoneRateFreeAbove
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
Price ShippingZoneRatePrice
ShippingMethodId string
ShippingRatePriceTiers List<ShippingZoneRateShippingRatePriceTier>
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
ShippingZoneId string
ShippingZoneRateId string
The ID of this resource.
FreeAbove ShippingZoneRateFreeAboveArgs
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
Price ShippingZoneRatePriceArgs
ShippingMethodId string
ShippingRatePriceTiers []ShippingZoneRateShippingRatePriceTierArgs
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
ShippingZoneId string
ShippingZoneRateId string
The ID of this resource.
freeAbove ShippingZoneRateFreeAbove
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
price ShippingZoneRatePrice
shippingMethodId String
shippingRatePriceTiers List<ShippingZoneRateShippingRatePriceTier>
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shippingZoneId String
shippingZoneRateId String
The ID of this resource.
freeAbove ShippingZoneRateFreeAbove
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
price ShippingZoneRatePrice
shippingMethodId string
shippingRatePriceTiers ShippingZoneRateShippingRatePriceTier[]
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shippingZoneId string
shippingZoneRateId string
The ID of this resource.
free_above ShippingZoneRateFreeAboveArgs
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
price ShippingZoneRatePriceArgs
shipping_method_id str
shipping_rate_price_tiers Sequence[ShippingZoneRateShippingRatePriceTierArgs]
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shipping_zone_id str
shipping_zone_rate_id str
The ID of this resource.
freeAbove Property Map
The shipping is free if the sum of the (custom) line item prices reaches the freeAbove value
price Property Map
shippingMethodId String
shippingRatePriceTiers List<Property Map>
A price tier is selected instead of the default price when a certain threshold or specific cart value is reached. If no tiered price is suitable for the cart, the base price of the shipping rate is used . See also Shipping Rate Price Tier API Docs
shippingZoneId String
shippingZoneRateId String
The ID of this resource.

Supporting Types

ShippingZoneRateFreeAbove
, ShippingZoneRateFreeAboveArgs

CentAmount This property is required. double
The amount in cents (the smallest indivisible unit of the currency)
CurrencyCode This property is required. string
The currency code compliant to ISO 4217
CentAmount This property is required. float64
The amount in cents (the smallest indivisible unit of the currency)
CurrencyCode This property is required. string
The currency code compliant to ISO 4217
centAmount This property is required. Double
The amount in cents (the smallest indivisible unit of the currency)
currencyCode This property is required. String
The currency code compliant to ISO 4217
centAmount This property is required. number
The amount in cents (the smallest indivisible unit of the currency)
currencyCode This property is required. string
The currency code compliant to ISO 4217
cent_amount This property is required. float
The amount in cents (the smallest indivisible unit of the currency)
currency_code This property is required. str
The currency code compliant to ISO 4217
centAmount This property is required. Number
The amount in cents (the smallest indivisible unit of the currency)
currencyCode This property is required. String
The currency code compliant to ISO 4217

ShippingZoneRatePrice
, ShippingZoneRatePriceArgs

CentAmount This property is required. double
CurrencyCode This property is required. string
CentAmount This property is required. float64
CurrencyCode This property is required. string
centAmount This property is required. Double
currencyCode This property is required. String
centAmount This property is required. number
currencyCode This property is required. string
cent_amount This property is required. float
currency_code This property is required. str
centAmount This property is required. Number
currencyCode This property is required. String

ShippingZoneRateShippingRatePriceTier
, ShippingZoneRateShippingRatePriceTierArgs

Type This property is required. string
CartValue, CartScore or CartClassification
MinimumCentAmount double
If type is CartValue this represents the cent amount of the tier
Price ShippingZoneRateShippingRatePriceTierPrice
The price of the score, value or minimumcentamount tier
PriceFunction ShippingZoneRateShippingRatePriceTierPriceFunction
If type is CartScore. Allows to calculate a price dynamically for the score.
Score double
If type is CartScore. Sets a fixed price for this score value
Value string
If type is CartClassification, must be a valid key of the CartClassification
Type This property is required. string
CartValue, CartScore or CartClassification
MinimumCentAmount float64
If type is CartValue this represents the cent amount of the tier
Price ShippingZoneRateShippingRatePriceTierPrice
The price of the score, value or minimumcentamount tier
PriceFunction ShippingZoneRateShippingRatePriceTierPriceFunction
If type is CartScore. Allows to calculate a price dynamically for the score.
Score float64
If type is CartScore. Sets a fixed price for this score value
Value string
If type is CartClassification, must be a valid key of the CartClassification
type This property is required. String
CartValue, CartScore or CartClassification
minimumCentAmount Double
If type is CartValue this represents the cent amount of the tier
price ShippingZoneRateShippingRatePriceTierPrice
The price of the score, value or minimumcentamount tier
priceFunction ShippingZoneRateShippingRatePriceTierPriceFunction
If type is CartScore. Allows to calculate a price dynamically for the score.
score Double
If type is CartScore. Sets a fixed price for this score value
value String
If type is CartClassification, must be a valid key of the CartClassification
type This property is required. string
CartValue, CartScore or CartClassification
minimumCentAmount number
If type is CartValue this represents the cent amount of the tier
price ShippingZoneRateShippingRatePriceTierPrice
The price of the score, value or minimumcentamount tier
priceFunction ShippingZoneRateShippingRatePriceTierPriceFunction
If type is CartScore. Allows to calculate a price dynamically for the score.
score number
If type is CartScore. Sets a fixed price for this score value
value string
If type is CartClassification, must be a valid key of the CartClassification
type This property is required. str
CartValue, CartScore or CartClassification
minimum_cent_amount float
If type is CartValue this represents the cent amount of the tier
price ShippingZoneRateShippingRatePriceTierPrice
The price of the score, value or minimumcentamount tier
price_function ShippingZoneRateShippingRatePriceTierPriceFunction
If type is CartScore. Allows to calculate a price dynamically for the score.
score float
If type is CartScore. Sets a fixed price for this score value
value str
If type is CartClassification, must be a valid key of the CartClassification
type This property is required. String
CartValue, CartScore or CartClassification
minimumCentAmount Number
If type is CartValue this represents the cent amount of the tier
price Property Map
The price of the score, value or minimumcentamount tier
priceFunction Property Map
If type is CartScore. Allows to calculate a price dynamically for the score.
score Number
If type is CartScore. Sets a fixed price for this score value
value String
If type is CartClassification, must be a valid key of the CartClassification

ShippingZoneRateShippingRatePriceTierPrice
, ShippingZoneRateShippingRatePriceTierPriceArgs

CentAmount This property is required. double
CurrencyCode This property is required. string
CentAmount This property is required. float64
CurrencyCode This property is required. string
centAmount This property is required. Double
currencyCode This property is required. String
centAmount This property is required. number
currencyCode This property is required. string
cent_amount This property is required. float
currency_code This property is required. str
centAmount This property is required. Number
currencyCode This property is required. String

ShippingZoneRateShippingRatePriceTierPriceFunction
, ShippingZoneRateShippingRatePriceTierPriceFunctionArgs

CurrencyCode This property is required. string
Function This property is required. string
CurrencyCode This property is required. string
Function This property is required. string
currencyCode This property is required. String
function This property is required. String
currencyCode This property is required. string
function This property is required. string
currency_code This property is required. str
function This property is required. str
currencyCode This property is required. String
function This property is required. String

Import

$ pulumi import commercetools:index/shippingZoneRate:ShippingZoneRate my-shipping-zone-rate {my-shipping-method-id}@{my-shipping-zone-id}@{currency}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
commercetools labd/terraform-provider-commercetools
License
Notes
This Pulumi package is based on the commercetools Terraform Provider.