> ## Documentation Index
> Fetch the complete documentation index at: https://developers.mioesim.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /api_esim/addEsimOrderByApiCode — Order by API code

> Place an eSIM or physical SIM order using a package's apiCode instead of skuId and priceId. Ideal when you have pre-negotiated specific package codes.

An alternative to [Place Order](/api-reference/place-order) that uses the package `apiCode` (e.g. `"40-0-3-1-G"`) instead of separate `skuId` and `priceId` parameters. The response and card details are identical.

```
POST https://bpm.mioesim.com/api_esim/addEsimOrderByApiCode
```

## Request parameters

<ParamField body="token" type="string" required>Session token.</ParamField>
<ParamField body="apiCode" type="string" required>Package unique identifier (e.g. `"99162-0-3-1-G"`).</ParamField>
<ParamField body="count" type="string" required>Number of SIM cards to order.</ParamField>
<ParamField body="sign" type="string" required>Request signature.</ParamField>
<ParamField body="beginDate" type="string">Required when `mustDate=1`. Format: `MM/dd/yyyy`.</ParamField>
<ParamField body="backInfo" type="string">`0`/empty = order number; `1` = full details; `2` = PDF URL info.</ParamField>
<ParamField body="dpId" type="string">Required for physical SIM orders.</ParamField>
<ParamField body="iccids" type="string">Comma-separated ICCIDs for physical SIM (count must match `count`).</ParamField>
<ParamField body="customerEmail" type="string">Customer email for PDF delivery.</ParamField>
<ParamField body="isSendEmail" type="string">`1` to send PDF email.</ParamField>
<ParamField body="pdfLanguage" type="string">PDF language code. See [PDF Languages](/reference/pdf-languages).</ParamField>
<ParamField body="otherOrderId" type="string">Your external order ID.</ParamField>
<ParamField body="otherItemId" type="string">Your external line item ID.</ParamField>
<ParamField body="remark" type="string">Optional notes.</ParamField>

## Response

Identical to [Place Order](/api-reference/place-order). The `data` field is either the order number string (backInfo=0) or a full order object with `cardApiDtoList` (backInfo=1).

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://bpm.mioesim.com/api_esim/addEsimOrderByApiCode \
    -d "token=YOUR_TOKEN" \
    -d "apiCode=40-0-3-1-G" \
    -d "count=1" \
    -d "backInfo=1" \
    -d "sign=YOUR_SIGN"
  ```

  ```json Success theme={null}
  { "code": "0", "message": "success", "data": "EP20221104000005" }
  ```
</CodeGroup>
