Table of Contents

Get eSIM Order by ID API Documentation

Overview

This API allows users to retrieve detailed information about a specific eSIM order using its unique identifier (Order ID). The response includes order status, eSIM specifics, pricing information, and metadata related to the order's creation and updates.


API Endpoint

  • URL: {{host}}/hub/esim/orders/{orderId}
  • Method: GET
  • Content-Type (Response): application/json

Headers

Key Value Description
Authorization Bearer {token} Access token (Required)

Path Parameters

Parameter Type Required Description Example
orderId String ✅ Yes The unique identifier of the order. 4950d3d0-0c49-40ec-a25f-4398003234bb

Request Body Parameters

None. This is a GET request, and all necessary information is passed via the URL path parameter.


Sample Request

curl --location '{{host}}/hub/esim/orders/4950d3d0-0c49-40ec-a25f-4398003234bb' \
--header 'Authorization: Bearer {token}'


Sample Response

{
  "id": "4950d3d0-0c49-40ec-a25f-4398003234bb",
  "readableId": "ES300525G002",
  "orderBaseInfo": {
    "providerCode": "esim.provider1",
    "providerReferenceId": "142",
    "status": "CLOSED",
    "statusIsFinal": true,
    "bookingType": "esim",
    "totalAmount": 1000.0,
    "totalAmountUSD": 0.0,
    "totalAmountVND": 0.0,
    "currency": "VND",
    "convertionRate": 0.0,
    "isNeedRebookPNR": false,
    "passengerCount": 0,
    "totalAmountAtHotel": 0.0,
    "refunded": false
  },
  "orderESimInfo": {
    "id": "5b590b90-f8a3-4379-b5a9-5bd33e4f232d",
    "eSimBookingId": "4950d3d0-0c49-40ec-a25f-4398003234bb",
    "name": "GIGAGO DEMO",
    "countries": [],
    "qrCode": "LPA:1$viettelvietnam.validspereachdpplus.com$HBEQKOSUW6GS3E9TUVNXA4H46P52--ZLW0J51SJ-ZUGNZKHN9COU69A2259BT80K",
    "phoneNumber": "1698552136",
    "serialNumber": "8984048000941504285",
    "description": "GIGAGO DEMO - 0GB/1 days",
    "data": "0GB",
    "validityPeriod": "1",
    "accessPointName": "internet",
    "amount": 1000.0
  },
  "passengers": [],
  "priceInfo": {
    "id": "04361827-3341-4110-8ef9-c130e1a1f6b4",
    "orderId": "4950d3d0-0c49-40ec-a25f-4398003234bb",
    "couponId": "00000000-0000-0000-0000-000000000000",
    "itemType": 0,
    "passengerTotalAmount": 0.0,
    "passengerTotalAmountUSD": 0.0,
    "passengerTotalAmountVND": 0.0,
    "ancillaryTotalAmount": 0.0,
    "ancillaryTotalAmountUSD": 0.0,
    "ancillaryTotalAmountVND": 0.0,
    "seatTotalAmount": 0.0,
    "seatTotalAmountUSD": 0.0,
    "seatTotalAmountVND": 0.0,
    "ticketFeeAmount": 0.0,
    "ticketFeeAmountUSD": 0.0,
    "ticketFeeAmountVND": 0.0,
    "totalAmount": 1000.0,
    "totalAmountUSD": 0.0,
    "totalAmountVND": 0.0,
    "couponAmount": 0.0,
    "couponAmountUSD": 0.0,
    "couponAmountVND": 0.0,
    "handlingFee": 0.0,
    "handlingFeeUSD": 0.0,
    "handlingFeeVND": 0.0,
    "totalFare": 0.0,
    "totalFareUSD": 0.0,
    "totalFareVND": 0.0,
    "convertionRate": 0.0,
    "currency": "VND",
    "totalTax": 0.0,
    "surcharges": 0.0,
    "amount": 0.0,
    "numberOfRooms": 0,
    "averagePerNightAmount": 0.0,
    "numberOfNights": 0,
    "priceDetails": [],
    "createdBy": "thanh.nguyen1@tripdata.vn",
    "createdUtc": "0001-01-01T00:00:00:0000",
    "updatedUtc": "0001-01-01T00:00:00:0000",
    "refundable": false,
    "hasBreakfast": false,
    "extraBed": false,
    "nonSmoking": false
  },
  "createdBy": "thanh.nguyen1@tripdata.vn",
  "createdUtc": "2025-05-30T04:41:27:2182",
  "updatedBy": "System",
  "updatedUtc": "2025-05-30T04:41:28:0399"
}

Response Field Description

This section describes the fields returned in the API response. All field description tables in this section follow the | Field | Type | Example | Description | format.

Root Level Fields

Field Type Example Description
id String "4950d3d0-..." Unique identifier for the order (UUID).
readableId String "ES300525G002" Human-readable identifier for the order.
orderBaseInfo Object {...} Order Base Information Object
orderESimInfo Object {...} Order eSIM Information Object
passengers Array [] Array of passenger objects (typically empty for eSIM orders).
priceInfo Object {...} Price Information Object
createdBy String "thanh.nguyen1@tripdata.vn" Identifier of the user/system that created the order.
createdUtc String "2025-05-30T04:41:27:2182" UTC timestamp when the order was created.
updatedBy String "System" Identifier of the user/system that last updated the order.
updatedUtc String "2025-05-30T04:41:28:0399" UTC timestamp when the order was last updated.

Order Base Information Object

Details about the base order.

Field Type Example Description
providerCode String "esim.provider1" Code of the eSIM provider.
providerReferenceId String "142" Reference ID from the provider for this order.
status String "CLOSED" Current status of the order (e.g., PENDING, CLOSED, FAILED, CANCELED).
statusIsFinal Boolean true Indicates if the current status is final.
bookingType String "esim" Type of booking.
totalAmount Number 1000.0000 Total amount of the order in the order currency.
totalAmountUSD Number 0.0 Total amount of the order in USD (if applicable).
totalAmountVND Number 0.0 Total amount of the order in VND (if applicable).
currency String "VND" Currency of the totalAmount.
convertionRate Number 0.0 Conversion rate used, if applicable.
isNeedRebookPNR Boolean false Flag indicating if PNR rebooking is needed.
passengerCount Integer 0 Number of passengers (typically 0 for eSIM).
totalAmountAtHotel Number 0.0 Amount to be paid at hotel (not for eSIM).
refunded Boolean false Indicates if the order has been refunded.

Order eSIM Information Object

Details the characteristics and provisioning information for the eSIM item(s) within this order.

Field Type Example Description
id String "5b590b90-..." Unique identifier for this eSIM order item.
eSimBookingId String "4950d3d0-..." References the main order ID.
name String "GIGAGO DEMO" Name of the eSIM product as ordered.
countries Array of String [] List of 2-letter ISO country codes covered. May be empty.
operator String (not present in sample item) (Optional) Operator associated with the eSIM.
qrCode String "LPA:1$viettel...BT80K" (Optional) QR code string for eSIM activation. Not present if order failed/canceled.
phoneNumber String "1698552136" (Optional) Phone number associated with the eSIM. Not present if order failed/canceled.
serialNumber String "8984048000..." (Optional) Serial number (ICCID) of the eSIM. Not present if order failed/canceled.
description String "GIGAGO DEMO - 0GB/1 days" Description of the eSIM product.
data String "0GB" Data allowance of the ordered eSIM.
validityPeriod String "1" Validity period in days of the ordered eSIM.
accessPointName String "internet" APN (Access Point Name) for the eSIM.
amount Number 1000.0000 Price of a single eSIM unit in this order.

Price Information Object

Detailed breakdown of pricing for the order.

Field Type Example Description
id String "04361827-..." Unique identifier for the price information.
orderId String "4950d3d0-..." References the main order ID.
couponId String "00000000-..." ID of any coupon applied.
itemType Integer 0 Type of item this pricing refers to.
passengerTotalAmount Number 0.0 Total amount related to passengers (not for eSIM).
passengerTotalAmountUSD Number 0.0 (USD)
passengerTotalAmountVND Number 0.0 (VND)
ancillaryTotalAmount Number 0.0 Total amount for ancillaries.
ancillaryTotalAmountUSD Number 0.0 (USD)
ancillaryTotalAmountVND Number 0.0 (VND)
seatTotalAmount Number 0.0 Total amount for seats (not for eSIM).
seatTotalAmountUSD Number 0.0 (USD)
seatTotalAmountVND Number 0.0 (VND)
ticketFeeAmount Number 0.0 Amount for ticket fees.
ticketFeeAmountUSD Number 0.0 (USD)
ticketFeeAmountVND Number 0.0 (VND)
totalAmount Number 1000.0000 Overall total amount for this price entry.
totalAmountUSD Number 0.0 (USD)
totalAmountVND Number 0.0 (VND)
couponAmount Number 0.0 Amount discounted by coupon.
couponAmountUSD Number 0.0 (USD)
couponAmountVND Number 0.0 (VND)
handlingFee Number 0.0 Handling fee amount.
handlingFeeUSD Number 0.0 (USD)
handlingFeeVND Number 0.0 (VND)
totalFare Number 0.0 Total base fare.
totalFareUSD Number 0.0 (USD)
totalFareVND Number 0.0 (VND)
convertionRate Number 0.0 Conversion rate used.
currency String "VND" Currency for this price information.
totalTax Number 0.0 Total tax amount.
surcharges Number 0.0 Surcharge amount.
amount Number 0.0 General amount field, context may vary.
numberOfRooms Integer 0 Number of rooms (not for eSIM).
averagePerNightAmount Number 0.0 Average per night amount (not for eSIM).
numberOfNights Integer 0 Number of nights (not for eSIM).
priceDetails Array [] Array of further price detail objects.
createdBy String "thanh.nguyen1@tripdata.vn" Creator of this price entry.
createdUtc String "0001-01-01T00:00:00:0000" Creation UTC timestamp (default/placeholder value).
updatedUtc String "0001-01-01T00:00:00:0000" Last update UTC timestamp (default/placeholder value).
refundable Boolean false Indicates if this price component is refundable.
hasBreakfast Boolean false Indicates if breakfast is included (not for eSIM).
extraBed Boolean false Indicates if an extra bed is included (not for eSIM).
nonSmoking Boolean false Indicates if non-smoking option (not for eSIM).

Notes

  • The orderId in the URL path must be the UUID of an existing eSIM order.
  • The passengers array is generally empty for eSIM orders.
  • Many fields within priceInfo (e.g., numberOfRooms, seatTotalAmount) are generic and may not be relevant to eSIM orders, often showing 0 or default values.
  • The createdUtc and updatedUtc fields within priceInfo might show a default timestamp (0001-01-01T00:00:00:0000) if this specific pricing sub-record hasn't been explicitly timestamped or if it uses the main order's timestamps.
  • Fields like qrCode, phoneNumber, and serialNumber within orderESimInfo are typically available for successfully provisioned eSIMs (e.g., status CLOSED). These fields might be absent or null for orders with other statuses, such as REFUNDED or CANCELED.
  • The orderESimInfo.operator field might not be present for all eSIM products or in all states of the order.