1. Manage orders
Roamic API v2
  • Topics
    • Authentication
      • Verify token
    • Browse packages
      • List countries and regions
      • List packages
      • Get a package
    • Manage orders
      • Get an order
        GET
      • List orders
        GET
      • Create new order
        POST
    • Manage eSIMs
      • List eSIMs
      • Get an eSIM / installation details
      • Cancel an eSIM
      • Revoke an eSIM
    • Monitor usage
      • Get data usage
    • Top up eSIM
      • List top-up packages for an eSIM
      • Place a top-up order
    • Billing details
      • Get billing details
    • Notifications
      • List webhook event types
      • Create a webhook subscription
      • Update a webhook subscription
      • Get a webhook subscription
      • List webhook subscriptions
      • Delete a webhook subscription
      • List deliveries
      • Get a delivery
      • List notifications sent for an eSIM
      • Retry a delivery
      • Send a test event
  • Raíz
  • Schemas
    • Paginated
    • EsimIdentifier
    • OrderType
    • EsimStatus
    • OrderStatus
    • Result
    • FinancialStatus
    • Error
    • FulfillmentStatus
    • ValidationErrorBody
    • Order
    • TopupStatus
    • StoreOrder
    • WebhookDeliveryStatus
    • Customer
    • WebhookEventType
    • Billing
    • User
    • OrderLineItem
    • Esim
    • BillingFull
    • Topup
    • Settings
    • BillingInput
    • Country
    • Package
    • Product
    • TopupPackage
    • CreateOrder
    • CreateTopupOrder
    • NotificationLog
    • WebhookSubscription
    • WebhookSubscriptionInput
    • WebhookDelivery
  1. Manage orders

Create new order

POST
/api/v1/orders
Requests made outside the sandbox environment incur costs. The order is processed asynchronously. Maximum 50 units in total.
Idempotency-Key is required (422 if missing). Same key + same body → the stored response is replayed byte for byte. Same key + different body, or the first request still in flight → 409. A non-2xx response releases the key.
external_order_id is unique per user (422 if repeated).
billing: optional, take account billing details by default.

Solicitud

Autorización
Bearer Token
Proporciona tu token bearer en el encabezado
Authorization
al realizar solicitudes a recursos protegidos.
Ejemplo:
Authorization: Bearer ********************
or
Parámetros de Header

Parámetros del Body application/jsonRequerido

Ejemplos

Respuestas

🟢201
application/json
Creado
Bodyapplication/json

🟠401Unauthenticated
🟠409IdempotencyConflict
🟠422Unprocessable
🟠429TooManyRequests
Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
cURL
curl --location '/api/v1/orders' \
--header 'Idempotency-Key: 7b1f3b9e-5d0e-4d6e-9a0c-2d7a9a9d0001' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "external_order_id": "ORD-2026-0001",
    "customer": {
        "email": "ana.perez@example.com",
        "first_name": "Ana",
        "last_name": "Pérez",
        "locale": "es"
    },
    "line_items": [
        {
            "sku": "ESIM-ES-1GB-7D",
            "quantity": 1
        }
    ]
}'
Respuesta Ejemplo de Respuesta
201 - Ejemplo 1
{
    "data": {
        "code": "20261027-000123",
        "external_order_id": "string",
        "type": "purchase",
        "status": "open",
        "financial_status": "pending",
        "fulfillment_status": "unfulfilled",
        "customer": {
            "email": "user@example.com",
            "first_name": "string",
            "last_name": "string",
            "phone": "string",
            "external_id": "string",
            "locale": "es"
        },
        "currency": "string",
        "subtotal": "string",
        "discount_total": "string",
        "tax_total": "string",
        "total": "string",
        "billing": {
            "address": "string",
            "city": "string",
            "zip_code": "string",
            "country_iso": "ESP",
            "name": "string",
            "email": "user@example.com",
            "phone": "string",
            "id_document": "string"
        },
        "note": "string",
        "cancel_reason": "string",
        "line_items": [
            {
                "id": 0,
                "package_id": 0,
                "product_id": 0,
                "sku": "string",
                "name": "string",
                "product_name": "string",
                "esimaccess_package_code": "string",
                "is_unlimited": true,
                "quantity": 0,
                "unit_price": "string",
                "subtotal": "string",
                "currency": "string",
                "fulfillment_status": "unfulfilled",
                "esims": [
                    {
                        "code": "string",
                        "status": "assigned",
                        "order_code": "string",
                        "line_item_id": 0,
                        "sku": "string",
                        "package_name": "string",
                        "iccid": "string",
                        "imsi": "string",
                        "activation_code": "string",
                        "smdp_address": "string",
                        "matching_id": "string",
                        "qr_code_url": "string",
                        "branded_qr_code_url": "string",
                        "short_url": "string",
                        "apn": "string",
                        "provider_order_no": "string",
                        "failure_reason": "string",
                        "assigned_at": "2019-08-24T14:15:22.123Z"
                    }
                ],
                "topups": [
                    {
                        "code": "string",
                        "status": "pending",
                        "iccid": "string",
                        "esim_code": "string",
                        "esimaccess_package_code": "string",
                        "provider_order_no": "string",
                        "failure_reason": "string",
                        "applied_at": "2019-08-24T14:15:22.123Z"
                    }
                ]
            }
        ],
        "paid_at": "2019-08-24T14:15:22.123Z",
        "cancelled_at": "2019-08-24T14:15:22.123Z",
        "created_at": "2019-08-24T14:15:22.123Z",
        "updated_at": "2019-08-24T14:15:22.123Z"
    }
}
Modificado en 2026-11-10 12:45:23
Anterior
List orders
Siguiente
List eSIMs
Built with