Orders
UPDATE Order
important notes conditions for a successful update 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 { "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" } }