---
title: Order Update API
slug: fourkites-api-reference/order-update-api
icon: {"apiMethod":"PUT"}
createdAt: 2024-05-15T09:59:26.000Z
---

An order update is any new information communicated about the status of an order. This can happen throughout the order lifecycle, from the moment it's placed to after it's delivered.

:::hint{type="info"}
**Note**: All date fields in this API use **UTC** exclusively.
:::

:::ApiMethodV2
```json
{
  "name": "Production",
  "method": "PUT",
  "url": "https://api.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "f7qKCFqjXdd1DAxCOqI7D",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>' \\\n--header 'apikey: <YOUR_API_KEY>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"order\": {\n        \"orderNumber\": \"PO44839202\",\n        \"orderTypeCode\": \"PO\",\n        \"status\": \"on order\",\n        \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n        \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n         }\n}'",
        "customLabel": ""
      },
      {
        "id": "TsN27qRddz14wmsbg30TF",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"order\\\": {\\n        \\\"orderNumber\\\": \\\"PO44839202\\\",\\n        \\\"orderTypeCode\\\": \\\"PO\\\",\\n        \\\"status\\\": \\\"on order\\\",\\n        \\\"requiredDeliveryDateTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\",\\n        \\\"lastUpdatedTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\"\\n         }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\")\n  .method(\"PUT\", body)\n  .addHeader(\"apikey\", \"<YOUR_API_KEY>\")\n  .addHeader(\"Content-Type\", \"application/json\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "w4gUVKGCdp9-lX3OZdj0b",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"apikey\": \"<YOUR_API_KEY>\",\n    \"Content-Type\": \"application/json\"\n  },\n  \"data\": JSON.stringify({\n    \"order\": {\n      \"orderNumber\": \"PO44839202\",\n      \"orderTypeCode\": \"PO\",\n      \"status\": \"on order\",\n      \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n      \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n    }\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "eLvBJJym0CDSDKiXZhGv7",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"order\\\": {\\n        \\\"orderNumber\\\": \\\"PO44839202\\\",\\n        \\\"orderTypeCode\\\": \\\"PO\\\",\\n        \\\"status\\\": \\\"on order\\\",\\n        \\\"requiredDeliveryDateTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\",\\n        \\\"lastUpdatedTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\"\\n         }\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"<YOUR_API_KEY>\", forHTTPHeaderField: \"apikey\")\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\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": "mqbhMI0jRuRhuZoDuQXBh",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"apikey\", \"<YOUR_API_KEY>\");\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"order\"\": {\" + \"\\n\" +\n@\"        \"\"orderNumber\"\": \"\"PO44839202\"\",\" + \"\\n\" +\n@\"        \"\"orderTypeCode\"\": \"\"PO\"\",\" + \"\\n\" +\n@\"        \"\"status\"\": \"\"on order\"\",\" + \"\\n\" +\n@\"        \"\"requiredDeliveryDateTime\"\": \"\"2021-02-28T11:00:27.464596Z\"\",\" + \"\\n\" +\n@\"        \"\"lastUpdatedTime\"\": \"\"2021-02-28T11:00:27.464596Z\"\"\" + \"\\n\" +\n@\"         }\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "6D-33KFWU570wo_TT9pZu",
        "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/async/order/?request_id=%3CYOUR_REQUEST_ID%3E\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"order\": {\n        \"orderNumber\": \"PO44839202\",\n        \"orderTypeCode\": \"PO\",\n        \"status\": \"on order\",\n        \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n        \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n         }\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(\"apikey\", \"<YOUR_API_KEY>\")\n  req.Header.Add(\"Content-Type\", \"application/json\")\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": "xivuLk2YSyWIBU0AI98kq",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"apikey\"] = \"<YOUR_API_KEY>\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n  \"order\": {\n    \"orderNumber\": \"PO44839202\",\n    \"orderTypeCode\": \"PO\",\n    \"status\": \"on order\",\n    \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n    \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n  }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "CdBQZDG146CGAuLRSuZ4e",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api.fourkites.com\")\npayload = json.dumps({\n  \"order\": {\n    \"orderNumber\": \"PO44839202\",\n    \"orderTypeCode\": \"PO\",\n    \"status\": \"on order\",\n    \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n    \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n  }\n})\nheaders = {\n  'apikey': '<YOUR_API_KEY>',\n  'Content-Type': 'application/json'\n}\nconn.request(\"PUT\", \"/api/v1/async/order/?request_id=%3CYOUR_REQUEST_ID%3E\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "f7qKCFqjXdd1DAxCOqI7D"
  },
  "results": {
    "languages": [
      {
        "id": "b5C8Zhm812WJaksqzg5AS",
        "language": "202",
        "customLabel": "",
        "code": "{\n    \"request_id\": \"9c9463de-e6c3-497a-8ba8-2c3dc5ae9038\"\n}"
      }
    ],
    "selectedLanguageId": "b5C8Zhm812WJaksqzg5AS"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "order",
        "kind": "required",
        "type": "object",
        "description": "All order update specific information are housed in this object.",
        "children": [
          {
            "name": "orderNumber",
            "kind": "required",
            "type": "string",
            "description": "Order Number in the Customer System"
          },
          {
            "name": "orderTypeCode",
            "kind": "required",
            "type": "string",
            "description": "Type of the Order (PO = Purchase Order, SO = Sales Order, STO = Stock Transfer Order)"
          },
          {
            "name": "status",
            "kind": "required",
            "type": "string",
            "description": "Status of the Order in the source system (actual value depends on the mapping defined by the customer in the FourKites application)"
          },
          {
            "name": "requiredDeliveryDateTime",
            "kind": "required",
            "type": "string",
            "description": "The date by which the order is supposed to be delivered"
          },
          {
            "name": "lastUpdatedTime",
            "kind": "required",
            "type": "string",
            "description": "Order updated date in the customer system"
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "production",
  "legacyHash": "VPcyckU9phBU_J-6GS8dB"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Staging",
  "method": "PUT",
  "url": "https://api-staging.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "f7qKCFqjXdd1DAxCOqI7D",
        "language": "curl",
        "code": "curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>' \\\n--header 'apikey: <YOUR_API_KEY>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"order\": {\n        \"orderNumber\": \"PO44839202\",\n        \"orderTypeCode\": \"PO\",\n        \"status\": \"on order\",\n        \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n        \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n         }\n}'",
        "customLabel": ""
      },
      {
        "id": "TsN27qRddz14wmsbg30TF",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"order\\\": {\\n        \\\"orderNumber\\\": \\\"PO44839202\\\",\\n        \\\"orderTypeCode\\\": \\\"PO\\\",\\n        \\\"status\\\": \\\"on order\\\",\\n        \\\"requiredDeliveryDateTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\",\\n        \\\"lastUpdatedTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\"\\n         }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api-staging.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\")\n  .method(\"PUT\", body)\n  .addHeader(\"apikey\", \"<YOUR_API_KEY>\")\n  .addHeader(\"Content-Type\", \"application/json\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "w4gUVKGCdp9-lX3OZdj0b",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api-staging.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\",\n  \"method\": \"PUT\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"apikey\": \"<YOUR_API_KEY>\",\n    \"Content-Type\": \"application/json\"\n  },\n  \"data\": JSON.stringify({\n    \"order\": {\n      \"orderNumber\": \"PO44839202\",\n      \"orderTypeCode\": \"PO\",\n      \"status\": \"on order\",\n      \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n      \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n    }\n  }),\n};\n\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "eLvBJJym0CDSDKiXZhGv7",
        "language": "swift",
        "code": "import Foundation\n#if canImport(FoundationNetworking)\nimport FoundationNetworking\n#endif\n\nvar semaphore = DispatchSemaphore (value: 0)\n\nlet parameters = \"{\\n    \\\"order\\\": {\\n        \\\"orderNumber\\\": \\\"PO44839202\\\",\\n        \\\"orderTypeCode\\\": \\\"PO\\\",\\n        \\\"status\\\": \\\"on order\\\",\\n        \\\"requiredDeliveryDateTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\",\\n        \\\"lastUpdatedTime\\\": \\\"2021-02-28T11:00:27.464596Z\\\"\\n         }\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api-staging.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"<YOUR_API_KEY>\", forHTTPHeaderField: \"apikey\")\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\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": "mqbhMI0jRuRhuZoDuQXBh",
        "language": "csharp",
        "code": "var client = new RestClient(\"https://api-staging.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\");\nclient.Timeout = -1;\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"apikey\", \"<YOUR_API_KEY>\");\nrequest.AddHeader(\"Content-Type\", \"application/json\");\nvar body = @\"{\" + \"\\n\" +\n@\"    \"\"order\"\": {\" + \"\\n\" +\n@\"        \"\"orderNumber\"\": \"\"PO44839202\"\",\" + \"\\n\" +\n@\"        \"\"orderTypeCode\"\": \"\"PO\"\",\" + \"\\n\" +\n@\"        \"\"status\"\": \"\"on order\"\",\" + \"\\n\" +\n@\"        \"\"requiredDeliveryDateTime\"\": \"\"2021-02-28T11:00:27.464596Z\"\",\" + \"\\n\" +\n@\"        \"\"lastUpdatedTime\"\": \"\"2021-02-28T11:00:27.464596Z\"\"\" + \"\\n\" +\n@\"         }\" + \"\\n\" +\n@\"}\";\nrequest.AddParameter(\"application/json\", body,  ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nConsole.WriteLine(response.Content);",
        "customLabel": ""
      },
      {
        "id": "6D-33KFWU570wo_TT9pZu",
        "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/async/order/?request_id=%3CYOUR_REQUEST_ID%3E\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{\n    \"order\": {\n        \"orderNumber\": \"PO44839202\",\n        \"orderTypeCode\": \"PO\",\n        \"status\": \"on order\",\n        \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n        \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n         }\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(\"apikey\", \"<YOUR_API_KEY>\")\n  req.Header.Add(\"Content-Type\", \"application/json\")\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": "xivuLk2YSyWIBU0AI98kq",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-staging.fourkites.com/api/v1/async/order/?request_id=<YOUR_REQUEST_ID>\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"apikey\"] = \"<YOUR_API_KEY>\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n  \"order\": {\n    \"orderNumber\": \"PO44839202\",\n    \"orderTypeCode\": \"PO\",\n    \"status\": \"on order\",\n    \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n    \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n  }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "CdBQZDG146CGAuLRSuZ4e",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api-staging.fourkites.com\")\npayload = json.dumps({\n  \"order\": {\n    \"orderNumber\": \"PO44839202\",\n    \"orderTypeCode\": \"PO\",\n    \"status\": \"on order\",\n    \"requiredDeliveryDateTime\": \"2021-02-28T11:00:27.464596Z\",\n    \"lastUpdatedTime\": \"2021-02-28T11:00:27.464596Z\"\n  }\n})\nheaders = {\n  'apikey': '<YOUR_API_KEY>',\n  'Content-Type': 'application/json'\n}\nconn.request(\"PUT\", \"/api/v1/async/order/?request_id=%3CYOUR_REQUEST_ID%3E\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "f7qKCFqjXdd1DAxCOqI7D"
  },
  "results": {
    "languages": [
      {
        "id": "b5C8Zhm812WJaksqzg5AS",
        "language": "202",
        "customLabel": "",
        "code": "{\n    \"request_id\": \"9c9463de-e6c3-497a-8ba8-2c3dc5ae9038\"\n}"
      }
    ],
    "selectedLanguageId": "b5C8Zhm812WJaksqzg5AS"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "order",
        "kind": "required",
        "type": "object",
        "description": "All order update specific information are housed in this object.",
        "children": [
          {
            "name": "orderNumber",
            "kind": "required",
            "type": "string",
            "description": "Order Number in the Customer System"
          },
          {
            "name": "orderTypeCode",
            "kind": "required",
            "type": "string",
            "description": "Type of the Order (PO = Purchase Order, SO = Sales Order, STO = Stock Transfer Order)"
          },
          {
            "name": "status",
            "kind": "required",
            "type": "string",
            "description": "Status of the Order in the source system (actual value depends on the mapping defined by the customer in the FourKites application)"
          },
          {
            "name": "requiredDeliveryDateTime",
            "kind": "required",
            "type": "string",
            "description": "The date by which the order is supposed to be delivered"
          },
          {
            "name": "lastUpdatedTime",
            "kind": "required",
            "type": "string",
            "description": "Order updated date in the customer system"
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "staging",
  "legacyHash": "3yKuUfB6v4aDDL_KzwXID"
}
```
:::

