---
title: Check-In/Out
slug: fourkites-api-reference/check-inout
icon: {"apiMethod":"PUT"}
createdAt: 2024-08-19T10:02:44.000Z
---

Use this API to update your appointments to take the following actions:

- [Check-in update only](https://docs.fourkites.com/api-reference/check-inout#lvtxF)
- [Check-out update only](https://docs.fourkites.com/api-reference/check-inout#I5rPf)
- [Both Check-in and Check-out update](https://docs.fourkites.com/api-reference/check-inout#Ie17i)
- [Check-in / Check-out revert](https://docs.fourkites.com/api-reference/check-inout#WgSY6)

For more Error Responses, [click here](https://docs.fourkites.com/api-reference/check-inout#PK5j4).&#x20;

:::hint{type="info"}
### Rate Limit

**60 requests per minute**
:::

:::hint{type="info"}
### Format Supported

**JSON**
:::

:::hint{type="info"}
### Authenticated Resource

**API Key**
:::

For more information on Authentication, [click here](https://docs.fourkites.com/api-reference/authentication).

## Check-In Update Only

:::hint{type="info"}
Pass `checkInAt` along with `loadNumber` & `shippingType` fields for an appointment Check-In, with the mandatory `action` field as “CheckIn/CheckOut".
:::

:::ApiMethodV2
```json
{
  "name": "Production",
  "method": "PUT",
  "url": "https://api.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "-tioYTpB2-8MW1xl6VLef",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "1K9Ofgs7d2u3TT_S5qkZs",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "1UkMbI14NGU0YQ3z_9qog",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "AWqLhu3CPK1WYz7xCmJwT",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "_gMmBBDDmoZjQ245jHKeP",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkInAt\"\": \"\"2024-07-11T12:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "2hCBuDiixUYLm0Xe40dEX",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "m-k4uTrauBTUuhKGFHLVx",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "CVtdd_Cocan5EO0aTMNAC",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "-tioYTpB2-8MW1xl6VLef"
  },
  "results": {
    "languages": [
      {
        "id": "qETxUvYepeYrBj91tvYnr",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "SNAf-0hQQskWP51QhXO5N",
        "language": "400",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "qETxUvYepeYrBj91tvYnr"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkInAt",
        "kind": "optional",
        "type": "string",
        "description": "Time at which the check in should occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "production",
  "legacyHash": "l8zFTG0pWs5XP8uTjMNfF"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Staging",
  "method": "PUT",
  "url": "https://api-staging.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "-tioYTpB2-8MW1xl6VLef",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "1K9Ofgs7d2u3TT_S5qkZs",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "1UkMbI14NGU0YQ3z_9qog",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api-staging.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "AWqLhu3CPK1WYz7xCmJwT",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api-staging.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "_gMmBBDDmoZjQ245jHKeP",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api-staging.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkInAt\"\": \"\"2024-07-11T12:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "2hCBuDiixUYLm0Xe40dEX",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api-staging.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "m-k4uTrauBTUuhKGFHLVx",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "CVtdd_Cocan5EO0aTMNAC",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api-staging.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "-tioYTpB2-8MW1xl6VLef"
  },
  "results": {
    "languages": [
      {
        "id": "qETxUvYepeYrBj91tvYnr",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "SNAf-0hQQskWP51QhXO5N",
        "language": "400",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "SNAf-0hQQskWP51QhXO5N"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkInAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-in should occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "staging",
  "legacyHash": "DWkrYJydQw041lVqsE72w"
}
```
:::

## Check-out Update Only

:::hint{type="info"}
Pass `checkOutAt` along with `loadNumber` & `shippingType` fields for an appointment Check-Out, with the mandatory `action` field as “CheckIn/CheckOut".
:::

:::ApiMethodV2
```json
{
  "name": "Production",
  "method": "PUT",
  "url": "https://api.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "BZ1Q1pNXIl7qrg9rjo597",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "J3DFY7qu3u8fjzqCV08uT",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "g4uyGUmrZnOpQDdnqUPbi",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "6GwPldTj42fYsUZsRi5Dh",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkOutAt\"\": \"\"2024-07-11T12:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "xjCrjqikZoub_FvGt3gDu",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "JUMgtXPWB-WKX77WPYG5a",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "KY3m9TxoLmPtOwXimcjzQ",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "iGmA_fov82G4P1mkfZ8sU",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "iGmA_fov82G4P1mkfZ8sU"
  },
  "results": {
    "languages": [
      {
        "id": "QMci2tgr6427O5lWAMeOm",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "zY1dCceRJUs3iCgjLWmJz",
        "language": "400",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "zY1dCceRJUs3iCgjLWmJz"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkOutAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-out needs to occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "production-1",
  "legacyHash": "si_WCr9NFE-Co4svw0sYn"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Staging",
  "method": "PUT",
  "url": "https://api-staging.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "BZ1Q1pNXIl7qrg9rjo597",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "J3DFY7qu3u8fjzqCV08uT",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "g4uyGUmrZnOpQDdnqUPbi",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api-staging.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "6GwPldTj42fYsUZsRi5Dh",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api-staging.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkOutAt\"\": \"\"2024-07-11T12:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "xjCrjqikZoub_FvGt3gDu",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api-staging.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "JUMgtXPWB-WKX77WPYG5a",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api-staging.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "KY3m9TxoLmPtOwXimcjzQ",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "iGmA_fov82G4P1mkfZ8sU",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api-staging.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "BZ1Q1pNXIl7qrg9rjo597"
  },
  "results": {
    "languages": [
      {
        "id": "QMci2tgr6427O5lWAMeOm",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "zY1dCceRJUs3iCgjLWmJz",
        "language": "400",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "zY1dCceRJUs3iCgjLWmJz"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkOutAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-out needs to occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "staging-1",
  "legacyHash": "YjXuBP1XZojL8yIy6mRTK"
}
```
:::

## Both Check-In & Check-Out

:::hint{type="info"}
Pass both `checkInAt` and `checkOutAt` along with load number & shipping type for Appointment Check-In & Out together, with the mandatory `action` field as “CheckIn/CheckOut".
:::

:::ApiMethodV2
```json
{
  "name": "Production",
  "method": "PUT",
  "url": "https://api.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "0UUCPJvTQgLqjFU-3fzL1",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T11:00:00Z\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "q4oCF-XHKaWpIn-PafREN",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T11:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "hP8hMGQDpOowSVSi2vepl",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T11:00:00Z\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "seC-aAWnuLt3PbvbAbTaN",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T11:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "FF91Jm6w2IHRdw6XwcFbX",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkInAt\"\": \"\"2024-07-11T11:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"checkOutAt\"\": \"\"2024-07-11T12:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "K9J_SqwtDN7zFRbtulj8l",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T11:00:00Z\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "RnoVQlb21GIjlXzJA-hnd",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T11:00:00Z\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "dDjg7HJwkEOgEaywN7uCy",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T11:00:00Z\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "0UUCPJvTQgLqjFU-3fzL1"
  },
  "results": {
    "languages": [
      {
        "id": "KVQQao5_k-sZQUjPEiKPz",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "NC9RAJgBcGMwRdM_hq-18",
        "language": "400",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "NC9RAJgBcGMwRdM_hq-18"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkInAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-in should occur for the appointment",
        "children": []
      },
      {
        "name": "checkOutAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-out needs to occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "production-2",
  "legacyHash": "Qif6S3706zHS6C9mzwyPz"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Staging",
  "method": "PUT",
  "url": "https://api-staging.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "0UUCPJvTQgLqjFU-3fzL1",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T11:00:00Z\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "q4oCF-XHKaWpIn-PafREN",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T11:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "hP8hMGQDpOowSVSi2vepl",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api-staging.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T11:00:00Z\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "seC-aAWnuLt3PbvbAbTaN",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"2024-07-11T11:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"2024-07-11T12:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api-staging.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "FF91Jm6w2IHRdw6XwcFbX",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api-staging.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkInAt\"\": \"\"2024-07-11T11:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"checkOutAt\"\": \"\"2024-07-11T12:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "K9J_SqwtDN7zFRbtulj8l",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api-staging.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"2024-07-11T11:00:00Z\",\n    \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "RnoVQlb21GIjlXzJA-hnd",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T11:00:00Z\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "dDjg7HJwkEOgEaywN7uCy",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api-staging.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"2024-07-11T11:00:00Z\",\n  \"checkOutAt\": \"2024-07-11T12:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FF91Jm6w2IHRdw6XwcFbX"
  },
  "results": {
    "languages": [
      {
        "id": "KVQQao5_k-sZQUjPEiKPz",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "NC9RAJgBcGMwRdM_hq-18",
        "language": "400",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "NC9RAJgBcGMwRdM_hq-18"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkInAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-in should occur for the appointment",
        "children": []
      },
      {
        "name": "checkOutAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-out needs to occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "staging-2",
  "legacyHash": "cs8p5JSYrtDhut8CWJYLl"
}
```
:::

## Check-In/Out Revert

:::hint{type="info"}
Pass `checkInAt` and/or `checkOutAt` fields with 0001-01-01T00:00:00Z as value along with load number & shipping type to revert check-in and check-out for an appointment, with the mandatory action field as “CheckIn/CheckOut".
:::

:::ApiMethodV2
```json
{
  "name": "Production",
  "method": "PUT",
  "url": "https://api.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "eXI1-Y9HeEu-0yUbmPkKn",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"0001-01-01T00:00:00Z\",\n    \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "xFIHxFZf0BiPW3aepZLSa",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "c8NQ6jzAUr3869LjJX8et",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"0001-01-01T00:00:00Z\",\n    \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "SyYPYALOJM_NCYen3EBr_",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "P54umdZGMfAHUrw6JtaNb",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkInAt\"\": \"\"0001-01-01T00:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"checkOutAt\"\": \"\"0001-01-01T00:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "a5tdapCxU3_jgoTFDdpcI",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"0001-01-01T00:00:00Z\",\n    \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "sr_HpMvtGCTmVYoXgO7Vb",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"0001-01-01T00:00:00Z\",\n  \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "VSZJzbivYROb-Fl0EVGIV",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"0001-01-01T00:00:00Z\",\n  \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "eXI1-Y9HeEu-0yUbmPkKn"
  },
  "results": {
    "languages": [
      {
        "id": "QsMv5vchRMirHiEyYF0x_",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "Y_bYVGcvnM-q9smPUPk4U",
        "language": "404",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "Y_bYVGcvnM-q9smPUPk4U"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkInAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-in should occur for the appointment",
        "children": []
      },
      {
        "name": "checkOutAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-out needs to occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "optional",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "production-3",
  "legacyHash": "l43H8aNYHXPkRcWfe9jgh"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Staging",
  "method": "PUT",
  "url": "https://api-staging.fourkites.com/api/v1/update_appointment",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "eXI1-Y9HeEu-0yUbmPkKn",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/update_appointment' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: REPLACE_KEY_VALUE' \\\n--data-raw '{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"0001-01-01T00:00:00Z\",\n    \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}'",
        "customLabel": ""
      },
      {
        "id": "xFIHxFZf0BiPW3aepZLSa",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n  .method(\"PUT\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"REPLACE_KEY_VALUE\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "c8NQ6jzAUr3869LjJX8et",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api-staging.fourkites.com/api/v1/update_appointment\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"REPLACE_KEY_VALUE\"\n  },\n  \"data\": JSON.stringify({\n    \"loadNumber\": \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"0001-01-01T00:00:00Z\",\n    \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "SyYPYALOJM_NCYen3EBr_",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"loadNumber\\\" : \\\"NB23b23423\\\",\\n    \\\"shippingType\\\": \\\"inbound\\\",\\n    \\\"checkInAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"checkOutAt\\\": \\\"0001-01-01T00:00:00Z\\\",\\n    \\\"action\\\": \\\"CheckIn/CheckOut\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api-staging.fourkites.com/api/v1/update_appointment\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"REPLACE_KEY_VALUE\", forHTTPHeaderField: \"apikey\")\n\nrequest.httpMethod = \"PUT\"\nrequest.httpBody = postData\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    semaphore.signal()\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n  semaphore.signal()\n}\n\ntask.resume()\nsemaphore.wait()\n",
        "customLabel": ""
      },
      {
        "id": "P54umdZGMfAHUrw6JtaNb",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api-staging.fourkites.com/api/v1/update_appointment\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nrequest.AddHeader(\"apikey\", \"REPLACE_KEY_VALUE\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"loadNumber\"\" : \"\"NB23b23423\"\",\" + \"\\n\" +\n@\"    \"\"shippingType\"\": \"\"inbound\"\",\" + \"\\n\" +\n@\"    \"\"checkInAt\"\": \"\"0001-01-01T00:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"checkOutAt\"\": \"\"0001-01-01T00:00:00Z\"\",\" + \"\\n\" +\n@\"    \"\"action\"\": \"\"CheckIn/CheckOut\"\"\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "a5tdapCxU3_jgoTFDdpcI",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n\n  url := \"https://api-staging.fourkites.com/api/v1/update_appointment\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"loadNumber\" : \"NB23b23423\",\n    \"shippingType\": \"inbound\",\n    \"checkInAt\": \"0001-01-01T00:00:00Z\",\n    \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n    \"action\": \"CheckIn/CheckOut\"\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"REPLACE_KEY_VALUE\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "sr_HpMvtGCTmVYoXgO7Vb",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-staging.fourkites.com/api/v1/update_appointment\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"REPLACE_KEY_VALUE\"\nrequest.body = JSON.dump({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"0001-01-01T00:00:00Z\",\n  \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "VSZJzbivYROb-Fl0EVGIV",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api-staging.fourkites.com\")\npayload = json.dumps({\n  \"loadNumber\": \"NB23b23423\",\n  \"shippingType\": \"inbound\",\n  \"checkInAt\": \"0001-01-01T00:00:00Z\",\n  \"checkOutAt\": \"0001-01-01T00:00:00Z\",\n  \"action\": \"CheckIn/CheckOut\"\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'REPLACE_KEY_VALUE'\n}\nconn.request(\"PUT\", \"/api/v1/update_appointment\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "eXI1-Y9HeEu-0yUbmPkKn"
  },
  "results": {
    "languages": [
      {
        "id": "QsMv5vchRMirHiEyYF0x_",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"code\": 200,\n    \"message\": \"Updated appointment with check in check out details successfully\",\n    \"request_id\": \"cq8hbj14cktev3sofddg\"\n}"
      },
      {
        "id": "Y_bYVGcvnM-q9smPUPk4U",
        "language": "404",
        "customLabel": "",
        "code": "{\n    \"code\": 400,\n    \"error\": {\n        \"message\": \"Invalid Request Params\",\n        \"code\": 400,\n        \"errors\": [\n            {\n                \"domain\": \"oas\",\n                \"reason\": \"The shipment does not have an associated appointment\",\n                \"message\": \"Invalid Request Params\"\n            }\n        ]\n    },\n    \"request_id\": \"cq8hcd14cktev3sofde0\"\n}"
      }
    ],
    "selectedLanguageId": "QsMv5vchRMirHiEyYF0x_"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "loadNumber",
        "kind": "optional",
        "type": "string",
        "description": "Load number of the load for which the update needs to be made."
      },
      {
        "name": "shippingType",
        "kind": "optional",
        "type": "string",
        "description": "Indicates shipping type (inbound/outbound)",
        "children": []
      },
      {
        "name": "checkInAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-in should occur for the appointment",
        "children": []
      },
      {
        "name": "checkOutAt",
        "kind": "optional",
        "type": "string",
        "description": "Time when the check-out needs to occur for the appointment",
        "children": []
      },
      {
        "name": "action",
        "kind": "optional",
        "type": "string",
        "description": "Indicates the Check-In/Out action",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "staging-3",
  "legacyHash": "fY1bHG0lPJS4oIEnZt_3T"
}
```
:::

## Error Response

| **Action**                                                          | **Response Message**                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Invalid Auth**                                                    | \{"message": "Invalid authentication credentials"}                                                                                                                                                                                                                                                                                                 |
| **Load Not Found**                                                  | \{<br />"code": 400,<br />"error": \{<br />"message": "Invalid Request Params",<br />"code": 400,<br />"errors": \[<br />\{<br />"domain": "oas",<br />"reason": "The shipment does not have an associated appointment",<br />"message": "Invalid Request Params"<br />}<br />]<br />},<br />"request\_id": "cq8hcd14cktev3sofde0"<br />}          |
| **Load with the same shipping type found in  more than 1 facility** | \{<br />"code": 400,<br />"error": \{<br />"message": "Invalid Request Params",<br />"code": 400,<br />"errors": \[<br />\{<br />"domain": "oas",<br />"reason": "The shipment has multiple appointments associated",<br />"message": "Invalid Request Params"<br />}<br />]<br />},<br />"request\_id": "cq8hcqp4cktev3sofdeg"<br />}             |
| **Check-in / Check-out request on an unscheduled appointment**      | \{<br />"code": 400,<br />"error": \{<br />"message": "Invalid Request Params",<br />"code": 400,<br />"errors": \[<br />\{<br />"domain": "oas",<br />"reason": "Only confirmed appointment can be checked in or out",<br />"message": "Invalid Request Params"<br />}<br />]<br />},<br />"request\_id": "cq8hdgp4cktev3sofdf0"<br />}           |
| **When an invalid action is sent**                                  | \{<br />"code": 400,<br />"error": \{<br />"message": "Invalid Request Params",<br />"code": 400,<br />"errors": \[<br />\{<br />"domain": "oas",<br />"reason": "Not a valid action",<br />"message": "Invalid Request Params"<br />}<br />]<br />},<br />"request\_id": "cq8heah4cktev3sofdg0"<br />}                                            |
| **When Action is not sent**                                         | \{<br />"code": 400,<br />"error": \{<br />"message": "Invalid Request Params",<br />"code": 400,<br />"errors": \[<br />\{<br />"domain": "oas",<br />"reason": "ReservedSlotId or StartTime and EndTime or action is required",<br />"message": "Invalid Request Params"<br />}<br />]<br />},<br />"request\_id": "cq8hf814cktf0bubdrqg"<br />} |
| **When CheckInAt and CheckOutAt is not sent**                       | \{<br />"code": 400,<br />"error": \{<br />"message": "Invalid Request Params",<br />"code": 400,<br />"errors": \[<br />\{<br />"domain": "oas",<br />"reason": "CheckInAt or CheckOutAt is required",<br />"message": "Invalid Request Params"<br />}<br />]<br />},<br />"request\_id": "cq8hhih4cktf1kb3j6cg"<br />}                           |
