Locations

Update location

Changed on
patch/locations/{id}

Request

  • Base URL
    https://api.getmaintainx.com/v1
  • Auth
    HTTP bearer

Path parameters

idinteger required

ID of the location

Query parameters

skipWebhookboolean

Set skipWebhook=true, skipWebhook=1 or skipWebhook=yes to skip all webhooks upon successful operation on the endpoint. Learn more about webhooks

Request body

namestring
descriptionstring nullable
addressstring nullable

Postal address of the location

barcodestring nullable

String encoded barcode

parentIdinteger nullable

ID of the parent location

extraFieldsobject

Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Department")

vendorIdsnumber[]

Vendor IDs

externalIdstring nullable

External ID for this location, unique per organization.

Example request

{
  "name": "Warehouses",
  "description": "The warehouse where we store the forklifts",
  "address": "1090 main street, Franklin",
  "barcode": "BWFPBNRHAW54CG",
  "parentId": 852,
  "extraFields": {
    "Department": "Electrical"
  },
  "vendorIds": [
    2
  ],
  "externalId": "ext-location-001"
}

Response

Successfully edited location

Example response

{
  "location": {
    "id": 963,
    "name": "Warehouses",
    "description": "The warehouse where we store the forklifts",
    "address": "1090 main street, Franklin",
    "barcode": "BWFPBNRHAW54CG",
    "parentId": 852,
    "childrenIds": [
      342,
      521
    ],
    "thumbnail": {
      "id": 12345,
      "mimeType": "image/png",
      "fileName": "image.png",
      "url": "http://example.com/image.png",
      "createdAt": "2022-01-01T00:00:00.000Z",
      "width": 220,
      "height": 100
    },
    "attachments": [
      {
        "id": 12345,
        "mimeType": "image/png",
        "fileName": "image.png",
        "url": "http://example.com/image.png",
        "createdAt": "2022-01-01T00:00:00.000Z",
        "width": 220,
        "height": 100
      }
    ],
    "extraFields": {
      "Department": "Electrical"
    },
    "teamIds": [
      2
    ],
    "vendorIds": [
      2
    ],
    "createdAt": "2022-01-01T00:00:00.000Z",
    "updatedAt": "2022-01-01T00:00:00.000Z",
    "externalId": "ext-location-001"
  }
}

Changes

    • breaking

      removed the media type application/octet-stream from the request body

    • info

      added the new optional query request parameter skipWebhook

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status