Skip to main content

Managing zones using CSV

Import, export and update your zones with CSV files

Clemency Farmer avatar
Written by Clemency Farmer
Updated this week

In Rates by Zipcode, you can import zones and rates using a CSV file. We recommend using this if you have to create a lot of zones.

If you are transferring the zones to a new store, we recommend exporting a copy of your zones first.


Export zones

If you have existing zones, we recommend exporting them first. This will give you a backup copy of your zones, or you can edit your zones and see all available fields.

  1. Click Zones and rates.

  2. Tick the zones you wish to export.

    • If you want to select all zones on the page, tick the checkbox above the zone names.

    • If you want to select all zones on all pages, tick the checkbox and click Select all 10+ zones in your store.

  3. Click Export.

This will start a download in your browser for a CSV file with your zone information.

You may wish to export your zones twice, or duplicate the file, so you have a backup copy of your zones and a version that you can edit.


CSV format

The first line of the CSV should have field names, separated by a comma. Every next line should have information about your zone in the same order. You can use our CSV file template as a reference.

If your zones contain special characters, ensure any programs you use to edit the CSV file can support those characters.


If you experience any parsing issues when importing files, then remove all special characters from the CSV file and try again.

Fields

All columns are required, but some fields can be left blank.

If you need to add multiple rates to the same zone, keep the zone_handle the same.

If you need to add more than one translation of the same rate, keep the zone_handle and the rate_handle the same. If you have no additional languages, you can leave the translation fields blank.

Field

Values

Notes

zone_handle

Add any value in here. For all rates that need to be added to the same zone, keep the handle the same.

zone_name

The name of the zone

zone_status

0,1

1 = zone is enabled

0 = zone is disabled

zip_codes

Add comma separated values here for each zip code.

rate_handle

Add any value in here. For all translations that need to be added to the same rate, keep the handle the same.

rate_description

Optional rate description for the rate.

rate_type

price, weight

To determine if it is a price-based rate or a weight-based rate

rate_min

Minimum order value the rate will apply to. Add 0 if there is no minimum

rate_max

Optional order value maximum the rate will apply to

translation_language_code

Language code for the rate

translation_name

Translated name for the rate

translation_description

0,1

Translated rate description

translation_published

0,1

1 = Unpublished

0 = Published

Make sure your default language is published

For example, the below CSV file has two zones, and each rate has three translations: English, French and German.


Import Zones

  1. Click Zones and rates.

  2. Click Import.

  3. Upload your CSV.

  4. Click Import zones.

Your file has now been uploaded. Depending on the number of zones you are importing, it may take up to 15 minutes.


Limitations

  • The CSV import cannot update existing zones.


Notes

  • If your zones contain special characters, ensure any programs you use to edit the CSV file can support those characters.

  • You can only import CSV files. Anything else will trigger the error message "The file you are uploading must be a CSV."

    • For example, if you are using Excel, do not save the file as a .xlsx file, save it as a .csv file instead.

    • You can easily verify the file type by going to http://mime.ritey.com/ and uploading your CSV. The response mime.ritey.com returns must be either text/csv, text/plain or application/vnd.ms-excel.


Did this answer your question?