# Step 3. Send a response with shipping options

Once your app has shipping rates, it must pass them as **shipping options** back to Ecwid. Ecwid API expects a JSON object with the shipping option name, description, and shipping rate.

### Code example for the response JSON

The following response will display 4 shipping options to the customer: 2 delivery and 2 pickup options.

```json
{
    "shippingOptions": [
      {
        "title": "SuperMail First Class",
        "rate": 10.31,
        "transitDays": "1",
        "description": "Courier will come tomorrow between 10AM-12PM.",
        "titleTranslated": {
          "en": "SuperMail First Class",
          "it": "SuperMail di prima classe"
        },
        "descriptionTranslated": {
          "fr": "Courier will come tomorrow between 10AM-12PM.",
          "it": "Il corriere arriverà domani tra le 10:00 e le 12:00."
        }
      }, 
      {
        "title": "SuperMail Regular Delivery",
        "rate": 5.01,
        "transitDays": "5",
        "description": "This method provides tracking number.",
        "fulfilmentType": "SHIPPING",
      },
      {
        "title": "Pick up at store #1",
        "rate": 0,
        "transitDays": "1",
        "description": "Pick you order at 210, 5th West street, New York",
        "fulfilmentType": "PICKUP",
        "scheduled": true,
        "businessHours":"{\"THU\":[[\"09:00\",\"18:00\"]],\"TUE\":[[\"09:00\",\"18:00\"]],\"WED\":[[\"09:00\",\"18:00\"]],\"FRI\":[[\"09:00\",\"18:00\"]],\"MON\":[[\"09:00\",\"18:00\"]]}",
        "fulfillmentTimeInMinutes": 60,
        "blackoutDates": "{blackoutDates:[{intervalStart:\"June 23, 2022, 4:00:00 AM\",intervalEnd:\"June 25, 2022, 12:12:10 PM\",repeatAnnually:true}]}"
      },
      {
        "title": "Pick up at store #2",
        "rate": 2,
        "transitDays": "2",
        "description": "Pick you order at 88, Town street, Chicago",
        "fulfilmentType": "PICKUP",
        "scheduled": false
      },
      {
        "title": "Local delivery Chicago",
        "rate": 5,
        "transitDays": "0",
        "description": "2 hours delivery",
        "fulfilmentType": "DELIVERY",
        "scheduled": false
      }                   
    ] 
}
```

### Response JSON

Ecwid API expects a JSON object with the following fields:

| Name                     | Type                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| title                    | string                                 | <p>Shipping method name visible to customers at the checkout.<br><br><strong>Required</strong></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| rate                     | number                                 | <p>Shipping rate added to the order total cost.<br><br><strong>Required</strong></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| transitDays              | string                                 | <p>Estimated delivery time visible to customers at the checkout. <br><br>Formats accepted: empty <code>""</code>, number <code>"5"</code>, several days estimate <code>"4-9"</code>.<br><br>You need to pass both <code>transitDays</code> and <code>description</code>. One of them will be displayed to customers depending on store's internal settings.<br><br><strong>Required</strong></p>                                                                                                                                                                                                                                                    |
| description              | string                                 | <p>Shipping method description in text format, for example, <code>"Estimated delivery time is 3-5 days"</code>.<br><br>You need to pass both <code>transitDays</code> and <code>description</code>. One of them will be displayed to customers depending on store's internal settings.<br><br><strong>Required</strong></p>                                                                                                                                                                                                                                                                                                                         |
| titleTranslated          | object [translations](#translations)   | Available translations for the shipping method name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| descriptionTranslated    | object [translations](#translations)   | Available translations for the shipping method description.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| fulfilmentType           | string                                 | <p>Fulfillment type. Only two of the three types are available for custom shipping methods.<br><br>One of:</p><ul><li><code>SHIPPING</code> for everything else (default). Only visible to customers if they chose <strong>Ship to address</strong> option at the checkout.</li><li><code>DELIVERY</code> for local delivery methods. Only visible to customers if they chose <strong>Ship to address</strong> option at the checkout.</li></ul><p>The following one is <strong>unavailable</strong>:</p><ul><li><code>PICKUP</code> - Disabled for custom shipping methods as it represents the Ecwid-made in-store pickup methods only.</li></ul> |
| scheduled                | boolean                                | <p>Define if the shipping option should require the datepicker (similar to the or "Ask for Pickup Date and Time at Checkout" setting)<br><br>Set <code>true</code> to enable. <br><br>Ignored if <code>fulfilmentType</code> has value <code>"SHIPPING"</code>.</p>                                                                                                                                                                                                                                                                                                                                                                                 |
| businessHours            | string [businessHours](#businesshours) | Should be passed if `"scheduled": true`. Available and scheduled times to pickup orders.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| fulfillmentTimeInMinutes | number                                 | Amount of time (in minutes) required for store to prepare pickup or to deliver an order (*Order Fulfillment Time* setting)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| blackoutDates            | object [blackoutDates](#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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

#### 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).

{% hint style="info" %}
Quotes must be escaped
{% endhint %}

Code example:&#x20;

```json
"{\"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. |

#### 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 <mark style="color:green;">`GET`</mark> `/profile` request > `languages` > `enabledLanguages`.
