Security Protocol v1.0 Standard Global Protocol

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.

HEADER X-API-Key: {prefix}_{env}_{publicIdentifier}_{secret}

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.

Mandatory Scope & Key Format: The request must supply an active API key formatted as {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.
1
Strict HTTPS & Method Guard SSL/HTTPS is mandatory across all endpoints (403 Forbidden); Method must match endpoint guard (405 Method Not Allowed).
2
X-API-Key Structure Requires 4+ underscore parts; resolves active key record by prefix_env_identifier.
3
Timing-Safe SHA-512 Cryptographic hash evaluated with hash_equals() preventing side-channels.
4
Permission Scopes Evaluates assigned permission scopes before processing payloads (e.g. write:orders, write:associates, read:stocks).
5
Rate Limiter MySQL fixed-window window tracking (default 60 req/min, 429 on overflow).

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 '{ ... }'
HTTP Standards RFC 7231 & W3C CORS Global Protocol

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.
CORS & Preflight: An HTTP 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"
Expected 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
Setup Service API v1.0 Production Ready

Associate Master API

Onboard and synchronize business associate entities—including Customers and Vendors in the Ananta 4PL network.

POST https://www.ananta4pl.in/associate/

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.
Sample 201 Created Response:
{
  "status": "Success",
  "assoc_id": "CU001",
  "assoc_name": "Malhotra Books",
  "message": "Associate Created/Updated"
}

Status Codes & Error Matrix

201 Created
Created / Updated
Associate profile successfully created or updated in client directory.
422 Unprocessable
Missing assoc_name
Mandatory field 'assoc_name' was omitted or empty in the JSON payload.
422 Unprocessable
Missing State
Mandatory field 'state' was omitted, blank, or null.
401 Unauthorized
Auth Failure
API key missing, malformed or inactive.
403 Forbidden
Scope Deficit
API Key lacks required permission scope.
405 Method Not Allowed
Method Rejected
Non-POST request received; endpoint exclusively accepts POST requests.
400 Bad Request
Malformed JSON
Malformed JSON syntax or empty body received.
429 Rate Limited
Window Saturated
Fixed-window 60 req/min saturated. Retry after 1 min.

Interactive API Playground

Associate Registration Console

Simulate live associate upserts & verify API contracts.

Preset:
X-API-Key Header verification
JSON Request Body
Response Console
Awaiting dispatch...
// Ready to send. Status codes, headers, and upsert confirmation will appear here.

Integration Code Samples

curl --request POST \
  --url https://www.ananta4pl.in/associate/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "assoc_type": "Customer",
    "assoc_id": "CU001",
    "assoc_name": "Malhotra Books",
    "state": "06",
    "address": "SCF-14, Sector 15",
    "city": "Panchkula",
    "pin": "134109",
    "contact_person": "Raman Malhotra",
    "mobile_no": "9988776655",
    "email_id": "accounts@malhotrabooks.com",
    "gst_no": "06AABCM1234F1Z8"
  }'
Setup Service API v1.0 Production Ready

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.

POST https://www.ananta4pl.in/product/

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.
Sample 201 Created Response:
{
  "status": "Success",
  "prod_id": "SKU-CBSE-MATH-10",
  "prod_desc": "NCERT Mathematics Class 10 Textbook",
  "message": "SKU Created/Updated"
}

Status Codes & Error Matrix

201 Created
Created / Updated
Product SKU successfully created or updated in client catalog.
422 Unprocessable
Missing prod_desc
Mandatory field 'prod_desc' was omitted or empty in payload.
422 Unprocessable
Missing HSN / Price
Mandatory fields 'hsn_code' or 'sale_price' were blank/null.
401 Unauthorized
Auth Failure
API key missing, malformed or inactive.
403 Forbidden
Scope Deficit
API Key lacks required permission scope: 'write:products'.
405 Method Not Allowed
Method Rejected
Non-POST request received; endpoint exclusively accepts POST requests.
400 Bad Request
Malformed JSON
Malformed JSON syntax or empty body received.
429 Rate Limited
Window Saturated
Fixed-window 60 req/min saturated. Retry after 1 min.

Interactive API Playground

Product SKU Sync Console

Simulate live SKU upserts & verify API contracts.

Preset:
X-API-Key Header verification
JSON Request Body
Response Console
Awaiting dispatch...
// Ready to send. Status codes, headers, and upsert confirmation will appear here.

Integration Code Samples

curl --request POST \
  --url https://www.ananta4pl.in/product/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "prod_id": "SKU-CBSE-MATH-10",
    "prod_desc": "NCERT Mathematics Class 10 Textbook",
    "prod_cat": 4,
    "cover_cur": "INR",
    "cover_price": 380.00,
    "sale_cur": "INR",
    "sale_price": 340.00,
    "buy_group": "INDIAN",
    "publisher": "NCERT Publications",
    "subject": "Mathematics",
    "author": "NCERT Editorial Board",
    "school_grade": "Class 10",
    "length": 24.5,
    "width": 18.2,
    "height": 1.8,
    "volume": 802.62,
    "weight": 480.00,
    "baseUnit": "EACH",
    "hsn_code": "49011010",
    "prod_image": "https://img.ananta4pl.in/skus/math-10.jpg"
  }'
Orders Service API v1.0 Production Ready

Create Order API

Creates a new sales order transaction in Ananta 4PL logistics system.

POST https://www.ananta4pl.in/order/

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).
201 Created Response:
{
  "status": "Success",
  "message": "Order successfully created.",
  "assoc_ref": "2026-27/001",
  "assoc_ref_date": "2026-09-18",
  "client_order_no": "ORD-2026-001"
}
422 Validation Error Examples:
// 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

201 Created
Order Created
Order and line items registered within an atomic transaction. Echoes assoc_ref, assoc_ref_date, and client_order_no.
422 Unprocessable
Duplicate Order Ref
assoc_ref already exists for your client account.
422 Validation Error
Missing Fields
Missing or empty required header/detail parameters.
422 Unknown Customer
Invalid bill_to
Customer code not found in client master setup with type Customer.
422 Unknown Product
Invalid prod_id
Line item prod_id does not exist in client catalog.
401 Unauthorized
Auth Failure
Missing header, malformed structure (<4 parts), deactivated token, or SHA-512 mismatch.
403 Forbidden
SSL / Scope Deficit
Non-HTTPS connection or key lacking write:orders scope.
405 Method Not Allowed
Invalid HTTP Method
This endpoint exclusively accepts POST requests.
400 Bad Request
Invalid JSON
Malformed syntax or empty body in HTTP POST.
429 Rate Limited
Limit Saturated
60 req/min threshold exceeded. Check X-RateLimit headers.
500 Server Error
Storage / DB Error
Database connection failure or transaction rolled back.

Interactive API Playground

Order Dispatch Console

Simulate API behavior or inspect live headers.

Preset:
X-API-Key Header verification
JSON Request Body
Response Console
Awaiting dispatch...
// Ready to send. Responses will display status codes, headers, and payload here.

Integration Code Samples

curl --request POST \
  --url https://www.ananta4pl.in/order/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "txn_date": "2026-09-18",
    "doc_id": "SALO",
    "client_order_no": "ORD-2026-001",
    "assoc_ref": "2026-27/001",
    "assoc_ref_date": "2026-09-18",
    "bill_to": "CU001",
    "cons_name": "Malhotra Books",
    "cons_address": "SCF-14, Sect-15",
    "cons_city": "Panchkula",
    "cons_state": "06",
    "cons_pin": "134109",
    "cons_phone": "9988776655",
    "items": [
      {
        "prod_id": "TESTPRD0001",
        "order_qty": 200,
        "price": 399,
        "mrp": 499
      }
    ]
  }'
Orders Service API v1.0 Production Ready

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.

GET https://www.ananta4pl.in/order_status/

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.
Example Request Payload:
{
  "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.
HTTP 200 OK — Delivered with Signed Proof of Delivery (POD):
{
  "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"
}
HTTP 200 OK — In-Transit / Dispatched:
{
  "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"
}
HTTP 404 Not Found — Order Reference Not Found:
{
  "status": "Failed",
  "order_no": "2026-27/999-NOTFOUND",
  "message": "Order reference not found"
}
HTTP 422 Unprocessable — Missing Required Field:
{
  "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

200 OK
Status Retrieved
Order found; returns latest milestone state, timestamp, and signed POD link if delivered.
404 Not Found
Order Not Found
Order reference does not exist for your client account.
422 Unprocessable
Validation Failed
Required field 'assoc_ref' was omitted, blank, or literal null.
401 Unauthorized
Authentication Failed
Missing X-API-Key, malformed structure, inactive token, or hash mismatch.
403 Forbidden
Scope Deficit
API Key lacks required permission scope 'read:order_status'.
403 Forbidden
SSL Required
Unencrypted HTTP request rejected; SSL/HTTPS connection is strictly required.
405 Method Not Allowed
Method Rejected
Request method was not GET; this endpoint exclusively accepts GET requests.
400 Bad Request
Malformed JSON
Malformed syntax or unparseable JSON payload in request body.
429 Rate Limited
Rate Window Saturated
60 requests/minute limit reached. Retry after 1 minute window reset.

Interactive API Playground

Order Status Inspection Console

Simulate live GET requests with headers & verify response contracts.

Preset:
X-API-Key Header verification
JSON Query Body (GET)
Response Console
Awaiting dispatch...
// Ready to send. Status code, HTTP headers, and milestone status will appear here.

Integration Code Samples

curl --request GET \
  --url https://www.ananta4pl.in/order_status/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "assoc_ref": "2026-27/001"
  }'
Logistics Service API v1.0 Production Ready

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.

GET https://www.ananta4pl.in/docket_info/

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.
HTTP GET with JSON Payload: This endpoint requires the parameter to be supplied as a JSON body (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.
Example Request Payload:
{
  "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).
HTTP 200 OK — Despatch Found:
{
  "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
        }
      ]
    }
  ]
}
HTTP 200 OK — Order Pending Dispatch:
{
  "status": "Success",
  "order_no": "2026-27/102",
  "client_order_no": "ORD-2026-102",
  "message": "No records found matching criteria",
  "despatch_detail": []
}
HTTP 404 Not Found:
{
  "status": "Failed",
  "order_no": "2026-27/999-NOTFOUND",
  "message": "Order reference not found"
}
HTTP 422 Unprocessable Entity:
{
  "status": "Validation Failed",
  "message": "Missing or empty assoc_ref."
}

Status Codes & Error Matrix

200 OK
Despatch Retrieved
Order found; returns array of AWB consignment dockets, client_order_no, weights, and invoice details.
200 OK
Pending Dispatch
Order exists in header, but 0 dockets created yet (empty despatch_detail array).
404 Not Found
Order Not Found
Order reference not found for your client account.
422 Unprocessable
Missing assoc_ref
Required field 'assoc_ref' was omitted, blank, or null in the payload.
401 Unauthorized
Authentication Failed
Key missing in header, malformed key structure, or SHA-512 hash mismatch.
403 Forbidden
Scope / SSL Deficit
Non-SSL connection or API Key lacks required permission scope 'read:dockets'.
405 Method Not Allowed
Method Rejected
Request method was not GET; this endpoint exclusively accepts GET requests.
400 Bad Request
Malformed JSON
Malformed syntax or empty body received in php://input.
429 Rate Limited
Rate Window Saturated
Fixed-window 60 req/min saturated. Retry after one minute.
500 Server Error
Query Execution Failed
Server exception: 'Fatal Error, Contact administrator'.

Interactive API Playground

Docket & Consignment Inspection Console

Simulate live GET requests & verify logistics consignment records.

Preset:
X-API-Key Header verification
JSON Query Body (GET)
Response Console
Awaiting dispatch...
// Ready to send. Status code, HTTP headers, and consignment dockets will appear here.

Integration Code Samples

curl --request GET \\
  --url https://www.ananta4pl.in/docket_info/ \\
  --header 'X-API-Key: YOUR_API_KEY' \\
  --header 'Content-Type: application/json; charset=UTF-8' \\
  --header 'Accept: application/json' \\
  --data '{
    "assoc_ref": "2026-27/001"
  }'
Inventory Service API v1.0 Production Ready

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.

POST https://www.ananta4pl.in/po/

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").
Example Request Payload:
{
  "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.
HTTP 201 Created — Order Ingested Successfully:
{
  "status": "Success",
  "message": "PO successfully created.",
  "po_no": "PO-2026-001",
  "po_date": "2026-10-22"
}
HTTP 422 Unprocessable — Duplicate PO Number:
{
  "error": "Validation Failed",
  "message": "PO already exists : PO-2026-001"
}
HTTP 422 Validation Failed — Unknown Vendor:
{
  "status": "Validation Failed",
  "message": "Unknown Vendor",
  "field": "assoc_id",
  "value": "VEND-999-NOTFOUND"
}
HTTP 422 Validation Failed — Unknown Product SKU:
{
  "status": "Validation Failed",
  "message": "Unknown Product",
  "field": "items[0].prod_id",
  "value": "SKU-UNKNOWN-ITEM"
}

Status Codes & Error Matrix

201 Created
PO Ingested
Order records and line items saved; staged for warehouse receipts.
422 Conflict
Duplicate PO
Purchase order number already exists in your client account.
422 Validation
Unknown Vendor
Supplier assoc_id does not exist or lacks Supplier classification.
422 Validation
Unknown Product
One or more product SKUs in items[] do not exist in product catalog.
422 Validation
Missing Fields
Required header or item detail fields were omitted, empty, or null.
401 Unauthorized
Authentication Failed
Missing X-API-Key, malformed structure, or deactivated token.
403 Forbidden
Scope Deficit
API Key lacks required permission scope 'write:po'.
405 Method Not Allowed
Method Rejected
Request method was not POST; this endpoint exclusively accepts POST requests.
400 Bad Request
Malformed JSON
Malformed syntax or empty body received in payload.
429 Rate Limited
Rate Window Saturated
Fixed-window 60 req/min saturated. Retry after one minute.

Interactive API Playground

Purchase Order Ingestion Console

Simulate live POST requests with headers & line-item calculations.

Preset:
X-API-Key Header verification
JSON Ingestion Payload (POST)
Response Console
Awaiting dispatch...
// Ready to send. Status code, HTTP headers, and confirmation will appear here.

Integration Code Samples

curl --request POST \
  --url https://www.ananta4pl.in/po/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "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"
      }
    ]
  }'
Inventory Service API v1.0 Production Ready

Inbound Receipts API

Retrieve goods receipts (GRN), inbound delivery shipments, associate vendor details, and received/damaged quantities for any transaction date and inward type.

GET https://www.ananta4pl.in/inward_on_date/

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.
Example Request Payload:
{
  "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.
HTTP 200 OK — Inwards Found:
{
  "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
    }
  ]
}
HTTP 200 OK — No Records Found:
{
  "status": "Success",
  "inward_type": "Purchase",
  "inward_date": "2026-10-05",
  "message": "No records found matching criteria",
  "inward_records": []
}
HTTP 500 Server Error — Query Failed:
{
  "error": "Query Failed",
  "message": "Fatal Error, Contact administrator"
}

Status Codes & Error Matrix

200 OK
Inwards Retrieved
Transactions found; returns itemized receipt list with associate & quantity details.
200 OK
No Records Found
Valid query criteria, but no matching inward records found for the date.
422 Unprocessable
Missing Required Fields
Missing or empty inward_date or inward_type payload parameters.
401 Unauthorized
Authentication Failed
Key missing in header, malformed structure, or token deactivated.
403 Forbidden
Scope Deficit
API Key lacks required permission.
405 Method Not Allowed
Method Rejected
Request was not GET; this endpoint exclusively accepts GET requests.
400 Bad Request
Malformed JSON
Malformed syntax or empty body received in HTTP payload.
429 Rate Limited
Rate Window Saturated
60 req/min saturated. Retry after one minute.
500 Server Error
Query Execution Failed
Database exception: 'Fatal Error, Contact administrator'.

Interactive API Playground

Inward Goods Receipt Console

Simulate live GET requests & verify inbound delivery records.

Preset:
X-API-Key Header verification
Request Payload (JSON)
Response Console
Awaiting dispatch...
// Ready to send. Status code, HTTP headers, and inward records will appear here.

Integration Code Samples

curl --request GET \
  --url https://www.ananta4pl.in/inward_on_date/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "inward_date": "2026-10-02",
    "inward_type": "PO"
  }'
Inventory Service API v1.0 Production Ready

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.

GET https://www.ananta4pl.in/stock_on_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.
Example Request Payload:
{
  "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.
HTTP 200 OK — Stock Found:
{
  "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
    }
  ]
}
HTTP 200 OK — Stock Not Found:
{
  "status": "Failure",
  "stock_date": "2026-10-02",
  "message": "Stock Not Found"
}
HTTP 500 Server Error — Query Failed:
{
  "error": "Query Failed",
  "message": "Fatal Error, Contact administrator"
}

Status Codes & Error Matrix

200 OK
Stock Retrieved
Inventory located; returns itemized balance list with SKU, saleable & damaged counts.
200 OK
Stock Not Found
Valid query criteria, but no ledger transactions exist on or before the cutoff date.
422 Unprocessable
Missing Required Fields
Missing or empty stock_date payload parameter.
401 Unauthorized
Authentication Failed
Key missing in header, malformed structure, or token deactivated.
403 Forbidden
Scope Deficit
API Key lacks required permission.
405 Method Not Allowed
Method Rejected
Request was not GET; this endpoint exclusively accepts GET requests.
400 Bad Request
Malformed JSON
Malformed syntax or empty body received in HTTP payload.
429 Rate Limited
Rate Window Saturated
60 req/min saturated. Retry after one minute.
500 Server Error
Query Execution Failed
Database exception: 'Fatal Error, Contact administrator'.

Interactive API Playground

Stock Balance Console

Simulate live GET requests & verify inventory ATP balances.

Preset:
X-API-Key Header verification
Request Payload (JSON)
Response Console
Awaiting dispatch...
// Ready to send. Status code, HTTP headers, and stock records will appear here.

Integration Code Samples

curl --request GET \
  --url https://www.ananta4pl.in/stock_on_date/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "stock_date": "2026-10-02"
  }'
Inventory Service API v1.0 Production Ready

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.

GET https://www.ananta4pl.in/stock_ledger/

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.
Example Request Payload:
{
  "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.
HTTP 200 OK — Stock Ledger Found:
{
  "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
    }
  ]
}
HTTP 200 OK — Stock Not Found:
{
  "status": "Success",
  "begin_date": "2026-09-01",
  "end_date": "2026-10-02",
  "prod_id": "SKU-CBSE-MATH-10",
  "message": "Stock Not Found",
  "stock_ledger": []
}
HTTP 500 Server Error — Query Failed:
{
  "error": "Query Failed",
  "message": "Fatal Error, Contact administrator"
}

Status Codes & Error Matrix

200 OK
Ledger Retrieved
Movements located; returns chronological entries with opening, inward, dispatch & damage.
200 OK
Stock Not Found
Valid query criteria, but no ledger transactions exist within the specified date range.
422 Unprocessable
Missing Required Fields
Missing or empty begin_date, end_date, or prod_id payload parameters.
401 Unauthorized
Authentication Failed
Key missing in header, malformed structure, or token deactivated.
403 Forbidden
Scope Deficit / HTTPS
API Key lacks permission or SSL/HTTPS connection is missing.
405 Method Not Allowed
Method Rejected
Request was not GET; this endpoint exclusively accepts GET requests.
400 Bad Request
Malformed JSON
Malformed syntax or empty body received in HTTP payload.
429 Rate Limited
Rate Window Saturated
60 req/min saturated. Retry after one minute.
500 Server Error
Query Execution Failed
Database exception: 'Fatal Error, Contact administrator'.

Interactive API Playground

Stock Ledger Console

Simulate live GET requests & verify chronological SKU stock movement.

Preset:
X-API-Key Header verification
Request Payload (JSON)
Response Console
Awaiting dispatch...
// Ready to send. Status code, HTTP headers, and ledger timeline will appear here.

Integration Code Samples

curl --request GET \
  --url https://www.ananta4pl.in/stock_ledger/ \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "begin_date": "2026-09-01",
    "end_date": "2026-10-02",
    "prod_id": "SKU-CBSE-MATH-10"
  }'
Service Planned / In Design

Endpoint Name

This endpoint is scheduled for release in the Ananta 4PL API Roadmap.

POST /path

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.