/
Pull create order flow

Pull create order flow

Step 1: Get pendency orders from the following API

GET : /orders/pendency

Response:

{ "orders": [ { "carrier": "string", "order_date": 1635828975, "order_id": "string", "order_lines": [ { "item_details": { "brand_name": "string", "color": "string", "ean": "string", "item_code": "string", "name": "string", "size": "string" }, "order_item_id": "string", "ordered_quantity": 0, "mrp": 0, "unit_price": 0, "listing_price ": 0, "seller_discount": 0, "b2b_base_price": 0, "b2b_tax": 0 } ], "payment_method": "string", "tracking_number": "string", "total_amount": 0, } ], "page": { "number": 0, "size": 0, "totalElements": 0, "totalPages": 0 } }

Step 2: Acknowledge relevant orders using the following API

POST : /orders

Request body:

{ "order_id": "string", "order_lines": [ { "cancelled_quantity": 0, "confirmed_quantity": 0, "order_item_id": "string" } ], "status": "enum(Acknowledge, Cancel)" }

Response:

{ "failed_items": [ { "error_message": "string", "order_id": "string" } ], "success": [ { "order_id": "string", "order_lines": [ { "cancelled_quantity": "string", "confirmed_quantity": "string", "order_item_id": "string" } ], "order_status": "enum(Acknowledge, Cancel)" } ] }

Step 3: Get the details of the acknowledged orders using the following API

GET : /orders

Response body:

{ "orders": [ { "carrier": "string", "order_date": 1635828975, "order_id": "string", "payment_method": "string", "po_amount": 0, "total_tax": 0, "po_number": "string", "po_date": 1635828975, "po_pdf_url": "string", "status": "enum (CANCELLED, CONFIRMED, PACKED, DISPATCHED, DELIVERED, READY_TO_DISPATCH)", "order_lines": [ { "item_details": { "brand_name": "string", "color": "string", "ean": "string", "item_code": "string", "name": "string", "size": "string" }, "mrp": 0, "item_base_price": 0, "order_item_id": "string", "quantity": 0, "customer_cancelled_qty": 0, "seller_cancelled_qty": 0, "seller_short_picked_qty": 0, "hsn": "string", "tax_summary": { "cess_amount": 0, "cess_percentage": 0, "cgst_amount": 0, "cgst_percentage": 0, "igst_amount": 0, "igst_percentage": 0, "sgst_amount": 0, "sgst_percentage": 0, "tcs_amount": 0, "tcs_percentage": 0, "gst_amount": 0 }, "po_line_amount": 0, "total_tax": 0 } ], "recipient_address": { "address_line_1": "string", "address_line_2": "string", "address_line_3": "string", "city": "string", "country": "string", "first_name": "string", "last_name": "string", "mobile": "string", "state": "string", "state_code": 0, "zipcode": "string", "gstin": "string" } } ], "page": { "number": 0, "size": 0, "totalElements": 0, "totalPages": 0 } }

 

Step 4: Prepare the PubSub event message body using order details, channel data, WMS access token, and other details and push the event message to the PubSub topic “ajio_create_order”.

 

Related content