Update

PUT /api/locations/{id}

Update a location

Path parameters

  • id string Required
application/json

Body Required

  • name string Required

    Minimum length is 4, maximum length is 100.

  • description string | null Required

    Maximum length is 150.

  • remarks string | null Required

    Maximum length is 10000.

  • coordinates string | null
  • isEnabled boolean Required
  • circuit object | null
    Hide circuit attribute Show circuit attribute object | null
    • id string Required

      Minimum length is 26, maximum length is 26.

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • name string Required

      Minimum length is 4, maximum length is 100.

    • description string | null Required

      Maximum length is 150.

    • remarks string | null Required

      Maximum length is 10000.

    • coordinates string | null
    • isEnabled boolean Required
    • id string Required
    • shiftsCount integer Required
    • shifts array[object] Required
      Hide shifts attributes Show shifts attributes object
    • remarksSummary string | null
    • labels array[object] Required
      Hide labels attributes Show labels attributes object
      • name string Required

        Minimum length is 1, maximum length is 50.

      • bgColor string Required

        Maximum length is 20.

      • id string Required
    • circuit object | null
      Hide circuit attributes Show circuit attributes object | null
      • name string Required

        Minimum length is 3, maximum length is 100.

      • id string Required

        Maximum length is 26.

    • createdAt string(date-time) Required
    • updatedAt string(date-time) | null
  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
PUT /api/locations/{id}
curl \
 -X PUT https://ppammedellin.com/api/locations/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","description":"string","remarks":"string","coordinates":"string","isEnabled":true,"circuit":{"id":"string"}}'
Request example
{
  "name": "string",
  "description": "string",
  "remarks": "string",
  "coordinates": "string",
  "isEnabled": true,
  "circuit": {
    "id": "string"
  }
}
Response examples (200)
{
  "name": "string",
  "description": "string",
  "remarks": "string",
  "coordinates": "string",
  "isEnabled": true,
  "id": "string",
  "shiftsCount": 42,
  "shifts": [
    {
      "startTime": "09:42:00+00:00",
      "endTime": "09:42:00+00:00",
      "dayOfWeek": 42,
      "seatsCount": 42,
      "isEnabled": true,
      "id": "string"
    }
  ],
  "remarksSummary": "string",
  "labels": [
    {
      "name": "string",
      "bgColor": "string",
      "id": "string"
    }
  ],
  "circuit": {
    "name": "string",
    "id": "string"
  },
  "createdAt": "2024-05-04T09:42:00+00:00",
  "updatedAt": "2024-05-04T09:42:00+00:00"
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}