DrayEasy API v2

DrayEasy API v2


Update Warehouse

<h2>Overview</h2> <p>This endpoint allows you to update an existing warehouse in the system. You need to replace <code>{warehouseId}</code> in the URI with the actual ID of the warehouse you want to update. The request should include the updated information for the warehouse, such as name, code, address, residential indicator, zipcode, city ID, appointment details, working hours, time zone, and contacts.</p> <h2>Request</h2> <ul> <li>Method: <strong>PUT</strong></li> <li>URI: <code>/warehouses/{warehouseId}</code></li> </ul> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id (*)</td> <td>Integer</td> <td>Warehouse Id</td> </tr> <tr> <td>name (*)</td> <td>String</td> <td>Warehouse Name</td> </tr> <tr> <td>code</td> <td>String</td> <td>Warehouse Code</td> </tr> <tr> <td>address (*)</td> <td>String</td> <td>The Stree Address</td> </tr> <tr> <td>is_residential (*)</td> <td>Boolean</td> <td>Residential indicator</td> </tr> <tr> <td>zipcode (*)</td> <td>String</td> <td>Warehouse Zipcode</td> </tr> <tr> <td>city_id (*)</td> <td>Integer</td> <td>The id of City</td> </tr> <tr> <td>appointment_by</td> <td>Integer</td> <td>0: Unknown, 1: No apt needed, 2: Customer, 3: DrayEasy</td> </tr> <tr> <td>live_or_drop</td> <td>Integer</td> <td>0: Unknown, 1: Live, 2: Drop</td> </tr> <tr> <td>customer_memo</td> <td>String</td> <td>Customer Memo</td> </tr> <tr> <td>working_day_from</td> <td>Integer</td> <td>0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday</td> </tr> <tr> <td>working_day_to</td> <td>Integer</td> <td>0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday</td> </tr> <tr> <td>working_hour_from</td> <td>String</td> <td>Working Hour Begin</td> </tr> <tr> <td>working_hour_to</td> <td>String</td> <td>Working Hour End</td> </tr> <tr> <td>time_zone</td> <td>String</td> <td>AST, EST, CST, MST, PST, AKST, HST</td> </tr> <tr> <td>contacts (*)</td> <td>Array</td> <td>Array of Contacts</td> </tr> <tr> <td>contacts[tye]</td> <td>Array&lt;Srting&gt;</td> <td>One or more of this set of data: APT, SALES, DISPATCH, ACCOUNTING</td> </tr> <tr> <td>contacts[name] (*)</td> <td>String</td> <td>Contact Name</td> </tr> <tr> <td>contacts[role]</td> <td>String</td> <td>Contact Role</td> </tr> <tr> <td>contacts[phone]</td> <td>String</td> <td>Contact Phone</td> </tr> <tr> <td>contacts[fax]</td> <td>String</td> <td>Contact Fax</td> </tr> <tr> <td>contacts[email]</td> <td>String</td> <td>Contact Email</td> </tr> <tr> <td>contacts[remark]</td> <td>String</td> <td>Contact Remark</td> </tr> <tr> <td>&lt;!--</td> <td>files</td> <td>File</td> <td>Array of File, Max Size 10M. Please add Header &quot;Content-Type&quot;: &quot;multipart/form-data&quot; if applicable</td> <td>--&gt;</td> </tr> </tbody> </table> <p>&gt; <code>(*)</code> it means the field is required. &gt; <code>(*?)</code> it means the field is conditionally required.</p> <h2>Code Example</h2> <pre><code>Request: curl --location --request PUT 'https://api.drayeasy.com/api/v2/warehouses/2376' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer xxxxxxxxx' --data-raw '{ &amp;quot;id&amp;quot;: 2376, &amp;quot;name&amp;quot;: &amp;quot;Test Update Warehouse&amp;quot;, &amp;quot;code&amp;quot;: &amp;quot;100121&amp;quot;, &amp;quot;address&amp;quot;: &amp;quot;Test Update Warehouse Stree Address&amp;quot;, &amp;quot;is_residential&amp;quot;: true, &amp;quot;time_zone&amp;quot;: &amp;quot;MST&amp;quot;, &amp;quot;zipcode&amp;quot;: &amp;quot;90001&amp;quot;, &amp;quot;appointment_by&amp;quot;: 2, &amp;quot;live_or_drop&amp;quot;: 1, &amp;quot;customer_memo&amp;quot;: &amp;quot;Test Update Warehouse\n Test&amp;quot;, &amp;quot;working_day_from&amp;quot;: &amp;quot;3&amp;quot;, &amp;quot;working_day_to&amp;quot;: &amp;quot;6&amp;quot;, &amp;quot;working_hour_from&amp;quot;: &amp;quot;10:41&amp;quot;, &amp;quot;working_hour_to&amp;quot;: &amp;quot;14:41&amp;quot;, &amp;quot;contacts&amp;quot;: [ { &amp;quot;id&amp;quot;: 1388, &amp;quot;email&amp;quot;: &amp;quot;john@john.com&amp;quot;, &amp;quot;emailable&amp;quot;: false, &amp;quot;request_rate&amp;quot;: false, &amp;quot;fax&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;John&amp;quot;, &amp;quot;phone&amp;quot;: &amp;quot;11112345688&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;Test&amp;quot;, &amp;quot;role&amp;quot;: &amp;quot;UFO&amp;quot;, &amp;quot;type&amp;quot;: [ &amp;quot;SALES&amp;quot;, &amp;quot;ACCOUNTING&amp;quot; ] }, { &amp;quot;email&amp;quot;: &amp;quot;whes@test.com&amp;quot;, &amp;quot;emailable&amp;quot;: false, &amp;quot;request_rate&amp;quot;: false, &amp;quot;fax&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;whes&amp;quot;, &amp;quot;phone&amp;quot;: &amp;quot;11113333333&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;role&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: [ &amp;quot;APT&amp;quot;, &amp;quot;SALES&amp;quot;, &amp;quot;ACCOUNTING&amp;quot; ] } ], &amp;quot;city_id&amp;quot;: 1 }' Response: HTTP/1.1 201 OK Content-Type: application/json; charset=utf-8 { &amp;quot;data&amp;quot;: { &amp;quot;id&amp;quot;: 2376, &amp;quot;name&amp;quot;: &amp;quot;Test Update Warehouse&amp;quot;, &amp;quot;code&amp;quot;: &amp;quot;100121&amp;quot;, &amp;quot;zipcode&amp;quot;: &amp;quot;90001&amp;quot;, &amp;quot;working_hour_from&amp;quot;: &amp;quot;10:41&amp;quot;, &amp;quot;working_hour_to&amp;quot;: &amp;quot;14:41&amp;quot;, &amp;quot;working_day_from&amp;quot;: &amp;quot;3&amp;quot;, &amp;quot;working_day_to&amp;quot;: &amp;quot;6&amp;quot;, &amp;quot;time_zone&amp;quot;: &amp;quot;MST&amp;quot;, &amp;quot;appointment_by&amp;quot;: 2, &amp;quot;internal_memo&amp;quot;: null, &amp;quot;is_residential&amp;quot;: true, &amp;quot;customer_memo&amp;quot;: &amp;quot;Test Update Warehouse\n Test&amp;quot;, &amp;quot;live_or_drop&amp;quot;: 1, &amp;quot;address&amp;quot;: &amp;quot;Test Update Warehouse Stree Address&amp;quot;, &amp;quot;delivery_order_address&amp;quot;: &amp;quot;TEST UPDATE WAREHOUSE STREE ADDRESS\nLOS ANGELES, CA, USA 90001\nJOHN(11112345688)\nWHES(11113333333)&amp;quot;, &amp;quot;created_at&amp;quot;: &amp;quot;2023-06-02T12:16:34.000000Z&amp;quot;, &amp;quot;user&amp;quot;: { &amp;quot;name&amp;quot;: &amp;quot;Name1&amp;quot;, &amp;quot;email&amp;quot;: &amp;quot;email1@email.com&amp;quot;, &amp;quot;company&amp;quot;: &amp;quot;Company1&amp;quot; }, &amp;quot;city&amp;quot;: { &amp;quot;id&amp;quot;: 1, &amp;quot;country&amp;quot;: &amp;quot;USA&amp;quot;, &amp;quot;full_name&amp;quot;: &amp;quot;Los Angeles, CA, USA&amp;quot;, &amp;quot;name&amp;quot;: &amp;quot;LOS ANGELES&amp;quot;, &amp;quot;state&amp;quot;: &amp;quot;CA&amp;quot;, &amp;quot;alias&amp;quot;: null, &amp;quot;latitude&amp;quot;: 33.973093, &amp;quot;longitude&amp;quot;: -118.247896 }, &amp;quot;contacts&amp;quot;: [ { &amp;quot;id&amp;quot;: 1388, &amp;quot;name&amp;quot;: &amp;quot;John&amp;quot;, &amp;quot;type&amp;quot;: [ &amp;quot;SALES&amp;quot;, &amp;quot;ACCOUNTING&amp;quot; ], &amp;quot;role&amp;quot;: &amp;quot;UFO&amp;quot;, &amp;quot;phone&amp;quot;: &amp;quot;11112345688&amp;quot;, &amp;quot;fax&amp;quot;: null, &amp;quot;email&amp;quot;: &amp;quot;john@john.com&amp;quot;, &amp;quot;remark&amp;quot;: &amp;quot;Test&amp;quot; }, { &amp;quot;id&amp;quot;: 1389, &amp;quot;name&amp;quot;: &amp;quot;whes&amp;quot;, &amp;quot;type&amp;quot;: [ &amp;quot;APT&amp;quot;, &amp;quot;SALES&amp;quot;, &amp;quot;ACCOUNTING&amp;quot; ], &amp;quot;role&amp;quot;: null, &amp;quot;phone&amp;quot;: &amp;quot;11113333333&amp;quot;, &amp;quot;fax&amp;quot;: null, &amp;quot;email&amp;quot;: &amp;quot;whes@test.com&amp;quot;, &amp;quot;remark&amp;quot;: null } ] } }</code></pre> <h2>Response Fields Description</h2> <table> <thead> <tr> <th>Field Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id</td> <td>Integer</td> <td>Unique identifier for the resource</td> </tr> <tr> <td>name</td> <td>String</td> <td>Name of the resource</td> </tr> <tr> <td>code</td> <td>String</td> <td>Code or identifier for the resource</td> </tr> <tr> <td>zipcode</td> <td>String</td> <td>Zipcode of the resource location</td> </tr> <tr> <td>working_hour_from</td> <td>String</td> <td>Start time of working hours</td> </tr> <tr> <td>working_hour_to</td> <td>String</td> <td>End time of working hours</td> </tr> <tr> <td>working_day_from</td> <td>Integer</td> <td>Start day of working hours (0-6, Sunday-Saturday)</td> </tr> <tr> <td>working_day_to</td> <td>Integer</td> <td>End day of working hours (0-6, Sunday-Saturday)</td> </tr> <tr> <td>time_zone</td> <td>String</td> <td>Time zone of the resource</td> </tr> <tr> <td>appointment_by</td> <td>Integer</td> <td>Appointment method (0: Unknown, 1: No apt needed, 2: Customer, 3: DrayEasy)</td> </tr> <tr> <td>live_or_drop</td> <td>Integer</td> <td>Live or drop indicator (0: Unknown, 1: Live, 2: Drop)</td> </tr> <tr> <td>customer_memo</td> <td>String</td> <td>Memo or notes related to the customer</td> </tr> <tr> <td>internal_memo</td> <td>String</td> <td>Internal memo or notes</td> </tr> <tr> <td>is_residential</td> <td>Boolean</td> <td>Residential indicator (true/false)</td> </tr> <tr> <td>delivery_order_address</td> <td>String</td> <td>Address for delivery orders</td> </tr> <tr> <td>created_at</td> <td>String</td> <td>Date and time when the resource was created</td> </tr> <tr> <td>user</td> <td>Object</td> <td>Information about the user associated with the resource</td> </tr> <tr> <td>city</td> <td>Object</td> <td>Information about the city where the resource is located</td> </tr> <tr> <td>contacts</td> <td>Array</td> <td>Array of contact objects associated with the resource</td> </tr> </tbody> </table> <h2>User Object</h2> <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td>The name of the user.</td> </tr> <tr> <td>email</td> <td>The email address of the user.</td> </tr> <tr> <td>company</td> <td>The company associated with the user.</td> </tr> </tbody> </table> <h2>City Object</h2> <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id</td> <td>The unique identifier for the city.</td> </tr> <tr> <td>country</td> <td>The country where the city is located.</td> </tr> <tr> <td>full_name</td> <td>The full name of the city, including state and country.</td> </tr> <tr> <td>name</td> <td>The name of the city.</td> </tr> <tr> <td>state</td> <td>The state where the city is located (if applicable).</td> </tr> <tr> <td>alias</td> <td>An alias for the city (if available).</td> </tr> <tr> <td>latitude</td> <td>The latitude coordinate of the city.</td> </tr> <tr> <td>longitude</td> <td>The longitude coordinate of the city.</td> </tr> </tbody> </table> <h2>Contact Object</h2> <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id</td> <td>The unique identifier for the contact.</td> </tr> <tr> <td>name</td> <td>The name of the contact.</td> </tr> <tr> <td>type</td> <td>The type or roles associated with the contact.</td> </tr> <tr> <td>role</td> <td>The role of the contact (if applicable).</td> </tr> <tr> <td>phone</td> <td>The phone number of the contact.</td> </tr> <tr> <td>fax</td> <td>The fax number of the contact (if available).</td> </tr> <tr> <td>email</td> <td>The email address of the contact.</td> </tr> <tr> <td>remark</td> <td>Any additional remarks or notes about the contact.</td> </tr> </tbody> </table> <h2>User Object</h2> <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td>The name of the user.</td> </tr> <tr> <td>email</td> <td>The email address of the user.</td> </tr> <tr> <td>company</td> <td>The company associated with the user.</td> </tr> </tbody> </table> <h2>City Object</h2> <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id</td> <td>The unique identifier for the city.</td> </tr> <tr> <td>country</td> <td>The country where the city is located.</td> </tr> <tr> <td>full_name</td> <td>The full name of the city, including state and country.</td> </tr> <tr> <td>name</td> <td>The name of the city.</td> </tr> <tr> <td>state</td> <td>The state where the city is located (if applicable).</td> </tr> <tr> <td>alias</td> <td>An alias for the city (if available).</td> </tr> <tr> <td>latitude</td> <td>The latitude coordinate of the city.</td> </tr> <tr> <td>longitude</td> <td>The longitude coordinate of the city.</td> </tr> </tbody> </table> <h2>Contact Object</h2> <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>id</td> <td>The unique identifier for the contact.</td> </tr> <tr> <td>name</td> <td>The name of the contact.</td> </tr> <tr> <td>type</td> <td>The type or roles associated with the contact.</td> </tr> <tr> <td>role</td> <td>The role of the contact (if applicable).</td> </tr> <tr> <td>phone</td> <td>The phone number of the contact.</td> </tr> <tr> <td>fax</td> <td>The fax number of the contact (if available).</td> </tr> <tr> <td>email</td> <td>The email address of the contact.</td> </tr> <tr> <td>remark</td> <td>Any additional remarks or notes about the contact.</td> </tr> </tbody> </table>

页面列表

ITEM_HTML