---
title: UPDATE Order
slug: update-order
icon: 🟩
createdAt: 2023-11-28T13:47:11.910Z
---

**Important notes**:

- Conditions for a successful update&#x20;
  - The store the order is linked with must be active
  - The order type must be "quote"
  - The order status is not one of the following: Canceled, Refunded, Active Installment, Partially Refunded, or Captured
  - It is preferable to provide the order.updatedDt as it was provided in the GET Order request to avoid accidentally overwriting an order that has already been updated.
  - Optional body parameters will update when populated.

:::ApiMethodV2
```json
{
  "name": "Update Order",
  "method": "POST",
  "url": "https://test-api.featherpay.io/api/v1/orders/{orderId}/update",
  "description": "Updates an orders fields based on the provided request body.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "HN2RAk6Zm5B10t7HzNDf2",
        "language": "curl",
        "code": "curl --location --globoff 'https://test-api.featherpay.io/api/v1/orders/{orderId}/update/{orderId}' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\"id\":\"String\",\"posOrderId\":\"string\",\"totalInvoiced\":\"Integer\",\"totalPayNowAmount\":\"Integer\",\"customerEmail\":\"string\",\"customerFirstName\":\"string\",\"customerLastName\":\"string\",\"customerMiddleName\":\"string\",\"customerPrefix\":\"string\",\"customerSuffix\":\"string\",\"shippingAddress\":\"Object\",\"billingAddress\":\"Object\",\"patientId\":\"string\",\"externalPatientId\":\"string\",\"origin\":\"string\",\"enablePaymentPlanForPatient\":\"Boolean\",\"patientNote\":\"string\"}'",
        "customLabel": ""
      },
      {
        "id": "a1H7dYHCaeBLmKolr4Ves",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://test-api.featherpay.io/api/v1/orders/{orderId}/update/{orderId}',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"id\": \"String\",\n      \"posOrderId\": \"string\",\n      \"totalInvoiced\": \"Integer\",\n      \"totalPayNowAmount\": \"Integer\",\n      \"customerEmail\": \"string\",\n      \"customerFirstName\": \"string\",\n      \"customerLastName\": \"string\",\n      \"customerMiddleName\": \"string\",\n      \"customerPrefix\": \"string\",\n      \"customerSuffix\": \"string\",\n      \"shippingAddress\": \"Object\",\n      \"billingAddress\": \"Object\",\n      \"patientId\": \"string\",\n      \"externalPatientId\": \"string\",\n      \"origin\": \"string\",\n      \"enablePaymentPlanForPatient\": \"Boolean\",\n      \"patientNote\": \"string\"\n   })\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "NGKLlDOEDWY55XuqHNu_h",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"id\": \"String\",\n   \"posOrderId\": \"string\",\n   \"totalInvoiced\": \"Integer\",\n   \"totalPayNowAmount\": \"Integer\",\n   \"customerEmail\": \"string\",\n   \"customerFirstName\": \"string\",\n   \"customerLastName\": \"string\",\n   \"customerMiddleName\": \"string\",\n   \"customerPrefix\": \"string\",\n   \"customerSuffix\": \"string\",\n   \"shippingAddress\": \"Object\",\n   \"billingAddress\": \"Object\",\n   \"patientId\": \"string\",\n   \"externalPatientId\": \"string\",\n   \"origin\": \"string\",\n   \"enablePaymentPlanForPatient\": \"Boolean\",\n   \"patientNote\": \"string\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://test-api.featherpay.io/api/v1/orders/{orderId}/update/{orderId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "MNqxevjvGYmb_o4WEXp3k",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://test-api.featherpay.io/api/v1/orders/{orderId}/update/{orderId}\"\n\npayload = json.dumps({\n   \"id\": \"String\",\n   \"posOrderId\": \"string\",\n   \"totalInvoiced\": \"Integer\",\n   \"totalPayNowAmount\": \"Integer\",\n   \"customerEmail\": \"string\",\n   \"customerFirstName\": \"string\",\n   \"customerLastName\": \"string\",\n   \"customerMiddleName\": \"string\",\n   \"customerPrefix\": \"string\",\n   \"customerSuffix\": \"string\",\n   \"shippingAddress\": \"Object\",\n   \"billingAddress\": \"Object\",\n   \"patientId\": \"string\",\n   \"externalPatientId\": \"string\",\n   \"origin\": \"string\",\n   \"enablePaymentPlanForPatient\": \"Boolean\",\n   \"patientNote\": \"string\"\n})\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "2NkWg_rqfNuE4QtdFyIFX",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://test-api.featherpay.io/api/v1/orders/{orderId}/update/{orderId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"id\": \"String\",\n   \"posOrderId\": \"string\",\n   \"totalInvoiced\": \"Integer\",\n   \"totalPayNowAmount\": \"Integer\",\n   \"customerEmail\": \"string\",\n   \"customerFirstName\": \"string\",\n   \"customerLastName\": \"string\",\n   \"customerMiddleName\": \"string\",\n   \"customerPrefix\": \"string\",\n   \"customerSuffix\": \"string\",\n   \"shippingAddress\": \"Object\",\n   \"billingAddress\": \"Object\",\n   \"patientId\": \"string\",\n   \"externalPatientId\": \"string\",\n   \"origin\": \"string\",\n   \"enablePaymentPlanForPatient\": \"Boolean\",\n   \"patientNote\": \"string\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "HN2RAk6Zm5B10t7HzNDf2"
  },
  "results": {
    "languages": [
      {
        "id": "fnR5_JrNLtGF0uSlRBqiq",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"id\": \"01EY8ZZ7Z91DWZZQFQ2YN4W620\",\n  \"createdDt\": \"2021-02-11T15:51:50.419321\",\n  \"updatedDt\": \"2021-02-11T15:54:33.641135\",\n  \"createdBy\": \"ryan.cino@featherpay.io\",\n  \"updatedBy\": \"ryan.cino@featherpay.io\",\n  \"orderType\": \"order\",\n  \"posOrderId\": \"100010\",\n  \"storeId\": \"01E8F3ZZDJ186BZFZEN3V8Z44W\",\n  \"orderKey\": \"1EQ3VEABTK8WPVR4689V715VHE\",\n  \"status\": \"Captured\",\n  \"totalAuthorized\": 500000,\n  \"totalCanceled\": 0,\n  \"totalInvoiced\": 500000,\n  \"totalPaid\": 500000,\n  \"totalRefunded\": 0,\n  \"totalDue\": 0,  \n  \"totalPayNowAmount\": 450000,\n  \"customerEmail\": \"jane.smith@gmail.com\",\n  \"customerFirstName\": \"Jane\",\n  \"customerLastName\": \"Smith\",\n  \"onBehalfOf\": \"jane.doe@tx24seven.com\",\n  \"currencyCode\": \"usd\",\n  \"orderCreatedDt\": \"2021-02-11T15:54:33.280216\",\n  \"multipay\": true,  \n  \"enablePaymentPlanForPatient\": true,\n  \"shippingAddress\": {\n    \"id\": \"01EY8XQFXX2G2ZZ3QZ3FV3AYAN\",\n    \"createdDt\": \"2021-02-11T15:51:50.424476\",\n    \"updatedDt\": \"2021-02-11T15:54:33.643819\",\n    \"createdBy\": \"ryan.cino@featherpay.io\",\n    \"updatedBy\": \"ryan.cino@featherpay.io\",\n    \"orderId\": \"01EY8ZZ7Z91DWZZQFQ2YN4W620\",\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Smith\",\n    \"line1\": \"543 Winton Terrace Northeast\",\n    \"line2\": \"\",\n    \"city\": \"Atlanta\",\n    \"stateProvince\": \"GA\",\n    \"postcode\": \"30308-2826\",\n    \"countryCode\": \"US\",\n    \"email\": \"jane.smith@gmail.com\",\n    \"telephone\": \"(404) 555-1212\",\n    \"sameAsBilling\": false\n  },\n  \"orderPayments\": [\n    {\n      \"type\": \"AuthorizeNetOrderPayment\",\n      \"id\": \"01EY8ZSZTV1KK7XZBKA2H0TJSN\",\n      \"createdDt\": \"2021-02-11T15:54:27.041165\",\n      \"updatedDt\": \"2021-02-11T15:54:33.647715\",\n      \"createdBy\": \"ryan.cino@featherpay.io\",\n      \"updatedBy\": \"ryan.cino@featherpay.io\",\n      \"orderId\": \"01EY8ZZ7Z91DWZZQFQ2YN4W620\",\n      \"chargeAmount\": 400000,\n      \"amountRefunded\": 0,\n      \"amountCanceled\": 0,\n      \"amountPaid\": 400000,\n      \"amountAuthorized\": 400000,\n      \"estimatedFee\": 0,\n      \"fee\": 0,\n      \"status\": \"Captured\",\n      \"paymentId\": \"60162324415\",\n      \"paymentType\": \"AuthorizeNet\",\n      \"paymentMethod\": \"Credit / Debit Card\",\n      \"paymentMethodStatus\": \"This transaction has been approved.\",\n      \"billingAddress\": {\n        \"id\": \"01EY8WSZVZW3CCZZZTNR7GDXQX\",\n        \"createdDt\": \"2021-02-11T15:54:27.053415\",\n        \"updatedDt\": \"2021-02-11T15:54:33.649552\",\n        \"createdBy\": \"ryan.cino@featherpay.io\",\n        \"updatedBy\": \"ryan.cino@featherpay.io\",\n        \"orderPaymentId\": \"01EY8ZSZTV1KK7XZBKA2H0TJSN\",\n        \"firstName\": \"Jane\",\n        \"lastName\": \"Smith\",\n        \"line1\": \"543 Winton Terrace Northeast\",\n        \"line2\": \"\",\n        \"city\": \"Atlanta\",\n        \"stateProvince\": \"GA\",\n        \"postcode\": \"30308-2826\",\n        \"countryCode\": \"US\",\n        \"email\": \"jane.smith@gmail.com\",\n        \"telephone\": \"(404) 555-1212\",\n        \"sameAsBilling\": true\n      },\n      \"paymentTransactions\": [\n        {\n          \"type\": \"AuthorizeNetTransaction\",\n          \"id\": \"01EY8ZVFBW9MY6FXYFEAFNNBT2\",\n          \"createdDt\": \"2021-02-11T15:54:33.653113\",\n          \"updatedDt\": \"2021-02-11T15:54:33.653113\",\n          \"createdBy\": \"ryan.cino@featherpay.io\",\n          \"updatedBy\": \"ryan.cino@featherpay.io\",\n          \"orderPaymentId\": \"01EY8ZSZTV1KK7XZBKA2H0TJSN\",\n          \"txnId\": \"60162324415\",\n          \"txnType\": \"Credit / Debit Card\",\n          \"txnSource\": \"Captured\",\n          \"avsResult\": \"P\",\n          \"cvvResult\": \"\",\n          \"cavvResult\": \"\",\n          \"accountNumber\": \"XXXX1111\",\n          \"accountType\": \"Visa\"\n        },\n        {\n          \"type\": \"AuthorizeNetTransaction\",\n          \"id\": \"01EY8YYNYEGA6YZWQCMGA3AJB7\",\n          \"createdDt\": \"2021-02-11T15:54:33.291645\",\n          \"updatedDt\": \"2021-02-11T15:54:33.65142\",\n          \"createdBy\": \"ryan.cino@featherpay.io\",\n          \"updatedBy\": \"ryan.cino@featherpay.io\",\n          \"orderPaymentId\": \"01EY8ZSZTV1KK7XZBKA2H0TJSN\",\n          \"txnId\": \"60162324415\",\n          \"txnType\": \"Credit / Debit Card\",\n          \"txnSource\": \"Authorized\",\n          \"avsResult\": \"Y\",\n          \"cvvResult\": \"P\",\n          \"cavvResult\": \"2\",\n          \"accountNumber\": \"XXXX1111\",\n          \"accountType\": \"Visa\"\n        }\n      ],\n      \"opaqueDescriptor\": \"COMMON.ACCEPT.INAPP.PAYMENT\",\n      \"opaqueValue\": \"eyJjb2RlIjoiNTBfMl8wNjAwMDUyODc0OUEzM0I0NzJGMzZEMTFDOUIwOUZGQjVGMThEMURGODUwRDBGNTBBQ0IwMDAzNDg3NTAxQkI3MDg0MkNFOTFBMDU5NjFEN0M0OEUzMDI3OTQ2QzE4OTUzMjQ5OUVFIiwidG9rZW4iOiI5NjEzMDU4ODY2Nzc2MTY0NjA0NjAxIiwidiI6IjEuMSJ9\",\n      \"cardLastFour\": \"1111\",\n      \"totalPendingRefund\": 0,\n      \"paymentSubType\": \"Credit / Debit Card\",\n      \"accountType\": \"Visa\"\n    },\n    {\n      \"type\": \"AuthorizeNetOrderPayment\",\n      \"id\": \"01EY8XRZZZ7JPYQWZFANX0N5CM\",\n      \"createdDt\": \"2021-02-11T15:53:45.315317\",\n      \"updatedDt\": \"2021-02-11T15:54:33.656288\",\n      \"createdBy\": \"ryan.cino@featherpay.io\",\n      \"updatedBy\": \"ryan.cino@featherpay.io\",\n      \"orderId\": \"01EY8ZZ7Z91DWZZQFQ2YN4W620\",\n      \"chargeAmount\": 100000,\n      \"amountRefunded\": 0,\n      \"amountCanceled\": 0,\n      \"amountPaid\": 100000,\n      \"amountAuthorized\": 100000,\n      \"estimatedFee\": 0,\n      \"fee\": 0,\n      \"status\": \"Captured\",\n      \"paymentId\": \"60162324416\",\n      \"paymentType\": \"AuthorizeNet\",\n      \"paymentMethod\": \"Credit / Debit Card\",\n      \"paymentMethodStatus\": \"This transaction has been approved.\",\n      \"billingAddress\": {\n        \"id\": \"01EY8WYQKND38FTEDMFWH1B6NP\",\n        \"createdDt\": \"2021-02-11T15:53:45.319214\",\n        \"updatedDt\": \"2021-02-11T15:54:33.65811\",\n        \"createdBy\": \"ryan.cino@featherpay.io\",\n        \"updatedBy\": \"ryan.cino@featherpay.io\",\n        \"orderPaymentId\": \"01EY8XRZZZ7JPYQWZFANX0N5CM\",\n        \"firstName\": \"Jane\",\n        \"lastName\": \"Smith\",\n        \"line1\": \"543 Winton Terrace Northeast\",\n        \"line2\": \"\",\n        \"city\": \"Atlanta\",\n        \"stateProvince\": \"GA\",\n        \"postcode\": \"30308-2826\",\n        \"countryCode\": \"US\",\n        \"email\": \"jane.smith@gmail.com\",\n        \"telephone\": \"(404) 555-1212\",\n        \"sameAsBilling\": true\n      },\n      \"paymentTransactions\": [\n        {\n          \"type\": \"AuthorizeNetTransaction\",\n          \"id\": \"01EY8WZFBZ30C36PZZPVN1ZBQM\",\n          \"createdDt\": \"2021-02-11T15:54:33.661935\",\n          \"updatedDt\": \"2021-02-11T15:54:33.661935\",\n          \"createdBy\": \"ryan.cino@featherpay.io\",\n          \"updatedBy\": \"ryan.cino@featherpay.io\",\n          \"orderPaymentId\": \"01EY8XRZZZ7JPYQWZFANX0N5CM\",\n          \"txnId\": \"60162324416\",\n          \"txnType\": \"Credit / Debit Card\",\n          \"txnSource\": \"Captured\",\n          \"avsResult\": \"P\",\n          \"cvvResult\": \"\",\n          \"cavvResult\": \"\",\n          \"accountNumber\": \"XXXX4242\",\n          \"accountType\": \"Visa\"\n        },\n        {\n          \"type\": \"AuthorizeNetTransaction\",\n          \"id\": \"01EY8XTXZNG7K9SQZCMAXANTV9\",\n          \"createdDt\": \"2021-02-11T15:54:33.300203\",\n          \"updatedDt\": \"2021-02-11T15:54:33.660049\",\n          \"createdBy\": \"ryan.cino@featherpay.io\",\n          \"updatedBy\": \"ryan.cino@featherpay.io\",\n          \"orderPaymentId\": \"01EY8XRZZZ7JPYQWZFANX0N5CM\",\n          \"txnId\": \"60162324416\",\n          \"txnType\": \"Credit / Debit Card\",\n          \"txnSource\": \"Authorized\",\n          \"avsResult\": \"Y\",\n          \"cvvResult\": \"P\",\n          \"cavvResult\": \"2\",\n          \"accountNumber\": \"XXXX4242\",\n          \"accountType\": \"Visa\"\n        }\n      ],\n      \"opaqueDescriptor\": \"COMMON.ACCEPT.INAPP.PAYMENT\",\n      \"opaqueValue\": \"eyJjb2RlIjoiNTBfMl8wNjAwMDUyQ0M5NUI3QjkxODk1QTQ5RkNCNTJBODIxOTJBMTZGMTc5MjQxQTZCMERGQ0ZCMkNGQ0E0NTEwOERBQzZCQTg3NEJEODU1Mjc3OTk1QzgyNkIxRjk2NjFGNThGMTlCQTI3IiwidG9rZW4iOiI5NjEzMDU4ODI1MTQ4MTY0MzA0NjAxIiwidiI6IjEuMSJ9\",\n      \"cardLastFour\": \"4242\",\n      \"totalPendingRefund\": 0,\n      \"paymentSubType\": \"Credit / Debit Card\",\n      \"accountType\": \"Visa\"\n    }\n  ],\n  \"orderItems\": [\n    {\n      \"id\": \"01EY8XNZXY0HW5STZ5DM9HCPE2\",\n      \"createdDt\": \"2021-02-11T15:51:50.427756\",\n      \"updatedDt\": \"2021-02-11T15:54:33.663241\",\n      \"createdBy\": \"ryan.cino@featherpay.io\",\n      \"updatedBy\": \"ryan.cino@featherpay.io\",\n      \"orderId\": \"01EY8ZZ7Z91DWZZQFQ2YN4W620\",\n      \"quantity\": 1,\n      \"unitPrice\": 500000,\n      \"name\": \"Medical Procedure\",\n      \"sku\": \"MP101\"\n    }\n  ],\n  \"fraudCases\": [],\n  \"totalFee\": 0\n}"
      },
      {
        "id": "j9mnwtmOvmmKWqotiwCtO",
        "language": "412",
        "customLabel": "",
        "code": "{\n  \"subErrors\": [],\n  \"status\": \"precondition_failed\",\n  \"message\": \"Cannot update an order that's already in Order type\"\n}"
      }
    ],
    "selectedLanguageId": "j9mnwtmOvmmKWqotiwCtO"
  },
  "request": {
    "pathParameters": [
      {
        "name": "orderId",
        "kind": "required",
        "type": "string",
        "description": "ID of the order entity in ULID form.\nMust match body parameter id.",
        "children": []
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "X-FP-Origin",
        "kind": "optional",
        "type": "string",
        "description": "Provided by a security layer if left empty",
        "children": []
      }
    ],
    "bodyDataParameters": [
      {
        "name": "id",
        "kind": "required",
        "type": "String",
        "description": "ID of the order entity in ULID form.\nMust match URI path parameter."
      },
      {
        "name": "posOrderId",
        "kind": "optional",
        "type": "string",
        "description": "POS Reference ID field",
        "children": []
      },
      {
        "name": "totalInvoiced",
        "kind": "optional",
        "type": "Integer",
        "description": "Long amounting to the lowest common currency value to be expressed. \nThe value must be greater than 0.",
        "children": []
      },
      {
        "name": "totalPayNowAmount",
        "kind": "optional",
        "type": "Integer",
        "description": "Long amounting to the lowest common currency value to be expressed. \nThe value must be greater than 0.",
        "children": []
      },
      {
        "name": "customerEmail",
        "kind": "optional",
        "type": "string",
        "description": "Replaces email field",
        "children": []
      },
      {
        "name": "customerFirstName",
        "kind": "optional",
        "type": "string",
        "description": "Replaces first name field",
        "children": []
      },
      {
        "name": "customerLastName",
        "kind": "optional",
        "type": "string",
        "description": "Replaces last name field",
        "children": []
      },
      {
        "name": "customerMiddleName",
        "kind": "optional",
        "type": "string",
        "description": "Replaces middle name field",
        "children": []
      },
      {
        "name": "customerPrefix",
        "kind": "optional",
        "type": "string",
        "description": "Replaces prefix field\neg. Mr., Mrs., Ms. etc.",
        "children": []
      },
      {
        "name": "customerSuffix",
        "kind": "optional",
        "type": "string",
        "description": "Replaces suffix field\neg. Jr, III, Third, etc.",
        "children": []
      },
      {
        "name": "shippingAddress",
        "kind": "optional",
        "type": "Object",
        "description": "Expects an address object. \nPreferred usage is to update an address which was inserted incorrectly.\nCan completely replace the Address object proveded from the GET Order endpoint.",
        "children": []
      },
      {
        "name": "billingAddress",
        "kind": "optional",
        "type": "Object",
        "description": "Expects an address object. \nPreferred usage is to update an address which was inserted incorrectly.\nCan completely replace the Address object proveded from the GET Order endpoint.",
        "children": []
      },
      {
        "name": "patientId",
        "kind": "optional",
        "type": "string",
        "description": "Replaces the patientId",
        "children": []
      },
      {
        "name": "externalPatientId",
        "kind": "optional",
        "type": "string",
        "description": "Replaces the externalPatientId",
        "children": []
      },
      {
        "name": "origin",
        "kind": "optional",
        "type": "string",
        "description": "Updated from the X-FP-Origin Header if not provided.",
        "children": []
      },
      {
        "name": "enablePaymentPlanForPatient",
        "kind": "optional",
        "type": "Boolean",
        "description": "Enables/Disables Payment Plans per order.",
        "children": []
      },
      {
        "name": "patientNote",
        "kind": "optional",
        "type": "string",
        "description": "Location for merchants to leave notes related to an order which is displayed to patients when pay link or reminder emails.",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  }
}
```
:::

