locations

PUT /api/v1/locations/{id}

Handles the updating of a location by id

put/api/v1/locations/{id}

Request

Path parameters

idstring string required

The Location Hashed ID

Query parameters

indexstring
Example:user

Replaces the default response index from data to a user specific string

ie.

  ?index=new_index

response is wrapped

  {
    'new_index' : [
      .....  
    ]
  }

Headers

X-API-TOKENstring required
Example:TOKEN

The API token to be used for authentication

X-Requested-Withstring required
Example:XMLHttpRequest

Used to send the XMLHttpRequest header

Request body

namestring

The location name

address1string

The first line of the address

address2string

The second line of the address

citystring

The city name

statestring

The state or region

postal_codestring

The postal or zip code

country_idstring

The ID of the associated country

custom_value1string nullable

Custom field value 1

custom_value2string nullable

Custom field value 2

custom_value3string nullable

Custom field value 3

custom_value4string nullable

Custom field value 4

is_shipping_locationboolean

Indicates if this is a shipping location

assigned_user_idstring

The assigned user hashed id

client_idstring

The client hashed id

vendor_idstring

The vendor hashed id

Example request

{
  "name": "Warehouse A",
  "address1": "123 Business Street",
  "address2": "Suite 100",
  "city": "San Francisco",
  "state": "CA",
  "postal_code": "94107",
  "country_id": "840",
  "is_shipping_location": true,
  "assigned_user_id": "Opnel5aKBz",
  "client_id": "Opnel5aKBz",
  "vendor_id": "Opnel5aKBz"
}

Response

Returns the location object

idstring

The location hashed id

namestring

The location name

address1string

The first line of the address

address2string

The second line of the address

citystring

The city name

statestring

The state or region

postal_codestring

The postal or zip code

country_idstring

The ID of the associated country

custom_value1string nullable

Custom field value 1

custom_value2string nullable

Custom field value 2

custom_value3string nullable

Custom field value 3

custom_value4string nullable

Custom field value 4

is_deletedboolean

Indicates if the location has been deleted

is_shipping_locationboolean

Indicates if this is a shipping location

user_idstring

The user hashed id

assigned_user_idstring

The assigned user hashed id

client_idstring

The client hashed id

vendor_idstring

The vendor hashed id

created_atinteger

Timestamp of when the location was created

updated_atinteger

Timestamp of when the location was last updated

Example response

{
  "id": "Kd5S2M",
  "name": "Warehouse A",
  "address1": "123 Business Street",
  "address2": "Suite 100",
  "city": "San Francisco",
  "state": "CA",
  "postal_code": "94107",
  "country_id": "840",
  "is_shipping_location": true,
  "user_id": "Opnel5aKBz",
  "assigned_user_id": "Opnel5aKBz",
  "client_id": "Opnel5aKBz",
  "vendor_id": "Opnel5aKBz",
  "created_at": 1623456789,
  "updated_at": 1623456999
}

Changes

    • info

      the response optional property became read-only for the status

    • breaking

      the request's body type changed from no type to object

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property