Introduction
The ILS Orders API lets you push orders into your ILS Panel programmatically. Use it to connect a custom storefront, sync from an ERP, automate test orders, or bridge any platform we do not natively integrate with.
All endpoints are stateless and accept JSON. Every response — success or failure — is JSON with the same envelope. Your client never needs to parse HTML.
Base URL & Format
- HTTP method: All endpoints accept
POSTonly. Any other verb returns405 Method Not Allowed. - Content-Type:
application/jsonon every request. - Auth header:
auth-key: <your-api-key>on every request. - Identifier: The
reference_idreturned by Create Order is passed in the JSON body of Detail, Update, and Delete — not in the URL.
Authentication
Every request must carry your panel-generated API key in the auth-key HTTP header. The key encodes your user id and a per-account unique code — treat it like a password.
Your key is already provisioned and visible inside the panel under Channel » Public API. See Where to find your API key for step-by-step screenshots of the path.
// Example header auth-key: AbCd1234EfGhIjKlMnOpQrStUvWxYz0987654321
Where to find your API key & channel id
Every ILS Panel account has a unique API key and one unique_id per active channel — both are visible in the panel, no manual generation required.
- Sign in to your ILS Panel.
- Open Channel from the left navigation.
- On the Channel integrations grid, find the Public API card and click View.
- The API Auth Key field shows your token, masked by default. Click the eye icon to reveal, then the copy icon to copy it into your
auth-keyheader. - Below the auth key you will see your active channels with their channel unique id (an alphanumeric string, up to 50 chars). Copy that value and pass it as
channel_idin the order body to scope the order to that channel. Omitchannel_idand the order is recorded as a manual entry under your account.
The keys are derived from your account's unique code and identity, so they stay valid for the lifetime of your account. If you suspect compromise, contact [email protected] to rotate the underlying unique code — this invalidates all derived tokens immediately.
Response envelope
Every response — success or error — follows the same shape:
{
"status": 200,
"message": "Human-readable summary",
"data": { /* present on success; optional on failures */ }
}
Status codes
HTTP status codes and the status field inside the JSON body always agree.
Create Order
Creates a new order in your panel. The order is written immediately into order_detail and order_items — no queue, no delay. A generated reference_id is returned which you must use to read, update, or delete the order later.
Headers
| Name | Required | Description |
|---|---|---|
auth-key | Required | Your panel-generated API key. |
Content-Type | Required | Must be application/json. |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer (1–18 digits) | Required | Your internal numeric order id. Must be a positive integer fitting in MySQL BIGINT (max 18 digits). |
order_name | string (≤64) | Required | Human label, e.g. #1001. |
order_date | string | Required | Format dd-mm-yyyy; must be within the last 2 months and not in the future. |
reference_no | integer | Required | Positive integer; numeric order number used on labels & manifest. |
payment_type | enum | Required | One of COD or PREPAID. |
channel_id | string (alphanumeric, ≤50) | Optional | Channel unique_id — copy it from Channel » Manual in the panel. pass null to record a manual order. |
tax_include | boolean | Optional | Whether product prices already include tax. |
order_notes | string (≤1024) | Optional | Free-text instructions. |
tags | string[] | Optional | Up to 50 tags, each ≤64 chars. |
weight_unit | enum | Optional | Must be KG (default). |
shipping_gstin | string (15) | Optional | Indian GSTIN of the recipient (B2B invoicing). Standard 15-char format. |
billing_gstin | string (15) | Optional | Indian GSTIN of the bill-to party. |
invoice_number | string (≤200) | Optional | Pre-generated invoice number from your ERP. |
package_details | object | Optional | Box dimensions, all required if the object is sent. Shape: { "length": <cm>, "width": <cm>, "height": <cm> }. Each value must be a positive number in centimetres, ≤1000. |
shipping_address | object | Required | See address fields below. |
billing_address | object | Optional | Defaults to shipping_address. |
products | object[] | Required | 1–200 items. See product fields below. |
shipping_detail | object | Optional | { shipping_title, shipping_charge } |
tracking_details | object | Optional | { tracking_number, tracking_company, tracking_url, items? } — see Update Order for the item-wise format. |
Address fields (shipping_address & billing_address) — Indian standards
| Field | Type | Required | Description |
|---|---|---|---|
first_name | string ≤64 | Required | |
last_name | string ≤64 | Required | |
address1 | string ≤255 | Required | |
address2 | string ≤255 | Optional | |
city | string ≤64 | Required | |
province | string ≤64 | Required | State / UT name (e.g. Gujarat). |
province_code | string (2) | Required | ISO 3166-2:IN code. Allowed: AN, AP, AR, AS, BR, CG, CH, DH, DL, DN, GA, GJ, HR, HP, JK, JH, KA, KL, LA, LD, MH, ML, MN, MP, MZ, NL, OR, PB, PY, RJ, SK, TG, TN, TR, UP, UT, WB. |
zip | string (6) | Required | Indian PIN code: exactly 6 digits, first digit 1–9. |
country | string ≤64 | Required | Use India. |
country_code | string (2) | Required | Must be IN. Other countries are not yet supported. |
phone | string | Required | Indian mobile: 10 digits, first digit 6–9. Accepts optional +91 or 91 prefix. Spaces and hyphens are stripped before validation. |
email | Required | Valid email address. | |
company | string | Optional |
Product fields (products[])
| Field | Type | Required | Description |
|---|---|---|---|
product_name | string ≤255 | Required | |
product_sku | string ≤64 | Required | Unique per line. Used to target items in item-wise tracking updates. |
product_price | number ≥0 | Required | Unit price in INR. |
product_quantity | integer ≥1 | Required | |
product_weight | number ≥0 | Required | Per-unit weight. |
product_weight_unit | enum | Required | Must be KG. |
product_tax | number 0–100 | Optional | Tax percentage applied to the line. |
product_discount | number ≥0 | Optional | Fixed amount in INR — subtracted from product_price × product_quantity. Percentage discounts are not supported; convert to a flat amount before sending. Cannot exceed the line total. |
product_hsn | string | Optional | 4–8 digit HSN code for GST tax filings. |
product_variant_title | string ≤250 | Optional | Variant label (e.g. Red / Large). |
product_discount is always a fixed amount in INR deducted from the line total (price × quantity). There is no discount_type toggle. If your system stores percentages, compute the rupee equivalent before sending. Order-level discounts are not supported in this API release.Example request
POST /api/order/create HTTP/1.1 Host: ilsportal.io Content-Type: application/json auth-key: AbCd1234EfGhIjKlMnOp... { "order_id": 202610010001, "order_name": "#1001", "order_date": "01-06-2026", "reference_no": 1001, "channel_id": "<channel unique_id from panel>", "payment_type": "PREPAID", "tax_include": true, "order_notes": "Please ship promptly", "tags": ["WEB", "PRIORITY"], "weight_unit": "KG", "invoice_number": "INV/2026/00045", "package_details": { "length": 30, "width": 20, "height": 10 }, "shipping_gstin": "24AAACI1681G1ZE", "billing_gstin": "24AAACI1681G1ZE", "shipping_address": { "first_name": "Chetna", "last_name": "Patel", "address1": "123 Varachha", "address2": "Near Mota Varachha", "city": "Surat", "province": "Gujarat", "province_code": "GJ", "zip": "395008", "country": "India", "country_code": "IN", "phone": "+919033104668", "email": "[email protected]" }, "products": [ { "product_name": "T-Shirt Cotton", "product_sku": "TSHRT-001", "product_price": 299.00, "product_quantity": 2, "product_weight": 0.250, "product_weight_unit": "KG", "product_tax": 5, "product_discount": 10, "product_hsn": "61091000", "product_variant_title": "Red / Large" } ], "shipping_detail": { "shipping_title": "Standard", "shipping_charge": 40.00 } }
Example response — 200 OK
{
"status": 200,
"message": "The order has been created successfully.",
"data": { /* full normalized order JSON, including reference_id */ }
}
data — it is the only identifier used to read, update, or delete this order later.Get Order Details
Returns the full order JSON for a previously created order. Pass the reference_id in the JSON body. The response includes the complete fulfillments[] array (each entry has tracking_company, tracking_number, tracking_url, and the line_items[] covered by that fulfilment), as well as top-level fulfillment_status (fulfilled, partially_fulfilled, or unfulfilled) and per-item fulfillment_status / fulfillable_quantity.
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
reference_id | string | Required | The id returned by Create Order. |
Example request
POST /api/order/detail HTTP/1.1 Host: ilsportal.io Content-Type: application/json auth-key: AbCd1234EfGhIjKlMnOp... { "reference_id": "482A1B7C9E3F" }
Example response — 200 OK
{
"status": 200,
"message": "The order details have been fetched successfully.",
"data": {
"id": "ORD-2026-1001",
"name": "#1001",
"order_number": 1001,
"created_at": "2026-06-01T00:00:00.000Z",
"financial_status": "paid",
"fulfillment_status": "unfulfilled",
"total_price": 628.0,
"total_tax": 28.0,
"line_items": [ /* ... */ ],
"shipping_address": { /* ... */ },
"customer": { /* ... */ },
"reference_id": "482A1B7C9E3F"
}
}
Update Order
Patches an existing order. Only a fixed set of fields can be modified, and only while the order is still pending. The reference_id is sent in the body alongside the fields to change.
ready to ship AND not cancelled. Once tracking has been pushed, the carrier has been booked, or the order has been cancelled, updates return 400.
Body fields
| Field | Type | Required | Description |
|---|---|---|---|
reference_id | string | Required | The id returned by Create Order. |
shipping_address | object | Optional | Same shape as on create. All Indian-standard rules apply. |
tags | string[] | Optional | Replaces existing tags. |
order_notes | string | Optional | Replaces existing notes. |
payment_type | enum | Optional | COD or PREPAID. Downgrading from PREPAID to COD is rejected. |
tracking_details | object | Optional | See Tracking & item-wise fulfilment below. |
400 Invalid request keys.Tracking & item-wise fulfilment
The tracking_details object carries the carrier-issued tracking. It now accepts an optional items[] array for item-wise fulfilment:
| Field | Type | Required | Description |
|---|---|---|---|
tracking_number | string | Required | Carrier waybill / AWB. |
tracking_company | string | Required | Carrier name (e.g. DTDC). |
tracking_url | URL | Required | Public tracking page. |
items | object[] | Optional | List of { sku, quantity } entries to fulfil. Each sku must exist on the order and quantity must not exceed the ordered quantity. If omitted, the same tracking is applied to every line item at full quantity (full-order fulfilment). |
items[] is provided and does not cover every line item, the order is marked partially_fulfilled; if it covers every line, the order is marked fulfilled.Example request
POST /api/order/update HTTP/1.1 Host: ilsportal.io Content-Type: application/json auth-key: AbCd1234EfGhIjKlMnOp... { "reference_id": "482A1B7C9E3F", "tags": ["VIP", "GIFT"], "order_notes": "Leave at front desk", "tracking_details": { "tracking_number": "TR123456", "tracking_company": "DTDC", "tracking_url": "https://trackdtdc.in/TR123456", // Optional: list specific SKUs and quantities to fulfil. // Omit the items array to fulfil the entire order with this tracking. "items": [ { "sku": "TSHRT-001", "quantity": 2 } ] } }
Example response — 200 OK
{
"status": 200,
"message": "The order has been updated successfully.",
"data": { /* full normalized order JSON */ }
}
Delete Order
Removes the order from order_detail and order_items and deletes its on-disk JSON. Only orders in pending status can be deleted — the same definition used by Update Order: status = '2' AND cancel_status = '0' AND fulfill_status = '0'. The reference_id is sent in the body.
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
reference_id | string | Required | The id returned by Create Order. |
Example request
POST /api/order/delete HTTP/1.1 Host: ilsportal.io Content-Type: application/json auth-key: AbCd1234EfGhIjKlMnOp... { "reference_id": "482A1B7C9E3F" }
Example response — 200 OK
{
"status": 200,
"message": "The order has been deleted successfully."
}
Error Handling
All errors return JSON with the same envelope and an HTTP status code that mirrors the status field. The API never returns HTML — even on internal server errors, you receive valid JSON your client can parse safely.
| HTTP | When you see it | Example message |
|---|---|---|
| 400 | Validation failed or unknown key in body | "Invalid request keys: total_price" |
| 400 | Duplicate order_id on the same channel | "This Order ID already exists." |
| 401 | Missing or invalid auth-key | "Access token is missing in the request header." |
| 404 | reference_id does not exist for this user | "Order not found." · "Invalid reference ID." |
| 405 | Wrong HTTP method on a route | "Method not allowed." |
Postman Collection
Download a ready-to-import Postman collection with every endpoint, pre-filled headers and example bodies. Set your auth_key, base_url, and channel_id in the environment and start sending requests.
Import steps
- Open Postman » Import » choose the downloaded JSON.
- Create a new environment with the variables
base_url,auth_key,channel_id, andreference_id. - Activate the environment and run Create Order first — copy the returned
reference_idinto the variable to test Get / Update / Delete.