Aalam Ecommerce

Ecommerce (0.8.0)

Download OpenAPI specification:

Authentication

Every API request should be sent with a valid token. The token can be fetched by registering a remote application in your account's Settings -> Users & Groups -> Remote applications. The token of the remote application should be passed along with the header X-Auth-Token and also make sure the remote application is authorized with necessary permissions.

Orders

API related to the trips

Combine Split Orders

Combines one or more split orders belonging to the same parent order.

The selected split orders are merged back into the parent split structure. After combining, the split order sequence is recalculated so that the remaining split orders use consecutive split numbers.

Features

  • Combine multiple split orders.
  • Combine split orders belonging to the same parent order.
  • Reduce the number of split orders after a combination.
  • Recalculate split order IDs after combining.
  • Combine all split orders belonging to a parent order.
  • Specify the processing status for the resulting order.

Split Order IDs

The order_ids path parameter contains the IDs of the split orders to combine.

Multiple order IDs must be supplied as comma-separated values.

Example:

/aalam/ecomm/order/NZRL6451-1,NZRL6451-2/combine

Split Sequence

Split orders are identified using the parent order number followed by a sequential suffix.

For example:

  • NZRL6451-1
  • NZRL6451-2
  • NZRL6451-3
  • NZRL6451-4

When split orders are combined, the remaining split orders are renumbered to maintain a continuous sequence.

For example, combining NZRL6451-1 and NZRL6451-2 results in the remaining split orders being represented using the reduced split sequence.

Parent Order

All split orders being combined must belong to the same parent order.

Split orders from different parent orders cannot be combined.

Combining All Splits

All split orders belonging to the same parent order can be combined.

When all splits are combined, the parent order becomes the resulting order and the split structure is removed.

Status

The status query parameter specifies the processing status to use when combining the orders.

Status values are configured by the administrator and are not restricted to a predefined enum.

Notes

  • order_ids must contain valid split order IDs.
  • At least one valid order ID must be supplied.
  • The supplied split orders must belong to the same parent order.
  • The specified split orders are combined into the parent order's split structure.
  • The remaining split orders are renumbered after the combination.
  • The number of split orders decreases after a successful combination.
  • The parent order ID remains unchanged.
  • All split orders belonging to the parent order can be combined.

Permissions

Order/manage is needed

path Parameters
order_ids
required
string

Comma-separated IDs of the split orders to combine.

All specified orders must belong to the same parent order.

Example:

NZRL6451-1,NZRL6451-2

query Parameters
status
required
string

Processing status to assign during the combine operation.

Status values are configured by the administrator and are not restricted to a predefined enum.

Responses

Response samples

Content type
application/json
Example
{
  • "parent_id": "NZRL6451",
  • "splits": [
    ]
}

Download Order Invoice

Downloads the invoice PDF for one or more orders.

The order IDs are provided as comma-separated values in the order_ids path parameter.

Features

  • Download an invoice PDF for a single order.
  • Download invoice PDFs for multiple orders.
  • Accept multiple order IDs as comma-separated values.
  • Generate the invoice document for the specified orders.

Order IDs

The order_ids path parameter accepts one or more order IDs separated by commas.

Example:

/aalam/ecomm/order/ZHKI2831,CILC1923/invoice

Notes

  • Each supplied order ID must identify a valid order.
  • The generated response is an invoice PDF file.
  • Multiple order IDs can be supplied in a single request.
  • The endpoint is intended for downloading invoice documents rather than returning JSON order data.

Permissions

Any of the following permissions are needed

  • Orders/access
  • Orders/manage
  • Orders/edit
  • Orders/process
path Parameters
order_ids
required
string

Comma-separated IDs of the orders for which invoice PDFs should be downloaded.

Responses

Response samples

Content type
{
  • "message": "string"
}

Download Shipping Label

Downloads the shipping label for one or more orders.

The order IDs are provided as comma-separated values in the order_ids path parameter.

Features

  • Download a shipping label for a single order.
  • Download shipping labels for multiple orders.
  • Accept multiple order IDs as comma-separated values.
  • Generate the shipping label document for the specified orders.

Order IDs

The order_ids path parameter accepts one or more order IDs separated by commas.

Example:

/aalam/ecomm/order/CILC1923/shipping_label

Multiple orders can be requested using comma-separated order IDs:

/aalam/ecomm/order/ZHKI2831,CILC1923/shipping_label

Notes

  • Each supplied order ID must identify a valid order.
  • The response contains the generated shipping label document.
  • Multiple order IDs can be supplied in a single request.
  • The endpoint is intended for downloading shipping label documents rather than returning JSON order data.

Permissions

Any of the following permissions are needed

  • Orders/access
  • Orders/manage
  • Orders/edit
  • Orders/process
path Parameters
order_ids
required
string

Comma-separated IDs of the orders for which shipping labels should be downloaded.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Order Details

Retrieves detailed information for a specific order.

The response includes the current order state, processing history, invoice details, order items, tags, causes, and related split and return orders.

Features

  • Retrieve details of a specific order.
  • Retrieve the current order status and processing state.
  • Retrieve the complete order status history.
  • Retrieve invoice and settlement details.
  • Retrieve order items.
  • Select specific item fields using item_fields.
  • Retrieve order tags and processing causes.
  • Retrieve related split orders.
  • Retrieve related return orders.

Item Fields

The item_fields parameter can be used to control which item fields are returned in the invoice item details.

Multiple fields can be supplied as a comma-separated list.

Example:

item_fields=id,code,name,type,type_id,uom

Notes

  • The order_id must be a valid order number.
  • If the specified order does not exist, a 404 Not Found response is returned.
  • The item_fields parameter applies to item details returned inside the invoice.
  • Order status values are configured by the administrator and are not restricted to a predefined enum.
  • direction identifies whether the order is a forward (F) or reverse (R) order.
path Parameters
order_id
required
string

Unique order identifier.

query Parameters
item_fields
string

Comma-separated list of item fields to include in the invoice item details.

Example:

id,code,name,num_variants,sub_title,type,type_id,uom, varying_properties

Responses

Response samples

Content type
application/json
{
  • "causes": [ ],
  • "contact_id": 85,
  • "created_on": "20-08-2026T10:30:00",
  • "cur_status": "Confirmed",
  • "direction": "F",
  • "id": "CCBV9408",
  • "invoice": {
    },
  • "invoice_id": 601,
  • "is_cod": true,
  • "is_stuck": false,
  • "logs": [
    ],
  • "num_items": 1,
  • "on_hold": false,
  • "price": 903,
  • "return_orders": [ ],
  • "settled": 903,
  • "sno": 251,
  • "split_orders": [ ],
  • "tags": [ ],
  • "total_quantity": 1
}

Update Order

Updates properties of an existing order.

The endpoint supports updating the order status, tags, custom fields, COD state, pause or resume state, and delivery address based on the supplied parameters and the current order stage.

Features

  • Update the order status.
  • Add tags to an order.
  • Remove tags from an order.
  • Update custom order fields.
  • Update COD state.
  • Pause an order.
  • Resume a paused order.
  • Update the delivery address when permitted.
  • Update multiple order properties in a single request.

Tags

The tags parameter accepts comma-separated tag names.

  • A tag without a - prefix is added to the order.
  • A tag with a - prefix is removed from the order.

For example:

tags=Tag 2,case,try,-tag5,-123

adds Tag 2, case, and try, and removes tag5 and 123.

Order Status

The status parameter updates the order to the specified processing stage.

Order stages are configured separately for forward (F) and reverse (R) orders.

The supplied status must be a valid stage for the order direction. Otherwise, the request results in a 400 Bad Request response.

Notes

  • At least one of status, claim, uid, or tags is required when the request is not authenticated against a customer contact.
  • Tags can be added and removed using the tags parameter.
  • Prefix a tag with - to remove it.
  • The status value must be valid for the order's direction.
  • delivery_address cannot be changed by a customer after the first configured order stage.
  • pause=true pauses the order.
  • resume=true resumes the order.
  • cod=true updates the order as a cash-on-delivery order.
path Parameters
order_id
required
string

Unique identifier of the order.

query Parameters
status
string

Updates the order to the specified processing stage.

The available stages are configured by the administrator and depend on the order direction.

The supplied value must match a valid configured stage for the order.

tags
string

Comma-separated list of tags to add or remove.

  • A tag without a - prefix is added.
  • A tag with a - prefix is removed.

Example:

tags=Tag 2,case,try,-tag5,-123

cod
boolean

Updates the cash-on-delivery state of the order.

pause
boolean

Pauses the order when set to true.

resume
boolean

Resumes the order when set to true.

claim
string

Claim value associated with the order.

uid
string

User identifier associated with the order.

Field 1
string <date>

Field 1 associated with the order.

Field 2
string

Custom order field value.

Responses

Response samples

Content type
application/json
{ }

Apply Coupon to Order

Applies a coupon to an existing order.

The supplied coupon code is validated and applied to the order. After applying the coupon, the order and invoice details are recalculated and the updated order details are returned.

Features

  • Apply a coupon to an existing order.
  • Recalculate the order after applying the coupon.
  • Return the updated order details.
  • Return the updated invoice details.
  • Return coupon savings applied to the order.
  • Return all coupons currently applied to the order.
  • Return updated loyalty information.

Coupon

The coupon query parameter is mandatory.

The coupon value should contain the configured coupon code.

Example:

coupon=TEST6

Multiple coupons can be applied to the same order by calling this endpoint with additional valid coupon codes.

Previously applied coupons remain associated with the order.

Notes

  • The coupon parameter is mandatory.
  • The supplied coupon code is validated before it is applied.
  • Applying a coupon recalculates the order and invoice.
  • The response contains the complete updated order state.
  • The coupons array contains coupons currently applied to the order.
  • item_savings.coupons contains the coupon savings applied to order items.
  • Coupon savings can change when another coupon is applied.
path Parameters
order_id
required
string

Unique identifier of the order.

query Parameters
coupon
required
string

Coupon code to apply to the order.

Example:

TEST6

Responses

Response samples

Content type
application/json
{
  • "causes": [ ],
  • "contact_id": 173,
  • "created_on": "20-08-2026T14:29:20",
  • "cur_status": "New",
  • "direction": "F",
  • "id": "WWDU5805",
  • "invoice": {
    },
  • "invoice_id": 2418,
  • "is_cod": false,
  • "is_stuck": false,
  • "logs": [
    ],
  • "num_items": 1,
  • "on_hold": false,
  • "price": 654.72,
  • "settled": 0,
  • "sno": 11179,
  • "tags": [ ],
  • "total_quantity": 1
}

Process Order Item

Processes an individual item in an order during the current order processing stage.

The endpoint records the processing result for the specified item, including successfully processed quantity and any configured processing causes.

The processing stage must already be claimed for the order before an item can be processed.

Features

  • Process an individual order item.
  • Record successfully processed quantity.
  • Record processing quantities against configured causes.
  • Mark an item as successfully processed.
  • Mark an item with one or more processing causes.
  • Set the COD amount during the delivery stage.
  • Complete the current processing stage after all required items are processed.
  • Automatically update the order status when the processing stage is completed.
  • Mark the order as stuck when processing causes are present.

Processing Parameters

The request accepts only the following query parameters:

  • success - Quantity successfully processed.
  • cause.<id> - Quantity associated with a configured processing cause.
  • amount - COD amount to be set during the delivery stage.

Multiple cause.<id> parameters can be supplied for the same item.

The value of every quantity parameter must be numeric.

Item Processing

When an item ID is supplied, the total quantity specified by success and all cause.<id> parameters must exactly match the quantity ordered for that item.

For example, an item with quantity 5 can be processed as:

success=3&cause.12=2

The total processed quantity is 5.

If the processed quantity does not match the ordered quantity, the request is rejected.

Processing Causes

Processing causes are configured for the current processing stage.

Each cause.<id> parameter must reference a valid cause configured for the current processing stage.

When a non-zero cause quantity is recorded, the corresponding cause is associated with the order and the order is marked as stuck.

Existing causes for the order are preserved while processing additional items.

Complete Processing Stage

Use _ as the item_id to indicate that processing of the current stage is complete.

Before completing the stage, the endpoint verifies that all required items have been processed.

For product-processing stages, every order item must have a corresponding processing entry.

If any required item has not been processed, the stage cannot be completed.

When the stage is successfully completed, the order is moved to the next configured status.

COD Amount

The amount parameter can be supplied when processing the delivery stage to set the COD amount for the order.

Example:

amount=500

Notes

  • The order must already be claimed before an item can be processed.
  • success represents successfully processed quantity.
  • cause.<id> represents quantity associated with a specific processing cause.
  • The sum of all processing quantities must match the ordered quantity for the item.
  • cause.<id> must reference a valid cause for the current processing stage.
  • item_id=_ completes the current processing stage.
  • A product-processing stage cannot be completed while any required item remains unprocessed.
  • An order with processing causes is marked as stuck.
  • The processing result is stored against the current processing stage.
  • If the order is already stuck when completing the stage, no further status update is performed.
  • The endpoint returns the updated order information when the processing stage is completed.

Permissions

Any of the following permissions are needed

  • Orders/manage
  • Orders/process
path Parameters
order_id
required
string

Unique identifier of the order.

item_id
required
string

ID of the order item to process.

Use _ to complete the current processing stage after all required items have been processed.

query Parameters
success
number <float>

Quantity successfully processed for the specified item.

The value is recorded against the success processing result.

cause.<id>
number <float>

Quantity associated with a processing cause.

Replace <id> with the configured cause ID for the current processing stage.

Multiple cause.<id> parameters can be supplied when an item has multiple processing causes.

amount
number <float>

COD amount to be set during the delivery processing stage.

Responses

Response samples

Content type
application/json
{
  • "contact_id": 85,
  • "customer_name": "Prem Kumar",
  • "date": "20-08-2026T11:23:07",
  • "direction": "F",
  • "new_status": "Shipped",
  • "num_items": 2,
  • "order_id": "NZRL6451",
  • "price": 120000,
  • "settled": 50000
}

Update order items

Updates the items of an existing e-commerce order.

This endpoint allows the quantity, price, and discount of existing order items to be updated.

Features

  • Update the quantity of an existing order item.
  • Update the price of an existing order item.
  • Update the discount of an existing order item.
  • Add a new item to an existing order.
  • Remove an item by setting its quantity to zero.
path Parameters
order_id
required
string

Unique ID of the order to update.

Request Body schema: application/json
required
required
Array of objects

List of order items to add or update.

Responses

Request samples

Content type
application/json
{
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "addons": [
    ],
  • "app_id": 3,
  • "bill_number": "__p__",
  • "bill_type": "sale",
  • "cancelled": false,
  • "contact_addr_id": 12,
  • "contact_id": 70,
  • "contact_name": "Karthik Kumar",
  • "contact_wallet": 500,
  • "coupons": [ ],
  • "created": "20-08-2026T11:23:07",
  • "created_by": "prem@mail.com",
  • "documents": { },
  • "due_date": "30-08-2026T11:23:07",
  • "item_savings": {
    },
  • "items": [
    ],
  • "last_updated": "20-08-2026T11:39:07",
  • "last_updated_by": "prem@mail.com",
  • "loyalty": [ ],
  • "loyalty_last_updated": null,
  • "loyalty_revised": false,
  • "manual_disc": {
    },
  • "offers": [ ],
  • "params": [
    ],
  • "settled": null,
  • "settlements": [ ],
  • "shipping_addr_id": 18,
  • "total": 1425,
  • "total_logic": "sum(price(items())) + {{Shipping Tax}}"
}

Update Order Parameters

Updates custom parameters associated with an existing order.

Order parameters are supplied as query parameters using the param. prefix. Each parameter name after the prefix is stored against the order.

Features

  • Update custom parameters associated with an order.
  • Support multiple parameters in a single request.
  • Support comma-separated values for multi-choice parameters.
  • Return whether the order requires recalculation.

Parameter Format

Order parameters must use the following format:

param.<parameter_name>=<value>

Multiple parameters can be supplied in the same request.

Example:

param.student type=Foundation

param.batch=11

param.multichoice=C2,C1,C3

The param. prefix identifies the parameter as an order parameter.

Notes

  • Parameter names after the param. prefix are dynamic.
  • Multiple param.* parameters can be supplied in the same request.
  • A comma-separated value can be used for parameters that accept multiple selections.
  • The response indicates whether the order requires recalculation.
  • The endpoint updates the parameters of the specified existing order.
path Parameters
order_id
required
string

Unique identifier of the order.

Responses

Response samples

Content type
application/json
{
  • "recalc": false
}

Create Order Return

Creates a return for one or more items from an existing order.

The endpoint supports both return-only requests and exchanges.

Features

  • Return one or more items from an existing order.
  • Specify the quantity being returned.
  • Provide a reason for the return.
  • Optionally exchange a returned item for another item.
  • Return the ID of the newly created return order.
  • Return the ID of the newly created exchange order when an exchange is requested.

Item IDs

Each return item uses the following fields:

  • id - ID of the item that was originally purchased in the order and is being returned.
  • quantity - Quantity of the purchased item being returned.
  • reason - Reason for returning the item.
  • exch_id - ID of the new item requested as an exchange.
  • exch_quantity - Quantity of the new item requested for exchange.

Return Only

A return can be created without an exchange by providing only the original item ID, return quantity, and reason.

Example:

/aalam/ecomm/order/HIFU7298/returns

{
  "items": [
    {
      "id": 267,
      "quantity": 1,
      "reason": "Damaged"
    }
  ]
}

Exchange

When an exchange is requested, exch_id identifies the newly selected item and exch_quantity specifies the quantity required.

Example:

{
  "items": [
    {
      "id": 294,
      "quantity": 1,
      "exch_id": 13,
      "exch_quantity": 1
    }
  ]
}

Notes

  • id always refers to an item from the original order.
  • reason describes why the original item is being returned.
  • exch_id and exch_quantity are optional.
  • If no exchange fields are supplied, only a return order is created.
  • When exchange fields are supplied, an exchange order is also created.
  • At least one return item must be supplied.
path Parameters
order_id
required
string

Unique identifier of the original order.

Request Body schema: application/json
required
required
Array of objects non-empty

Items from the original order to be returned.

Responses

Request samples

Content type
application/json
Example
{
  • "items": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "return_id": "R-RLIH6038"
}

Split Order

Splits an existing order into multiple separate orders.

The items from the original order can be distributed between multiple split orders. Each split order can also be assigned an order processing status.

Features

  • Split one order into multiple orders.
  • Distribute products between the resulting orders.
  • Specify the quantity of each item in each split order.
  • Set the processing status for each split order.
  • Split an already split order again.
  • Support multiple levels of order splitting.

Split Items

The id in each item refers to the item ID from the original order being split.

quantity specifies how much of that item should be included in the particular split order.

All quantities from the original order must be accounted for across the split plan.

Split Status

Each split entry must contain a status.

The status must be a valid order processing status for the direction of the parent order.

Processing statuses are configured by the administrator and are not restricted to a predefined enum.

Multiple Splits

An order can be split into multiple orders.

A previously split order can also be split again, provided it has not reached the shipped stage.

This allows multiple levels of splitting.

For example:

  • NZRL6451 can be split into NZRL6451-1 and NZRL6451-2.
  • NZRL6451-2 can subsequently be split into additional child orders.
  • The resulting order numbers continue the split relationship with the original order.

Notes

  • At least two split entries must be supplied.
  • Every split entry must contain status and items.
  • The split plan must account for all items and their quantities from the order.
  • An item quantity cannot exceed the quantity available in the parent order.
  • The order cannot be split after it has reached the shipped stage.
  • An order that is already split cannot be split again at the same split stage.
  • The parent order must exist.
  • The split status must be valid for the parent order direction.

Permissions

Orders/manage is needed

path Parameters
order_id
required
string

Unique identifier of the order to be split.

Request Body schema: application/json
required
required
Array of objects >= 2 items

List of orders to create from the parent order.

Responses

Request samples

Content type
application/json
{
  • "split": [
    ]
}

Response samples

Content type
application/json
Example
[
  • "NZRL6451-3",
  • "NZRL6451-2"
]

Get Orders

Retrieves orders matching the supplied filters.

Orders can be filtered, sorted, limited, or downloaded based on the supplied query parameters.

Features

  • Retrieve orders using multiple filter criteria.
  • Filter orders by status, direction, customer, and order state.
  • Filter orders by stuck or on-hold state.
  • Sort orders using multiple supported fields.
  • Limit the number of returned orders.
  • Select specific response fields.
  • Request order summary information.
  • Download order data with optional address and item details.

Order Status

The status value is not restricted to a predefined enum.

Order processing statuses are configured by the administrator and can differ between installations.

  • Configured processing statuses can be used for both forward (F) and reverse (R) order flows.
  • Cancelled is a predefined status and is available for both forward and reverse orders.
  • Abandoned is a predefined status and is available only for forward (F) orders.
  • If an unavailable status is supplied, an empty array is returned.

Direction

The direction parameter identifies the order flow.

  • F - Forward order.
  • R - Reverse order.

Abandoned status is valid only for F direction.

Notes

  • Multiple sorting expressions can be supplied as a comma-separated list.
  • Invalid filter fields or filter syntax result in a 400 Bad Request response.
  • Invalid sort fields or sort methods result in a 400 Bad Request response.
  • summary is not available for customer users.
  • When download is requested, pagination, field selection, and sorting parameters are removed.
  • address controls whether address details are included in downloaded data.
  • items controls whether item details are included in downloaded data.
query Parameters
status
string

Filter orders by order status.

Status values are configured by the administrator and are not restricted to a predefined enum.

Cancelled is available for both F and R directions.

Abandoned is available only for F direction.

If the supplied status is not available in the configured order processing flow, an empty array is returned.

direction
string
Enum: "F" "R"

Filter orders by direction.

  • F - Forward order.
  • R - Reverse order.
contact
string

Filter orders by customer contact ID.

Multiple contact IDs can be supplied as a comma-separated value.

For customer users, this filter is automatically derived from the authenticated contact.

is_stuck
string

Filter orders by stuck state.

Use 1 to retrieve stuck orders and 0 to retrieve orders that are not stuck.

on_hold
string

Filter orders by on-hold state.

Use 1 to retrieve orders on hold and 0 to retrieve orders that are not on hold.

fields
string

Comma-separated list of fields to include in the response.

limit
integer

Maximum number of orders to return.

sort
string^(id|price|created_date|num_items|total_quant...

Comma-separated sorting expressions.

Each expression must use the format <field>.<asc|desc>.

Supported fields:

  • id
  • price
  • created_date
  • num_items
  • total_quantity
  • sno
  • priority
summary
string

Returns order summary information.

This parameter is not available for customer users.

download
string

Requests the orders as downloadable data.

When specified, fields, limit, and sort parameters are ignored.

address
string
Enum: "0" "1" "true" "false"

When downloading orders, controls whether address details are included.

items
string
Enum: "0" "1" "true" "false"

When downloading orders, controls whether item details are included.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Order

Creates a new forward order for a customer.

Internal users can create an order by providing the customer contact ID and the items to be ordered.

Customer users can create an order using the items available in their cart.

Features

  • Create a new forward (F) order.
  • Create an order with multiple items.
  • Specify item quantity, price, and discount.
  • Create an order from the authenticated customer's cart.
  • Validate the supplied customer and item IDs.
  • Generate a unique order number automatically.
  • Create an invoice automatically for the new order.
  • Return the newly created order ID.

Notes

  • Internal users must be administrators or have Orders manage permission.
  • contact_id is required when an internal user creates an order.
  • items is required when an internal user creates an order.
  • Customer users use their authenticated contact automatically.
  • Customer users must have items available in their cart.
  • All supplied item IDs must be valid.
  • A unique order number is generated automatically.
  • An invoice is automatically created for the new order.
  • The generated order number is stored in the invoice as Order Id.
  • The endpoint creates only forward (F) orders.
Request Body schema: application/json
required
contact_id
integer

Customer contact ID for whom the order is created.

Required when an internal user creates the order.

Customer users use their authenticated contact automatically.

required
Array of objects non-empty

Items to be included in the order.

Responses

Request samples

Content type
application/json
{
  • "contact_id": 70,
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "NZRL6451"
}

Shipments

API related to the Shipments

Cancel Shipment

Cancels an existing shipment associated with an order.

The endpoint retrieves the shipping service associated with the order and invokes that service's configured shipment cancellation API.

Features

  • Cancel an existing shipment.
  • Identify the shipping service from the order shipment details.
  • Use the shipping service's configured cancellation API.
  • Pass the order ID and order direction to the shipping service.
  • Validate the response from the shipping service.

Shipment Validation

The order must already have shipping details.

If the order has not yet been shipped, the request is rejected.

The shipping service code is obtained from the existing shipment details. If the service code cannot be determined, the request is rejected.

Shipping Service

The shipping service associated with the order must provide a cancelshipment API.

If the configured shipping service does not provide a shipment cancellation API, the request is rejected.

The cancellation request sent to the shipping service contains:

  • order_id - The order identifier.
  • direction - The order direction (F or R).

Notes

  • This endpoint uses the POST method.
  • order_id identifies the order whose shipment is being cancelled.
  • The shipping service is determined from the existing shipment details.
  • The endpoint does not require the shipping service code as a request parameter.
  • The cancellation operation is performed by the shipping service configured for the order.
  • A non-200 response from the shipping service results in a 500 Internal Server Error.

Permissions

Orders/manage is needed

path Parameters
order_id
required
string

Unique identifier of the order whose shipment is being cancelled.

Responses

Response samples

Content type
application/json
{
  • "order_id": "R-LVGP8541",
  • "status": "Shipment Cancelled"
}

Track Shipment

Retrieves tracking information for an existing shipment associated with an order.

The endpoint validates access to the order, verifies that the order has already been shipped, identifies the shipping service used for the shipment, and retrieves the tracking service configured for that shipping provider.

Features

  • Track an existing order shipment.
  • Support tracking for internal users.
  • Validate that the order has already been shipped.
  • Identify the shipping service associated with the order.
  • Use the configured tracking API of the shipping service.

Shipment Validation

The order must already have shipping details.

If the order has not yet been shipped, the request is rejected.

The shipping service code is obtained from the existing shipment details. A valid shipping service code is required before tracking information can be retrieved.

Tracking Service

The configured shipping service must provide a track API.

If a tracking API is not available for the shipping service, the request is rejected.

Notes

  • order_id identifies the order whose shipment is being tracked.
  • The endpoint does not create or modify a shipment.
  • The shipping service is determined from the existing shipment details.
  • Tracking is performed using the shipping service's configured tracking API.
  • Internal users require administrator access or Orders manage permission.
path Parameters
order_id
required
string

Unique identifier of the order whose shipment is being tracked.

Responses

Response samples

Content type
application/json
{
  • "order_id": "R-LVGP8541",
  • "service": "aalam/bluedart",
  • "status": "In Transit",
  • "tracking_number": "AWB123456789",
  • "tracking_url": null
}

Create Shipment

Creates a shipment for an existing order using the specified shipping service.

The shipping service is selected using the mandatory service query parameter. The package dimensions and serviceability check can also be supplied as query parameters.

Features

  • Create a shipment for an existing order.
  • Select the shipping service for the shipment.
  • Check destination serviceability before shipment creation.
  • Provide package length, breadth, and height.
  • Support different configured shipping providers.
  • Update the order through the selected shipping service.

Shipping Service

The service parameter identifies the configured shipping provider to use for shipment creation.

Supported services depend on the shipping providers configured for the installation.

Examples:

  • aalam/bluedart
  • aalam/shiprocket
  • aalam/shipfast

Example using Blue Dart:

/aalam/ecomm/order/TELN2098/shipment?service=aalam%2Fbluedart&check=true&length=80&breadth=30&height=40

Example using Shiprocket:

/aalam/ecomm/order/TELN2098/shipment?service=aalam%2Fshiprocket&check=true&length=80&breadth=30&height=40

Serviceability Check

The check parameter can be used to check whether the destination is serviceable by the selected shipping service.

If the destination pincode is not serviceable, the request returns 406 Not Acceptable.

Package Dimensions

Package dimensions can be supplied using:

  • length
  • breadth
  • height

Example:

length=80&breadth=30&height=40

Shipment Validation

Before creating a shipment:

  • The order must have an address assigned.
  • The order must be in a shippable processing stage.
  • The requested shipping service must be configured.
  • The selected shipping service must be able to process the destination.

Order Status

After shipment creation, the order can contain shipping details such as the cargo company, AWB number, and expected delivery date.

Example:

/aalam/ecomm/order/TELN2098?status=Shipped&Cargo+Company=comp&AWB+No=12345&Expected+DOD=18-08-2026

Notes

  • service is mandatory.
  • Shipping services are installation-dependent.
  • check is optional.
  • Package dimensions are optional.
  • A customer address must be available.
  • The order must be in a valid stage for shipment creation.
  • Remote applications use the remote shipment creation flow.
  • Internal users must be administrators or have Orders manage permission.
path Parameters
order_id
required
string

Unique identifier of the order for which the shipment is created.

query Parameters
service
required
string

Configured shipping service used to create the shipment.

Examples:

  • aalam/bluedart
  • aalam/shiprocket
  • aalam/shipfast
check
boolean

Checks whether the destination is serviceable by the selected shipping service.

length
number <float>

Package length.

breadth
number <float>

Package breadth.

height
number <float>

Package height.

Responses

Response samples

Content type
application/json
{ }

Check Shipment Serviceability

Checks the serviceability of available shipping services for an existing order.

The API evaluates the order destination against the configured shipping services and returns whether each service can serve the order.

Features

  • Check shipping serviceability for an order.
  • Return all configured shipping services.
  • Identify which shipping services can serve the destination.
  • Return the shipping service code and display name.
  • Return the shipping service icon.
  • Return an optional shipping service description.

Serviceability Result

Each configured shipping service is returned with a can_serve value.

  • true means the shipping service can serve the order destination.
  • false means the shipping service cannot serve the order destination.

Example:

  • aalam/bluedart can serve the destination.
  • aalam/shipfast cannot serve the destination.
  • aalam/shiprocket cannot serve the destination.

Notes

  • The order is identified using order_id.
  • No shipping service needs to be specified in the request.
  • The API checks all configured shipping services.
  • The result can be used to select a shipping service before creating a shipment.

Permissions

Orders/manage is needed

path Parameters
order_id
required
string

Unique identifier of the order for which shipping serviceability is checked.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

Mark Shipment as Cancelled

Marks an existing shipment as cancelled for an order.

The endpoint first verifies that a shipment has already been created for the order and identifies the shipping service that created the shipment.

Features

  • Validate that the order has an existing shipment.
  • Identify the shipping service associated with the shipment.
  • Ensure that the shipment cancellation request is made by the same shipping service that created the shipment.
  • Reject cancellation requests from a different shipping service.

Shipment Validation

A shipment must already exist for the specified order.

If no shipping details are available, the request is rejected with a 400 Bad Request response.

The shipping service code is obtained from the existing shipment details. If the service code cannot be determined, the request is rejected.

Shipping Service Authorization

The authenticated user or remote shipping service must match the service that originally created the shipment.

A shipment created by one shipping service cannot be acknowledged or cancelled by another shipping service.

Notes

  • The order_id identifies the order whose shipment is being cancelled.
  • The order must already have shipping details.
  • The shipping service code must be available for the existing shipment.
  • Internal users are identified using the authenticated internal user context.
  • Remote shipping services are identified using the authenticated remote service code.
path Parameters
order_id
required
string

Unique identifier of the order whose shipment is being cancelled.

Responses

Response samples

Content type
application/json
{
  • "order_id": "TELN2098",
  • "status": "Shipment Cancelled"
}

Mark Shipment as Delivered

Marks the shipment associated with an order as delivered.

The endpoint validates the shipment action user and the shipping service associated with the order before updating the order status.

Features

  • Mark a shipment as delivered.
  • Support both forward and reverse orders.
  • Validate the authenticated shipment action user.
  • Validate that the request is associated with the shipping service responsible for the order.
  • Automatically select the appropriate delivered status based on the order direction.
  • Preserve additional parameters supplied with the request.
  • Update the order and trigger the corresponding order notifications.

Order Direction

The delivered status is selected automatically based on the order direction.

  • Forward (F) orders are updated to the configured forward delivered status.
  • Reverse (R) orders are updated to the configured reverse delivered status.

The caller does not need to provide the status parameter.

Shipping Service Validation

The authenticated user or remote shipping service must be authorized for the order shipment.

The endpoint validates the order shipper before updating the order. A request from an unauthorized shipping service is rejected.

Notes

  • order_id identifies the order whose shipment is being marked as delivered.
  • The status parameter is set internally by the endpoint.
  • Additional query parameters are passed to the order update operation.
  • The order must exist before it can be updated.
  • The shipment action user must be authorized.
  • The shipping service associated with the order must match the authenticated shipment service.
  • Updating the order can trigger the configured order or return notification flow.
  • For forward orders, the configured order notification is used.
  • For reverse orders, the configured return notification is used.
path Parameters
order_id
required
string

Unique identifier of the order whose shipment is being marked as delivered.

query Parameters
*
string

Additional order parameters to be passed to the order update operation.

The endpoint internally determines and sets the appropriate delivered status based on the order direction.

Responses

Response samples

Content type
application/json
{
  • "amount": 0,
  • "customer_name": "Prem Kumar",
  • "direction": "F",
  • "new_status": "Delivered",
  • "num_items": 1,
  • "order_id": "TELN2098",
  • "price": 680.38,
  • "settled": 0
}

Mark Shipment as Picked

Marks a reverse order shipment as picked.

This endpoint is used after a reverse shipment has been picked from the customer and moves the reverse order to the configured picked status.

Features

  • Mark a reverse order shipment as picked.
  • Validate the requested order before updating it.
  • Validate that the shipment can be processed by the authenticated shipper.
  • Preserve additional order parameters supplied in the request.
  • Update the order status to the configured reverse shipment picked status.

Order Direction

This endpoint applies only to reverse (R) orders.

If the supplied order is a forward (F) order, the endpoint does not perform a status update.

Shipper Validation

The request must be made by an authorized shipment action user.

The shipment shipper is validated using either the authenticated internal user or the remote shipping service associated with the request.

Notes

  • The status parameter is managed internally by the endpoint and is set to the configured reverse shipment picked status.
  • Additional query parameters are passed to the order update operation.
  • The order must exist before it can be marked as picked.
  • The shipment must belong to the authenticated customer or authorized shipping service.
  • This endpoint is intended for reverse shipment processing.
path Parameters
order_id
required
string

Unique identifier of the reverse order whose shipment is being marked as picked.

query Parameters
*
string

Additional order parameters that are passed to the order update operation.

The endpoint internally sets the order status to the configured reverse shipment picked status.

Responses

Response samples

Content type
application/json
{
  • "amount": 0,
  • "customer_name": "Prem Kumar",
  • "direction": "R",
  • "new_status": "Picked",
  • "num_items": 1,
  • "order_id": "R-RLIH6038",
  • "price": 680.38,
  • "settled": 0
}

Mark Shipment as Stuck

Marks a forward order shipment as stuck with a reason.

This endpoint is used when a shipment cannot proceed normally and requires attention or intervention.

Features

  • Mark a forward order shipment as stuck.
  • Record the reason for the shipment being stuck.
  • Validate that the order is currently in the shipped stage.
  • Avoid re-processing an order that is already marked as stuck.

Validation

The reason parameter is mandatory.

The endpoint applies only to forward (F) orders.

The order must currently be in the configured forward shipment stage. Orders in any other stage cannot be marked as stuck.

If the order is already marked as stuck, the operation returns without applying the operation again.

Notes

  • order_id identifies the order whose shipment is being marked as stuck.
  • reason must be supplied as a query parameter.
  • The endpoint does not apply to reverse (R) orders.
  • The order must already be in the shipped state.
  • An already stuck order is not processed again.
path Parameters
order_id
required
string

Unique identifier of the order whose shipment is being marked as stuck.

query Parameters
reason
required
string

Reason why the shipment is being marked as stuck.

Responses

Response samples

Content type
application/json
{
  • "is_stuck": true,
  • "order_id": "TELN2098",
  • "reason": "Shipment delayed"
}

Shipping Services

API related to the Shipping services

Update Shipping Services

Updates the registered shipping services.

The endpoint also supports checking the registered shipping services by supplying the check parameter.

Check Available Shipping Services

When the check parameter is present, the registered shipping services are rechecked.

Example:

/aalam/ecomm/service/shipping?check=1

The response contains the available shipping services.

Each shipping service contains:

  • name - Shipping service name.
  • code - Shipping service code.
  • description - Shipping service description.
  • icon - Shipping service icon path.
  • cancelshipment - Indicates whether shipment cancellation is supported.
  • track - Indicates whether shipment tracking is supported.

Example response:

[ { "name":"Shiprocket", "code":"aalam/shiprocket", "description":null, "icon":"/aalam/shiprocket/r/s/images/icon.png", "cancelshipment":true, "track":true }, { "name":"Shipfast", "code":"aalam/shipfast", "description":null, "icon":"/aalam/shipfast/r/s/images/icon.png", "cancelshipment":true, "track":true } ]

Update Shipping Services

The endpoint is also used for updating the registered shipping service configuration.

The exact update parameters depend on the remaining update logic of the update_shipping_services method.

Permissions

Any of the following permissions are needed

  • Settings/configure
  • Orders/manage
query Parameters
check
string

Rechecks the registered shipping services when this parameter is present.

Example:

/aalam/ecomm/service/shipping?check=1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Register Shipping Service

Registers a shipping service with the ecommerce system.

The shipping service must provide a name and a newshipment API. The service can optionally provide serviceability, tracking, cancellation, icon, and description details.

The shipping service registration requires internal authentication.

Register Shipping Service

Example:

/aalam/ecomm/service/shipping

Example request:

PUT /aalam/ecomm/service/shipping

Example payload:

{"name":"Shiprocket","icon":"/aalam/shiprocket/r/s/images/icon.png","serviceability":"/aalam/shiprocket/serviceability","track":"/aalam/shiprocket/track","cancelshipment":{"method":"POST","url":"/aalam/shiprocket/cancel"},"newshipment":{"method":"PUT","url":"/aalam/shiprocket/newshipment"}}

New Shipment API

The newshipment parameter is mandatory.

It defines the API used to create a new shipment.

The value can be supplied as a URL string.

Example:

"/aalam/shiprocket/newshipment"

A URL can also be supplied as an object with an HTTP method and URL.

Example:

{"method":"PUT","url":"/aalam/shiprocket/newshipment"}

When supplied as a string, the method defaults to GET.

Serviceability API

The serviceability parameter defines the API used to check whether shipping is available.

It can be supplied as a URL string or as an object containing method and url.

Example:

"/aalam/shiprocket/serviceability"

Example:

{"method":"POST","url":"/aalam/shiprocket/serviceability"}

When supplied as a string, the method defaults to GET.

Tracking API

The track parameter defines the API used to track a shipment.

It can be supplied as a URL string or as an object containing method and url.

Example:

"/aalam/shiprocket/track"

When supplied as a string, the method defaults to GET.

Cancel Shipment API

The cancelshipment parameter defines the API used to cancel a shipment.

It can be supplied as a URL string or as an object containing method and url.

Example:

{"method":"POST","url":"/aalam/shiprocket/cancel"}

When supplied as a string, the method defaults to GET.

Icon

The icon parameter can contain the URL or path of the shipping service icon.

Example:

"/aalam/shiprocket/r/s/images/icon.png"

Description

The description parameter can contain a description of the shipping service.

Permissions

  • Allowed for all internal applications
query Parameters
name
required
string

Name of the shipping service.

string or object

API used to check shipping serviceability.

Can be a URL string or an object containing method and url.

string or object

API used for shipment tracking.

Can be a URL string or an object containing method and url.

required
string or object

API used to create a new shipment.

This parameter is mandatory.

Can be a URL string or an object containing method and url.

string or object

API used to cancel a shipment.

Can be a URL string or an object containing method and url.

icon
string

URL or path of the shipping service icon.

description
string

Description of the shipping service.

Request Body schema: application/json
optional
string or object
description
string

Description of the shipping service.

icon
string

URL or path of the shipping service icon.

name
required
string

Name of the shipping service.

required
string or object
string or object
string or object

Responses

Request samples

Content type
application/json
Example
{
  • "cancelshipment": {
    },
  • "icon": "/aalam/shiprocket/r/s/images/icon.png",
  • "name": "Shiprocket",
  • "newshipment": {
    },
  • "serviceability": "/aalam/shiprocket/serviceability",
  • "track": "/aalam/shiprocket/track"
}

Response samples

Content type
{
  • "message": "string"
}

Shipping

API related to the Shipping

Get Shipping Properties

Returns shipping properties for the requested object.

The obj path parameter determines the type of shipping property being requested.

Supported object types are:

  • default - Returns the default shipping properties.
  • item_type - Returns shipping properties for one or more item types.
  • boxes - Returns the configured shipping boxes.

Default Shipping Properties

Use default as the obj and _ as the obj_id.

Example:

/aalam/ecomm/shipping_properties/default/_

Example response:

{"weight":500.0,"ship_estimate":3,"restrict_regions":null,"restrict_returns":null,"restrict_exchanges":[14,15,17,18],"return_due_days":"5"}

The restrict_regions, restrict_returns, and restrict_exchanges values contain shipping region IDs.

Item Type Shipping Properties

Use item_type as the obj.

One or more item type IDs can be provided as a comma-separated value in obj_id.

Example:

/aalam/ecomm/shipping_properties/item_type/1,2,3,4,5

When multiple item type IDs are supplied, the response is an array containing the ID and shipping properties of each item type.

Example response:

[ {"id":1,"props":{"weight":502.0,"ship_estimate":3,"restrict_regions":null,"restrict_returns":null,"restrict_exchanges":null,"return_due_days":null}}, {"id":2,"props":{}}, {"id":3,"props":{"weight":900.0,"ship_estimate":null,"restrict_regions":null,"restrict_returns":null,"restrict_exchanges":null,"return_due_days":null}} ]

If no shipping properties are configured for an item type, the props object is returned as an empty object.

Shipping Boxes

Use boxes as the obj and * as the obj_id.

Example:

/aalam/ecomm/shipping_properties/boxes/*

Example response:

[ {"name":"packaging box","l":100.0,"b":40.0,"h":50.0}, {"name":"return delivery","l":80.0,"b":30.0,"h":40.0} ]

The l, b, and h values represent the length, breadth, and height of the shipping box.

Permissions

Settings/configure is needed

path Parameters
obj
required
string

Type of shipping property to retrieve.

Supported values:

  • default
  • item_type
  • boxes
obj_id
required
string

Identifier for the requested shipping property.

For default, use _.

For item_type, provide one or more comma-separated item type IDs.

For boxes, use *.

Responses

Response samples

Content type
application/json
[ ]

Create or Update Shipping Properties

Creates or updates shipping properties for the specified object.

The shipping properties can be updated for an item, item type, the default shipping configuration, or a shipping box.

Item Shipping Properties

Use item as the obj and provide the item ID as obj_id.

Example:

/aalam/ecomm/shipping_properties/item/9?return_due_days=7&restrict_regions=14%2C2&restrict_returns=19%2C3

The following shipping properties can be configured:

  • weight - Item weight.
  • ship_estimate - Shipping estimate.
  • restrict_regions - Shipping region IDs where shipping is restricted.
  • restrict_returns - Shipping region IDs where returns are restricted.
  • restrict_exchanges - Shipping region IDs where exchanges are restricted.
  • return_due_days - Number of days allowed for return.

Multiple shipping region IDs must be supplied as a comma-separated value.

Example:

/aalam/ecomm/shipping_properties/item/10?restrict_exchanges=14%2C15%2C18

A successful update returns an empty response with HTTP status 200.

Item Type Shipping Properties

Use item_type as the obj and provide the item type ID as obj_id.

Example:

/aalam/ecomm/shipping_properties/item_type/1?ship_estimate=5&restrict_regions=1%2C12%2C14%2C2%2C3

This updates the shipping properties for item type ID 1.

Multiple item type IDs can also be supplied as a comma-separated value.

Example:

/aalam/ecomm/shipping_properties/item_type/1,2,3?ship_estimate=5

The restrict_regions, restrict_returns, and restrict_exchanges values contain comma-separated shipping region IDs.

A successful update returns an empty response with HTTP status 200.

Default Shipping Properties

Use default as the obj and _ as the obj_id.

Example:

/aalam/ecomm/shipping_properties/default/_?restrict_regions=1%2C2

This updates the default shipping properties.

A successful update returns an empty response with HTTP status 200.

Shipping Boxes

Use boxes as the obj and provide the box name as obj_id.

If the specified box already exists, its dimensions are updated.

Example:

/aalam/ecomm/shipping_properties/boxes/return%20delivery?l=60&b=50&h=35

The following dimensions are supported:

  • l - Box length.
  • b - Box breadth.
  • h - Box height.

If the specified box does not already exist, a new shipping box is created.

Example:

/aalam/ecomm/shipping_properties/boxes/small%20box?l=50&b=30&h=20

Shipping Region IDs

The values supplied for restrict_regions, restrict_returns, and restrict_exchanges are shipping region IDs.

Example:

restrict_regions=14,2

restrict_returns=19,3

restrict_exchanges=14,15,18

Permissions

Settings/configure is needed

path Parameters
obj
required
string
Enum: "default" "item" "item_type" "boxes"

Type of shipping property to create or update.

Supported values:

  • default - Default shipping properties.
  • item - Item shipping properties.
  • item_type - Item type shipping properties.
  • boxes - Shipping box properties.
obj_id
required
string

Identifier of the shipping property.

For default, use _.

For item, provide the item ID.

For item_type, provide one or more item type IDs separated by commas.

For boxes, provide the shipping box name.

query Parameters
weight
number

Item or item type weight.

ship_estimate
integer

Shipping estimate.

restrict_regions
string

Comma-separated shipping region IDs where shipping is restricted.

Example:

14,2

restrict_returns
string

Comma-separated shipping region IDs where returns are restricted.

Example:

19,3

restrict_exchanges
string

Comma-separated shipping region IDs where exchanges are restricted.

Example:

14,15,18

return_due_days
number

Number of days allowed for return.

l
number

Shipping box length.

b
number

Shipping box breadth.

h
number

Shipping box height.

Responses

Response samples

Content type
{
  • "message": "string"
}

Delete Shipping Region

Deletes the specified shipping region.

The shipping region is identified using its region ID.

Delete Shipping Region

Example:

/aalam/ecomm/shipping_region/19

The specified shipping region with ID 19 is deleted.

Permissions

Settings/configure is needed

path Parameters
region_id
required
integer

ID of the shipping region to delete.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Shipping Region

Updates an existing shipping region.

The region_id in the path identifies the shipping region to be updated.

At least one shipping region property must be supplied in the request body.

The following properties can be updated:

  • name - Name of the shipping region.
  • country - Country associated with the shipping region.
  • postcodes - Individual postcodes configured for the shipping region.
  • postcode_ranges - Postcode ranges configured for the shipping region.
  • del_estimate - Minimum and maximum delivery estimate.

All update fields are optional individually, but at least one of the supported fields must be provided.

Update Region Details

The region name, postcode ranges, individual postcodes, and delivery estimate can be updated together.

Example:

/aalam/ecomm/shipping_region/14

Example payload:

{"name":"Australia country","postcode_ranges":[{"name":"","begin":"621000","end":"621999"}],"postcodes":["641004"],"del_estimate":{"min":2,"max":5}}

The postcode_ranges field contains one or more postcode ranges.

Each postcode range contains:

  • name - Name associated with the postcode range.
  • begin - Beginning value of the postcode range.
  • end - Ending value of the postcode range.

The postcodes field contains individual postcodes configured for the shipping region.

The del_estimate field contains the minimum and maximum delivery estimate.

Update Country and Postcode Ranges

The country and postcode ranges can also be updated without updating the other properties.

Example payload:

{"country":"*","postcode_ranges":[{"name":"","begin":"000","end":"111"}]}

The country value identifies the country associated with the shipping region.

The country value can also be * for a region that is not restricted to a specific country.

Required Update Data

At least one of the following fields must be supplied:

  • name
  • postcodes
  • postcode_ranges
  • country
  • del_estimate

If none of these fields are supplied, the API returns 400 Bad Request.

A successful update returns an empty response with HTTP status 200.

Permissions

Settings/configure is needed

path Parameters
region_id
required
integer

Unique identifier of the shipping region to update.

Request Body schema: application/json
required
country
string

Country associated with the shipping region.

Use * when the region is not restricted to a specific country.

object

Delivery estimate configured for the shipping region.

name
string

Name of the shipping region.

Array of objects

Postcode ranges configured for the shipping region.

postcodes
Array of strings

Individual postcodes configured for the shipping region.

Responses

Request samples

Content type
application/json
Example
{
  • "country": "*",
  • "postcode_ranges": [
    ]
}

Response samples

Content type
{
  • "message": "string"
}

Delete Shipping Rule

Deletes an existing shipping rule from the specified shipping region.

Delete Shipping Rule

Example:

/aalam/ecomm/shipping_region/15/rule/3

The shipping rule is identified using the region_id and rule_id path parameters.

Permissions

Settings/configure is needed

path Parameters
region_id
required
integer

ID of the shipping region containing the rule.

rule_id
required
integer

ID of the shipping rule to delete.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Shipping Rule

Updates one or more properties of an existing shipping rule for the specified shipping region.

Update Shipping Rule

Example:

/aalam/ecomm/shipping_region/15/rule/3?to_value=250

The shipping rule is identified using the region_id and rule_id path parameters.

The following parameters can be updated:

  • from_value - Starting value of the shipping rule range.
  • to_value - Ending value of the shipping rule range.
  • amount - Shipping amount applicable to the range.

At least one valid parameter must be supplied.

Example:

/aalam/ecomm/shipping_region/15/rule/3?amount=750

Multiple properties can be updated in the same request.

Example:

/aalam/ecomm/shipping_region/15/rule/3?from_value=150&to_value=250&amount=600

Permissions

Settings/configure is needed

path Parameters
region_id
required
integer

ID of the shipping region containing the rule.

rule_id
required
integer

ID of the shipping rule to update.

query Parameters
from_value
number

Starting value of the shipping rule range.

to_value
number

Ending value of the shipping rule range.

amount
number

Shipping amount applicable to the range.

Responses

Response samples

Content type
{
  • "message": "string"
}

Create Shipping Rule

Creates a new shipping rule for the specified shipping region.

Create Shipping Rule

Example:

/aalam/ecomm/shipping_region/15/rules

Example payload:

{"from_value":100,"to_value":200,"amount":500}

All three fields are mandatory:

  • from_value - Starting value of the shipping rule range.
  • to_value - Ending value of the shipping rule range.
  • amount - Shipping amount applicable to the range.

A successful request creates the shipping rule for the specified region.

Permissions

Settings/configure is needed

path Parameters
region_id
required
integer

ID of the shipping region for which the rule is created.

Request Body schema: application/json
required
amount
required
number

Shipping amount applicable to the range.

from_value
required
number

Starting value of the shipping rule range.

to_value
required
number

Ending value of the shipping rule range.

Responses

Request samples

Content type
application/json
{
  • "amount": 500,
  • "from_value": 100,
  • "to_value": 200
}

Response samples

Content type
{
  • "message": "string"
}

Get Shipping Regions

Returns all shipping regions configured for the e-commerce application.

Each shipping region contains its identifier, name, country, configured postcodes, postcode ranges, shipping rules, and delivery estimate.

The postcodes field contains individual postcodes configured for the shipping region.

The postcode_ranges field contains postcode ranges with their beginning and ending values and an optional name.

The rules field contains the shipping rules configured for the region.

The del_estimate field contains the minimum and maximum delivery estimate when configured.

Example

/aalam/ecomm/shipping_regions

Example response:

[ { "id": 1, "name": "North India", "country": "INDIA", "postcodes": ["600000"], "postcode_ranges": [ { "begin": "000000", "end": "599999", "name": "NO" } ], "rules": [], "del_estimate": { "min": "5", "max": "6" } } ]

Permissions

Settings/configure is needed

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

Create Shipping Region

Creates a new shipping region.

Example:

/aalam/ecomm/shipping_regions

Example payload:

{"name":"chennai","country":"India","del_estimate":{"min":7,"max":10}}

The name and country fields are mandatory.

Postcodes

Individual postcodes can be supplied using the postcodes field.

Example:

{"name":"Tamil Nadu","country":"India","postcodes":["600001","641004"]}

Postcode Ranges

Postcode ranges can be supplied using the postcode_ranges field.

Each postcode range can contain:

  • name - Name of the postcode range.
  • begin - Starting postcode of the range.
  • end - Ending postcode of the range.

Example:

{"name":"South India","country":"India","postcode_ranges":[{"name":"","begin":"600000","end":"699999"}]}

Delivery Estimate

The del_estimate field can contain delivery estimate information.

Example:

{"min":7,"max":10}

A successful request returns the ID of the newly created shipping region.

Permissions

Settings/configure is needed

Request Body schema: application/json
required
country
required
string

Country associated with the shipping region.

object

Delivery estimate configuration.

name
required
string

Name of the shipping region.

Array of objects

Postcode ranges associated with the shipping region.

postcodes
Array of strings

Postcodes associated with the shipping region.

Responses

Request samples

Content type
application/json
Example
{
  • "country": "India",
  • "del_estimate": {
    },
  • "name": "chennai"
}

Response samples

Content type
application/json
{
  • "id": 19
}

Validate Shipping Postal Codes

Validates one or more postal codes against the configured shipping regions.

The postal_code and country parameters are used to determine whether the postal codes are valid for shipping.

Validate Postal Codes

Example:

/aalam/ecomm/shipping_regions/validate?postal_code=600001,641004&country=India

Multiple postal codes can be supplied as a comma-separated value.

When item_id is not supplied, all provided postal codes are validated against the shipping regions for the specified country.

Validate Postal Code for an Item

An item_id can be supplied to validate a postal code for a specific item.

Example:

/aalam/ecomm/shipping_regions/validate?postal_code=600001&country=India&item_id=10

When item_id is supplied, only one postal code can be checked at a time.

Supplying multiple postal codes together with an item_id results in a bad request.

query Parameters
postal_code
required
string

Postal code or comma-separated postal codes to validate.

Multiple postal codes can be supplied when item_id is not provided.

country
required
string

Country associated with the postal code.

item_id
integer

ID of the item for which the postal code should be validated.

When supplied, only one postal code can be checked.

Responses

Response samples

Content type
application/json
{
  • "property1": true,
  • "property2": true
}

Get Shipping Rule Type

Returns the shipping rule type configured for the e-commerce application.

The shipping rule type determines whether shipping rules are based on shipment weight or invoice value.

The response contains a type field.

Weight Based

Returns weight_based when shipping rules are calculated based on shipment weight.

Example:

/aalam/ecomm/shipping_rule_type

Example response:

{"type":"weight_based"}

Invoice Based

Returns invoice_based when shipping rules are calculated based on invoice value.

Example response:

{"type":"invoice_based"}

Permissions

Settings/configure is needed

Responses

Response samples

Content type
application/json
Example
{
  • "type": "invoice_based"
}

Update Shipping Rule Type

Updates the shipping rule type configured for the e-commerce application.

The shipping rule type determines whether shipping rules are calculated based on shipment weight or invoice value.

The type query parameter is mandatory.

Weight Based

Use weight_based to configure shipping rules based on shipment weight.

Example:

/aalam/ecomm/shipping_rule_type?type=weight_based

Invoice Based

Use invoice_based to configure shipping rules based on invoice value.

Example:

/aalam/ecomm/shipping_rule_type?type=invoice_based

Only the following values are accepted:

  • weight_based
  • invoice_based

Any other value results in a 400 Bad Request response.

A successful update returns an empty response with HTTP status 200.

Permissions

Settings/configure is needed

query Parameters
type
required
string
Enum: "weight_based" "invoice_based"

Shipping rule calculation type.

weight_based configures shipping rules based on shipment weight.

invoice_based configures shipping rules based on invoice value.

Responses

Response samples

Content type
{
  • "message": "string"
}

Payments

API related to the Payments

Process Order Payment

Processes a payment for an existing order.

The endpoint validates the payment request based on the authenticated user type, processes the payment against the order, and returns the payment and settlement identifiers.

Features

  • Process a payment for an existing order.
  • Support payments made through the customer wallet.
  • Support payments made by internal users or authorized applications.
  • Support payment gateway payments from internal users.
  • Return the payment ID and settlement ID.
  • Trigger the appropriate payment notification after successful payment processing.
  • Trigger the order confirmation notification when the payment confirms the order.

Payment Authorization

When the pg parameter is supplied, the request must be made by an internal user.

When pg is not supplied:

  • Customer users must use mode=__wallet__.
  • Anonymous users are not allowed to process payments.
  • Internal non-admin users must have Orders payments permission.
  • Administrators are allowed to process payments.

Payment Amount

The amount parameter is mandatory for every payment request.

Payment Mode

The payment mode is taken from the mode parameter.

If mode is not supplied, the payment mode defaults to CASH.

When the payment mode is pg, it is represented as Payment Gateway in the payment notification.

Payment and Settlement IDs

The response contains:

  • id - Payment identifier.
  • settlement_id - Settlement identifier.

If payment_id or settlement_id is supplied in the request, the supplied identifier is used when the corresponding processed identifier is not available.

When either payment_id or settlement_id is explicitly supplied, payment notifications are not triggered.

Notes

  • order_id identifies the order for which the payment is processed.
  • The order must exist before payment processing.
  • Stock locking is removed before payment processing.
  • Customer wallet payments require mode=__wallet__.
  • Anonymous users cannot process payments.
  • The endpoint may trigger a paid or refund event depending on the order direction.
  • A successful payment can also trigger the configured order confirmation event when the payment confirms the order.
path Parameters
order_id
required
string

Unique identifier of the order for which the payment is being processed.

query Parameters
amount
required
number <float>

Amount to be processed for the order payment.

mode
string

Payment mode.

Customer users must use __wallet__.

If omitted, the payment mode defaults to CASH.

Use pg for payment gateway processing when authorized as an internal user.

pg
string

Indicates that the payment is being processed through a payment gateway.

This parameter can be supplied only by internal users.

payment_id
string

Existing payment identifier to associate with the payment processing request.

When supplied, payment notification is not triggered.

settlement_id
string

Existing settlement identifier to associate with the payment processing request.

When supplied, payment notification is not triggered.

Responses

Response samples

Content type
application/json
{
  • "id": "PAY-78421",
  • "settlement_id": "SET-45218"
}

Refund Order Payment

Refunds a payment amount associated with an existing order.

The endpoint validates payment refund permissions, resolves split orders to their parent order, validates the required refund information, and processes the refund against the specified payment or settlement.

Features

  • Refund a payment associated with an order.
  • Support refunds for split orders by resolving the split order to its parent order.
  • Refund a specified amount.
  • Refund using either a settlement ID or payment ID.
  • Associate the refund with a parent order.
  • Trigger the configured refund notification after the refund is processed.

Authorization

The request is allowed when the authenticated user is:

  • An administrator.
  • A client authorized with Orders payments permission.
  • A user with the configured aalam/base/Payments/refund permission.

Users without the required refund permission are rejected.

Split Orders

If the supplied order is a split order, the endpoint resolves the split order to its parent order before processing the refund.

The supplied order_id is still used in the notification parameters.

Refund Validation

The following parameters are mandatory:

  • amount
  • parent_order_id
  • Either settlement_id or payment_id

The refund cannot be processed unless at least one of settlement_id or payment_id is supplied.

Refund Processing

The refund is processed using the specified amount, parent order ID, settlement ID, and payment ID.

After the refund is processed, a refund notification is sent using the order's invoice.

Notes

  • order_id identifies the order associated with the payment being refunded.
  • Split orders are resolved to their parent order for refund processing.
  • amount is converted to a floating-point value before processing.
  • The refund notification uses Payment Gateway as the payment mode.
  • The refund notification is sent asynchronously.
  • The order's invoice ID is used when sending the refund notification.

Permissions

  • Denied for anonymous users (Users / Apps not registered in the settings)
path Parameters
order_id
required
string

Unique identifier of the order whose payment is being refunded.

query Parameters
amount
required
number <float>

Amount to refund.

parent_order_id
required
string

Identifier of the parent order associated with the refund.

settlement_id
string

Settlement identifier associated with the payment to refund.

Either settlement_id or payment_id must be supplied.

payment_id
string

Payment identifier associated with the payment to refund.

Either payment_id or settlement_id must be supplied.

Responses

Response samples

Content type
application/json
{ }

Settings

API related to the settings

Get All Settings

Retrieves all configured settings for the e-commerce application.

The response contains the combined configuration for preorder, COD, item types, UI-related settings, return policy, shipping, reviews, badges, customer tax fields, category groups, and other application settings.

Features

  • Retrieve preorder settings.
  • Retrieve COD settings.
  • Retrieve item type configuration.
  • Retrieve property guide configuration.
  • Retrieve emergency message settings.
  • Retrieve listing add-to-cart settings.
  • Retrieve return policy settings.
  • Retrieve out-of-stock visibility settings.
  • Retrieve customer review settings.
  • Retrieve item badge configuration.
  • Retrieve customer tax fields.
  • Retrieve supported shipping countries.
  • Retrieve category group configuration.
  • Retrieve tax inclusion settings.

Notes

  • The response combines settings from multiple e-commerce configuration areas.
  • item_types.invalids contains item type IDs marked as invalid.
  • item_types.sort_logic contains sorting logic keyed by item type ID.
  • item_types.ordered contains item type IDs in their configured order.
  • restrict_regions contains region IDs where COD is restricted.
  • return_policy contains the configured return policy.
  • item_badges contains badge definitions and their associated item fields.
  • category_group contains the configured category menu hierarchy and item type IDs.
  • shipping_countries contains the countries supported by the configured shipping settings.

Responses

Response samples

Content type
application/json
{
  • "can_review": true,
  • "category_group": { },
  • "cod": {
    },
  • "cust_tax": [
    ],
  • "emergency_msg": "Test message emergence",
  • "item_badges": {
    },
  • "item_types": {
    },
  • "listing_add2cart": "1",
  • "preorder": {
    },
  • "property_guides": { },
  • "pub_url_root": "shop",
  • "return_policy": {
    },
  • "shipping_countries": [
    ],
  • "show_oos": false,
  • "taxes_included": true
}

Get COD Settings

Retrieves the current Cash on Delivery (COD) settings configured for the e-commerce application.

Features

  • Retrieve whether COD is enabled.
  • Retrieve the configured COD charges.
  • Retrieve the minimum order value applicable for COD.
  • Retrieve the maximum order value applicable for COD.

Notes

  • enabled indicates whether COD is currently available.
  • charges represents the configured COD charges.
  • min_order_value represents the minimum order value required for COD when configured.
  • max_order_value represents the maximum order value allowed for COD when configured.
  • min_order_value and max_order_value can be null when no limit is configured.

Responses

Response samples

Content type
application/json
{
  • "charges": 50,
  • "enabled": true,
  • "max_order_value": null,
  • "min_order_value": null
}

Update COD Settings

Updates the Cash on Delivery (COD) settings configured for the e-commerce application.

The endpoint supports updating COD availability, charges, order value limits, and restricted regions.

Features

  • Enable or disable Cash on Delivery.
  • Update COD charges.
  • Set the minimum order value for COD.
  • Set the maximum order value for COD.
  • Add a region to the COD restricted regions list.
  • Remove a region from the COD restricted regions list.

COD Availability

The enable and disable parameters control whether COD is available.

  • enable enables COD.
  • disable disables COD.
  • enable and disable cannot be supplied together.

Restricted Regions

The restrict_regions parameter controls COD restricted regions.

  • A positive region ID adds the region to the restricted region list.
  • -1 removes the specified region from the restricted region list.

Order Value Limits

  • min_order_value sets the minimum order value for COD.
  • max_order_value sets the maximum order value for COD.
  • An empty max_order_value can be supplied to clear the configured maximum value.

Notes

  • At least one supported setting parameter must be supplied.
  • enable and disable are mutually exclusive.
  • Settings can be updated individually without changing the other COD settings.

Permissions

Settings/configure is needed

query Parameters
enable
boolean

Enables Cash on Delivery.

disable
boolean

Disables Cash on Delivery.

charges
number <float>

COD charges to apply to eligible orders.

min_order_value
number <float>

Minimum order value required for COD.

max_order_value
number <float>

Maximum order value allowed for COD.

An empty value can be supplied to remove the configured maximum order value.

restrict_regions
integer

Updates COD restricted regions.

A positive region ID adds the region to the restricted region list.

-1 removes the specified region from the restricted region list.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Customer Taxation Settings

Retrieves the customer taxation fields configured for the e-commerce application.

The response contains the configured customer taxation fields. An empty array is returned when no customer taxation fields are configured.

Responses

Response samples

Content type
application/json
Example
[
  • {
    }
]

Update Customer Taxation Settings

Adds or deletes a customer taxation field configured for the e-commerce application.

The operation is controlled using the action query parameter.

Operations

Use action=add to add a customer taxation field.

Use action=del to delete a customer taxation field.

Add Taxation Field

Example:

/aalam/ecomm/setting/customer-taxation?action=add&key=GSTIN&desc=GST+Number

Delete Taxation Field

Example:

/aalam/ecomm/setting/customer-taxation?action=del&key=GSTIN&desc=GST+Number

Notes

  • action is mandatory and must be either add or del.
  • key is mandatory for both operations.
  • desc is mandatory for both operations.
  • For add, the key and desc values are used to configure the customer taxation field.
  • For del, the key identifies the customer taxation field to be deleted.

Permissions

Settings/configure is needed

query Parameters
action
required
string
Enum: "add" "del"

Operation to perform.

add adds a customer taxation field.

del deletes a customer taxation field.

key
required
string

Key of the customer taxation field.

desc
required
string

Description of the customer taxation field.

Responses

Response samples

Content type
{
  • "message": "string"
}

Remove Invalid Item Type

Removes an item type from the invalid item type configuration.

Features

  • Remove an item type from the invalid item type list.
  • Identify the item type using its type ID.

Notes

  • The type_id path parameter identifies the item type to remove.
  • The item type ID must be a valid item type identifier.
  • Removing an item type from this list does not delete the item type itself.

Permissions

Settings/configure is needed

path Parameters
type_id
required
integer

ID of the item type to remove from the invalid item type list.

Responses

Response samples

Content type
{
  • "message": "string"
}

Add Invalid Item Types

Marks one or more item types as invalid for the e-commerce application.

The type_ids field contains the item type IDs that should be added to the invalid item type configuration.

Features

  • Mark an item type as invalid.
  • Mark multiple item types as invalid in a single request.
  • Update the invalid item type configuration using item type IDs.

Notes

  • The type_ids field is mandatory.
  • type_ids must be an array of item type IDs.
  • Each value in type_ids represents an item type ID.
  • The supplied item type IDs are added to the invalid item type configuration.

Permissions

Settings/configure is needed

Request Body schema: application/json
required
type_ids
required
Array of integers non-empty

Array of item type IDs to mark as invalid.

Responses

Request samples

Content type
application/json
{
  • "type_ids": [
    ]
}

Response samples

Content type
{
  • "message": "string"
}

Get Item Badges Settings

Returns the item badge configuration used by the e-commerce application.

The response contains badge definitions, badge groups, property configurations, and item fields used by badge conditions.

Responses

Response samples

Content type
application/json
{
  • "badges": [
    ],
  • "groups": [ ],
  • "item_fields": [
    ],
  • "props": { }
}

Create or Update Item Badge

Creates a new item badge or updates an existing item badge.

Use _ as the badge_name when creating a new badge. Use the existing badge name when updating a badge.

The nature parameter must be either badge or badgegrp. Use badge for item badge operations.

Create New Badge

Example:

/aalam/ecomm/setting/item_badges/_?nature=badge

A new badge must contain a unique name.

Example payload:

{"name":"Suggested badge","type":"text","status":"active","text":{"value":"Suggested","color":"rgba(15, 15, 15, 1)","background":"rgba(7, 153, 5, 1)","padding":null,"border":null,"border-radius":null,"font-size":null,"font-weight":null},"priority":0,"pos":{"left":"0%","top":"0%"}}

Update Existing Badge

Pass the existing badge name in the path.

Example:

/aalam/ecomm/setting/item_badges/New%20arrivals?nature=badge

Example payload:

{"conditions":[{"param":"launch_date","field":"days_till_now","value":4,"op":"<="},{"param":"sale_price","op":">=","value":100}],"pos":{"left":"0%","top":"0%"}}

Badge Conditions

Multiple conditions can be configured for a badge.

Each condition can contain:

  • param - Item parameter used by the condition.
  • field - Optional field used for evaluating the parameter.
  • value - Value used for comparison.
  • op - Comparison operator.

Example:

{"param":"sale_price","op":">=","value":100}

Multiple conditions can be supplied:

{"conditions":[{"param":"launch_date","field":"days_till_now","value":4,"op":"<="},{"param":"sale_price","op":">=","value":100}]}

Badge Text

Text badges can contain the following display properties:

  • value - Text displayed in the badge.
  • color - Text color.
  • background - Badge background color.
  • padding - Badge padding.
  • border - Badge border.
  • border-radius - Badge border radius.
  • font-size - Badge font size.
  • font-weight - Badge font weight.

Example:

{"value":"Suggested","color":"rgba(15, 15, 15, 1)","background":"rgba(7, 153, 5, 1)","padding":null,"border":null,"border-radius":null,"font-size":null,"font-weight":null}

Badge Position

The pos object defines the badge position.

Example:

{"left":"0%","top":"0%"}

Badge Priority

The priority field controls the display priority of the badge.

Badge Status

The status field defines the current badge status.

Permissions

Settings/configure is needed

path Parameters
badge_name
required
string

Name of the badge.

Use _ when creating a new badge.

query Parameters
nature
string
Default: "badge"
Enum: "badge" "badgegrp"

Specifies whether the operation is for a badge or badge group.

Use badge for item badge operations.

Request Body schema: application/json
optional
Array of objects

Conditions used to determine badge visibility.

name
string

Name of the badge.

object

Position of the badge.

priority
integer

Display priority of the badge.

status
string

Badge status.

object

Text badge configuration.

type
string

Badge display type.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "Suggested badge",
  • "pos": {
    },
  • "priority": 0,
  • "status": "active",
  • "text": {
    },
  • "type": "text"
}

Response samples

Content type
{
  • "message": "string"
}

Update Item Type Sort Logic

Updates the sorting logic configured for an item type.

The item type is identified by its type ID, and the sorting logic is supplied using the value query parameter.

Features

  • Update the sorting logic for an item type.
  • Support sorting by item type ID.
  • Support sorting by sale price.
  • Support sorting by sale discount.
  • Support sorting using the configured item property order.

Supported Sort Logic

The value parameter supports the following values:

  • id.asc
  • id.desc
  • sale_price.asc
  • sale_price.desc
  • sale_discount.desc
  • prop.__eorder__.asc

Notes

  • The type_id path parameter identifies the item type.
  • The value query parameter is mandatory.
  • Only the supported sort logic values can be configured.
  • A successful update returns an empty response.

Permissions

Settings/configure is needed

path Parameters
type_id
required
integer

ID of the item type whose sorting logic is updated.

query Parameters
value
required
string
Enum: "id.asc" "id.desc" "sale_price.asc" "sale_price.desc" "sale_discount.desc" "prop.__eorder__.asc"

Sorting logic to apply to the item type.

Supported values are:

  • id.asc
  • id.desc
  • sale_price.asc
  • sale_price.desc
  • sale_discount.desc
  • prop.__eorder__.asc

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Item Type Settings

Retrieves the configured item type settings used by the e-commerce application.

The response contains item type IDs grouped according to their configuration state.

Features

  • Retrieve invalid item type IDs.
  • Retrieve item type sorting configuration.
  • Retrieve the configured item type ordering.
  • Return item type IDs used by the e-commerce settings.

Response Fields

  • invalids contains item type IDs that are currently marked as invalid.
  • sort_logic contains sorting rules configured for item types, keyed by item type ID.
  • ordered contains item type IDs in their configured display order.

Notes

  • The values returned by invalids and ordered are item type IDs.
  • sort_logic keys represent item type IDs.
  • Sorting rules may differ between item types.
  • The returned configuration can vary between installations.

Responses

Response samples

Content type
application/json
{
  • "invalids": [
    ],
  • "ordered": [
    ],
  • "sort_logic": {
    }
}

Update JS Plugin

Creates, updates, or deletes a JavaScript plugin configured for the e-commerce application.

The plugin is identified by plugin_name in the URL and its JavaScript code is supplied through the code field in the request body.

Features

  • Create a new JavaScript plugin.
  • Update an existing JavaScript plugin.
  • Delete an existing JavaScript plugin.
  • Store JavaScript code associated with a plugin name.

Plugin Operations

  • A non-empty code value creates or updates the plugin.
  • An empty code value removes the plugin.

Notes

  • plugin_name identifies the plugin configuration key.
  • code is mandatory in the request body.
  • An empty code value is used to delete the plugin.
  • The plugin name can contain spaces and other URL-encoded characters.

Permissions

Settings/configure is needed

path Parameters
plugin_name
required
string

Name of the JavaScript plugin to create, update, or delete.

Request Body schema: application/json
required
code
required
string

JavaScript code associated with the plugin.

A non-empty value creates or updates the plugin.

An empty value deletes the plugin.

Responses

Request samples

Content type
application/json
Example
{
  • "code": "<script>let v=4</script>"
}

Response samples

Content type
{
  • "message": "string"
}

Get All JS Plugins

Retrieves all JavaScript plugins configured for the e-commerce application.

Each plugin is returned as a key-value pair containing the plugin identifier and its configured JavaScript source.

Features

  • Retrieve all configured JavaScript plugins.
  • Return each plugin using its configured identifier.
  • Return the JavaScript source associated with each plugin.

Notes

  • The response contains a dynamic set of JavaScript plugins.
  • Plugin names are used as response object keys.
  • Plugin values contain the configured JavaScript source, typically as a <script> element.
  • The configured plugin set can differ between installations.

Responses

Response samples

Content type
application/json
{
  • "coupon": "<script src=\"/aalam/site/h/1/coupon.js\"></script>",
  • "productyoumaylike": "<script src=\"/aalam/site/h/1/Productsyoumaylike.js\"></script>",
  • "profileandaddresscomponent": "3<script src=\"/aalam/site/h/3/ProfileAndAddressComponent.js\"></script>"
}

Get Navigation Menu

Retrieves the navigation menu configuration for the e-commerce application.

The navigation menu is returned as a hierarchical list. Menu entries can contain nested menus, item types, collections, links, and filters.

Navigation Entry Types

  • menu - A menu entry that can contain nested entries.
  • type - Associates an item type with the menu.
  • collection - Links to a configured product collection.
  • link - Configures a custom navigation link.
  • fltr - Configures a navigation filter.

Notes

  • Menu entries can contain nested obj arrays.
  • A menu can contain other menus recursively.
  • type values identify configured item type IDs.
  • collection entries contain a collection name and filtering criteria.
  • link entries contain a display name and URL.
  • fltr entries contain a display name and filter criteria.
  • The navigation structure can vary between installations.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Update Navigation Menu

Updates the navigation menu configuration for the specified menu group.

Navigation entries are supplied as numbered query parameters. The number determines the position of the entry in the navigation menu.

Supported Entry Types

  • type - Adds an item type to the menu.
  • menu - Adds a nested menu.
  • collection - Adds a product collection.
  • fltr - Adds a filter entry.
  • link - Adds a custom navigation link.

Entry Format

Each navigation entry uses the following format:

<position>.<entry_type>=<value>

Examples:

1.type=10

2.menu=Featured

3.collection=[New Arrivals](new-arrivals)

4.fltr=[Sale Items](type_id=15)

5.link=[Contact Us](contact)

The numeric position determines the order in which the entries appear in the navigation menu.

Nested Menus

Menus can contain multiple levels of nested menus.

For example, a menu can contain another menu, which can contain another nested menu:

1.menu=Products

2.menu=Categories

3.menu=Featured

When updating a nested menu, use the parent parameter to identify its immediate parent menu.

Example:

1.type=10&2.type=15&parent=Products

A deeper nested menu can be updated by specifying its immediate parent:

1.type=20&2.collection=[New Arrivals](new-arrivals)&parent=Categories

Another level can be configured below that menu:

1.type=25&2.type=30&parent=Featured

This allows navigation menus to contain multiple nested levels.

Multiple Entry Types

A single menu can contain different types of entries.

Example:

1.type=10&2.type=15&3.menu=Categories&4.collection=[New Arrivals](new-arrivals)&5.fltr=[Sale Items](type_id=15)&6.link=[Contact Us](contact)

A nested menu can also contain multiple entry types:

1.type=20&2.type=25&3.menu=Featured&4.collection=[Latest Products](latest-products)&5.fltr=[Popular Items](type_id=20)&parent=Categories

Notes

  • group_name identifies the navigation menu group being updated.
  • The numeric prefix determines the position of each navigation entry.
  • Multiple navigation entries can be supplied in one request.
  • parent identifies the immediate parent menu when updating a nested menu.
  • Nested menus can contain further nested menus.
  • type values represent configured item type IDs.
  • Collection, filter, and link entries can contain a display name and target value.

Permissions

Settings/configure is needed

path Parameters
group_name
required
string

Name of the navigation menu group to update.

query Parameters
parent
string

Name of the immediate parent menu when updating a nested menu.

<position>.<entry_type>
string

Navigation entry to add or update.

<position> determines the position of the entry.

<entry_type> can be one of:

  • type
  • menu
  • collection
  • fltr
  • link

Examples:

1.type=10

2.menu=Featured

3.collection=[New Arrivals](new-arrivals)

4.fltr=[Sale Items](type_id=15)

5.link=[Contact Us](contact)

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Out-of-Stock Settings

Retrieves the current out-of-stock setting for the e-commerce application.

The response indicates whether the out-of-stock setting is enabled or disabled.

Features

  • Retrieve the current out-of-stock setting.
  • Determine whether the out-of-stock setting is enabled.

Notes

  • oos contains the current setting value.
  • 1 indicates that the out-of-stock setting is enabled.
  • 0 indicates that the out-of-stock setting is disabled.

Responses

Response samples

Content type
application/json
Example
{
  • "oos": "0"
}

Update Out-of-Stock Settings

Updates the out-of-stock setting for the e-commerce application.

The oos query parameter controls whether the out-of-stock setting is enabled or disabled.

Features

  • Enable the out-of-stock setting.
  • Disable the out-of-stock setting.
  • Accept boolean values for the setting.

Notes

  • The oos parameter is mandatory.
  • oos=true enables the setting.
  • oos=false disables the setting.
  • oos=1 also enables the setting.
  • Any value other than 1 or true is stored as 0.

Permissions

Settings/configure is needed

query Parameters
oos
required
boolean

Controls the out-of-stock setting.

  • true or 1 enables the setting.
  • false disables the setting.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Operation Stages

Retrieves the configured operation stages for the specified order direction.

The direction determines which operation stage configuration is returned.

  • F - Forward order stages.
  • R - Return order stages.

The response contains the configured stages and the users associated with those stages.

Stage Information

Each stage can contain:

  • Stage identifier and title.
  • Display order.
  • Processing type.
  • Assignment scheme.
  • System status name.
  • Time span in minutes.
  • Custom fields.
  • Causes.
  • Assigned users.
  • Additional stage parameters.

Some fields are optional and are returned only when they are configured for the stage.

Permissions

  • Denied for anonymous users (Users / Apps not registered in the settings)
path Parameters
direction
required
string
Enum: "F" "R"

Order direction for which operation stages should be retrieved.

F retrieves forward order stages.

R retrieves return order stages.

Responses

Response samples

Content type
application/json
{
  • "stages": [
    ],
  • "users": [
    ]
}

Update Operation Stages

Creates or updates the operation stages configuration for the specified order direction.

The stages are supplied as an array in the request payload. Each stage contains its title and order, along with optional configuration such as processing type, assignment scheme, time span, causes, fields, users, and parameters.

Stage Configuration

A stage can contain:

  • title - Stage display title.
  • old_title - Existing stage title when renaming a stage.
  • order - Position of the stage in the operation flow.
  • proc_type - Processing type configured for the stage.
  • assign_scheme - User assignment scheme.
  • timespan_mins - Time span configured in minutes.
  • causes - Causes associated with the stage.
  • fields - Custom fields configured for the stage.
  • users - User IDs assigned to the stage.
  • params - Additional stage parameters.

Processing Type

The proc_type field can be used to configure the type of processing associated with a stage.

Example:

proc_type=product

Assignment Scheme

The assign_scheme field configures how users are assigned to a stage.

Example:

assign_scheme=auto

or:

assign_scheme=manual

Stage Causes

Causes can be supplied as an array of strings.

Example:

causes=["Item unavailable","Item damaged"]

Stage Fields

New fields can be added using the fields array.

Each field can contain:

  • title - Field title.
  • type - Field type.
  • new - Indicates that the field is newly added.

Example:

fields=[{"title":"Quantity Processed","type":"number","new":true}]

Stage Users

Users can be assigned to a stage using the users array.

Example:

users=[10,15]

Renaming an Existing Stage

The old_title field can be used when changing the title of an existing stage.

Example:

{"title":"Processing","old_title":"New","order":1}

Stage Parameters

Additional stage parameters can be supplied using params.* request parameters.

Only parameters using the params. prefix are accepted when updating stage parameters.

Examples:

params.product_photos=mandatory

params.can_accept=accept

params.returns=enabled

Multiple Stages

Multiple stages can be created or updated in a single request.

Example:

{"direction":"F","stages":[{"title":"New","order":1},{"title":"Confirmed","order":2},{"title":"Processing","order":3},{"title":"Completed","order":4}]}

A stage can also contain multiple optional configuration fields:

{"title":"Processing","order":3,"proc_type":"product","assign_scheme":"manual","timespan_mins":30,"causes":["Item unavailable","Item damaged"],"fields":[{"title":"Quantity Processed","type":"number","new":true}],"users":[10,15]}

Permissions

Settings/configure is needed

query Parameters
params.<parameter_name>
string

Additional parameter for the operation stage.

Parameter names must use the params. prefix.

Examples:

params.product_photos=mandatory

params.can_accept=accept

params.returns=enabled

params.return_due_days=5

Request Body schema: application/json
required
direction
required
string
Enum: "F" "R"

Order direction for which the operation stages are configured.

F represents forward orders.

R represents return orders.

required
Array of objects

Operation stages to create or update.

Responses

Request samples

Content type
application/json
Example
{
  • "direction": "F",
  • "stages": [
    ]
}

Response samples

Content type
{
  • "message": "string"
}

Get Order Parameters

Retrieves the order parameters configured for the e-commerce application.

By default, active order parameters are returned.

When summary=true is supplied, discarded order parameters are also included in the response.

Parameter Types

Order parameters can use different types, including:

  • text - Text value.
  • number - Numeric value.
  • barcode - Barcode value.
  • schoice - Single-choice value.
  • mchoice - Multiple-choice value.
  • date - Date value.
  • daterange - Date range value.
  • datetime - Date and time value.
  • timerange - Time range value.

Notes

  • Parameters are returned in their configured priority order.
  • Choice-based parameters include a choices array.
  • Each choice can have an associated price.
  • min, max, and step contain configured validation values when applicable.
  • schedule is included when configured for a parameter.
  • discarded is included for discarded parameters.
  • Discarded parameters are included when summary=true.
query Parameters
summary
boolean
Default: false

Controls whether discarded order parameters are included.

When true, discarded parameters are included along with the active parameters.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Update Order Parameter Status

Updates the active or discarded status of an order parameter.

The order parameter is identified using the discard query parameter. The sign of the supplied value determines whether the parameter is discarded or activated.

Parameter Behavior

  • Positive value discards the specified order parameter.
  • Negative value activates the specified order parameter.

Examples:

discard=14 discards order parameter 14.

discard=-14 activates order parameter 14.

Notes

  • The discard parameter is mandatory.
  • The absolute value of discard identifies the order parameter.
  • A positive value marks the parameter as discarded.
  • A negative value marks the parameter as active.

Permissions

Settings/configure is needed

query Parameters
discard
required
integer

Order parameter ID whose active or discarded status should be updated.

Use a positive value to discard the parameter.

Use a negative value to activate the parameter.

Responses

Response samples

Content type
{
  • "message": "string"
}

Create Order Type

Creates or updates the configured order type ordering.

The ordered field contains an array of item type IDs. The order of the IDs in the array determines the configured order of the item types.

Features

  • Configure the ordering of item types for order types.
  • Specify multiple item type IDs in a single request.
  • Preserve the exact ordering supplied in the request.

Notes

  • The ordered field is mandatory.
  • ordered must be an array of item type IDs.
  • Each value in ordered represents an item type ID.
  • The position of each ID in the array determines its configured order.

Permissions

Settings/configure is needed

Request Body schema: application/json
required
ordered
required
Array of integers non-empty

Array of item type IDs in the required order.

Responses

Request samples

Content type
application/json
{
  • "ordered": [
    ]
}

Response samples

Content type
{
  • "message": "string"
}

Get Preorder Settings

Retrieves the current preorder setting for the e-commerce application.

The response indicates whether preorder items are currently allowed.

Features

  • Retrieve the current preorder setting.
  • Determine whether preorder is enabled.

Notes

  • allow indicates whether preorder items are allowed.
  • A value of true means preorder is enabled.
  • A value of false means preorder is disabled.

Responses

Response samples

Content type
application/json
{
  • "allow": false
}

Update Preorder Settings

Updates the preorder setting for the e-commerce application.

The preorder setting can be enabled or disabled using the allow or disallow query parameter.

Features

  • Allow preorder items.
  • Disallow preorder items.
  • Update the preorder setting using a query parameter.

Notes

  • Either allow or disallow must be supplied.
  • The value should be true to enable the corresponding setting.
  • allow=true enables preorder.
  • disallow=true disables preorder.
  • A successful update returns an empty response.

Permissions

Settings/configure is needed

query Parameters
allow
boolean

Allows preorder items when set to true.

disallow
boolean

Disallows preorder items when set to true.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Property Guides

Retrieves property guides configured for the e-commerce application.

The endpoint returns property guides grouped by property name. Each property can contain one or more guide names with their configured guide rules.

Features

  • Retrieve property guides for all properties.
  • Retrieve property guides for a specific property.
  • Return guide names and their configured rules.
  • Support property names containing URL-encoded characters.

Guide Rules

Property guide rules can be based on:

  • item_type - Restricts the guide to specific item type IDs.
  • prop_value - Restricts the guide to specific property values.

Notes

  • Use * as property_name to retrieve guides for all configured properties.
  • The response structure is dynamic because property names and guide names are configured by the administrator.
  • Guide values contain the configured rule expression.
path Parameters
property_name
required
string

Property name whose guides should be retrieved.

Use * to retrieve property guides for all configured properties.

Responses

Response samples

Content type
application/json
{
  • "brand": {
    },
  • "material": {
    }
}

Update Property Guide

Creates, updates, or deletes property guides configured for an e-commerce property.

The property is identified by property_name in the URL. One or more guides can be supplied through the titles object.

Each guide is identified by its title. A guide contains its conditions and content.

Features

  • Create a new property guide.
  • Update an existing property guide.
  • Delete an existing property guide.
  • Add multiple guides to the same property.
  • Update multiple guides for the same property.
  • Delete individual guides without affecting other guides.

Guide Format

Each guide is supplied using its title as the key:

titles.<guide_title>

A guide contains:

  • conditions - Condition used to determine when the guide applies.
  • content - Content displayed for the matching property values.

Guide Operations

A guide with a non-empty object value creates or updates the guide.

Example:

{ "titles": { "attractive colors": { "conditions": "prop_value=Bougainvillea,Fireball,Old Gold", "content": "

Very attractive colors

" } } }

To delete a specific guide, provide its title with an empty value.

Example:

{ "titles": { "shining color values": "" } }

Multiple guides can be configured independently under the same property.

Permissions

Settings/configure is needed

path Parameters
property_name
required
string

Name of the property for which the guide is being created, updated, or deleted.

Request Body schema: application/json
required
required
object

Responses

Request samples

Content type
application/json
Example
{
  • "titles": {
    }
}

Response samples

Content type
{
  • "message": "string"
}

Get Site Analytics Settings

Retrieves the site analytics configuration for the e-commerce application.

The response contains the configured analytics identifiers and access token used by supported analytics integrations.

Supported Analytics

  • fbq - Facebook Pixel identifier.
  • fbq_acc_token - Facebook access token.
  • gtm - Google Tag Manager identifier.
  • ga - Google Analytics measurement identifier.

Notes

  • Empty values indicate that the corresponding analytics integration is not configured.
  • The response contains the currently configured values.

Permissions

Settings/configure is needed

Responses

Response samples

Content type
application/json
{
  • "fbq": "5761123",
  • "fbq_acc_token": "",
  • "ga": "G-T1XHT2PDB7",
  • "gtm": ""
}

Update Site Analytics Settings

Updates the site analytics configuration for the e-commerce application.

The endpoint accepts one or more supported analytics settings as query parameters. Only the supplied settings are updated.

Supported Settings

  • ga - Google Analytics measurement identifier.
  • fbq - Facebook Pixel identifier.
  • fbq_acc_token - Facebook Pixel access token.
  • gtm - Google Tag Manager identifier.

Notes

  • Multiple analytics settings can be updated in a single request.
  • Only the supplied settings are updated.
  • Existing settings that are not supplied remain unchanged.
  • Unsupported parameter names result in a 400 Bad Request.
  • Empty values can be used to clear a configured setting.

Permissions

Settings/configure is needed

query Parameters
ga
string

Google Analytics measurement identifier.

fbq
string

Facebook Pixel identifier.

fbq_acc_token
string

Facebook Pixel access token.

gtm
string

Google Tag Manager identifier.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get UI Settings

Retrieves the current UI settings configured for the e-commerce application.

The response contains the storefront UI configuration, including layout, typography, colors, product display settings, and custom font metadata.

Features

  • Retrieve storefront layout settings.
  • Retrieve mobile, tablet, and desktop display sizes.
  • Retrieve heading and body typography settings.
  • Retrieve product page typography settings.
  • Retrieve light or dark color scheme settings.
  • Retrieve background and text color configuration.
  • Retrieve primary, success, and danger colors.
  • Retrieve product-specific color configuration.
  • Retrieve add-to-cart listing configuration.
  • Retrieve custom font metadata.

Notes

  • UI setting values are returned using their configured string representations.
  • Color values are returned as hexadecimal color strings.
  • custom_fonts contains metadata for fonts configured for the application.
  • Product-specific settings use the prod_ prefix.
  • A negative color suffix such as -1 or -2 represents an additional configured color level.

Permissions

Settings/configure is needed

Responses

Response samples

Content type
application/json
{
  • "aspect_ratio": "0.8",
  • "bg_color_-1": "#efefef",
  • "bg_color_-2": "#dfdfdf",
  • "bg_color_0": "#ffffff",
  • "bg_color_1": "#f2f2f2",
  • "bg_color_2": "#f5f5f5",
  • "body_font_size": "14",
  • "body_line_height": "21",
  • "color_scheme": "light",
  • "custom_fonts": [
    ],
  • "danger_col": "#b54545",
  • "edges": "curved",
  • "emergency_msg": "System maintenance scheduled",
  • "font_body": "Inter#google",
  • "font_heading": "Inter#google",
  • "heading_font_size": "20",
  • "heading_line_height": "30",
  • "is_dirty": "true",
  • "listing_add2cart": "1",
  • "primary_col": "#6b7bf5",
  • "prod_bg_color_-1": "#efefef",
  • "prod_bg_color_-2": "#dfdfdf",
  • "prod_bg_color_0": "#ffffff",
  • "prod_bg_color_1": "#f2f2f2",
  • "prod_bg_color_2": "#f5f5f5",
  • "prod_body_font_size": "14",
  • "prod_body_line_height": "21",
  • "prod_color_scheme": "light",
  • "prod_danger_col": "#b54545",
  • "prod_font_body": "Inter#google",
  • "prod_font_heading": "Inter#google",
  • "prod_heading_font_size": "20",
  • "prod_heading_line_height": "30",
  • "prod_primary_col": "#4054e7",
  • "prod_success_col": "#649130",
  • "prod_txt_color_-1": "#404040",
  • "prod_txt_color_-2": "#303030",
  • "prod_txt_color_0": "#505050",
  • "prod_txt_color_1": "#606060",
  • "prod_txt_color_2": "#707070",
  • "release": "true",
  • "size_desktop": "5",
  • "size_mobile": "2",
  • "size_tablet": "3",
  • "success_col": "#649130",
  • "txt_color_-1": "#404040",
  • "txt_color_-2": "#303030",
  • "txt_color_0": "#505050",
  • "txt_color_1": "#606060",
  • "txt_color_2": "#707070"
}

Update UI Settings

Updates the UI settings configured for the e-commerce application.

The endpoint accepts individual UI settings as query parameters. Multiple settings can be updated in a single request.

Supported Settings

  • size_mobile - Mobile UI size.
  • size_desktop - Desktop UI size.
  • size_tablet - Tablet UI size.
  • aspect_ratio - Product image aspect ratio.
  • theme_color - Theme color.
  • emergency_msg - Emergency message.
  • release - UI release setting.
  • font_heading - Heading font.
  • font_body - Body font.
  • color_bg - Background color.
  • heading_font_size - Heading font size.
  • body_font_size - Body font size.
  • heading_line_height - Heading line height.
  • body_line_height - Body line height.
  • color_scheme - UI color scheme.
  • edges - UI edge style.
  • listing_add2cart - Listing add-to-cart setting.
  • bg_color_0 through bg_color_2 - Background colors.
  • bg_color_-1 and bg_color_-2 - Additional background colors.
  • txt_color_0 through txt_color_2 - Text colors.
  • txt_color_-1 and txt_color_-2 - Additional text colors.
  • success_col - Success color.
  • danger_col - Danger color.
  • primary_col - Primary color.

Supported Values

The edges parameter accepts:

  • sharp
  • curved

The color_scheme parameter accepts:

  • dark
  • light

The listing_add2cart parameter accepts:

  • 0 - Disable add-to-cart in listings.
  • 1 - Enable add-to-cart in listings.

Notes

  • Multiple settings can be updated in one request.
  • Only the supplied settings are updated.
  • Existing settings that are not supplied remain unchanged.
  • Unsupported setting names result in a 400 Bad Request.
  • Invalid edges values result in a 400 Bad Request.
  • Invalid color_scheme values result in a 400 Bad Request.
  • Invalid listing_add2cart values result in a 400 Bad Request.

Permissions

Settings/configure is needed

query Parameters
size_mobile
string

UI size configured for mobile devices.

size_desktop
string

UI size configured for desktop devices.

size_tablet
string

UI size configured for tablet devices.

aspect_ratio
string

Product image aspect ratio.

theme_color
string

Theme color.

emergency_msg
string

Emergency message displayed by the application.

release
string

UI release setting.

font_heading
string

Heading font configuration.

font_body
string

Body font configuration.

color_bg
string

Background color configuration.

heading_font_size
string

Heading font size.

body_font_size
string

Body font size.

heading_line_height
string

Heading line height.

body_line_height
string

Body line height.

color_scheme
string
Enum: "dark" "light"

UI color scheme.

edges
string
Enum: "sharp" "curved"

UI edge style.

listing_add2cart
string
Enum: "0" "1"

Controls add-to-cart availability in product listings.

0 disables add-to-cart.

1 enables add-to-cart.

bg_color_0
string

Primary background color.

bg_color_-1
string

Additional background color level -1.

bg_color_-2
string

Additional background color level -2.

bg_color_1
string

Background color level 1.

bg_color_2
string

Background color level 2.

txt_color_0
string

Primary text color.

txt_color_-1
string

Additional text color level -1.

txt_color_-2
string

Additional text color level -2.

txt_color_1
string

Text color level 1.

txt_color_2
string

Text color level 2.

success_col
string

Success color.

danger_col
string

Danger color.

primary_col
string

Primary color.

Responses

Response samples

Content type
{
  • "message": "string"
}

Tags

API related to the Tags

Delete Tag

Deletes an existing order tag using its tag name.

Features

  • Delete an existing order tag.
  • Identify the tag using its name.
  • Remove the tag from the available order tags.

Notes

  • The tag_name path parameter identifies the tag to be deleted.
  • The tag must exist before it can be deleted.
  • Deleting a tag does not delete the orders themselves.

Permissions

Any of the following permissions are needed

  • Orders/manage
  • Settings/configure
path Parameters
tag_name
required
string

Name of the tag to delete.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Tag

Updates the properties of an existing order tag.

The tag is identified by its name in the URL. The tag's colour code and priority can be updated using query parameters.

Features

  • Update the colour of an existing tag.
  • Update the priority of an existing tag.
  • Update multiple tag properties in a single request.

Parameters

  • colour_code updates the colour code of the tag.
  • priority updates the priority assigned to the tag.

Notes

  • The tag_name path parameter identifies the tag to update.
  • The # character in colour_code must be URL encoded.
  • The server removes the # character from the supplied colour code before storing it.
  • Only the supplied tag properties are updated.
  • A successful update returns an empty response.

Permissions

Any of the following permissions are needed

  • Orders/manage
  • Settings/configure
path Parameters
tag_name
required
string

Name of the tag to update.

query Parameters
colour_code
string

Colour code to assign to the tag.

The # character should be URL encoded.

Example:

colour_code=%23000123

priority
integer

Priority value to assign to the tag.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Tags

Retrieves order tags with optional filtering, sorting, and result limit.

Features

  • Retrieve available order tags.
  • Filter tags by title.
  • Exclude specific tag titles using title_ne.
  • Sort tags by supported fields.
  • Limit the number of returned tags.

Query Parameters

  • max limits the maximum number of tags returned.
  • sort controls the sorting order.
  • title_ne excludes tags whose titles match the supplied comma-separated values.

Notes

  • Multiple values for title_ne can be supplied as a comma-separated list.
  • Sorting uses the format <field>.<direction>.
  • The response contains the currently configured tags.
  • When max is specified, at most that number of tags is returned.

Permissions

  • Denied for anonymous users (Users / Apps not registered in the settings)
query Parameters
max
integer

Maximum number of tags to return.

sort
string

Sorting expression for the returned tags.

Use the format <field>.<direction>.

Example:

id.asc

id.desc

title_ne
string

Excludes tags whose title matches any of the supplied comma-separated values.

Example:

title_ne=Priority,Gift,Fragile,Express

Responses

Response samples

Content type
application/json
Example
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Create Tags

Creates one or more order tags.

Each tag can be created with a title, colour code, and optional priority.

Features

  • Create a single order tag.
  • Create multiple order tags in one request.
  • Assign a colour code to each tag.
  • Assign an optional priority to each tag.
  • Return the generated tag IDs mapped to their titles.

Notes

  • The tags parameter is mandatory.
  • Each tag must contain at least title or colour_code.
  • priority is optional.
  • The colour_code can be supplied with a # prefix.
  • The response maps each created tag title to its generated tag ID.

Permissions

Any of the following permissions are needed

  • Orders/manage
  • Settings/configure
Request Body schema: application/json
required
required
Array of objects non-empty

List of tags to create.

Responses

Request samples

Content type
application/json
{
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "Priority": 31
}

Cart

API related to the carts. All APIs are only available to authenticated customers.

Remove all items from the cart

Removes all items from the authenticated customer's shopping cart.

If the user has an open order, the order is cancelled before the cart items are removed.

If the cart or open order is locked for payment, the operation is not permitted.

Authentication is required for this API.

Responses

Response samples

Content type
application/json
{ }

Get cart items

Retrieves the authenticated customer's shopping cart.

If an offline cart cookie is present, its items are transferred to the authenticated customer's cart before the cart is retrieved.

By default, API version 1 returns the cart items directly. For API versions greater than 1, the response contains either the user's currently open order or the cart items.

When an open order is returned, the response may include an is_locked field when the order is locked for payment.

Authentication is required for this API.

query Parameters
v
integer
Default: 1

API version. Version 1 returns the cart items directly. Versions greater than 1 return the open order when available, otherwise the cart.

fields
string

Comma-separated list of item fields to include in the response.

Responses

Response samples

Content type
application/json
Example
[
  • {
    }
]

Add an item to the cart

Adds the specified item to the authenticated customer's shopping cart.

The item must be a valid ecommerce item and must be permitted for addition to the cart. If the item already exists in the cart, its quantity is increased by the requested quantity.

For API version greater than 1, the item is added to the user's currently open order when one exists. The optional item_fields parameter can be used to control the item fields returned in the response.

Authentication is required for this API.

query Parameters
item_id
required
integer

ID of the item to add to the cart.

quantity
number
Default: 1

Quantity of the item to add to the cart.

v
integer
Default: 1

API version. When greater than 1, the item is added to the user's open order when available.

item_fields
string

Comma-separated list of item fields to include in the response.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Check coupon

Validates whether the specified coupon can be used by the authenticated customer.

The coupon code is checked against the coupon service for the authenticated customer's account. If the coupon cannot be used, the request is rejected.

Authentication is required for this API.

path Parameters
code
required
string

Coupon code to validate.

Responses

Response samples

Content type
application/json
{
  • "code": "SAVE10",
  • "valid": true
}

Remove an item from the cart

Removes the specified item from the authenticated customer's shopping cart.

For API version greater than 1, the item is removed from the user's currently open order when one exists. The optional item_fields parameter can be used to control the item fields returned in the response.

If the cart or order is locked for payment, the item cannot be removed.

Authentication is required for this API.

path Parameters
item_id
required
integer

ID of the item to remove from the cart.

query Parameters
v
integer
Default: 1

API version. When greater than 1, the item is removed from the user's open order when available.

item_fields
string

Comma-separated list of item fields to include in the response.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update a cart item

Updates the quantity of an existing item in the authenticated customer's shopping cart.

The quantity parameter is mandatory and must be greater than zero. The item can optionally be replaced with another item by providing replace_id. When replacing an item, old_quantity specifies the quantity of the existing item being replaced.

For API version greater than 1, the item is updated in the user's currently open order when one exists. The optional item_fields parameter can be used to control the item fields returned in the response.

If the cart or order is locked for payment, the item cannot be updated.

Authentication is required for this API.

path Parameters
item_id
required
integer

ID of the item in the cart to update.

query Parameters
quantity
required
number <float>

New quantity for the cart item. Must be greater than zero.

replace_id
integer

ID of another item to replace the current cart item with.

old_quantity
number <float>
Default: 0

Previous quantity of the item being replaced. Used when replace_id is provided.

v
integer
Default: 1

API version. When greater than 1, the update is applied to the user's open order when available.

item_fields
string

Comma-separated list of item fields to include in the response.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Items

API related to the items

Get items

Retrieves items using the supplied filter parameters.

The request is forwarded to the Stock service to retrieve the available items. The request is performed in anonymous mode.

If the request is authenticated, items that are present in the authenticated customer's wishlist are marked with wishlist: true.

Authentication is optional for this API.

query Parameters
fields
string

Comma-separated list of item fields to include in the response.

id
string

Comma-separated item IDs to retrieve.

anon_mode
integer
Default: 1

Anonymous mode is enabled automatically by the API and should not normally be supplied by the client.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get collection items

Retrieves items belonging to the specified collection.

The collection configuration is used to apply the collection's configured filters and sorting options. Query parameters supplied by the request are merged with the collection parameters.

If the collection is configured with custom sorting, the configured sorter is applied along with item ID sorting to provide a consistent result order.

Authentication is optional. When the request is authenticated, items that are present in the user's wishlist may be marked with wishlist: true.

path Parameters
collection_name
required
string

Name of the collection whose items should be retrieved.

query Parameters
sort
string
Default: "id.desc"

Sorting order for the returned items. If the collection has a configured sorting order, it is applied automatically.

fields
string

Comma-separated list of item fields to include in the response.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get collection item properties

Retrieves the available item properties for the specified collection.

The collection configuration is used to apply the collection's configured filters before retrieving the item properties.

If the specified collection does not exist, an empty object is returned.

Authentication is not required for this API.

path Parameters
collection_name
required
string

Name of the collection whose item properties should be retrieved.

Responses

Response samples

Content type
application/json
{
  • "color": [
    ],
  • "size": [
    ]
}

Wishlist

API related to the wishlist. All APIs are only available to authenticated customers.

Get customer wishlist

Retrieves the authenticated customer's wishlist items.

The response contains wishlist entries along with item details such as the item name, type, sale price, stock, variants, and properties.

The returned item fields can be customized using the fields query parameter.

Wishlist entries can be filtered, sorted, and limited using the supported query parameters.

Authentication is required for this API.

query Parameters
fields
string
Default: "id,name,type,sale_price,sale_discount,num_variants,stock,varying_properties"

Comma-separated list of item fields to include in the response.

item_id
integer

Filter wishlist entries by item ID.

date
string

Filter wishlist entries by the date they were updated.

sort
string
Example: sort=date.desc

Sort wishlist entries using date or item_id. Multiple sort fields can be separated by commas. Each field must use asc or desc.

Examples: date.desc item_id.asc date.desc,item_id.asc

limit
integer

Maximum number of wishlist entries to return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update customer wishlist

Adds or removes items from the authenticated customer's wishlist.

Each request parameter represents an item ID. Set the parameter value to 1 to add the item to the wishlist, or 0 to remove the item from the wishlist.

Multiple items can be added or removed in a single request.

Authentication is required for this API.

query Parameters
item_id
required
integer
Enum: 1 0

The parameter name must be the item ID. Set the value to 1 to add the item to the wishlist or 0 to remove it.

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Stock Alerts

API related to the stock alerts

Get stock alerts

Retrieves stock alert subscriptions.

An authenticated customer can retrieve the list of item IDs for which they have enabled stock alerts.

Authorized internal users can retrieve stock alerts for a specific customer using contact_id, or retrieve the customer contact IDs subscribed to stock alerts for a specific item using item_id.

The item_id parameter is restricted to authorized internal users.

query Parameters
contact_id
integer

Customer contact ID whose stock alert subscriptions should be retrieved. This parameter is available to authorized internal users.

item_id
integer

Item ID for which subscribed customer contact IDs should be retrieved. This parameter is available only to authorized internal users.

Responses

Response samples

Content type
application/json
Example
[
  • 101,
  • 205,
  • 310
]

Manage stock alerts

APIs are only available to authenticated customers.

Adds or removes stock alerts for items for the authenticated customer.

The item_id query parameter accepts one or more comma-separated item IDs.

An item ID without a prefix or with a + prefix adds a stock alert. An item ID with a - prefix removes the stock alert.

Examples: item_id=123 adds a stock alert for item 123. item_id=+123,-456 adds an alert for item 123 and removes the alert for item 456.

Authentication is required for this API.

query Parameters
item_id
required
string

Comma-separated item IDs to manage.

Use the item ID directly or prefix it with + to add a stock alert. Prefix the item ID with - to remove a stock alert.

Examples: 123 +123 +123,-456

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Frontend Store

API related to the frontend store

Get Frontend Store Components

Returns the list of components available for the frontend store.

These components can be used by frontend applications for common UI functionality such as authentication, navigation, items, cart, checkout, orders, payments, customer pages, wishlist, and other store-related features.

A successful request returns an array containing the names of the available frontend store components.

Permissions

Settings/configure is needed

Responses

Response samples

Content type
application/json
[
  • "Icon",
  • "WishlistPage",
  • "OrdersPage",
  • "CartPage",
  • "CheckoutFlowComponent",
  • "ItemPage",
  • "ListingPage",
  • "AuthPage",
  • "HeaderComponent",
  • "FooterComponent"
]

Delete Frontend Store Component JSX

Deletes the specified frontend store component.

Example:

/aalam/ecomm/pub-v2/jsx/WishlistPage

Permissions

Settings/configure is needed

path Parameters
component_name
required
string

Name of the frontend store component to delete.

Example:

WishlistPage

Responses

Response samples

Content type
{
  • "message": "string"
}

Download Frontend Store Component JSX

Downloads the JSX content of the specified frontend store component.

Example:

/aalam/ecomm/pub-v2/jsx/WishlistPage

Permissions

Settings/configure is needed

path Parameters
component_name
required
string

Name of the frontend store component.

Example:

WishlistPage

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Frontend Store Component JSX

Updates the JSX content of the specified frontend store component.

The request body must contain JSX source content.

The supplied JSX content is transformed using the component build process.

Example:

/aalam/ecomm/pub-v2/jsx/WishlistPage

Permissions

Settings/configure is needed

path Parameters
component_name
required
string

Name of the frontend store component to update.

Example:

WishlistPage

Request Body schema: text/plain
required
string

Responses

Response samples

Content type
{
  • "message": "string"
}

Collections

API related to the collections

Delete Collection

Deletes an existing product collection identified by its collection name.

The collection name is converted to lowercase before the collection is looked up.

Delete Collection

Example:

/aalam/ecomm/collection/cotton-products

If the specified collection does not exist, the API returns HTTP 404.

A successful deletion returns an empty response with HTTP status 200.

Permissions

Settings/collections is needed

path Parameters
coll_name
required
string

Name of the collection to delete.

The supplied collection name is converted to lowercase before the collection is looked up.

Responses

Response samples

Content type
{
  • "message": "string"
}

Update Collection

Updates an existing collection identified by its collection name.

The collection name is converted to lowercase before the collection is looked up.

Collection

Example:

/aalam/ecomm/collection/apple-devices

The collection can be updated using the supported query parameters.

Example:

/aalam/ecomm/collection/apple-devices?description=collection+descrption+info&sort=sale_discount.desc&filters=type_id%3D65%2C66%2C56%2C47%2C33%2C34%2C4%26prop.Brand%3DApple%2C24+Mantra%2CReebok%2C8%2CAddidas%2CCake+it+up

Collection Not Found

If the collection does not exist, the API returns HTTP 404 with the explanation:

Unable to find the collection

Permissions

Settings/collections is needed

path Parameters
coll_name
required
string

Name of the collection.

The supplied collection name is converted to lowercase before the collection is looked up.

query Parameters
description
string

Collection description.

sort
string

Collection sorting configuration.

filters
string

Collection filter configuration.

Responses

Response samples

Content type
{
  • "message": "string"
}

Get Collections

Retrieves product collections.

Collections can be retrieved using pagination, collection name search, product property filters, item type filters, or collection name suggestions.

Get Collections

Example:

/aalam/ecomm/collections

When no filter parameters are supplied, collections are retrieved using the collection pagination cursor.

Pagination

The page parameter specifies the pagination cursor.

Example:

/aalam/ecomm/collections?page=10

If page is not supplied, the cursor defaults to 0.

The response contains the pagination cursor in the page field.

Maximum Results

The max parameter specifies the maximum number of collections to return.

Example:

/aalam/ecomm/collections?max=10

The name parameter is used to search collection names.

Example:

/aalam/ecomm/collections?name=shirt

Property Filter

The prop parameter specifies one or more product properties used to find matching collections.

Multiple property names can be supplied as comma-separated values.

Example:

/aalam/ecomm/collections?prop=Brand,Color

Item Type Filter

The type_id parameter specifies one or more item type IDs used to find matching collections.

Multiple item type IDs can be supplied as comma-separated values.

Example:

/aalam/ecomm/collections?type_id=8,73,74

Property and Item Type Filter

The prop and type_id parameters can be supplied together.

Example:

/aalam/ecomm/collections?prop=Brand,Color&type_id=8,73,74

Collection Name Suggestions

When the suggest parameter is supplied, the API returns matching collection names instead of complete collection details.

Permissions

  • Denied for anonymous users (Users / Apps not registered in the settings)
query Parameters
page
integer
Default: 0

Pagination cursor used to retrieve the next set of collections.

Defaults to 0.

max
integer

Maximum number of collections to return.

name
string

Collection name used to search for collections.

prop
string

Comma-separated product property names used to filter collections.

type_id
string

Comma-separated item type IDs used to filter collections.

suggest
string

Returns collection names instead of complete collection details when supplied.

Responses

Response samples

Content type
application/json
{
  • "collections": [
    ],
  • "page": 0
}

Create Collection

Creates a new product collection.

A collection requires a name and filters. The collection name is converted to lowercase before it is stored.

Create Collection

Example:

/aalam/ecomm/collections

Example payload:

{"name":"cotton-products","title":"Cotton Items","description":"cotton products list here","sort":"id.desc","filters":"type_id=8,35,73,74&prop.Material=Cotton"}

The filters field cannot be empty.

The collection name is validated before the collection is created. Collection names are stored in lowercase.

A collection with the same name cannot already exist.

Sort

The sort field is optional.

Supported sort options are:

  • custom
  • id.desc
  • id.asc
  • sale_discount.desc
  • sale_price.asc
  • sale_price.desc

Example:

{"sort":"sale_price.desc"}

An invalid sort option results in HTTP 400.

A successful request returns the ID and generated sort key of the newly created collection.

Permissions

Settings/collections is needed

Request Body schema: application/json
required
description
string

Description of the collection.

filters
required
string

Product filter configuration for the collection. This field cannot be empty.

name
required
string

Name of the collection.

sort
string
Enum: "custom" "id.desc" "id.asc" "sale_discount.desc" "sale_price.asc" "sale_price.desc"

Sorting configuration for the collection.

title
string

Title of the collection.

Responses

Request samples

Content type
application/json
Example
{
  • "description": "cotton products list here",
  • "filters": "type_id=8,35,73,74&prop.Material=Cotton",
  • "name": "cotton-products",
  • "sort": "id.desc",
  • "title": "Cotton Items"
}

Response samples

Content type
application/json
{
  • "id": 12,
  • "sort_key": "__eo-12__"
}

Reviews

API related to the reviews

Get review feature settings

Retrieves the current ecommerce customer review feature settings.

The response includes whether the review feature is live, the number of reviews pending approval, and the configured publish threshold when available.

When the review feature is not live, the response can also include the trial and purchase event expiration status.

If the type query parameter is set to unapproved, the API returns the reviews pending approval instead of the review feature settings.

Authentication and Settings/configure permission are required for this API.

Permissions

Settings/configure is needed

query Parameters
type
string

Optional response type. When set to unapproved, returns the reviews pending approval instead of the review feature settings.

Responses

Response samples

Content type
application/json
{
  • "event_expires": "2026-08-25T12:00:00",
  • "is_account_trial_ended": false,
  • "is_event_expired": false,
  • "is_live": false,
  • "is_trial_expired": false,
  • "pending_approval": 5,
  • "publish_threshold": 3,
  • "trial_start_date": "2026-08-15T10:00:00"
}

Update review feature settings

Updates the ecommerce customer review feature settings.

The API supports starting the review feature trial, updating the review publish threshold, or initiating the purchase of the review feature.

The start_trial and purchase parameters are mutually exclusive. When start_trial is provided, the trial start date is recorded if a trial has not already been started.

When publish_threshold is provided, the minimum rating required for a customer review to be automatically approved can be updated. The value must be between 1 and 5.

When purchase is provided, an in-app purchase request is created for the ecommerce customer review feature.

Authentication and Settings/configure permission are required for this API.

Permissions

Settings/configure is needed

query Parameters
publish_threshold
integer [ 1 .. 5 ]

Minimum review rating required for automatic approval. Must be between 1 and 5.

Responses

Response samples

Content type
application/json
{
  • "event_id": "123456",
  • "expires": "2026-08-21T12:00:00"
}

Delete a product review

Deletes a review for the specified product.

For instagram and facebook reviews, the review is identified by its url parameter.

For insite reviews, the review is identified by its index parameter. When an authenticated customer does not provide an index, the customer's own review for the specified item is used.

Authenticated customers can delete their own insite reviews. Internal users must be administrators or have Settings -> configure permission to delete reviews.

When an insite review is deleted, the product rating is updated and the review count for the corresponding source is adjusted.

path Parameters
item_id
required
integer

ID of the item for which the review is being deleted.

query Parameters
source
required
string
Enum: "insite" "instagram" "facebook"

Source of the review to delete.

url
string

URL of the review to delete. Required when the source is instagram or facebook.

index
integer

Index of the insite review to delete. If omitted by an authenticated customer, the customer's own review is used.

Responses

Response samples

Content type
application/json
{ }

Get product reviews

Retrieves reviews and review summary information for the specified product.

When the source parameter is not provided, the response contains the total number of reviews and the review count for each supported review source.

When source is provided, reviews for the specified source are returned. The insite source supports pagination using the next_page parameter and returns the authenticated customer's own review separately when applicable.

For instagram and facebook sources, the response contains the review URLs.

The optional variant_ids parameter can be used to retrieve reviews for a specific variant. If not provided, the minimum variant ID is used.

path Parameters
item_id
required
integer

ID of the item for which reviews are being retrieved.

query Parameters
variant_ids
string

Comma-separated list of variant IDs used to determine the item variant for which reviews are retrieved.

source
string

Review source to retrieve. Supported sources include insite, instagram, and facebook. When omitted, only the review summary is returned.

totals
boolean

Returns the review summary containing the total number of reviews and review counts by source.

next_page
integer
Default: 0

Pagination cursor for retrieving the next set of reviews. Used when source is provided.

Responses

Response samples

Content type
application/json
Example
{}

Add or update a product review

Adds a new review for the specified product or updates an existing review.

Authenticated customers can submit only insite reviews. A new review submitted by an authenticated customer requires a rating and the customer must have previously purchased the product.

Reviews from instagram and facebook sources require review content. Internal users can add or update reviews when they have the required permissions.

If an existing insite review is being updated, the insite_index parameter can be used to identify the review.

Reviews submitted by authenticated customers may be marked as unapproved when the rating is at or below the configured publishing threshold.

path Parameters
item_id
required
integer

ID of the item for which the review is being added or updated.

query Parameters
source
required
string

Source of the review. Authenticated customers can submit only insite reviews.

content
string

Review content. Required for instagram and facebook reviews.

title
string

Title of the review.

rating
number

Rating given to the product. Required when an authenticated customer creates a new insite review.

name
string

Name displayed with the review. Defaults to the authenticated customer's contact name when not provided.

customer_id
integer

ID of the customer associated with the review. For authenticated customers, the authenticated customer ID is used.

insite_index
integer

Index of an existing insite review to update.

posted_on
string

Date on which the review was posted. If not provided, the current date is used.

approve
string

Used by authorized internal users to approve an existing review.

Responses

Response samples

Content type
application/json
{
  • "index": 1
}