Orders API Integration

Programmatically push orders into the ILS Panel from your storefront, ERP, or any custom system. Authenticate once with your panel-generated key and create, read, update, and delete orders over a clean JSON REST interface.

JSON over HTTPS Auth-Key Header 4 Order Endpoints Postman Collection Included
Home  /  Integrations  /  API Integration

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

BASE https://ilsportal.io/api/
  • HTTP method: All endpoints accept POST only. Any other verb returns 405 Method Not Allowed.
  • Content-Type: application/json on every request.
  • Auth header: auth-key: <your-api-key> on every request.
  • Identifier: The reference_id returned 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
Security: Never commit the key to a public repo or expose it in client-side JavaScript. The key grants full read/write access to your orders.

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.

  1. Sign in to your ILS Panel.
  2. Open Channel from the left navigation.
  3. On the Channel integrations grid, find the Public API card and click View.
  4. 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-key header.
  5. 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_id in the order body to scope the order to that channel. Omit channel_id and 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

200 OK 400 Bad Request 401 Unauthorized 404 Not Found 405 Method Not Allowed

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.

POST https://ilsportal.io/api/order/create

Headers

NameRequiredDescription
auth-keyRequiredYour panel-generated API key.
Content-TypeRequiredMust be application/json.

Body parameters

FieldTypeRequiredDescription
order_idinteger (1–18 digits)RequiredYour internal numeric order id. Must be a positive integer fitting in MySQL BIGINT (max 18 digits).
order_namestring (≤64)RequiredHuman label, e.g. #1001.
order_datestringRequiredFormat dd-mm-yyyy; must be within the last 2 months and not in the future.
reference_nointegerRequiredPositive integer; numeric order number used on labels & manifest.
payment_typeenumRequiredOne of COD or PREPAID.
channel_idstring (alphanumeric, ≤50)OptionalChannel unique_id — copy it from Channel » Manual in the panel. pass null to record a manual order.
tax_includebooleanOptionalWhether product prices already include tax.
order_notesstring (≤1024)OptionalFree-text instructions.
tagsstring[]OptionalUp to 50 tags, each ≤64 chars.
weight_unitenumOptionalMust be KG (default).
shipping_gstinstring (15)OptionalIndian GSTIN of the recipient (B2B invoicing). Standard 15-char format.
billing_gstinstring (15)OptionalIndian GSTIN of the bill-to party.
invoice_numberstring (≤200)OptionalPre-generated invoice number from your ERP.
package_detailsobjectOptionalBox 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_addressobjectRequiredSee address fields below.
billing_addressobjectOptionalDefaults to shipping_address.
productsobject[]Required1–200 items. See product fields below.
shipping_detailobjectOptional{ shipping_title, shipping_charge }
tracking_detailsobjectOptional{ tracking_number, tracking_company, tracking_url, items? } — see Update Order for the item-wise format.

Address fields (shipping_address & billing_address) — Indian standards

FieldTypeRequiredDescription
first_namestring ≤64Required
last_namestring ≤64Required
address1string ≤255Required
address2string ≤255Optional
citystring ≤64Required
provincestring ≤64RequiredState / UT name (e.g. Gujarat).
province_codestring (2)RequiredISO 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.
zipstring (6)RequiredIndian PIN code: exactly 6 digits, first digit 1–9.
countrystring ≤64RequiredUse India.
country_codestring (2)RequiredMust be IN. Other countries are not yet supported.
phonestringRequiredIndian mobile: 10 digits, first digit 6–9. Accepts optional +91 or 91 prefix. Spaces and hyphens are stripped before validation.
emailemailRequiredValid email address.
companystringOptional

Product fields (products[])

FieldTypeRequiredDescription
product_namestring ≤255Required
product_skustring ≤64RequiredUnique per line. Used to target items in item-wise tracking updates.
product_pricenumber ≥0RequiredUnit price in INR.
product_quantityinteger ≥1Required
product_weightnumber ≥0RequiredPer-unit weight.
product_weight_unitenumRequiredMust be KG.
product_taxnumber 0–100OptionalTax percentage applied to the line.
product_discountnumber ≥0OptionalFixed 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_hsnstringOptional4–8 digit HSN code for GST tax filings.
product_variant_titlestring ≤250OptionalVariant label (e.g. Red / Large).
How discounts work: 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 */ }
}
Save the returned reference_id from 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.

POST https://ilsportal.io/api/order/detail

Body parameters

FieldTypeRequiredDescription
reference_idstringRequiredThe 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.

POST https://ilsportal.io/api/order/update
What "pending" means: the order is updatable only when it's in 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

FieldTypeRequiredDescription
reference_idstringRequiredThe id returned by Create Order.
shipping_addressobjectOptionalSame shape as on create. All Indian-standard rules apply.
tagsstring[]OptionalReplaces existing tags.
order_notesstringOptionalReplaces existing notes.
payment_typeenumOptionalCOD or PREPAID. Downgrading from PREPAID to COD is rejected.
tracking_detailsobjectOptionalSee Tracking & item-wise fulfilment below.
Sending any field outside this list returns 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:

FieldTypeRequiredDescription
tracking_numberstringRequiredCarrier waybill / AWB.
tracking_companystringRequiredCarrier name (e.g. DTDC).
tracking_urlURLRequiredPublic tracking page.
itemsobject[]OptionalList 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).
When 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.

POST https://ilsportal.io/api/order/delete

Body parameters

FieldTypeRequiredDescription
reference_idstringRequiredThe 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.

HTTPWhen you see itExample message
400Validation failed or unknown key in body"Invalid request keys: total_price"
400Duplicate order_id on the same channel"This Order ID already exists."
401Missing or invalid auth-key"Access token is missing in the request header."
404reference_id does not exist for this user"Order not found." · "Invalid reference ID."
405Wrong 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.

PM

ILS Orders API — Postman Collection

Postman v2.1 schema · 4 endpoints · environment template included.

Import steps

  1. Open Postman » Import » choose the downloaded JSON.
  2. Create a new environment with the variables base_url, auth_key, channel_id, and reference_id.
  3. Activate the environment and run Create Order first — copy the returned reference_id into the variable to test Get / Update / Delete.