Seller Orchestra Internal API Mapping

Order & Fulfillment

Complete seller order operations with 3-layer architecture: API Gateway → Seller Order & Fulfillment Orchestrator → Core Microservices

View Postman Documentation

3-Layer Architecture

Seller API Gateway Public (Internet)
Seller Order & Fulfillment Internal Orchestration
Core Microservices Internal Services

List Orders

Search & Filter

Retrieve paginated list of orders with comprehensive filtering, sorting, and pagination (1 step)

GET
Seller API Gateway Layer 1 - Public
GET /merchant/api/v1/domains/:domain_id/orders

Query Parameters:

page - Page number
limit - Items per page
status - Order status filter
payment_status - Payment filter
fulfillment_status - Fulfillment filter
financial_status - Financial filter
customer_id - Customer filter
date_from / date_to
sort_by / sort_order
search - Order number search
store_id - Store filter
Seller Order & Fulfillment Layer 2 - Orchestration
GET /orders

Orchestrates 1 service call

Layer 3 - Service Calls (1 Step)
1 Order Service Core Microservices
POST /api/orders/search

Search orders with filters, pagination, and sorting

Get Order Details

Full Details

Retrieve complete order details including line items, customer, payment, shipping, fulfillments, and timeline (3 steps)

GET
Seller API Gateway Layer 1 - Public
GET /merchant/api/v1/domains/:domain_id/orders/:order_id
Seller Order & Fulfillment Layer 2 - Orchestration
GET /orders/:order_id

Orchestrates 3 service calls with caching

Layer 3 - Service Calls (3 Steps)
Step 1: Check cache first - return if available
1 Caching Service Shared Services
GET /api/cache/order/:order_id

Check if order is cached

2 Order Service Core Microservices (if not cached)
GET /api/orders/:order_id

Get complete order with line items, customer, payment, shipping, fulfillments, timeline

3 Caching Service Shared Services
POST /api/cache/set

Cache complete order (TTL: 600 seconds)

Update Order Status

Status Transition

Update order status with workflow validation and notifications (5 steps)

PATCH
Seller API Gateway Layer 1 - Public
PATCH /merchant/api/v1/domains/:domain_id/orders/:order_id/status

Request Body:

{
  "status": "processing",  // ENUM: pending, confirmed, processing, shipped, delivered, cancelled, refunded
  "note": "Order is being prepared for shipment",
  "notify_customer": true
}
Seller Order & Fulfillment Layer 2 - Orchestration
PATCH /orders/:order_id/status

Orchestrates 5 service calls

Valid Status Transitions (if applicable):

pending → confirmed, cancelled
confirmed → processing, cancelled
processing → shipped, cancelled
shipped → delivered

Note: Status can be changed to anything unless changed to delivered/cancelled

Layer 3 - Service Calls (5 Steps)
1 Order Service Core Microservices
GET /api/orders/:order_id

Get current order status

2 Validation Internal
Validate Status Transition

Check if transition is allowed (if applicable)

3 Order Service Core Microservices
PATCH /api/orders/:order_id/status

Update order status

4 Notification Service Core Microservices (if notify_customer)
POST /api/notifications/send

Send email/SMS about status change

5 Caching Service Shared Services
DELETE /api/cache/order/:order_id

Invalidate order cache

Create Fulfillment

Ship Items

Create fulfillment for order items with tracking and partial fulfillment support (5 steps)

POST
Seller API Gateway Layer 1 - Public
POST /merchant/api/v1/domains/:domain_id/orders/:order_id/fulfillments
1. Manual Shipment
2. Provider-Based

Self-delivery or non-integrated courier. Manual AWB & delivery person details.

{
  "items": [
    { "id": "iid_001", "name": "Alfredo Pasta", "quantity": 2, "selling_price": 100 }
  ],
  "awb": "1Z999AA10123456784",
  "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
  "provider_id": null,
  "shipping_method": "Self-Delivery",
  "notify_customer": true,
  "customer": {
    "name": "Anjali Patel",
    "phone": "+918765432109",
    "address": {
      "type": "HOME", "name": "John Doe", "phone": "+919999999999",
      "line1": "123 Main Street", "line2": "Apartment 4B",
      "city": "Mumbai", "state": "Maharashtra", "postal_code": "400001",
      "country": "India", "country_code": "IN",
      "coordinates": { "latitude": 19.076, "longitude": 72.8777 }
    }
  },
  "delivery_person": { "name": "Rider Rahul", "phone": "+919876543210" },
  "pickup_address": {
    "type": "OFFICE", "name": "Central Kitchen", "phone": "+919999999999",
    "line1": "456 Business Hub", "city": "Mumbai", "state": "Maharashtra",
    "postal_code": "400001", "country": "India", "country_code": "IN"
  }
}
Seller Order & Fulfillment Layer 2 - Orchestration
POST /orders/:order_id/fulfillments

Orchestrates 5 service calls

Layer 3 - Service Calls (5 Steps)
1 Order Service Core Microservices
GET /api/orders/:order_id/items

Validate line items exist and quantities are valid

2 Shipping & Fulfillment Service Core Microservices
POST /api/shipments

Create & update shipment/fulfillment with tracking

3 Order Service Core Microservices
PUT /api/orders/:order_id

Update order fulfillment status: unfulfilled, partial, fulfilled

4 Notification Service Core Microservices (if notify_customer)
POST /api/notifications/send

Send tracking email/SMS

5 Caching Service Shared Services
DELETE /api/cache/order/:order_id

Invalidate order cache

Cancel Order

Cancel & Refund

Cancel order with optional refund, inventory restoration, and notifications (7 steps)

POST
Seller API Gateway Layer 1 - Public
POST /merchant/api/v1/domains/:domain_id/orders/:order_id/cancel

Request Body:

{
  "reason": "customer_request",  // ENUM: customer_request, out_of_stock, fraud, other
  "cancel_reason_details": "Customer requested cancellation via phone",
  "refund": true,
  "refund_amount": 66.17,  // Optional, defaults to full order amount
  "restock": true,
  "notify_customer": true
}
Seller Order & Fulfillment Layer 2 - Orchestration
POST /orders/:order_id/cancel

Orchestrates 7 service calls

Cancellation Reasons:

customer_request out_of_stock fraud other
Layer 3 - Service Calls (7 Steps)
1 Order Service Core Microservices
GET /api/orders/:order_id

Get order details

2 Validation Internal
Validate Cancellation

Check: not cancelled, not shipped/delivered, payment status

3 Order Service Core Microservices
PATCH /api/orders/:order_id/status

Set status: "cancelled"

4 Inventory Service Core Microservices (if restock)
POST /api/inventory/restore

Add items back to inventory

5 Shipping & Fulfillment Service Core Microservices
PATCH /api/fulfillments/:fulfillment_id/cancel

Cancel each fulfillment

6 Notification Service Core Microservices (if notify_customer)
POST /api/notifications/send

Send cancellation email

7 Caching Service Shared Services
DELETE /api/cache/order/:order_id

Invalidate order cache

Bulk Update Orders

Batch Operations

Bulk update multiple orders - status, tags, or fulfillment (5 steps)

PATCH
Seller API Gateway Layer 1 - Public
PATCH /merchant/api/v1/domains/:domain_id/orders/bulk

Request Body:

{
  "order_ids": ["ord_1", "ord_2", "ord_3"],
  "action": "update_status",  // ENUM: update_status, add_tags, remove_tags, fulfill
  "data": {
    "status": "processing",
    "notify_customers": false
  }
}
Seller Order & Fulfillment Layer 2 - Orchestration
PATCH /orders/bulk

Orchestrates 5 service calls

Bulk Actions:

update_status add_tags remove_tags fulfill
Layer 3 - Service Calls (5 Steps)
1 Validation Internal
Validate Order IDs

Verify all order IDs exist and belong to domain

2 Order Service Core Microservices
Apply action to each order

Batch database updates

3 Caching Service Shared Services
Invalidate caches

Clear cache for all affected orders

4 Notification Service Core Microservices (if notify_customers)
Send bulk notifications

Notify customers about updates

5 Response Internal
Return bulk operation result
{ "success": true, "updated_count": 3, "failed": [], "updated_orders": ["ord_1", "ord_2", "ord_3"] }

Services Used in Order & Fulfillment Module

📦

Order Service

Order CRUD, search, status updates, items

🚚

Shipping & Fulfillment

Shipments, fulfillments, tracking

📊

Inventory Service

Stock restoration on cancellation

📧

Notification Service

Email and SMS notifications

Caching Service

Order caching and invalidation

🎯

Seller Order & Fulfillment

Orchestration layer

Order & Fulfillment Module - Seller Orchestra Internal API Mapping | 6 APIs | 26 Total Steps

Last Updated: December 2025