beehexa integrationsidebar
beehexa logo

We Build HexaSync Integration Platform for Connecting ERP, POS, CRM, Accounting, and eCommerce Applications to Automate Business Processes

beehexa how to create a shipping zone 01 01 01 1

BigCommerce API 2024: How To Create A Shipping Method

Shipping methods are used to deliver goods a shopper selects at checkout. The shipping method costs in addition to the cost of the products in the cart and any applicable taxes. Providing shoppers with a comprehensive list of shipping options boosts conversion by allowing them to choose the most cost-effective shipping method for their needs. There are several ways to ship items, including:

  • A fixed charge, like a $5 flat rate on all orders
  • A rate table based on weight or order value
  • A dynamically-calculated charge using a real-time shipping quote service from the carrier

Today, I will show you how to create a Shipping method. Please read the blog post carefully and watch the video to understand the steps and necessary notes. Let’s get started!

I. Checking Available Shipping Method

First, we need to check the BigCommerce store to see all shipping methods available. 

To check the shipping methods:

  •  Go to setting
  •  In the Setup section, click on shipping. 

You will see the shipping zone and shipping method here

beehexa how to create a shipping method
beehexa how to create a shipping method

As you can see, a free shipping method is available now.

II. Create A Shipping Method.

You need to know this information before creating a new shipping method.

Carrier Configurations – Current: 

  1. USPS by Endicia
  2. FedEx
  3. UPS Ready
  4. Canada Post
  5. Australia Post
  6. Royal Mail
  7. Zoom2U

Settings Objects

The type and settings properties of a shipping method can match any of the following:

  1. perorder Object: A model for flat-rate shipping quotes.
  2. peritem Object: Model for flat-rate shipping quotes per item.
  3. weight Object: Model for weight-based shipping quotes.
  4. total Object: Model for shipping quotes based on the total value of the order.
  5. Range object: A model for defining shipping ranges. The parent object defines the units.

To know more details about Carrier Configurations and Settings Objects properties, you should read the BigCommerce API reference. 

Now We will create a new shipping method in BigCommerce using Postman.

So, Log in Postman account and then choose a workspace.

Click the Plus button to open a request tab.

Now let us create a new shipping zone with me. Now select POST and add the URL:  

https://api.bigcommerce.com/stores/{store_hash}/v2/shipping/zones/{zone_id}/methods

Replace {store_hash} and {zone_id} with the store hash of your BigCommerce store and the zone ID you want to add shipping method

If you don’t know how to get a zone id in your store, you can read the blog How to Retrieve, Create and Delete a Shipping zone or watch the video to see the steps visually.

In the Header section

  • Accept: application/json 
  • Content-Type: application/json 
  • X-Auth-Token: {access_token}

In the Body section

Click on “raw” tofill in the data; remember to change the “text” to “JSON.” Then add the code in the box.

You have noticed that a shipping method can be created with the these Fields:

  • Name: Display name for shipping method. Example: Beehexa shopping method
  • Type: Allowed values: perorder/ peritemweight/ total/ auspost/ canadapost/ endicia/ usps/ fedex/ royalmai/ lupsready/ freeshipping
  • Settings: Depends on the shipping method type. 
  • Rate: Flat rate per order.
  • Enabled: Whether or not this shipping zone method is enabled. Example: true or false
  • Handling_fees: fixed surcharge or percentage surcharge
  • Is_fallback: Whether or not this shipping zone is the fallback if all others are not valid for the order. Example: true or false

III. Example request

This section provides a sample request and a carrier-specific object/property model for each supported carrier. You can rely on our examples combined with reading BigCommerce API reference documentation to customize your store with the right shipping methods.

1. USPS by Endicia:

Example code:

{
    "name": "USPS by Endicia Beehexa",
    "type": "endicia",
    "settings": {
        "carrier_options": {
            "delivery_services" : ["PriorityExpress","Priority", "PriorityMailExpressInternational"],
			"packaging_type" : "LargeFlatRateBox",
            "show_transit_time" : true
        }
    },
    "enabled": true
}

Code language: JSON / JSON with Comments (json)

Response

{
    "id": 2,
    "name": "USPS by Endicia Example",
    "type": "endicia",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "PriorityExpress",
                "Priority",
                "PriorityMailExpressInternational"
            ],
            "packaging": "LargeFlatRateBox",
            "packaging_type": "LargeFlatRateBox",
            "show_transit_time": "1"
        }
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}

Code language: JSON / JSON with Comments (json)

2. FedEx:

Example code:

{
    "name": "FEDEX Example",
    "type": "fedex",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "STANDARD_OVERNIGHT",
				"FEDEX_2_DAY"
            ],
            "dropoff_type": "BUSINESS_SERVICE_CENTER",
            "packaging_type": "FEDEX_10KG_BOX",
            "packing_method": "COMBINED",
            "rate_type": "NONE",
            "include_package_value": true,
            "destination_type": "business"
        }
    },
    "enabled": true
}

Code language: JSON / JSON with Comments (json)

Response

"id": 3,
    "name": "FEDEX Example",
    "type": "fedex",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "STANDARD_OVERNIGHT",
                "FEDEX_2_DAY"
            ],
            "dropoff_type": "BUSINESS_SERVICE_CENTER",
            "packaging_type": "FEDEX_10KG_BOX",
            "packing_method": "COMBINED",
            "rate_type": "NONE",
            "include_package_value": "1",
            "destination_type": "business",
            "packaging": []
        }
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}

Code language: JavaScript (javascript)

3. UPS Ready

Example code:

{
    "name": "UPS ready",
    "type": "upsready",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "3_Day_Select","Standard"
            ],
            "packaging_type": "2c",
            "packing_method": "combined",
            "include_package_value": true,
            "destination_type": "residential",
            "show_transit_time" : false
        }
    },
    "enabled": false
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 4,
    "name": "UPS ready",
    "type": "upsready",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "3_Day_Select",
                "Standard"
            ],
            "packaging_type": "2c",
            "packing_method": "combined",
            "include_package_value": "1",
            "destination_type": "residential",
            "show_transit_time": "0",
            "packaging": []
        }
    },
    "enabled": false,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

4. Canada Post

Example code:

{
    "name": "Canada Post",
    "type": "canadapost",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "DOM.EP","USA.EP"
            ]
        }
    },
    "enabled": true
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 5,
    "name": "Canada Post",
    "type": "canadapost",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "DOM.EP",
                "USA.EP"
            ],
            "packaging": []
        }
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

5. Australia Post

Example code:

{
    "name": "Australia Post",
    "type": "auspost",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "AUS_PARCEL_REGULAR",
				"AUS_PARCEL_EXPRESS"
            ]
        }
    },
    "enabled": true
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 6,
    "name": "Australia Post",
    "type": "auspost",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "AUS_PARCEL_REGULAR",
                "AUS_PARCEL_EXPRESS"
            ],
            "packaging": []
        }
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

6. Royal Mail

Example code:

{
    "name": "Royal Mail",
    "type": "royalmail",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "InternationalStandard",
				"SpecialDelivery9am"
            ]
        }
    },
    "enabled": true
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 7,
    "name": "Royal Mail",
    "type": "royalmail",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "InternationalStandard",
                "SpecialDelivery9am"
            ],
            "packaging": []
        }
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

7. Zoom2U

Example code:

{
    "name": "Zoom2U",
    "type": "zoom2u",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "3_hour",
				"Same_day",
				"VIP"
            ]
        }
    },
    "enabled": true
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 8,
    "name": "Zoom2U",
    "type": "zoom2u",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "3_hour",
                "Same_day",
                "VIP"
            ],
            "packaging": []
        }
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

8. Perorder Object

Example code:

{
	"name": "Flat Rate PerOrder",
	"type": "perorder",
	"settings": {
		"rate": 10
	}
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 9,
    "name": "Flat Rate PerOrder",
    "type": "perorder",
    "settings": {
        "rate": 10
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

9. Peritem Object

Example code:

{
	"name": "Flat Rate Peritem",
	"type": "peritem",
	"settings": {
		"rate": 5
	}
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 10,
    "name": "Flat Rate Peritem",
    "type": "peritem",
    "settings": {
        "rate": 5
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

10. Weight Object

Example code:

{
	"name": "Rate per Weight",
	"type": "weight",
	"settings": {
		"default_cost": 10,
		"default_cost_type": "percentage_of_total",
		"range": [
			{
				"lower_limit": 0,
				"upper_limit": 15,
				"shipping_cost": 15
			},
			{
				"lower_limit": 15,
				"upper_limit": 50,
				"shipping_cost": 30
			}
		]
	}
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 11,
    "name": "Rate per Weight",
    "type": "weight",
    "settings": {
        "default_cost": 10,
        "default_cost_type": "percentage_of_total",
        "range": [
            {
                "lower_limit": 0,
                "upper_limit": 15,
                "shipping_cost": 15
            },
            {
                "lower_limit": 15,
                "upper_limit": 50,
                "shipping_cost": 30
            }
        ]
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

11. Total Object

Example code:

{
	"name": "Per Total or Free",
	"type": "total",
	"settings": {
		"default_cost": 15,
		"default_cost_type": "percentage_of_total",
		"range": [
			{
				"lower_limit": 0,
				"upper_limit": 5,
				"shipping_cost": 7
			},
			{
				"lower_limit": 5,
				"upper_limit": 10,
				"shipping_cost": 10
			},
			{
				"lower_limit": 10,
				"upper_limit": 20,
				"shipping_cost": 12
			},
			{
				"lower_limit": 20,
				"upper_limit": 49.99,
				"shipping_cost": 15
			},
			{
				"lower_limit": 50,
				"upper_limit": 100000,
				"shipping_cost": 0
			}       
		]
	}
}
Code language: JSON / JSON with Comments (json)

Response

{
    "id": 12,
    "name": "Per Total or Free",
    "type": "total",
    "settings": {
        "default_cost": 12,
        "default_cost_type": "fixed_amount",
        "range": [
            {
                "lower_limit": 0,
                "upper_limit": 5,
                "shipping_cost": 5
            },
            {
                "lower_limit": 5,
                "upper_limit": 10,
                "shipping_cost": 8
            },
            {
                "lower_limit": 10,
                "upper_limit": 20,
                "shipping_cost": 10
            },
            {
                "lower_limit": 20,
                "upper_limit": 49.99,
                "shipping_cost": 15
            },
            {
                "lower_limit": 50,
                "upper_limit": 100000,
                "shipping_cost": 0
            }
        ]
    },
    "enabled": true,
    "handling_fees": {
        "fixed_surcharge": 0
    },
    "is_fallback": false
}
Code language: JSON / JSON with Comments (json)

Note: In the BigCommerce API reference, the sample request of the “total Object – Properties” section contains an error. If you declare additional taxes when you send the request, you will receive an error, and you cannot create this shipping method. So remove the “include_order_total_taxes” line and calculate the shipping cost again before sending the request.

12. Range Object

Object model to define ranges for shipping quotes. Units are defined in the parent object.

Example code:

{
	"lower_limit": 0,
	"upper_limit": 30,
	"shipping_cost": 10
}
Code language: JSON / JSON with Comments (json)

The above are all steps to create a shipping method on BigCommerce with Postman. Please comment below or refer to our BigCommerce API documentation if you have any questions.

I hope you can achieve it!

Table of Contents

Ready to integrate and automate at scale ?

Learn how HexaSync lets you build enterprise-grade integrations and automations without having to code.

Receive Exclusive Productivity Tips Directly in Your Inbox

We’ll email you 1-3 times per week—and never share your information.

Get started for free

You can’t add more hours to the day. Beehexa is the next best thing.