# Create Order This endpoint is used to create new orders with detailed information about the shipment, including container details, delivery information, contact emails, and more. Endpoint: POST /createOrder Version: 1.0.0 Security: bearerAuth ## Request fields (application/json): - `mbl_number` (string, required) The MBL# Example: "MBL123456789" - `rate_id` (string, required) The id of Rate Example: "RATE123" - `quote_id` (string, required) The unique identifier for a quote. Retrieve this ID from the rate search API. Example: "fb8ed1ce-203f-4ffa-b70e-f91662a7eeb9" - `destination_type` (integer) The Destination Type. 1: Ocean Port, 2: Ramp Port, Default: 1 Example: 1 - `live_or_drop` (integer) Live or Drop. 0: Unknown, 1: Live, 2: Drop, Default: 0 - `port_of_discharge_id` (integer, required) Port of Discharge (Intermodal Region) Example: 123 - `port_of_discharge_eta` (string, required) POD ETA Example: "2023-10-01" - `final_port_id` (integer) Final Port (Intermodal Region), Required if destination_type is ramp port Example: 456 - `final_port_eta` (string) Final Port ETA, Required if destination_type is ramp port Example: "2023-10-05" - `warehouse_id` (integer) The ID of Warehouse. Required when delivery_address is null. Example: 789 - `delivery_address` (string) Delivery address. Required when warehouse_id is null. Example: "1234 Main St, Anytown, USA" - `pu_number_agent_id` (integer) The ID of Pickup Number Agent Example: 101 - `customer_reference_number` (string, required) Customer Reference Number Example: "CUST12345" - `customer_memo` (string) Customer Memo Example: "Handle with care" - `terminal_firms_code` (string) Terminal Firms Code Example: "TFC123" - `urgent` (boolean) Urgent, Default False - `contact_emails` (array) Array of Contact Emails Example: ["contact@example.com"] - `containers` (array, required) Array of Container - `containers.number` (string, required) Container Number, Four Letters + Seven Numbers Example: "ABCD1234567" - `containers.type` (string, required) Container size and type specification. Available container types: - 20GP: 20' x 8'6" - DRY CONTAINER - 20RF: 20' x 8'6" - REEFER CONTAINER - 20TK: 20' x 8'6" - TANK CONTAINER - 20OT: 20' x 8'6" - OPENTOP CONTAINER - 40GP: 40' x 8'6" - DRY CONTAINER - 40OT: 40' x 8'6" - OPENTOP CONTAINER - 40RF: 40' x 8'6" - REEFER CONTAINER - 40TK: 40' x 8'6" - TANK CONTAINER - 40HC: 40' x 9'6" - HIGH CUBIC, DRY CONTAINER - 40HQ: 40' x 9'6" - HIGH CUBIC, DRY CONTAINER - 40HR: 40' x 9'6" - HIGH CUBIC, REEFER CONTAINER - 40RH: 40' x 9'6" - HIGH CUBIC, REEFER CONTAINER - 45HC: 45' x 9'6" - HIGH CUBIC, DRY CONTAINER - 45HQ: 45' x 9'6" - HIGH CUBIC, DRY CONTAINER - 45RH: 45' x 9'6" - HIGH CUBIC, REEFER CONTAINER Enum: "20GP", "20RF", "20TK", "20OT", "40GP", "40OT", "40RF", "40TK", "40HC", "40HQ", "40HR", "40RH", "45HC", "45HQ", "45RH" - `containers.seal_number` (string) Seal Number Example: "SEAL123" - `containers.package` (string, required) Package: 20 Cartons, 100 Boxes... Example: "20 Cartons" - `containers.weight` (number, required) Weight KG Example: 1000 - `containers.delivery_reference` (string) Delivery Reference Example: "DELREF123" - `containers.is_dg` (boolean) Danger Goods, Default False - `containers.is_soc` (boolean) SOC Container, Default False - `containers.is_overweight` (boolean) Overweight Container, Default False - `containers.is_reefer` (boolean) Reefer Container, Default False - `containers.commodity` (array) Array of commodity - `containers.loading_type` (integer) Available types: - 0: TBD - 1: Pallet Load - 2: Floor Load - 3: Other Example: 1 - `containers.cargo_value` (number) Cargo Value, if not provided, premium will be 0, minimum is 0, maximum is 1000000 Example: 100000 - `file_list` (array) Array of upload files list - `file_list.file` (string) File, Max Size 10M. Please add Header 'Content-Type': 'multipart/form-data' if applicable - `file_list.type` (string) Type of order file document. Available file types: - DO: Delivery Order - DG form: Dangerous Goods Form - POD: Proof of Delivery - Packing List: Packing List Document - MBL: Master Bill of Lading - Telex: Telex Release - PU#: Pickup Number - MSDS: Material Safety Data Sheet - Payment Proof: Proof of Payment - Scale Ticket: Scale Ticket Document - SOC Return Guarantee Letter: SOC Return Guarantee Letter - Ingate EIR: Ingate Equipment Interchange Receipt - Proof of Terminal apt time: Proof of Terminal Appointment Time - Proof of Terminal pickup apt time: Proof of Terminal Pickup Appointment Time - Proof of Terminal return apt time: Proof of Terminal Return Appointment Time - Proof of Empty Returned: Proof of Empty Container Return - Vendor Invoice: Vendor Invoice Document - Arrival Notice: Arrival Notice Document - Other: Other Document Types Enum: "DO", "DG form", "POD", "Packing List", "MBL", "Telex", "PU#", "MSDS", "Payment Proof", "Scale Ticket", "SOC Return Guarantee Letter", "Ingate EIR", "Proof of Terminal apt time", "Proof of Terminal pickup apt time", "Proof of Terminal return apt time", "Proof of Empty Returned", "Vendor Invoice", "Arrival Notice", "Other" ## Response 201 fields (application/json): - `data` (object) - `data.id` (integer) Order ID Example: 9079 - `data.mbl_number` (string) Master Bill of Lading number Example: "MEDU12341232131" - `data.status` (string) The status of the order. Possible values: - open: New Order - on hold: The order has been on hold. - in review: The order is in review. - confirmed: The order is confirmed by DrayEasy. - dispatched: The order has been dispatched, and the delivery order has been sent to the carrier. - in progress: 1. Waiting for the shipment to arrive at port. 2. Pickup the shipemnt at terminal 3. Out for delivery - delivered: The shipment is delivered to the destination. - empty returned: All containers are returned at port. - closed: The order will be closed since the shipments have been completed and all invoices have been paid. - canceled: The order is canceled. Enum: "open", "on hold", "in review", "confirmed", "dispatched", "in progress", "delivered", "empty returned", "closed", "canceled" - `data.urgent` (boolean) Urgent flag - `data.delivery_address` (string) Delivery address Example: "delivery_address" - `data.customer_reference_number` (string) Customer reference number Example: "customer_reference_number" - `data.customer_memo` (string) Customer memo Example: "TEST" - `data.released_status` (string) Release status Example: "Not Released" - `data.destination_type` (integer) Destination type (1: Ocean Port, 2: Ramp Port) Enum: 1, 2 - `data.destination_type_name` (string) Name of destination type Example: "Ramp Port" - `data.port_of_discharge_eta` (string) Port of Discharge ETA Example: "2023-09-13" - `data.port_of_discharge` (object) - `data.port_of_discharge.id` (integer) Port ID Example: 82 - `data.port_of_discharge.name` (string) Port name Example: "Atlanta - GA" - `data.port_of_discharge.city` (string) City location Example: "Atlanta, GA, USA" - `data.port_of_discharge.latitude` (number) Geographical latitude Example: 33.80446 - `data.port_of_discharge.longitude` (number) Geographical longitude Example: -84.499501 - `data.port_of_discharge.has_ocean_port` (boolean,null) Indicates if location has ocean port - `data.port_of_discharge.has_ramp_port` (boolean) Indicates if location has ramp port Example: true - `data.final_port_eta` (string) Final Port ETA Example: "2023-10-06" - `data.final_port` (object) - `data.commodity` (string) Commodity description Example: "commodity" - `data.contact_emails` (array) List of contact emails Example: ["test@test.com","test2@test.comd"] - `data.terminal_firms_code` (string) Terminal FIRMS code Example: "S478" - `data.amount_total` (string) Total amount Example: "606.00" - `data.live_or_drop` (integer) Live or Drop status (0: Unknown, 1: Live, 2: Drop) Enum: 0, 1, 2 - `data.created_at` (string) Creation date Example: "2023-09-19" - `data.user` (object) - `data.user.name` (string) User's name Example: "Name1" - `data.user.email` (string) User's email address Example: "email1@email.com" - `data.user.company` (string) User's company name Example: "Company1" - `data.containers` (array) List of containers - `data.containers.id` (integer) Container ID Example: 11482 - `data.containers.number` (string) Container number Example: "MEDU1234567" - `data.containers.type` (string) Container size and type specification. Available container types: - 20GP: 20' x 8'6" - DRY CONTAINER - 20RF: 20' x 8'6" - REEFER CONTAINER - 20TK: 20' x 8'6" - TANK CONTAINER - 20OT: 20' x 8'6" - OPENTOP CONTAINER - 40GP: 40' x 8'6" - DRY CONTAINER - 40OT: 40' x 8'6" - OPENTOP CONTAINER - 40RF: 40' x 8'6" - REEFER CONTAINER - 40TK: 40' x 8'6" - TANK CONTAINER - 40HC: 40' x 9'6" - HIGH CUBIC, DRY CONTAINER - 40HQ: 40' x 9'6" - HIGH CUBIC, DRY CONTAINER - 40HR: 40' x 9'6" - HIGH CUBIC, REEFER CONTAINER - 40RH: 40' x 9'6" - HIGH CUBIC, REEFER CONTAINER - 45HC: 45' x 9'6" - HIGH CUBIC, DRY CONTAINER - 45HQ: 45' x 9'6" - HIGH CUBIC, DRY CONTAINER - 45RH: 45' x 9'6" - HIGH CUBIC, REEFER CONTAINER Enum: "20GP", "20RF", "20TK", "20OT", "40GP", "40OT", "40RF", "40TK", "40HC", "40HQ", "40HR", "40RH", "45HC", "45HQ", "45RH" - `data.containers.package` (string,null) Package details - `data.containers.weight` (number,null) Weight in KG - `data.containers.delivery_reference` (string) Delivery reference Example: "delivery_reference" - `data.containers.is_dg` (boolean) Dangerous goods flag - `data.containers.is_soc` (boolean) SOC container flag - `data.containers.is_overweight` (boolean) Overweight flag - `data.containers.is_reefer` (boolean) Reefer container flag - `data.containers.is_arrival_on_time` (boolean) Arrival on time flag - `data.containers.is_all_released` (boolean) All released flag - `data.containers.shipping_events` (array) Array of shipping events Example: [[{"time":"2019-10-28 14:49:00","vessel":"MAERSK ALGOL 806","voyage":"944N","activity":"GATE-OUT-EMPTY","location":"Qingdao, Shandong, China"},{"time":"2019-10-30 06:41:00","vessel":"MAERSK ALGOL 806","voyage":"944N","activity":"GATE-IN","location":"Qingdao, Shandong, China"},{"time":"2019-11-01 22:38:00","vessel":"MAERSK ALGOL 806","voyage":"944N","activity":"LOAD","location":"Qingdao, Shandong, China"},{"time":"2019-11-30 08:40:00","vessel":"MAERSK ALGOL 806","voyage":"944N","activity":"DISCHARG","location":"Long Beach, California, United States"},{"time":"2019-12-04 13:53:00","vessel":"MAERSK ALGOL 806","voyage":"944N","activity":"GATE-OUT","location":"Long Beach, California, United States"},{"time":"2019-12-16 18:17:54","vessel":null,"voyage":null,"activity":"EMPTY-RETURNED","location":null}]] - `data.containers.shipping_events.time` (string) Timestamp of the shipping event Example: "2019-10-28 14:49:00" - `data.containers.shipping_events.vessel` (string,null) Name of the vessel Example: "MAERSK ALGOL 806" - `data.containers.shipping_events.voyage` (string,null) Voyage number Example: "944N" - `data.containers.shipping_events.activity` (string) Type of activity Enum: "GATE-OUT-EMPTY", "GATE-IN", "LOAD", "DISCHARG", "GATE-OUT", "EMPTY-RETURNED" - `data.containers.shipping_events.location` (string,null) Location where the event occurred Example: "Qingdao, Shandong, China" - `data.containers.seal_number` (string,null) Container seal number - `data.containers.port_of_loading_etd` (string,null) Port of Loading ETD - `data.containers.lfd` (string,null) Last Free Date - `data.containers.empty_returned_at` (string,null) Empty Container Return Date - `data.containers.ready_to_pickup_at` (string,null) Ready for Pickup Date - `data.containers.schedule_terminal_pickup_at` (string,null) Appointment time to pick up the container from the terminal. - `data.containers.schedule_delivery_at` (string,null) Appointment time to deliver to final destination. - `data.containers.freight_released_at` (string,null) Freight Release Date - `data.containers.customs_released_at` (string,null) Customs Release Date - `data.containers.terminal_released_at` (string,null) Terminal Release Date - `data.containers.terminal_pickuped_at` (string,null) Terminal Pickup Date - `data.containers.actual_delivered_at` (string,null) Actual Delivery Date - `data.containers.actual_empty_returned_at` (string,null) Actual Empty Container Return Date - `data.containers.status` (integer) Container status codes and their meanings. Status Codes: - -5: Canceled - 0: Order Confirmed - 1: Predelivery Appointment sent - 2: Predelivery Appointment confirmed - 8: Exam DO received - 30: Delivery plan Set - 34: Available - 36: CET Exam site pickup Apt confirmed - 38: Prepull to yard - 41: Deliver to Destination - 42: Container Dropped to Destination - 44: CNTR Emptied informed from WHS - 46: Empty Returned to terminal/depot - 50: MET Exam site pickup Apt confirmed - 55: WHS Apt Made by Customer - 56: Outgated - 61: WHS Apt Confirmed(MET) Enum: -5, 0, 1, 2, 8, 30, 34, 36, 38, 41, 42, 44, 46, 50, 55, 56, 61 - `data.containers.status_text` (string) Container status description Example: "Predelivery Appointment confirmed" - `data.containers.status_map` (array) Container status history - `data.containers.status_map.status` (integer) Status code - `data.containers.status_map.status_text` (string) Status description Example: "Order Confirmed" - `data.containers.status_map.updated_at` (string) Status update date Example: "2023-10-13" - `data.containers.remark_to_customer` (string) Remark to customer Example: "Remark to customer" - `data.containers.invoices` (array) List of invoices - `data.containers.invoices.id` (integer) Invoice ID Example: 13730 - `data.containers.invoices.uid` (string) Unique identifier Example: "IV13730" - `data.containers.invoices.status` (string) The status of the invoice. Possible values: - estimate: An initial cost provided before finalizing a shipment. This cost can change as the shipment process progresses. - invoice: An invoice that has been issued and confirmed but not yet paid. - paid: This status applies once an invoice has been fully settled by the customer, indicating no outstanding payment remains. Enum: "estimate", "invoice", "paid" - `data.containers.invoices.due_at` (string) Due date Example: "2023-09-19" - `data.containers.invoices.invoiced_at` (string) Invoice creation date Example: "2023-09-19" - `data.containers.invoices.charges` (array) List of charges - `data.containers.invoices.charges.qty` (number) Quantity of the charge Example: 1 - `data.containers.invoices.charges.code` (string) Charge code Example: "TRUCH" - `data.containers.invoices.charges.name` (string) Name of the charge Example: "TRUCKING / DRAYAGE CHARGE" - `data.containers.invoices.charges.rate` (number) Rate amount Example: 535 - `data.containers.invoices.charges.reason` (string) Reason for the charge Example: "test" - `data.containers.invoices.charges.documents` (array) Associated documents - `data.containers.invoices.charges.documents.id` (integer) Document ID Example: 785 - `data.containers.invoices.charges.documents.type` (string) Type of order file document. Available file types: - DO: Delivery Order - DG form: Dangerous Goods Form - POD: Proof of Delivery - Packing List: Packing List Document - MBL: Master Bill of Lading - Telex: Telex Release - PU#: Pickup Number - MSDS: Material Safety Data Sheet - Payment Proof: Proof of Payment - Scale Ticket: Scale Ticket Document - SOC Return Guarantee Letter: SOC Return Guarantee Letter - Ingate EIR: Ingate Equipment Interchange Receipt - Proof of Terminal apt time: Proof of Terminal Appointment Time - Proof of Terminal pickup apt time: Proof of Terminal Pickup Appointment Time - Proof of Terminal return apt time: Proof of Terminal Return Appointment Time - Proof of Empty Returned: Proof of Empty Container Return - Vendor Invoice: Vendor Invoice Document - Arrival Notice: Arrival Notice Document - Other: Other Document Types Enum: "DO", "DG form", "POD", "Packing List", "MBL", "Telex", "PU#", "MSDS", "Payment Proof", "Scale Ticket", "SOC Return Guarantee Letter", "Ingate EIR", "Proof of Terminal apt time", "Proof of Terminal pickup apt time", "Proof of Terminal return apt time", "Proof of Empty Returned", "Vendor Invoice", "Arrival Notice", "Other" - `data.containers.invoices.charges.documents.is_customer_upload` (boolean) Whether document was uploaded by customer - `data.containers.invoices.charges.documents.url` (string) Document URL Example: "https://api.drayeasy.com/api/v2/orders/13730/files/785" - `data.containers.invoices.charges.documents.filename` (string) Document filename Example: "invoice.pdf" - `data.containers.invoices.charges.container_number` (string) Associated container number - `data.containers.invoices.charges.container_id` (integer) Associated container ID - `data.containers.invoices.amount_due` (string) Amount due Example: "606.00" - `data.containers.invoices.amount_paid` (string) Amount paid Example: "606.00" - `data.containers.scenarios` (array) List of scenarios - `data.containers.scenarios.name` (string) Scenario name Example: "Best Scenario CHICAGO" - `data.containers.scenarios.rates` (array) List of rates - `data.containers.scenarios.rates.qty` (number) Quantity Example: 1 - `data.containers.scenarios.rates.name` (string) Rate name Example: "Base Rate" - `data.containers.scenarios.rates.unit` (string) Rate unit Example: "CNTR" - `data.containers.scenarios.rates.amount` (number) Total amount Example: 100 - `data.containers.scenarios.total_rate` (number) Total rate amount Example: 100 - `data.containers.scenarios.description` (string) Scenario description Example: "Best Scenario / 40'HQ,40',20' / Legal Weight / Live Unload\n2 Days Chassis Usage" - `data.containers.scenarios.possible_charges` (array) List of possible charges - `data.containers.scenarios.possible_charges.code` (string) Enum: "CHAFE", "TERWA", "WARWA", "PRECH", "YARST", "CHASP", "DRYRU", "LAYOV", "STOOF", "RESDE", "HAZCA", "TRIFE", "OVECH", "TOLFE", "REESU", "CHAFL", "REVOR", "RUSH", "HAZPREM", "PORCO", "RERO", "OTHCH", "EXAFE", "FBAFEE", "CLECF", "EQMFE", "EXAHA", "PIEPA", "CLETR" - `data.containers.scenarios.possible_charges.explanation` (string) Explanation of the charge - `data.containers.scenarios.possible_charges.unit` (string) Unit of measurement Example: "DAY" - `data.containers.scenarios.possible_charges.rate_text` (string) Text description of the rate Example: "45.00/DAY 2 DAYs MIN" - `data.containers.scenarios.possible_charges.free` (number) Whether the charge is free - `data.containers.scenarios.possible_charges.min` (number) Minimum quantity required Example: 2 - `data.containers.scenarios.possible_charges.max` (number) Maximum quantity allowed - `data.containers.scenarios.possible_charges.cntr_size` (array) Applicable container sizes Example: [0] - `data.containers.scenarios.possible_charges.probability` (number) Probability of the charge occurring Example: 0.97 - `data.containers.commodity` (array) Commodity Example: ["Commodity"] - `data.containers.loading_type` (integer) Available types: - 0: TBD - 1: Pallet Load - 2: Floor Load - 3: Other Example: 1 - `data.containers.cargo_value` (number) Cargo Value Example: 100000 - `data.containers.premium` (number) Premium Example: 56 - `data.pickup_number_agent` (object) - `data.pickup_number_agent.id` (integer) Agent ID - `data.pickup_number_agent.name` (string) Agent name - `data.pickup_number_agent.emails` (array) Agent email addresses - `data.pickup_number_agent.user_id` (integer) Associated user ID - `data.warehouse` (object) - `data.warehouse.id` (integer) Warehouse ID Example: 2798 - `data.warehouse.name` (string) Warehouse name Example: "TEST" - `data.warehouse.code` (string,null) Warehouse code - `data.warehouse.zipcode` (string) Postal/ZIP code Example: "90001" - `data.warehouse.appointment_by` (integer) Appointment type identifier - `data.warehouse.customer_memo` (string,null) Customer memo or notes - `data.warehouse.live_or_drop` (integer) Live or drop status (0: Unknown, 1: Live, 2: Drop) Enum: 0, 1, 2 - `data.warehouse.address` (string) Warehouse street address Example: "TEST" - `data.warehouse.delivery_order_address` (string) Full formatted delivery address Example: "TEST\nTEST\nLOS ANGELES, CA, USA 90001" - `data.warehouse.created_at` (string) Warehouse creation timestamp Example: "2023-05-25T04:14:14.000000Z" - `data.warehouse.city` (object) - `data.warehouse.city.id` (integer) The unique identifier for the city Example: 1 - `data.warehouse.city.country` (string) The country where the city is located Example: "USA" - `data.warehouse.city.full_name` (string) The full name of the city, including state and country Example: "Los Angeles, CA, USA" - `data.warehouse.city.name` (string) The name of the city Example: "LOS ANGELES" - `data.warehouse.city.state` (string) The state where the city is located Example: "CA" - `data.warehouse.city.alias` (string,null) An alias for the city - `data.warehouse.city.latitude` (number) The latitude coordinate of the city Example: 33.973093 - `data.warehouse.city.longitude` (number) The longitude coordinate of the city Example: -118.247896 - `data.warehouse.contacts` (array) List of warehouse contacts - `data.warehouse.contacts.id` (integer) The unique identifier for the contact Example: 1388 - `data.warehouse.contacts.name` (string) The name of the contact Example: "John" - `data.warehouse.contacts.type` (array) The type or roles associated with the contact Enum: "APT", "SALES", "DISPATCH", "ACCOUNTING" - `data.warehouse.contacts.role` (string,null) The role of the contact Example: "UFO" - `data.warehouse.contacts.phone` (string) The phone number of the contact Example: "11112345688" - `data.warehouse.contacts.fax` (string,null) The fax number of the contact - `data.warehouse.contacts.email` (string) The email address of the contact Example: "john@john.com" - `data.warehouse.contacts.remark` (string,null) Any additional remarks about the contact Example: "Test" - `data.rate_id` (string) Rate ID Example: "S200942" - `data.rate` (object) - `data.rate.base_rate` (integer) Base rate Example: 548 - `data.rate.fuel_surcharge` (integer) Fuel surcharge - `data.rate.toll_fee` (integer) Toll fee ## Response 400 fields (application/json): - `error` (string) Example: "VALIDATION" - `message` (string) Example: "Failed Validation" - `errors` (object) Example: {"pu_number_agent_id":["The pu_number_agent_id is invalid."],"mbl_number":["The mbl number has already been taken."],"rate_id":["The rate_id doesnt exist."]} ## Response 401 fields