### POST /api/v1/orders/create/adhoc Source: https://www.postman.com/shiprocketdev/shiprocket-dev-s-public-workspace/documentation/qu05zax/shiprocket-api?sideView=agentMode Documentation for creating an adhoc order via the Shiprocket API. ```APIDOC ## POST /api/v1/orders/create/adhoc ### Description Creates a new adhoc order with the provided order details and items. ### Method POST ### Endpoint /api/v1/orders/create/adhoc ### Parameters #### Request Body - **order_id** (string) - Optional - Unique order ID. - **order_date** (string) - Optional - Date of the order. - **pickup_location** (string) - Optional - Pickup location code. - **comment** (string) - Optional - Additional comments. - **reseller_name** (string) - Optional - Vendor name to display on label. - **company_name** (string) - Optional - Company name. - **billing_customer_name** (string) - Optional - Billing customer first name. - **billing_last_name** (string) - Optional - Billing customer last name. - **billing_address** (string) - Optional - Billing address line 1. - **billing_address_2** (string) - Optional - Billing address line 2. - **billing_isd_code** (string) - Optional - ISD code for billing phone. - **billing_city** (string) - Optional - Billing city. - **billing_pincode** (string) - Optional - Billing pincode. - **billing_state** (string) - Optional - Billing state. - **billing_country** (string) - Optional - Billing country. - **billing_email** (string) - Optional - Billing email. - **billing_phone** (string) - Optional - Billing phone. - **billing_alternate_phone** (string) - Optional - Alternate billing phone. - **shipping_is_billing** (string) - Optional - Flag indicating if shipping address is same as billing. - **shipping_customer_name** (string) - Optional - Shipping customer first name. - **shipping_last_name** (string) - Optional - Shipping customer last name. - **shipping_address** (string) - Optional - Shipping address line 1. - **shipping_address_2** (string) - Optional - Shipping address line 2. - **shipping_city** (string) - Optional - Shipping city. - **shipping_pincode** (string) - Optional - Shipping pincode. - **shipping_country** (string) - Optional - Shipping country. - **shipping_state** (string) - Optional - Shipping state. - **shipping_email** (string) - Optional - Shipping email. - **shipping_phone** (string) - Optional - Shipping phone. - **order_items** (array) - Required - List of items and their relevant fields. - **name** (string) - Required - Name of the product. - **sku** (string) - Required - SKU ID of the product. - **units** (integer) - Required - Number of units to be shipped. - **selling_price** (integer) - Required - Selling price per unit in Rupee, inclusive of GST. - **discount** (integer) - Optional - Discount amount in Rupee, inclusive of tax. - **tax** (integer) - Optional - Tax percentage on the item. - **hsn** (integer) - Optional - Harmonised System Nomenclature code. - **payment_method** (string) - Required - Method of payment: COD or Prepaid. - **shipping_charges** (integer) - Optional - Shipping charges in Rupee. - **giftwrap_charges** (integer) - Optional - Giftwrap charges in Rupee. - **transaction_charges** (integer) - Optional - Transaction charges in Rupee. - **total_discount** (integer) - Optional - Total discount amount in Rupee. - **sub_total** (integer) - Required - Calculated sub total amount in Rupee after deductions. - **length** (float) - Required - Length of the item in cms, must be more than 0.5. - **breadth** (float) - Required - Breadth of the item in cms, must be more than 0.5. - **height** (float) - Required - Height of the item in cms, must be more than 0.5. - **weight** (float) - Required - Weight of the item in kgs, must be more than 0. - **ewaybill_no** (string) - Optional - E-way bill number. - **customer_gstin** (string) - Optional - Goods and Services Tax Identification Number. - **invoice_number** (string) - Optional - Invoice number. - **order_type** (string) - Optional - Order type: ESSENTIALS or NON ESSENTIALS (case sensitive). - **checkout_shipping_method** (string) - Optional - Only for SRF users: SR_RUSH, SR_STANDARD, SR_EXPRESS, SR_QUICK. - **what3words_address** (string) - Optional - What3words address. - **is_insurance_opt** (boolean) - Optional - Secure shipments above order value of Rs 2500. - **is_document** (integer) - Optional - Create a document order (1 or 0). - **order_tag** (string) - Optional - Tags for orders. - **reseller_name** (string) - Optional - Vendor name on label. ### Request Example ```json { "order_id": "", "order_date": "", "pickup_location": "", "comment": "", "reseller_name": "", "company_name": "", "billing_customer_name": "", "billing_last_name": "", "billing_address": "", "billing_address_2": "", "billing_isd_code": "", "billing_city": "", "billing_pincode": "", "billing_state": "", "billing_country": "", "billing_email": "", "billing_phone": "", "billing_alternate_phone": "", "shipping_is_billing": "", "shipping_customer_name": "", "shipping_last_name": "", "shipping_address": "", "shipping_address_2": "", "shipping_city": "", "shipping_pincode": "", "shipping_country": "", "shipping_state": "", "shipping_email": "", "shipping_phone": "", "order_items": [ { "name": "", "sku": "", "units": "", "selling_price": "", "discount": "", "tax": "", "hsn": "" } ], "payment_method": "", "shipping_charges": "", "giftwrap_charges": "", "transaction_charges": "", "total_discount": "", "sub_total": "", "length": "", "breadth": "", "height": "", "weight": "", "ewaybill_no": "", "customer_gstin": "", "invoice_number": "", "order_type": "" } ``` ### Response #### Success Response (200) - **order_id** (integer) - Order ID. - **shipment_id** (integer) - Shipment ID. - **status** (string) - Status of the order. - **status_code** (integer) - Status code. - **onboarding_completed_now** (integer) - Flag indicating if onboarding completed now. - **awb_code** (string) - AWB code. - **courier_company_id** (integer) - Courier company ID. - **courier_name** (string) - Courier name. #### Response Example ```json { "order_id": 16161616, "shipment_id": 15151515, "status": "NEW", "status_code": 1, "onboarding_completed_now": 0, "awb_code": null, "courier_company_id": null, "courier_name": null } ``` ``` -------------------------------- ### POST /v1/external/orders/create/adhoc Source: https://www.postman.com/shiprocketdev/shiprocket-dev-s-public-workspace/documentation/qu05zax/shiprocket-api?sideView=agentMode This snippet documents the POST endpoint for creating a custom order via the Shiprocket API. It includes the endpoint URL, all request parameters with their types, required status, and descriptions, as well as important notes about usage. ```APIDOC ## POST /v1/external/orders/create/adhoc ### Description Use this API to create a quick custom order. Quick orders are the ones where we do not store the product details in the master catalogue. You have to pass all the required params at the minimum to create a quick custom order. You can add additional parameters as per your preference. ### Method POST ### Endpoint https://apiv2.shiprocket.in/v1/external/orders/create/adhoc ### Parameters #### Request Body - **order_id** (string) - Required - The order id you want to specify to the order. Max char: 50. (Avoid passing character values as this contradicts some other API calls). Example: 224477 or 224-477 - **order_date** (string) - Required - The date of order creation in yyyy-mm-dd format. Time is additional. Example: 2019-07-24 11:11 - **pickup_location** (string) - Required - The name of the pickup location added in your Shiprocket account. This cannot be a new location. Example: Jammu - **channel_id** (integer) - Optional - Mention this in case you need to assign the order to a particular channel. Default is 'Custom'. Example: 27022 - **comment** (string) - Optional - Option to add 'From' field to the shipment. To do this, enter the name in the following format: 'Reseller: [name]'. Example: Reseller: Divine - **reseller_name** (string) - Optional - The 'from' name if you want to print. Use 'Reseller: [name]'. Example: Reseller: Divine - **company_name** (string) - Optional - Name of the company. Example: Amazon - **billing_customer_name** (string) - Required - First name of the billed customer. Example: John - **billing_last_name** (string) - Optional - Last name of the billed customer. Example: Doe - **billing_address** (string) - Required - address details of the billed customer. Example: Civil line, House 20 - **billing_address_2** (string) - Optional - Further address details of the billed customer. Example: Near Hokage House - **billing_city** (string) - Required - Billing address city. Max char: 30. Example: New Delhi - **billing_pincode** (integer) - Required - Pincode of the billing address. Example: 110002 - **billing_state** (string) - Required - Billing address state. Example: Delhi - **billing_country** (string) - Required - Billing address country. Example: India - **billing_email** (string) - Required - Email address of the billed customer. Example: John@doe.com - **billing_phone** (integer) - Required - The phone number of the billing customer. Example: 9856321472 - **billing_alternate_phone** (integer) - Optional - Alternate phone number of the billing customer. Example: 8604690454 - **shipping_is_billing** (boolean) - Required - Whether the shipping address is the same as billing address. 1 or 'true' for yes and 0 or 'false' for no. Example: true - **shipping_customer_name** (string) - Conditional Yes - Name of the customer the order is shipped to. Required in case billing is not same as shipping. Example: Jane - **shipping_last_name** (string) - Optional - Last name of the shipping customer. Example: Doe - **shipping_address** (string) - Conditional Yes - Address of the Shipping customer. Required in case billing is not same as shipping. Example: Lane number 69 - **shipping_address_2** (string) - Optional - Further address details of shipping customer. Example: Andheri - **billing_isd_code** (string) - Optional - ISD code of the billing address. Example: +91 - **shipping_city** (string) - Conditional Yes - Shipping address city. Example: Mumbai - **shipping_pincode** (integer) - Conditional Yes - Shipping address pincode. Example: 200912 - **shipping_country** (string) - Conditional Yes - Shipping address country. Example: India - **shipping_state** (string) - Conditional Yes - Shipping address state. Example: Maharashtra - **shipping_email** (string) - Optional - Email of the shipping customer. Example: Jane@doe.com - **shipping_phone** (integer) - Conditional Yes - Phone no. of the shipping customer. Example: (not provided) - **longitude** (float) - Optional - Destination (Shipping address) Longitude. Example: 69.0747 - **latitude** (float) - Optional - Destination (Shipping address) Latitude. Example: 22.4064 ### Notes - In case the 'shipping_is_billing' field is false, further shipping detail fields are required. - If no channel id is passed, the order will be assigned to the default custom channel. If the channel id is not known, use the 'Get All Channels' API to get the list of all integrated channels in your Shiprocket account. - order_id field cannot be equal to an already existing id. Doing so does not change or affect the existing order. - New orders cannot be created with order id's same as that of cancelled orders. If error 422 shows up despite filling in the correct details, consider changing the order_id. - Be sure to input the correct calculated sub_total amount. The total is not calculated automatically through the API. - The 'order_id' returned in the response is the Shiprocket order_id. Please save this order ID as we will use this in future API calls. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.