API Reference
Payment Instruction
Update a payment instruction
1min
code examples curl location globoff request patch 'https //api fictive com/rest/api/accounts/{accountreference}/payment instructions/{paymentinstructionreference}' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'patch', headers myheaders, redirect 'follow' }; fetch("https //api fictive com/rest/api/accounts/{accountreference}/payment instructions/{paymentinstructionreference}", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api fictive com/rest/api/accounts/{accountreference}/payment instructions/{paymentinstructionreference}") https = net http new(url host, url port) https use ssl = true request = net http patch new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //api fictive com/rest/api/accounts/{accountreference}/payment instructions/{paymentinstructionreference}" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("patch", url, headers=headers, data=payload) print(response text) responses // no content { "paymentinstructionreference" "", "status" "", "currency" "", "description" "", "cartreference" "", "fulfilmentpaymentmappings" \[ { "fulfilments" \[ { "cartreference" "", "fulfilmentreference" "", "fulfilmentstatus" "", "fulfilmenttype" "", "expecteddeliverydate" "2021 09 21t05 33 22 3073453", "suppliernotificationdate" "2021 09 21t05 33 22 3073453", "addressreference" "", "datecreated" "2021 09 21t05 33 22 3073453", "datelastupdated" "2021 09 21t05 33 22 3073453", "customfulfilmentparameters" {} } ], "payments" \[ { "cartreference" "", "paymentreference" "", "paymentdate" "2021 09 21t05 33 22 432364", "paymentstatus" "", "datecreated" "2021 09 21t05 33 22 432364", "datelastupdated" "2021 09 21t05 33 22 432364", "vatamount" "", "grossamount" "", "netamount" "", "custompaymentparameters" {} } ] } ], "custompaymentinstructionparameters" {} }// bad request \<br />β’ the cancellation code is too long \<br />β’ unable to amend payment instruction \<br />β’ the status can only be set to 'cancelled' // unauthorized \<br />β’ api authentication failure invalid authentication type/credentials provided // forbidden \<br />β’ cart is already in use and/or bound to another account // not found \<br />β’ account cannot be found \<br />β’ payment instruction cannot be found // precondition failed \<br />β’ can not amend payment instruction status that has already been cancelled \<br />β’ patch data validation failed \<br />β’ carts must contain a minimum of 1 line item
π€
Have a question?
Our super-smart AI,knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.