---
title: "Create an eSIMply cart"
method: POST
path: "/esimply/orders/cart"
tags: ["eSIMply orders"]
---

# Create an eSIMply cart

`POST /esimply/orders/cart`

## Request

- Base URL: `https://api.liteapi.travel/v3.0`
- URL: `https://api.liteapi.travel/v3.0/esimply/orders/cart`
- Auth: API key in header `X-API-Key`

## Overview

Initialize a shopping cart for a selected eSIM package and travel dates. The returned `cartKey` is required to submit the purchase.

## When to Use

- **Start checkout** - After the traveler selects a package and travel window
- **Hold a package** - Create a short-lived cart before collecting traveler details
- **Multi-step flows** - Separate package selection from payment/provisioning

## What You Get

- **Cart key** - Opaque `cartKey` used by submit order

## Key Features

- **Date-bound**: Requires `startDate` and `endDate` for the travel period
- **Package-scoped**: Uses `packageId` with either `destinationCode` (country plan) or `regionId` + `externalPackageId` (regional/global plan) from the catalog
- **Exclusive modes**: Sending both `destinationCode` and `regionId`, or `externalPackageId` with `destinationCode`, is rejected
- **Idempotent submit later**: Reuse the same `cartKey` safely when submitting

## Request body

- union: Send either `destinationCode` (country plan) or `regionId` + `externalPackageId` (regional/global plan). Sending both `destinationCode` and `regionId`, or `externalPackageId` with `destinationCode`, is rejected with 62001.
  - object
    - `packageId` integer, required
    - `destinationCode` string, required: ISO2 destination code for a country plan. Do not send with `regionId` or `externalPackageId`.
    - `regionId` integer: Region ID from `GET /data/esimply/regions`. Do not send with `destinationCode`.
    - `externalPackageId` string: Required with `regionId`; taken from `GET /data/esimply/regions/{regionId}/packages`. Not allowed with `destinationCode`.
    - `startDate` string, date, required
    - `endDate` string, date, required
  - object
    - `packageId` integer, required
    - `destinationCode` string: ISO2 destination code for a country plan. Do not send with `regionId` or `externalPackageId`.
    - `regionId` integer, required: Region ID from `GET /data/esimply/regions`. Do not send with `destinationCode`.
    - `externalPackageId` string, required: Required with `regionId`; taken from `GET /data/esimply/regions/{regionId}/packages`. Not allowed with `destinationCode`.
    - `startDate` string, date, required
    - `endDate` string, date, required

## Response `200`

Cart created successfully

- object
  - `data` CartResponse, required
    - `cartKey` string: Opaque cart token used to submit the order

## Other responses

- `400`: Validation error
- `401`: Authentication required
- `403`: eSIMply access not enabled for this account

---

[API](https://skmtc.dev/liteapi/apis/api-esimply.md) - [All operations](https://skmtc.dev/liteapi/apis/api-esimply/llms.txt) - [OpenAPI document](https://skmtc.dev/liteapi/apis/api-esimply/revisions/b0fb431f4daf?raw)
