Authentication & Permission Scopes
All API endpoints in the Ananta 4PL platform mandate cryptographic API key authentication over secure SSL/HTTPS, 4-part key token verification, constant-time SHA-512 hashing, granular permission scopes, and sliding-window rate limiting.
Authentication & Permission Scopes
All requests require a valid API key supplied in the X-API-Key HTTP request header.
The key is authenticated against active database credentials.
{prefix}_{env}_{publicIdentifier}_{secret}
(e.g. 0003_test_2733f80815af731d_...).
The key must have the corresponding required scope for the endpoint (e.g. write:orders
for order dispatch) or wildcard *.
Malformed keys return HTTP 401 Unauthorized, while scope omissions return
HTTP 403 Forbidden.
Permission Scopes Matrix
Each endpoint enforces a dedicated permission scope. API keys configured with the universal
wildcard scope * have access to all endpoints across the
platform.
| Required Scope | Service | Endpoint | Method | Description & Access Level |
|---|---|---|---|---|
write:orders |
Orders & Fulfillment | /order/ |
POST | Create, validate, and dispatch customer sales fulfillment orders. |
read:order_status |
Orders & Fulfillment | /order_status/ |
GET | Track fulfillment state, milestone timestamps, and external reference numbers. |
write:associates |
Setup Master | /associate/ |
POST | Register or synchronize Customer & Vendor master profile records. |
write:products |
Setup Master | /product/ |
POST | Register or synchronize SKU master items, barcodes, and HS codes. |
read:dockets |
Logistics & Tracking | /docket_info/ |
GET | Inquire consignment docket numbers, Air Waybill (AWB) data, and courier details. |
read:inward |
Inventory & Warehousing | /inward_on_date/ |
GET | Query inbound receipt / Goods Receipt Note (GRN) records on date. |
read:stocks |
Inventory & Warehousing | /stock_on_date/ |
GET | Query physical inventory stock balances and availability as of cutoff date. |
read:stock_ledger |
Inventory & Warehousing | /stock_ledger/ |
GET | Audit historical inventory movements, inward receipts, and outward dispatches. |
* |
Platform Wide | All APIs |
ALL | Universal wildcard scope granting unrestricted access to all current and future APIs. |
Quick Authentication Example
curl -X POST "https://www.ananta4pl.in/order/" \\
-H "X-API-Key: 0003_test_2733f80815af731d_e4b8a21f7c8d9e0a1b2c3d4e5f6a7b8c" \\
-H "Content-Type: application/json; charset=UTF-8" \\
-H "Accept: application/json" \\
-d '{ ... }'
Headers & Preflight (CORS)
Standardized HTTP request and response headers, Content-Type encoding rules, and Cross-Origin Resource Sharing (CORS) preflight protocol for browser applications, SPAs, and third-party integrations.
Headers & Preflight (CORS)
| Header | Type | Requirement | Description |
|---|---|---|---|
X-API-Key |
string | Required | Client API secret token. |
Content-Type |
string | Required | Must be application/json; charset=UTF-8. |
Accept |
string | Optional | Expected response format: application/json. |
OPTIONS request is supported and
returns
200 OK with headers:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-API-Key
CORS Preflight Verification
Before dispatching non-simple cross-origin requests (such as POST with custom header
X-API-Key and application/json payload), browsers automatically send
an HTTP OPTIONS preflight check. You can verify this directly via cURL:
curl -i -X OPTIONS "https://www.ananta4pl.in/order/" \\
-H "Origin: https://client-portal.example.com" \\
-H "Access-Control-Request-Method: POST" \\
-H "Access-Control-Request-Headers: Content-Type, X-API-Key"
200 OK response with headers:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-API-Key
Content-Type: application/json; charset=UTF-8
Associate Master API
Onboard and synchronize business associate entities—including Customers and Vendors in the Ananta 4PL network.
Associate Entity Payload Schema
The request payload must contain the mandatory identifier, type, name, and state code. Optional contact and taxation fields can be provided to maintain rich profile records.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| assoc_type | string | Required | — | Associate classification: Customer, Vendor,
Consignee, or Billing. Cannot be empty or null.
|
| assoc_id | string | Required | — | Unique external associate code (e.g. CU001, VN012).
Serves as the primary key per client. |
| assoc_name | string | Required | — | Full legal business name or individual trading name (e.g.
Malhotra Books Pvt Ltd).
|
| state | string | Required | — | 2-digit Indian State Code (e.g. 06 for Haryana, 07 for
Delhi) or state name. |
| address | string | Optional | NULL |
Street address, facility, or shop floor location (e.g.
SCF-14, Sector 15).
|
| city | string | Optional | NULL |
City or municipality name (e.g. Panchkula). |
| pin | string | Optional | NULL |
6-digit Indian Postal PIN Code (e.g. 134109). |
| contact_person | string | Optional | NULL |
Designated account representative or liaison (e.g. Raman Malhotra).
|
| phone_no | string | Optional | NULL |
Landline office telephone number. |
| mobile_no | string | Optional | NULL |
10-digit primary mobile number for logistics and delivery updates. |
| email_id | string | Optional | NULL |
Electronic mail address for invoices and dispatch notices. |
| pan | string | Optional | NULL |
10-character Permanent Account Number (e.g. AABCM1234F). |
| gst_no | string | Optional | NULL |
15-character Goods and Services Tax Identification Number (GSTIN). |
Response Schema
On successful insertion or update within the database transaction, the API returns HTTP 201 Created.
| Field | Type | Description |
|---|---|---|
| status | string | Transaction result (Success). |
| assoc_id | string | Echoed associate code registered in the catalog (e.g. CU001). |
| assoc_name | string | Echoed associate entity name. |
| message | string | Confirmation notice: Associate Created/Updated. |
{
"status": "Success",
"assoc_id": "CU001",
"assoc_name": "Malhotra Books",
"message": "Associate Created/Updated"
}
Status Codes & Error Matrix
Interactive API Playground
Associate Registration Console
Simulate live associate upserts & verify API contracts.
// Ready to send. Status codes, headers, and upsert confirmation will appear here.
Integration Code Samples
Product Master API
Synchronize and catalog product SKUs, item definitions, physical dimensions, pricing tiers, and
taxation HSN codes in the Ananta 4PL network. Executes an atomic upsert into products with multi-tenant client isolation.
Product SKU Payload Schema
The JSON body must include the 5 mandatory fields: prod_id,
prod_desc, sale_cur,
sale_price, and hsn_code. Physical dimensions, category, procurement group,
and media URLs can be supplied for comprehensive warehouse inventory handling.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| prod_id | string | Required | — | Unique client SKU or item identifier (e.g. SKU-CBSE-MATH-10). Acts
as primary lookup key per client. |
| prod_desc | string | Required | — | Product title or item description (e.g.
NCERT Mathematics Class 10 Textbook). Cannot be empty.
|
| sale_cur | string | Required | INR |
3-letter ISO currency code for selling price (e.g. INR,
USD).
|
| sale_price | numeric | Required | 0 |
Net unit selling/billing price (e.g. 340.00). Evaluated strictly as
numeric. |
| hsn_code | string | Required | — | Harmonized System of Nomenclature code for GST classification (e.g.
49011010).
|
| prod_cat | numeric | Optional | 4 |
Numeric category classification ID (e.g. 4 for Books & Printed
Materials). |
| cover_cur | string | Optional | INR |
Printed Cover / Maximum Retail Price currency code. |
| cover_price | numeric | Optional | 0 |
Printed MRP / List price (e.g. 380.00). |
| buy_group | string | Optional | INDIAN |
Procurement source group (e.g. INDIAN, IMPORTED). |
| publisher | string | Optional | NULL |
Publisher, brand, or manufacturer imprint (e.g.
NCERT Publications).
|
| subject | string | Optional | NULL |
Academic discipline, category theme, or topic (e.g. Mathematics).
|
| author | string | Optional | NULL |
Author, creator, or editorial board (e.g. NCERT Editorial Board).
|
| school_grade | string | Optional | NULL |
Grade level, standard, or target demographic (e.g. Class 10). |
| length | numeric | Optional | NULL |
Physical length of the item packaging in centimeters (e.g. 24.50).
|
| width | numeric | Optional | NULL |
Physical width of the item in centimeters (e.g. 18.20). |
| height | numeric | Optional | NULL |
Physical thickness or height in centimeters (e.g. 1.80). |
| volume | numeric | Optional | NULL |
Calculated item volume in cubic centimeters (e.g. 802.62). |
| weight | numeric | Optional | NULL |
Item gross weight in grams or kilograms (e.g. 480.00). |
| baseUnit | string | Optional | EACH |
Inventory Unit of Measure (UOM) mapped into database column
base_unit (e.g. EACH, BOX,
SET).
|
| prod_image | string | Optional | NULL |
Public HTTPS URL pointing to product catalog image or thumbnail. |
Response Schema
On successful insertion or update within the database transaction, the API returns HTTP 201 Created.
| Field | Type | Description |
|---|---|---|
| status | string | Transaction result status: Success. |
| prod_id | string | Echoed unique product SKU identifier (e.g. SKU-CBSE-MATH-10). |
| prod_desc | string | Echoed product title / description. |
| message | string | Lifecycle confirmation notice: SKU Created/Updated. |
{
"status": "Success",
"prod_id": "SKU-CBSE-MATH-10",
"prod_desc": "NCERT Mathematics Class 10 Textbook",
"message": "SKU Created/Updated"
}
Status Codes & Error Matrix
Interactive API Playground
Product SKU Sync Console
Simulate live SKU upserts & verify API contracts.
// Ready to send. Status codes, headers, and upsert confirmation will appear here.
Integration Code Samples
Create Order API
Creates a new sales order transaction in Ananta 4PL logistics system.
Order Header Schema
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| txn_date | string | Required | — | Transaction date. Validated and formatted to YYYY-MM-DD. |
| assoc_ref | string | Required | — | External client order ID. Unique per client. Duplicate triggers
422 Unprocessable Entity
("Order already exists : {assoc_ref}").
|
| assoc_ref_date | string | Required | — | Date of the external reference. Validated and formatted to
YYYY-MM-DD. Echoed in response.
|
| bill_to | string | Required | — | Billing account/client identifier (e.g. CU001). Must be an active
registered Customer account in your client master setup. If customer is unknown,
returns 422 Validation Failed. |
| client_order_no | string | Optional | NULL |
Client purchase order or tracking reference. Echoed back in the 201 response. |
| cons_name | string | Required | — | Consignee recipient contact or business name. |
| cons_address | string | Required | — | Delivery shipping address. |
| cons_city | string | Required | — | Destination city (e.g. Panchkula). |
| cons_state | string | Required | — | 2-digit Indian State Code (e.g. 06, 07). |
| cons_pin | string | Required | — | 6-digit Indian PIN Code (e.g. 134109). |
| items | array | Required | — | Non-empty array of line item objects. Each item is validated against the products catalog. |
| doc_id | string | Optional | SALO |
Order voucher/document series. |
| cons_phone | string | Optional | NULL |
Consignee mobile phone number. |
| cons_gst | string | Optional | NULL |
15-character GSTIN number of consignee. |
| backorder | string | Optional | N |
Backorder allowance flag (Y or N). |
| txn_status | string | Optional | Pending |
Initial transaction status milestone (e.g. Created). |
Order Detail Items Schema
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| prod_id | string | Required | — | Product SKU or identifier. Verified against active catalog SKU records for the
client. If SKU is unknown, returns 422 Validation Failed. |
| order_qty | number | Required | 1 |
Quantity ordered (strictly numeric). |
| price | number | Required | 1 |
Selling unit price (strictly numeric). |
| mrp | number | Required | 1 |
Maximum Retail Price per unit (strictly numeric). |
| unit | string | Optional | EACH |
Unit of Measure (EACH, BOX, KG). |
| price_cur | string | Optional | INR |
ISO currency code. |
| exch_rate | number | Optional | 1.00 |
Exchange multiplier. |
| disc_p | number | Optional | 0 |
Discount percentage. |
| txn_status | string | Optional | Pending |
Initial line-item status (e.g. Created). |
Response Schema & Examples
Upon successful validation and transactional registration of the order, the endpoint returns HTTP 201 Created:
| Field | Type | Presence | Description |
|---|---|---|---|
| status | string | Always | Execution outcome: Success. |
| message | string | Always | Status description: Order successfully created. |
| assoc_ref | string | Always | Echoed external client order reference identifier. |
| assoc_ref_date | string | Always | Echoed external reference date (YYYY-MM-DD). |
| client_order_no | string | null | Always | Echoed client order number (or null if omitted). |
{
"status": "Success",
"message": "Order successfully created.",
"assoc_ref": "2026-27/001",
"assoc_ref_date": "2026-09-18",
"client_order_no": "ORD-2026-001"
}
// 1. Unknown Customer:
{
"status": "Validation Failed",
"message": "Unknown customer",
"field": "bill_to",
"value": "CU999"
}
// 2. Unknown Product:
{
"status": "Validation Failed",
"message": "Unknown Product",
"field": "items[0].prod_id",
"value": "INVALID_SKU"
}
// 3. Duplicate Order Reference:
{
"error": "Validation Failed",
"message": "Order already exists : 2026-27/001"
}
Status Codes & Error Matrix
Interactive API Playground
Order Dispatch Console
Simulate API behavior or inspect live headers.
// Ready to send. Responses will display status codes, headers, and payload here.
Integration Code Samples
Order Status & Delivery Tracking API
Retrieve the real-time fulfillment status, milestone timestamp, and cryptographically signed Proof
of Delivery (POD) document for any sales order using your external order reference (assoc_ref). For orders in Delivered state, a 15-minute time-limited secure download link
for the physical delivery receipt is dynamically generated.
Request Payload Schema
The endpoint exclusively accepts HTTP GET requests with a JSON body containing the external reference order identifier and authentication headers.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| assoc_ref | string | Required | — | External client sales order reference (e.g. 2026-27/001). Cannot be
empty, whitespace, or literal "null". Missing or invalid value
triggers 422 Unprocessable Entity.
|
{
"assoc_ref": "2026-27/001"
}
Response Schema & Delivery Verification
The endpoint queries the order against your authenticated client account and returns the latest recorded fulfillment milestone, timestamp, and a cryptographically signed Proof of Delivery (POD) link when available.
| Field | Type | Description |
|---|---|---|
| status | string | Execution outcome: Success (for HTTP 200), Failed (for
HTTP 404), or Validation Failed (for HTTP 422). |
| assoc_ref | string | Echoed external client sales order reference queried. |
| client_order_no | string | Internal order tracking number linked to this order in the fulfillment system. |
| message | string | Contextual result message:
• Status Record Found (order located with milestone record)
• No records found matching criteria (order exists, but no
milestone records yet)
• Order reference not found (HTTP 404: order reference does not
exist for this client)
|
| order_status | string | Latest fulfillment lifecycle stage: Created,
Allocated, Packed, Dispatched,
Delivered, or Not Found.
|
| date | string | Timestamp when the latest milestone was recorded (format:
YYYY-MM-DD HH:MM:SS).
|
| pod_url | string | When order_status is Delivered and the delivery
receipt is available, returns a cryptographically signed secure download link
(valid for 15 minutes). If pending delivery or no receipt exists, returns
Not Yet Delivered.
|
| expires_at | string | ISO 8601 expiration timestamp for the signed Proof of Delivery URL (900 seconds TTL from request time). |
| order_no | string | Returned in HTTP 404 responses echoing the requested order identifier that was not found. |
{
"status": "Success",
"assoc_ref": "2026-27/001",
"client_order_no": "ORD-2026-001",
"message": "Status Record Found",
"order_status": "Delivered",
"date": "2026-10-14 16:30:00",
"pod_url": "https://ananta4pl.in/download/POD_2026_001.pdf?md5=7d8a9b2c3d4e5f6a&expires=1792070400",
"expires_at": "2026-10-14T16:45:00+05:30"
}
{
"status": "Success",
"assoc_ref": "2026-27/045",
"client_order_no": "ORD-2026-045",
"message": "Status Record Found",
"order_status": "Dispatched",
"date": "2026-10-15 09:15:20",
"pod_url": "Not Yet Delivered",
"expires_at": "2026-10-15T09:30:20+05:30"
}
{
"status": "Failed",
"order_no": "2026-27/999-NOTFOUND",
"message": "Order reference not found"
}
{
"status": "Validation Failed",
"message": "Missing or empty assoc_ref"
}
Proof of Delivery (POD) Cryptographic Download Links
When an order is successfully marked Delivered and the delivery receipt
is uploaded, the API constructs a secure, time-limited download URL protected by an
Nginx cryptographic signature token.
The download URL expires automatically after 15 minutes (900
seconds). If a link expires, simply issue another GET request to obtain
a freshly signed link.
Status Codes & Error Matrix
Interactive API Playground
Order Status Inspection Console
Simulate live GET requests with headers & verify response contracts.
// Ready to send. Status code, HTTP headers, and milestone status will appear here.
Integration Code Samples
Docket & Despatch Info API
Retrieve consignment docket tracking details, Air Waybill (AWB) numbers, client invoice metadata,
3PL carrier allocations, carton package counts, estimated delivery dates, consignment weights (actual_weight & charged_weight), and the itemized line-item breakdown of
dispatched products (dispatched_items) for any sales order
using your external order reference (assoc_ref). Provides
real-time tracking, multi-package shipment visibility, and SKU fulfillment metrics with multi-tenant
client isolation.
Request Payload Schema
The endpoint expects a JSON payload containing the external client order reference identifier passed in the HTTP request body.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| assoc_ref | string | Required | — | External client sales order reference (e.g. 2026-27/001). Cannot be
omitted, empty, whitespace, or literal "null". Missing or empty
value triggers HTTP 422 Unprocessable Entity with
Missing or empty assoc_ref.
|
php://input) with Content-Type: application/json; charset=UTF-8
over SSL/HTTPS. Any non-GET method will immediately return HTTP 405 Method Not
Allowed.
{
"assoc_ref": "2026-27/001"
}
Response Schema & Despatch Records
The API returns HTTP 200 OK with structured payload containing both order identifiers and an array of all consignment dockets and logistics details.
| Field | Type | Description / Mapping Rules |
|---|---|---|
| status | string | Execution outcome: Success (for HTTP 200), Failed (for
HTTP 404), or Validation Failed (for HTTP 422). |
| assoc_ref | string | Echoed external client sales order reference matching the query (assoc_ref). Note: Echoed as
order_no when dockets array is empty or on 404. |
| client_order_no | string | Internal client sales order number linked to the fulfillment order (e.g.
ORD-2026-001).
|
| message | string | Contextual result message:
• Despatch Records Found (1+ consignment dockets
retrieved)
• No records found matching criteria (HTTP 200: Order
header exists, but items are pending warehouse dispatch)
• Order reference not found (HTTP 404: Order reference
does not exist for this client account)
• Missing or empty assoc_ref. (HTTP 422: Parameter omitted
or blank)
• Fatal Error, Contact administrator (HTTP 500:
System/storage exception)
|
| despatch_detail | array | Array of consignment docket and shipment fulfillment objects. Empty
[] if order is awaiting warehouse fulfillment.
|
| despatch_detail[].desp_date | string | Warehouse dispatch date/timestamp for the consignment (format:
YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).
|
| despatch_detail[].awb_no | string | Air Waybill / Consignment Docket tracking number issued by the logistics partner
(e.g. BD889201948IN). |
| despatch_detail[].inv_no | string | Commercial invoice number associated with the dispatched consignment (e.g.
INV-2026-00412).
|
| despatch_detail[].inv_date | string | Commercial invoice date associated with the dispatched consignment (format:
YYYY-MM-DD).
|
| despatch_detail[].vendor | string | Name of the assigned 3PL carrier or courier service partner (e.g.
Blue Dart Express, Delhivery Surface Special).
|
| despatch_detail[].packets | integer | Total count of cartons / packages in the consignment (e.g. 3). |
| despatch_detail[].expected_delivery_date | string | Estimated delivery date provided by the logistics partner (format:
YYYY-MM-DD).
|
| despatch_detail[].actual_weight | number | Physical scale weight of the consignment package in kilograms (e.g.
4.250).
|
| despatch_detail[].charged_weight | number | Volumetric or chargeable billing weight in kilograms (e.g. 5.000).
|
| despatch_detail[].dispatched_items | array | Itemized array of product SKUs packed and dispatched within this specific consignment shipment. |
| despatch_detail[].dispatched_items[].prod_id | string | Catalog Product SKU identifier (e.g. SKU-BLK-001). |
| despatch_detail[].dispatched_items[].prod_desc | string | Catalog product name or item description (e.g.
Industrial Safety Boots - Size 9).
|
| despatch_detail[].dispatched_items[].desp_qty | number | Quantity of this SKU dispatched in this consignment shipment (e.g.
2).
|
| error | string | Error classification identifier returned on HTTP 4xx/5xx (e.g.
Method Not Allowed, Forbidden,
Bad Request, Query Failed).
|
{
"status": "Success",
"assoc_ref": "2026-27/001",
"client_order_no": "ORD-2026-001",
"message": "Despatch Records Found",
"despatch_detail": [
{
"desp_date": "2026-10-12",
"awb_no": "BD889201948IN",
"inv_no": "INV-2026-00412",
"inv_date": "2026-10-12",
"vendor": "Blue Dart Express",
"packets": 3,
"expected_delivery_date": "2026-10-15",
"actual_weight": 4.25,
"charged_weight": 5.00,
"dispatched_items": [
{
"prod_id": "SKU-BLK-001",
"prod_desc": "Industrial Safety Boots - Size 9",
"desp_qty": 2
},
{
"prod_id": "SKU-GLV-004",
"prod_desc": "Heat Resistant Heavy-Duty Gloves",
"desp_qty": 5
}
]
}
]
}
{
"status": "Success",
"order_no": "2026-27/102",
"client_order_no": "ORD-2026-102",
"message": "No records found matching criteria",
"despatch_detail": []
}
{
"status": "Failed",
"order_no": "2026-27/999-NOTFOUND",
"message": "Order reference not found"
}
{
"status": "Validation Failed",
"message": "Missing or empty assoc_ref."
}
Status Codes & Error Matrix
Interactive API Playground
Docket & Consignment Inspection Console
Simulate live GET requests & verify logistics consignment records.
// Ready to send. Status code, HTTP headers, and consignment dockets will appear here.
Integration Code Samples
Purchase Order Ingestion API
Ingest inbound vendor Purchase Orders with line-item SKU details, unit pricing, exchange rates, and
quantity breakdowns. Automatically performs atomic database transaction processing, verifies vendor
registration (assoc_id with Supplier role), validates SKU
existence, calculates total purchase order value, and prepares stock for warehouse receiving.
Request Payload Schema
The endpoint exclusively accepts HTTP POST requests with a JSON body containing the purchase order header and child item details.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| po_no | string | Required | — | Unique Purchase Order identifier (e.g. PO-2026-001). Rejects
duplicates with 422 Unprocessable Entity. |
| po_date | string | Required | — | Order issuance date in YYYY-MM-DD format (e.g.
2026-10-22).
|
| assoc_id | string | Required | — | Registered supplier/vendor identifier (e.g. VEND-001). Must exist
with type Supplier. Unknown vendor returns
422 Validation Failed.
|
| back_order | string | Optional | "N" |
Whether partial back-order fulfillment is permitted ("Y" or
"N").
|
| po_value | number | Optional | 0.00 |
Gross PO monetary value. Automatically computed from item lines if omitted. |
| txn_status | string | Optional | "Pending" |
Workflow state milestone (e.g. Pending, Confirmed).
|
| items | array | Required | — | Array of line item detail objects. Every item must specify prod_id,
qty, price, and disc_p.
|
| items[].prod_id | string | Required | — | Catalog SKU product code (e.g. SKU-TECH-001). Must exist in your
active product master. |
| items[].qty | number | Required | 1 |
Ordered unit quantity (e.g. 100). |
| items[].base_unit | string | Optional | "EACH" |
Packaging measurement unit (e.g. EACH, BOX,
PCS).
|
| items[].price_cur | string | Optional | "INR" |
Pricing currency code (e.g. INR, USD). |
| items[].price | number | Required | 1.00 |
Net unit cost price per base unit (e.g. 450.00). |
| items[].exch_rate | number | Optional | 1.00 |
Currency conversion multiplier relative to base currency. |
| items[].disc_p | number | Required | 0.00 |
Discount percentage applied to this line (e.g. 5.00 for 5%). |
| items[].line_status | string | Optional | "Pending" |
Item line fulfillment status (default "Pending"). |
{
"po_no": "PO-2026-001",
"po_date": "2026-10-22",
"assoc_id": "VEND-001",
"back_order": "N",
"txn_status": "Pending",
"items": [
{
"prod_id": "SKU-TECH-001",
"qty": 100,
"base_unit": "EACH",
"price_cur": "INR",
"price": 450.00,
"exch_rate": 1.00,
"disc_p": 5.00,
"line_status": "Pending"
},
{
"prod_id": "SKU-TECH-002",
"qty": 50,
"base_unit": "BOX",
"price_cur": "INR",
"price": 850.00,
"exch_rate": 1.00,
"disc_p": 0.00,
"line_status": "Pending"
}
]
}
Response Schema & Validation Contracts
The API executes atomic validation across supplier identity, SKU existence, and duplicate reference constraints before staging records for inbound warehouse receiving.
| Field | Type | Description |
|---|---|---|
| status | string | Execution outcome: Success (for HTTP 201) or
Validation Failed (for HTTP 422).
|
| message | string | Detailed outcome message (e.g. PO successfully created.,
PO already exists : PO-2026-001, Unknown Vendor,
Unknown Product).
|
| po_no | string | Confirmed Purchase Order identifier echoed on successful creation. |
| po_date | string | Confirmed issuance date logged in system records. |
| field | string | Returned on specific lookup validation errors pinpointing the offending
attribute (e.g. assoc_id, items[0].prod_id). |
| value | string | The invalid value submitted that caused lookup validation to fail. |
{
"status": "Success",
"message": "PO successfully created.",
"po_no": "PO-2026-001",
"po_date": "2026-10-22"
}
{
"error": "Validation Failed",
"message": "PO already exists : PO-2026-001"
}
{
"status": "Validation Failed",
"message": "Unknown Vendor",
"field": "assoc_id",
"value": "VEND-999-NOTFOUND"
}
{
"status": "Validation Failed",
"message": "Unknown Product",
"field": "items[0].prod_id",
"value": "SKU-UNKNOWN-ITEM"
}
Status Codes & Error Matrix
Interactive API Playground
Purchase Order Ingestion Console
Simulate live POST requests with headers & line-item calculations.
// Ready to send. Status code, HTTP headers, and confirmation will appear here.
Integration Code Samples
Inbound Receipts API
Retrieve goods receipts (GRN), inbound delivery shipments, associate vendor details, and received/damaged quantities for any transaction date and inward type.
Request Payload Schema
The endpoint expects a JSON payload containing the inward date filter and inward movement type.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| inward_date | string | Required | — | Date of inbound transaction (YYYY-MM-DD, e.g.
2026-10-02). Cannot be empty, whitespace, or literal
"null". Missing value returns
422 Unprocessable Entity.
|
| inward_type | string | Required | — | Inward transaction classification code (e.g. Purchase,
Sales Return and Stock Transfer. Cannot be empty or
null.
|
{
"inward_date": "2026-10-02",
"inward_type": "Purchase"
}
Response Schema & Inbound Records
On success, the API returns HTTP 200 OK with an array of inward item receipts
| Field | Type | Description |
|---|---|---|
| status | string | Execution outcome: Success (for HTTP 200) or
Validation Failed (for HTTP 422).
|
| inward_type | string | Echoed inward classification code (e.g. Purchase). |
| inward_date | string | Echoed query date (YYYY-MM-DD). |
| message | string | Contextual outcome message:
• Inwards Found (matching records located)
• No records found matching criteria (valid query, 0 records
found)
• Missing or empty inward_date, inward_type. (validation
failure)
• Fatal Error, Contact administrator (query failure)
|
| inward_records | array | Array of item-level inward receipt line items. |
| inward_records[].inward_type | string | Inbound movement type code (e.g. Purchase). |
| inward_records[].inward_no | string/number | Unique inward transaction ID. |
| inward_records[].inward_date | string | Date of goods receipt (YYYY-MM-DD).
|
| inward_records[].assoc_id | string | Vendor/supplier associate ID (e.g. ASC-0012). |
| inward_records[].assoc_name | string | Vendor/supplier trade name. |
| inward_records[].po_no | string | Client purchase order reference. |
| inward_records[].prod_id | string | Product SKU code. |
| inward_records[].prod_desc | string | Product catalog description. |
| inward_records[].doc_qty | number | Documented / invoice quantity stated by vendor or supplier. |
| inward_records[].qty | number | Total units accepted and received into stock. |
| inward_records[].dam_qty | number | Units flagged as damaged or rejected during quality inspection. |
| error | string | Error code returned on 500 exceptions ("Query Failed") or protocol
rejections. |
{
"status": "Success",
"inward_type": "Purchase",
"inward_date": "2026-10-02",
"message": "Inwards Found",
"inward_records": [
{
"inward_type": "Purchase",
"inward_no": "10042",
"inward_date": "2026-10-02",
"assoc_id": "ASC-0012",
"assoc_name": "Orient Publications Pvt Ltd",
"po_no": "PO-2026-8812",
"prod_id": "SKU-CBSE-MATH-10",
"prod_desc": "NCERT Mathematics Class 10 Textbook",
"doc_qty": 152,
"qty": 150,
"dam_qty": 2
},
{
"inward_type": "Purchase",
"inward_no": "10043",
"inward_date": "2026-10-02",
"assoc_id": "ASC-0012",
"assoc_name": "Orient Publications Pvt Ltd",
"po_no": "PO-2026-8812",
"prod_id": "SKU-CBSE-SCI-10",
"prod_desc": "NCERT Science Class 10 Textbook",
"doc_qty": 100,
"qty": 100,
"dam_qty": 0
}
]
}
{
"status": "Success",
"inward_type": "Purchase",
"inward_date": "2026-10-05",
"message": "No records found matching criteria",
"inward_records": []
}
{
"error": "Query Failed",
"message": "Fatal Error, Contact administrator"
}
Status Codes & Error Matrix
Interactive API Playground
Inward Goods Receipt Console
Simulate live GET requests & verify inbound delivery records.
// Ready to send. Status code, HTTP headers, and inward records will appear here.
Integration Code Samples
Stock on Date API
Retrieve available-to-promise (ATP) saleable inventory and damaged stock balances per SKU aggregated up to any historical cutoff transaction date.
Request Payload Schema
The endpoint expects a JSON payload containing the cutoff date for inventory aggregation.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| stock_date | string | Required | — | Cutoff transaction date (YYYY-MM-DD, e.g.
2026-10-02). Evaluates cumulative stock up to this date
(txn_date <= stock_date). Cannot be empty, whitespace, or
literal
"null". Missing value returns
422 Unprocessable Entity.
|
{
"stock_date": "2026-10-02"
}
Response Schema & Stock Records
On success, the API returns HTTP 200 OK with an array of product inventory balances evaluated up to the cutoff date.
| Field | Type | Description |
|---|---|---|
| status | string | Execution outcome: Success (for HTTP 200 with records),
Failure (for HTTP 200 when no records found), or
Validation Failed (for HTTP 422).
|
| stock_date | string | Echoed query cutoff date (YYYY-MM-DD). |
| message | string | Contextual outcome message:
• Stock Found (matching inventory records located)
• Stock Not Found (valid query, 0 records found)
• Missing or empty stock_date. (validation failure)
• Fatal Error, Contact administrator (query failure)
|
| stock_records | array | Array of SKU-level stock balance objects (present when stock is found). |
| stock_records[].stock_date | string | Effective snapshot date (YYYY-MM-DD). |
| stock_records[].prod_id | string | Product SKU code. |
| stock_records[].prod_desc | string | Product catalog description. |
| stock_records[].saleable_qty | number | Available, undamaged pickable stock calculated. |
| stock_records[].dam_qty | number | Damaged or quarantine units. |
| error | string | Error code returned on 500 exceptions ("Query Failed") or protocol
rejections. |
{
"status": "Success",
"stock_date": "2026-10-02",
"message": "Stock Found",
"stock_records": [
{
"stock_date": "2026-10-02",
"prod_id": "SKU-CBSE-MATH-10",
"prod_desc": "NCERT Mathematics Class 10 Textbook",
"saleable_qty": 450,
"dam_qty": 5
},
{
"stock_date": "2026-10-02",
"prod_id": "SKU-CBSE-SCI-10",
"prod_desc": "NCERT Science Class 10 Textbook",
"saleable_qty": 320,
"dam_qty": 0
}
]
}
{
"status": "Failure",
"stock_date": "2026-10-02",
"message": "Stock Not Found"
}
{
"error": "Query Failed",
"message": "Fatal Error, Contact administrator"
}
Status Codes & Error Matrix
Interactive API Playground
Stock Balance Console
Simulate live GET requests & verify inventory ATP balances.
// Ready to send. Status code, HTTP headers, and stock records will appear here.
Integration Code Samples
Stock Ledger API
Audit itemized inventory movement histories for any product SKU across a date range, complete with automated opening balance aggregation, goods receipts, customer dispatches, and quarantine adjustments.
Request Payload Schema
The endpoint expects a JSON payload containing the date range and product SKU identifier.
| Field | Type | Requirement | Default | Description / Validation Rules |
|---|---|---|---|---|
| begin_date | string | Required | — | Start date of ledger audit window (YYYY-MM-DD, e.g.
2026-09-01). Prior inventory transactions
(txn_date < begin_date) are summed into the Opening balance
entry. Cannot be empty or null.
|
| end_date | string | Required | — | End date of ledger audit window (YYYY-MM-DD, e.g.
2026-10-02). Filters transactions where
txn_date BETWEEN begin_date AND end_date. Cannot be empty or null.
|
| prod_id | string | Required | — | Unique Product SKU code (e.g. SKU-CBSE-MATH-10). Matches against
product master catalog. Cannot be empty or null. |
{
"begin_date": "2026-09-01",
"end_date": "2026-10-02",
"prod_id": "SKU-CBSE-MATH-10"
}
Response Schema & Stock Ledger
On success, the API returns HTTP 200 OK with a chronological array of transaction movements beginning with an automated Opening balance row.
| Field | Type | Description |
|---|---|---|
| status | string | Execution outcome: Success (for HTTP 200) or
Validation Failed (for HTTP 422).
|
| begin_date | string | Echoed query start date (YYYY-MM-DD). |
| end_date | string | Echoed query end date (YYYY-MM-DD). |
| prod_id | string | Echoed product SKU identifier. |
| message | string | Contextual outcome message:
• Stock Found (ledger movements located)
• Stock Not Found (valid query, 0 movements found)
• Missing or empty begin_date, end_date, prod_id (validation
failure)
• Fatal Error, Contact administrator (query failure)
|
| stock_ledger | array | Array of chronological inventory ledger entries. |
| stock_ledger[].txn_id | number | Unique ledger transaction sequence ID (0 for synthetic Opening
balance entry). |
| stock_ledger[].txn_date | string | Date of stock event (YYYY-MM-DD). |
| stock_ledger[].doc_id | string | Source document reference (e.g. Opening, GRN-10042,
SALO-2026-001).
|
| stock_ledger[].wh_id | string | Fulfillment center or warehouse facility code (e.g. WH-DEL-01).
|
| stock_ledger[].prod_id | string | Product SKU code. |
| stock_ledger[].prod_desc | string | Product catalog description. |
| stock_ledger[].qty_in | number | Inbound quantity received (or net available Opening balance on opening row). |
| stock_ledger[].qty_out | number | Outbound quantity picked and dispatched for sales fulfillment. |
| stock_ledger[].qty_dam | number | Damaged, rejected, or written-off units quarantined during inspection. |
| error | string | Error code returned on 500 exceptions ("Query Failed") or protocol
rejections. |
{
"status": "Success",
"begin_date": "2026-09-01",
"end_date": "2026-10-02",
"prod_id": "SKU-CBSE-MATH-10",
"message": "Stock Found",
"stock_ledger": [
{
"txn_id": 0,
"txn_date": "2026-09-01",
"doc_id": "Opening",
"wh_id": "WH-DEL-01",
"prod_id": "SKU-CBSE-MATH-10",
"prod_desc": "NCERT Mathematics Class 10 Textbook",
"qty_in": 120,
"qty_out": 0,
"qty_dam": 0
},
{
"txn_id": 1042,
"txn_date": "2026-09-15",
"doc_id": "GRN-2026-0915",
"wh_id": "WH-DEL-01",
"prod_id": "SKU-CBSE-MATH-10",
"prod_desc": "NCERT Mathematics Class 10 Textbook",
"qty_in": 350,
"qty_out": 0,
"qty_dam": 5
},
{
"txn_id": 1098,
"txn_date": "2026-09-22",
"doc_id": "SALO-2026-110",
"wh_id": "WH-DEL-01",
"prod_id": "SKU-CBSE-MATH-10",
"prod_desc": "NCERT Mathematics Class 10 Textbook",
"qty_in": 0,
"qty_out": 20,
"qty_dam": 0
}
]
}
{
"status": "Success",
"begin_date": "2026-09-01",
"end_date": "2026-10-02",
"prod_id": "SKU-CBSE-MATH-10",
"message": "Stock Not Found",
"stock_ledger": []
}
{
"error": "Query Failed",
"message": "Fatal Error, Contact administrator"
}
Status Codes & Error Matrix
Interactive API Playground
Stock Ledger Console
Simulate live GET requests & verify chronological SKU stock movement.
// Ready to send. Status code, HTTP headers, and ledger timeline will appear here.
Integration Code Samples
Endpoint Name
This endpoint is scheduled for release in the Ananta 4PL API Roadmap.
API Specification In Progress
This endpoint contract is currently being designed and drafted. As soon as the specification is added, its full interactive playground, schema tables, and mock sandbox will appear here automatically.