Update a fulfilment
1 min
code examples curl request patch \\ \ url https //api fictive com/rest/api/accounts/{accountreference}/fulfilments/{fulfilmentreference} \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x version string' \\ \ data '\[ {} ]'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x version", "string"); var raw = json stringify(\[ {} ]); var requestoptions = { method 'patch', headers myheaders, body raw, redirect 'follow' }; fetch("https //api fictive com/rest/api/accounts/{accountreference}/fulfilments/{fulfilmentreference}", 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}/fulfilments/{fulfilmentreference}") 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" request\["x version"] = "string" request body = json dump(\[ {} ]) response = https request(request) puts response read body import requests import json url = "https //api fictive com/rest/api/accounts/{accountreference}/fulfilments/{fulfilmentreference}" payload = json dumps(\[ {} ]) headers = { 'accept' 'application/json', 'content type' 'application/json', 'x version' 'string' } response = requests request("patch", url, headers=headers, data=payload) print(response text) responses // no content // β’ the following custom parameter(s) are not configured β’ cannot provide the same parameter name multiple times β’ unable to amend or remove the following parameter(s) as no value currently exists β’ unable to add the following parameter(s) as a value already exists // api authentication failure invalid authentication type/credentials provided // β’ account cannot be found β’ fulfilment cannot be found
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.