# Create Warehouse This endpoint allows you to create warehouses with various details including name, address, contacts, working hours, and appointment settings. Key features: * Create warehouse with basic information * Set working hours and days * Add multiple contacts with different roles * Configure appointment settings * Specify residential/commercial status Endpoint: POST /warehouses Version: 1.0.0 Security: bearerAuth ## Request fields (application/json): - `name` (string, required) Name of the warehouse facility Example: "Test Create Warehouse" - `code` (string) Unique identifier code for the warehouse Example: "10222" - `address` (string, required) Complete street address of the warehouse Example: "123 Warehouse Street" - `is_residential` (boolean, required) Indicates if this is a residential address. Default is false - `zipcode` (string, required) Postal/ZIP code of the warehouse location Example: "90001" - `city_id` (integer, required) Unique identifier of the city where warehouse is located Example: 1 - `appointment_by` (integer) Specifies who handles appointments: * 0 - Unknown * 1 - No appointment needed * 2 - Customer handles appointments * 3 - DrayEasy handles appointments Enum: 0, 1, 2, 3 - `live_or_drop` (integer) Delivery type: * 0 - Unknown * 1 - Live unload * 2 - Drop and hook Enum: 0, 1, 2 - `customer_memo` (string) Additional notes or instructions for customers Example: "Please call 30 minutes before arrival" - `working_day_from` (integer) Starting working day: * 0 - Sunday * 1 - Monday * 2 - Tuesday * 3 - Wednesday * 4 - Thursday * 5 - Friday * 6 - Saturday Enum: 0, 1, 2, 3, 4, 5, 6 - `working_day_to` (integer) Ending working day: * 0 - Sunday * 1 - Monday * 2 - Tuesday * 3 - Wednesday * 4 - Thursday * 5 - Friday * 6 - Saturday Enum: 0, 1, 2, 3, 4, 5, 6 - `working_hour_from` (string) Start of working hours in 24-hour format (HH:mm) Example: "08:00" - `working_hour_to` (string) End of working hours in 24-hour format (HH:mm) Example: "17:00" - `time_zone` (string) Time zone of the warehouse location Enum: "AST", "EST", "CST", "MST", "PST", "AKST", "HST" - `contacts` (array, required) List of contact persons for the warehouse - `contacts.type` (array, required) Contact roles: * APT - Appointment scheduling * SALES - Sales related contact * DISPATCH - Dispatch operations * ACCOUNTING - Accounting matters Enum: "APT", "SALES", "DISPATCH", "ACCOUNTING" - `contacts.name` (string, required) Full name of the contact person Example: "John Smith" - `contacts.role` (string) Job title or role of the contact person Example: "Warehouse Manager" - `contacts.phone` (string) Contact phone number Example: "555-123-4567" - `contacts.fax` (string) Fax number if available Example: "555-123-4568" - `contacts.email` (string) Email address of the contact person Example: "john@warehouse.com" - `contacts.remark` (string) Additional notes about the contact Example: "Preferred contact method: email" ## Response 201 fields (application/json): - `data` (object) - `data.id` (integer) Warehouse ID Example: 2798 - `data.name` (string) Warehouse name Example: "TEST" - `data.code` (string,null) Warehouse code - `data.zipcode` (string) Postal/ZIP code Example: "90001" - `data.appointment_by` (integer) Appointment type identifier - `data.customer_memo` (string,null) Customer memo or notes - `data.live_or_drop` (integer) Live or drop status (0: Unknown, 1: Live, 2: Drop) Enum: 0, 1, 2 - `data.address` (string) Warehouse street address Example: "TEST" - `data.delivery_order_address` (string) Full formatted delivery address Example: "TEST\nTEST\nLOS ANGELES, CA, USA 90001" - `data.created_at` (string) Warehouse creation timestamp Example: "2023-05-25T04:14:14.000000Z" - `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.city` (object) - `data.city.id` (integer) The unique identifier for the city Example: 1 - `data.city.country` (string) The country where the city is located Example: "USA" - `data.city.full_name` (string) The full name of the city, including state and country Example: "Los Angeles, CA, USA" - `data.city.name` (string) The name of the city Example: "LOS ANGELES" - `data.city.state` (string) The state where the city is located Example: "CA" - `data.city.alias` (string,null) An alias for the city - `data.city.latitude` (number) The latitude coordinate of the city Example: 33.973093 - `data.city.longitude` (number) The longitude coordinate of the city Example: -118.247896 - `data.contacts` (array) List of warehouse contacts - `data.contacts.id` (integer) The unique identifier for the contact Example: 1388 - `data.contacts.name` (string) The name of the contact Example: "John" - `data.contacts.type` (array) The type or roles associated with the contact Enum: "APT", "SALES", "DISPATCH", "ACCOUNTING" - `data.contacts.role` (string,null) The role of the contact Example: "UFO" - `data.contacts.phone` (string) The phone number of the contact Example: "11112345688" - `data.contacts.fax` (string,null) The fax number of the contact - `data.contacts.email` (string) The email address of the contact Example: "john@john.com" - `data.contacts.remark` (string,null) Any additional remarks about the contact Example: "Test" ## Response 400 fields (application/json): - `message` (string) Example: "Validation failed" - `errors` (object) Example: {"name":["The name field is required"],"city_id":["The selected city_id is invalid"]} ## Response 401 fields