Create shipping option

POST https://app.ecwid.com/api/v3/{storeId}/profile/shippingOptions

Required access scopes

Your app must have the following access scopes to make this request: update_store_profile

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Request JSON

A JSON object with the following fields:

Field
Type
Description

title

string

Name of shipping option visible at the checkout.

titleTranslated

Available translations for the shipping option name.

enabled

boolean

Defines if the shipping option is available at the checkout (true).

orderby

number

Sort position or shipping option at checkout and in store settings. Starts with 10 and iterates by 10.

fulfilmentType

string

Fulfillment type. One of:

pickup – In-store pickup method.

delivery – Local delivery method.

shipping – Shipping method with externally calculated rates.

minimumOrderSubtotal

number

Order subtotal before discounts. The delivery method won’t be available at checkout for orders below that amount. The field is displayed if the value is not 0

destinationZone

Destination zone set for shipping option.

deliveryTimeDays

string

Estimated delivery time in days, for example: 4-6

Equal to the description value.

description

string

Shipping method description visible at the checkout.

descriptionTranslated

Available translations for the shipping option description.

carrier

string

Internal field. Name of the carrier for Ecwid-built shipping methods.

carrierMethods

Carrier-calculated shipping methods available for this shipping option.

carrierSettings

Shipping carrier settings.

ratesCalculationType

string

Rates calculation type. One of:

carrier-calculated

table

flat

app

shippingCostMarkup

number

Shipping cost markup for carrier-calculated methods.

flatRate

object flatRate

Flat rate details.

Only available if ratesCalculationType is flat.

ratesTable

object ratesTable

Custom table rates details. Only available if ratesCalculationType is table.

appClientId

string

client_id value of the partent app.

Only available for shipping methods added by apps.

pickupInstruction

string

Pickup instructions in HTML format. Only available if fulfilmentType is pickup.

pickupInstructionTranslated

Available translations for the pickup instructions.

pickupPrecisionType

string

Defines the availability of choosing a time in the datepicker for pickup methods at the checkout. One of:

DATE – Customers can only choose a pickup date.

DATE_AND_TIME_SLOT - Customers can choose a pickup date and time.

scheduledPickup

boolean

Defines if pickup time is scheduled (true).

fulfillmentTimeInMinutes

number

Minimum amount of order preparation time (in minutes). Order preparation time is reserved at the checkout. For example, if fulfillmentTimeInMinutes is 60, then customers cannot pick any time less than an hour from the current time for delivery/pickup at the checkout.

businessHours

Limitation for available pickup times by days of the week.

businessHoursLimitationType

string

One of: ALLOW_ORDERS_AND_INFORM_CUSTOMERS - makes it possible to place an order using this delivery method at any time, but if delivery doesn't work at the moment when the order is being placed, a warning will be shown to a customer. DISALLOW_ORDERS_AND_INFORM_CUSTOMERS - makes it possible to place an order using this delivery method only during the operational hours. If delivery doesn't work when an order is placed, this delivery method will be shown at the checkout as a disabled one and will contain a note about when delivery will start working again. ALLOW_ORDERS_AND_DONT_INFORM_CUSTOMERS - makes it possible to place an order using this delivery method at any time. Works only for delivery methods with a schedule.

scheduled

boolean

true if "Allow to select delivery date or time at checkout" or "Ask for Pickup Date and Time at Checkout" setting is enabled. false otherwise.

scheduledTimePrecisionType

string

Defines the availability of choosing a time in the datepicker for delivery methods at the checkout. One of:

DATE – Customers can only choose a delivery date.

DATE_AND_TIME_SLOT - Customers can choose a delivery date and time.

timeSlotLengthInMinutes

number

Length of the delivery time slot in minutes.

allowSameDayDelivery

boolean

true if same-day delivery is allowed. false otherwise.

cutoffTimeForSameDayDelivery

string

Orders placed after this time (in a 24-hour format) will be scheduled for delivery the next business day.

availabilityPeriod

string

Maximum possible delivery date for local delivery and pickup shipping options.

One of:

TWO_DAYS

THREE_DAYS

SEVEN_DAYS

ONE_MONTH

THREE_MONTHS

SIX_MONTHS

ONE_YEAR

UNLIMITED (default)

blackoutDates

array of objects blackoutDates

Dates when the store doesn’t work, so customers can't choose these dates for local delivery. Each period of dates is a JSON object.

estimatedShippingTimeAtCheckoutSettings

Information about estimated shipping time shown at checkout. te at checkout" section).

destinationZone

Field
Type
Description

name

string

Zone displayed name.

countryCodes

array of strings

Country codes this zone includes .

stateOrProvinceCodes

array of strings

State or province codes the zone includes. Format: [country code]-[state code] Example: shipping zone for Alabama, Arizona, Alaska in United states looks like: ["US-AL","US-AK","US-AZ"]. Please refer to Dictionaries to get right country and state codes

postCodes

array of strings

Postcode (or zip code) templates this zone includes. More details: Destination zones in Ecwid.

geoPolygons

Dot coordinates of the polygon (if destination zone is created using Zone on Map).

geoPolygons

Field
Type
Description

<COORDINATES>

Array of arrays of strings

Each array contains coordinates of a single dot of the polygon. For example, [ [37.0365395, -95.66864041664617], [37.0754801, -95.6404782452158], ...]).

flatRate

Field
Type
Description

rateType

string

One of "ABSOLUTE", "PERCENT"

rate

number

Shipping rate

ratesTable

Field
Type
Description

tableBasedOn

string

Defines how rates are applied.

One of:

subtotal - Shipping rates are based on order subtotal before any discounts are applied.

discountedSubtotal - Shipping rates are based on order subtotal after all discounts are applied.

weight - Shipping rates are based on order total weight.

rates

array rates

Details of shipping rates table.

rates

Field
Type
Description

conditions

object conditions

Conditions for this shipping rate in custom table.

rate

object rate

Details of shipping rates applied on certain conditions. It is possible to combine different rates for more complex rate calculations.

conditions

Field
Type
Description

weightFrom

number

"Weight from" condition value

weightTo

number

"Weight to" condition value

subtotalFrom

number

"Subtotal from" condition value

subtotalTo

number

"Subtotal to" condition value

discountedSubtotalFrom

number

"Discounted subtotal from" condition value

discountedSubtotalTo

number

"Discounted subtotal from" condition value

rate

Field
Type
Description

perOrder

number

Absolute rate applied to the whole order.

percent

number

Percent rate applied to the whole order.

perItem

number

Absolute rate based on the total quantity of products in the order. For example, if perItem is 15, then an order with 4 products will have a rate of 60.

perWeight

number

Absolute rate based on the total weight of products in the order. For example, if perWeight is 10, then an order weightning 5kg will have a rate of 50.

businessHours

Limit available hours when customers can pickup their orders in your store.

Format: String made from a JSON object with one or several weekdays, each having an array of time ranges (also in the array format).

Quotes must be escaped

Code example:

"{\"MON\":[[\"07:00\",\"19:00\"]], \"TUE\":[[\"07:00\",\"13:00\"],[\"13:30\",\"19:00\"]]}"

blackoutDates

Field
Type
Description

fromDate

string

Starting date of the period, e.g. 2022-04-28.

toDate

string

The end date of the period, e.g. 2022-04-30.

repeatedAnnually

boolean

Specifies whether the period repeats in the following years or not.

estimatedShippingTimeAtCheckoutSettings

Field
Type
Description

estimatedDeliveryDateAtCheckoutEnabled

boolean

true if the estimated delivery time is shown at checkout, otherwise false.

estimatedTransitTimeInDays

array of numbers

How long it usually takes for the package to be delivered at the shipping address after being handed in to the shipping company. Field uses[from, to] format. The same number can be used, e.g.: [2, 2]. For an approximate time, use different values, e.g.: [2, 6].

fulfillmentTimeInDays

array of numbers

How many days it usually takes you to prepare an order for shipment. That time will be taken into account when calculating the delivery date for customers. Field uses [from, to] format. Precise delivery time example: [2, 2]

Approximate delivery time example: [2, 6].

cutoffTimeForSameDayPacking

string

Local time to pack orders received past this time on the next day in a 24-hour format. For example: "13:00" makes orders placed after 13:00 to be scheduled for packing and shipping the next business day.

shippingBusinessDays

array of strings

Days of the week when your orders can be delivered. These days will be taken into account when calculating and displaying the approximate delivery date for customers at checkout. Format: [ "MON", "TUE", "WED", "THU", "FRI", "SUN", "SAT" ]

deliveryDays

array of strings

Days of the week when you pack orders for shipment. Your schedule will be taken into account when calculating the delivery date for customers. Format: [ "MON", "TUE", "WED", "THU", "FRI", "SUN", "SAT" ]

translations

Object with text field translations in the "lang": "text" format, where the "lang" is an ISO 639-1 language code. For example:

{
    "en": "Sample text",
    "nl": "Voorbeeldtekst"
}

Translations are available for all active store languages. Only the default language translations are returned if no other translations are provided for the field. Find active store languages with GET /profile request > languages > enabledLanguages.

Response JSON

A JSON object with the following fields:

Field
Type
Description

id

string

Internal ID of the created shipping option.

Last updated

Was this helpful?

OSZAR »