Use this method to update an existing withdrawal record.

Request

PUT https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}

Path parameters

Parameter name Value Description Additional
withdrawal_id int64

The withdrawal ID

Required

Request body

Read-only parameters such as a resource's ID field are to be omitted.

The request body takes a GXWithdrawal resource, containing the following writable properties:

{
    "content": "This is an example for a withdrawal's content.",
    "createdByAdmin": true,
    "dateCreated": "2018-05-28 12:45:07",
    "id": 1,
    "order": {
        "customerCity": "Bremen",
        "customerCountry": "Germany",
        "customerEmail": "m.musterfrau@example.com",
        "customerFirstName": "Maxi",
        "customerGender": "Frau",
        "customerId": 0,
        "customerLastName": "Musterfrau",
        "customerPostCode": "28219",
        "customerStreetAddress": "Musterstra├če 3",
        "deliveryDate": "1000-01-01 00:00:00",
        "orderDate": "2018-05-14 12:45:07",
        "orderId": 400276
    },
    "withdrawalDate": "2018-05-28 12:45:07"
}
{
    "content": "string",
    "createdByAdmin": "boolean",
    "dateCreated": "string",
    "order": {
        "customerCity": "string",
        "customerCountry": "string",
        "customerEmail": "string",
        "customerFirstname": "string",
        "customerGender": "string",
        "customerId": "int64",
        "customerLastName": "string",
        "customerPostCode": "string",
        "customerStreetAddress": "string",
        "deliveryDate": "string",
        "orderDate": "string"
    },
    "withdrawalDate": "string"
}

Properties

Name Type Description Additional
content string Required
createdByAdmin boolean Required
dateCreated string Required
order object GXWithdrawalOrder Required
order.customerCity string Required
order.customerCountry string Required
order.customerEmail string Required
order.customerFirstname string Required
order.customerGender string Required
order.customerId int64 Required
order.customerLastName string Required
order.customerPostCode string Required
order.customerStreetAddress string Required
order.deliveryDate string Required
order.orderDate string Required
withdrawalDate string Required

Authorization

In order to provide the authentication, you must insert the Basic Auth inside the HTTP header. The Basic Auth is an encrypted base64 string that holds the following content: admin@shop.de:12345 where the structure is as follows: username:password.

An example header would look as follows:

Authorization: Basic YWRtaW5Ac2hvcC5kZToxMjM0NQ==

This request requires the use of one of following authorisation methods: BASIC .

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
201 Created

Upon success, returns the updated withdrawal

GXWithdrawal
400 Bad Request

(Empty request body / Withdrawal record ID was not provided or is invalid)

defaultErrorResponse

Example Snippets

Here are some example implementations for this operation.

curl --request PUT \ --url https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id} \ --header 'accept: application/json' \ --header 'authorization: Basic REPLACE_BASIC_AUTH' \ --header 'content-type: application/json' \ --data '{"id":0,"withdrawalDate":"","content":"","order":{"orderId":0,"customerId":0,"customerGender":"","customerFirstname":"","customerLastName":"","customerStreetAddress":"","customerPostCode":"","customerCity":"","customerCountry":"","customerEmail":"","orderDate":"","deliveryDate":""},"dateCreated":"","createdByAdmin":false}'
wget --quiet \ --method PUT \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header 'authorization: Basic REPLACE_BASIC_AUTH' \ --body-data '{"id":0,"withdrawalDate":"","content":"","order":{"orderId":0,"customerId":0,"customerGender":"","customerFirstname":"","customerLastName":"","customerStreetAddress":"","customerPostCode":"","customerCity":"","customerCountry":"","customerEmail":"","orderDate":"","deliveryDate":""},"dateCreated":"","createdByAdmin":false}' \ --output-document

echo '{"id":0,"withdrawalDate":"","content":"","order":{"orderId":0,"customerId":0,"customerGender":"","customerFirstname":"","customerLastName":"","customerStreetAddress":"","customerPostCode":"","customerCity":"","customerCountry":"","customerEmail":"","orderDate":"","deliveryDate":""},"dateCreated":"","createdByAdmin":false}' | \ http PUT https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id} \ accept:application/json \ authorization:'Basic REPLACE_BASIC_AUTH' \ content-type:application/json
HttpResponse response = Unirest.put("https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "Basic REPLACE_BASIC_AUTH") .body("{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}") .asString();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}"); Request request = new Request.Builder() .url("https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}") .put(body) .addHeader("accept", "application/json") .addHeader("content-type", "application/json") .addHeader("authorization", "Basic REPLACE_BASIC_AUTH") .build();

Response response = client.newCall(request).execute();

var client = new RestClient("https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}"); var request = new RestRequest(Method.PUT); request.AddHeader("accept", "application/json"); request.AddHeader("content-type", "application/json"); request.AddHeader("authorization", "Basic REPLACE_BASIC_AUTH"); request.AddParameter("application/json", "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
var http = require("https");

var options = { "method": "PUT", "hostname": "gambio-shop.de", "port": null, "path": "/shop1/api.php/v2/withdrawals/{withdrawal_id}", "headers": {

"accept": "application/json",
"content-type": "application/json",
"authorization": "Basic REPLACE_BASIC_AUTH"

} };

var req = http.request(options, function (res) { var chunks = [];

res.on("data", function (chunk) {

chunks.push(chunk);

});

res.on("end", function () {

var body = Buffer.concat(chunks);
console.log(body.toString());

}); });

req.write(JSON.stringify({ id: 0, withdrawalDate: '', content: '', order: {

orderId: 0,
customerId: 0,
customerGender: '<ADD STRING VALUE>',
customerFirstname: '<ADD STRING VALUE>',
customerLastName: '<ADD STRING VALUE>',
customerStreetAddress: '<ADD STRING VALUE>',
customerPostCode: '<ADD STRING VALUE>',
customerCity: '<ADD STRING VALUE>',
customerCountry: '<ADD STRING VALUE>',
customerEmail: '<ADD STRING VALUE>',
orderDate: '<ADD STRING VALUE>',
deliveryDate: '<ADD STRING VALUE>'

}, dateCreated: '', createdByAdmin: false })); req.end();

var request = require("request");

var options = { method: 'PUT', url: 'https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}', headers: {

accept: 'application/json',
'content-type': 'application/json',
authorization: 'Basic REPLACE_BASIC_AUTH'

}, body: {

id: 0,
withdrawalDate: '<ADD STRING VALUE>',
content: '<ADD STRING VALUE>',
order: {
  orderId: 0,
  customerId: 0,
  customerGender: '<ADD STRING VALUE>',
  customerFirstname: '<ADD STRING VALUE>',
  customerLastName: '<ADD STRING VALUE>',
  customerStreetAddress: '<ADD STRING VALUE>',
  customerPostCode: '<ADD STRING VALUE>',
  customerCity: '<ADD STRING VALUE>',
  customerCountry: '<ADD STRING VALUE>',
  customerEmail: '<ADD STRING VALUE>',
  orderDate: '<ADD STRING VALUE>',
  deliveryDate: '<ADD STRING VALUE>'
},
dateCreated: '<ADD STRING VALUE>',
createdByAdmin: false

}, json: true };

request(options, function (error, response, body) { if (error) throw new Error(error);

console.log(body); });

var unirest = require("unirest");

var req = unirest("PUT", "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}");

req.headers({ "accept": "application/json", "content-type": "application/json", "authorization": "Basic REPLACE_BASIC_AUTH" });

req.type("json"); req.send({ "id": 0, "withdrawalDate": "", "content": "", "order": {

"orderId": 0,
"customerId": 0,
"customerGender": "<ADD STRING VALUE>",
"customerFirstname": "<ADD STRING VALUE>",
"customerLastName": "<ADD STRING VALUE>",
"customerStreetAddress": "<ADD STRING VALUE>",
"customerPostCode": "<ADD STRING VALUE>",
"customerCity": "<ADD STRING VALUE>",
"customerCountry": "<ADD STRING VALUE>",
"customerEmail": "<ADD STRING VALUE>",
"orderDate": "<ADD STRING VALUE>",
"deliveryDate": "<ADD STRING VALUE>"

}, "dateCreated": "", "createdByAdmin": false });

req.end(function (res) { if (res.error) throw new Error(res.error);

console.log(res.body); });

var data = JSON.stringify({ "id": 0, "withdrawalDate": "", "content": "", "order": {

"orderId": 0,
"customerId": 0,
"customerGender": "<ADD STRING VALUE>",
"customerFirstname": "<ADD STRING VALUE>",
"customerLastName": "<ADD STRING VALUE>",
"customerStreetAddress": "<ADD STRING VALUE>",
"customerPostCode": "<ADD STRING VALUE>",
"customerCity": "<ADD STRING VALUE>",
"customerCountry": "<ADD STRING VALUE>",
"customerEmail": "<ADD STRING VALUE>",
"orderDate": "<ADD STRING VALUE>",
"deliveryDate": "<ADD STRING VALUE>"

}, "dateCreated": "", "createdByAdmin": false });

var xhr = new XMLHttpRequest(); xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) {

console.log(this.responseText);

} });

xhr.open("PUT", "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}"); xhr.setRequestHeader("accept", "application/json"); xhr.setRequestHeader("content-type", "application/json"); xhr.setRequestHeader("authorization", "Basic REPLACE_BASIC_AUTH");

xhr.send(data);

var settings = { "async": true, "crossDomain": true, "url": "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}", "method": "PUT", "headers": {

"accept": "application/json",
"content-type": "application/json",
"authorization": "Basic REPLACE_BASIC_AUTH"

}, "processData": false, "data": "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}" }

$.ajax(settings).done(function (response) { console.log(response); });

<?php

$curl = curl_init();

curl_setopt_array($curl, array( CURLOPT_URL => "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}", CURLOPT_HTTPHEADER => array(

"accept: application/json",
"authorization: Basic REPLACE_BASIC_AUTH",
"content-type: application/json"

), ));

$response = curl_exec($curl); $err = curl_error($curl);

curl_close($curl);

if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }

<?php

$request = new HttpRequest(); $request->setUrl('https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}'); $request->setMethod(HTTP_METH_PUT);

$request->setHeaders(array( 'accept' => 'application/json', 'content-type' => 'application/json', 'authorization' => 'Basic REPLACE_BASIC_AUTH' ));

$request->setBody('{"id":0,"withdrawalDate":"","content":"","order":{"orderId":0,"customerId":0,"customerGender":"","customerFirstname":"","customerLastName":"","customerStreetAddress":"","customerPostCode":"","customerCity":"","customerCountry":"","customerEmail":"","orderDate":"","deliveryDate":""},"dateCreated":"","createdByAdmin":false}');

try { $response = $request->send();

echo $response->getBody(); } catch (HttpException $ex) { echo $ex; }

<?php

$client = new http\Client; $request = new http\Client\Request;

$body = new http\Message\Body; $body->append('{"id":0,"withdrawalDate":"","content":"","order":{"orderId":0,"customerId":0,"customerGender":"","customerFirstname":"","customerLastName":"","customerStreetAddress":"","customerPostCode":"","customerCity":"","customerCountry":"","customerEmail":"","orderDate":"","deliveryDate":""},"dateCreated":"","createdByAdmin":false}');

$request->setRequestUrl('https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}'); $request->setRequestMethod('PUT'); $request->setBody($body);

$request->setHeaders(array( 'accept' => 'application/json', 'content-type' => 'application/json', 'authorization' => 'Basic REPLACE_BASIC_AUTH' ));

$client->enqueue($request)->send(); $response = $client->getResponse();

echo $response->getBody();

import http.client

conn = http.client.HTTPSConnection("gambio-shop.de")

payload = "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}"

headers = {

'accept': "application/json",
'content-type': "application/json",
'authorization': "Basic REPLACE_BASIC_AUTH"
}

conn.request("PUT", "/shop1/api.php/v2/withdrawals/{withdrawal_id}", payload, headers)

res = conn.getresponse() data = res.read()

print(data.decode("utf-8"))

import requests

url = "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}"

payload = "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}" headers = {

'accept': "application/json",
'content-type': "application/json",
'authorization': "Basic REPLACE_BASIC_AUTH"
}

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)

require 'uri' require 'net/http' require 'openssl'

url = URI("https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}")

http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url) request["accept"] = 'application/json' request["content-type"] = 'application/json' request["authorization"] = 'Basic REPLACE_BASIC_AUTH' request.body = "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}"

response = http.request(request) puts response.read_body

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT"); curl_easy_setopt(hnd, CURLOPT_URL, "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}");

struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "accept: application/json"); headers = curl_slist_append(headers, "content-type: application/json"); headers = curl_slist_append(headers, "authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}");

CURLcode ret = curl_easy_perform(hnd);

package main

import (

"fmt"
"strings"
"net/http"
"io/ioutil"

)

func main() {

url := "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}"

payload := strings.NewReader("{\"id\":0,\"withdrawalDate\":\"<ADD STRING VALUE>\",\"content\":\"<ADD STRING VALUE>\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"<ADD STRING VALUE>\",\"customerFirstname\":\"<ADD STRING VALUE>\",\"customerLastName\":\"<ADD STRING VALUE>\",\"customerStreetAddress\":\"<ADD STRING VALUE>\",\"customerPostCode\":\"<ADD STRING VALUE>\",\"customerCity\":\"<ADD STRING VALUE>\",\"customerCountry\":\"<ADD STRING VALUE>\",\"customerEmail\":\"<ADD STRING VALUE>\",\"orderDate\":\"<ADD STRING VALUE>\",\"deliveryDate\":\"<ADD STRING VALUE>\"},\"dateCreated\":\"<ADD STRING VALUE>\",\"createdByAdmin\":false}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("accept", "application/json")
req.Header.Add("content-type", "application/json")
req.Header.Add("authorization", "Basic REPLACE_BASIC_AUTH")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)

fmt.Println(res)
fmt.Println(string(body))

}

#import

NSDictionary *headers = @{ @"accept": @"application/json",

                       @"content-type": @"application/json",
                       @"authorization": @"Basic REPLACE_BASIC_AUTH" };

NSDictionary *parameters = @{ @"id": @0,

                          @"withdrawalDate": @"<ADD STRING VALUE>",
                          @"content": @"<ADD STRING VALUE>",
                          @"order": @{ @"orderId": @0, @"customerId": @0, @"customerGender": @"<ADD STRING VALUE>", @"customerFirstname": @"<ADD STRING VALUE>", @"customerLastName": @"<ADD STRING VALUE>", @"customerStreetAddress": @"<ADD STRING VALUE>", @"customerPostCode": @"<ADD STRING VALUE>", @"customerCity": @"<ADD STRING VALUE>", @"customerCountry": @"<ADD STRING VALUE>", @"customerEmail": @"<ADD STRING VALUE>", @"orderDate": @"<ADD STRING VALUE>", @"deliveryDate": @"<ADD STRING VALUE>" },
                          @"dateCreated": @"<ADD STRING VALUE>",
                          @"createdByAdmin": @NO };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}"]

                                                   cachePolicy:NSURLRequestUseProtocolCachePolicy
                                               timeoutInterval:10.0];

[request setHTTPMethod:@"PUT"]; [request setAllHTTPHeaderFields:headers]; [request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request

                                        completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                            if (error) {
                                                NSLog(@"%@", error);
                                            } else {
                                                NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                NSLog(@"%@", httpResponse);
                                            }
                                        }];

[dataTask resume];

import Foundation

let headers = [ "accept": "application/json", "content-type": "application/json", "authorization": "Basic REPLACE_BASIC_AUTH" ] let parameters = [ "id": 0, "withdrawalDate": "", "content": "", "order": [

"orderId": 0,
"customerId": 0,
"customerGender": "<ADD STRING VALUE>",
"customerFirstname": "<ADD STRING VALUE>",
"customerLastName": "<ADD STRING VALUE>",
"customerStreetAddress": "<ADD STRING VALUE>",
"customerPostCode": "<ADD STRING VALUE>",
"customerCity": "<ADD STRING VALUE>",
"customerCountry": "<ADD STRING VALUE>",
"customerEmail": "<ADD STRING VALUE>",
"orderDate": "<ADD STRING VALUE>",
"deliveryDate": "<ADD STRING VALUE>"

], "dateCreated": "", "createdByAdmin": false ] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}")! as URL,

                                    cachePolicy: .useProtocolCachePolicy,
                                timeoutInterval: 10.0)

request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data

let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) {

print(error)

} else {

let httpResponse = response as? HTTPURLResponse
print(httpResponse)

} })

dataTask.resume()

open Cohttp_lwt_unix open Cohttp open Lwt

let uri = Uri.of_string "https://gambio-shop.de/shop1/api.php/v2/withdrawals/{withdrawal_id}" in let headers = Header.add_list (Header.init ()) [ ("accept", "application/json"); ("content-type", "application/json"); ("authorization", "Basic REPLACE_BASIC_AUTH"); ] in let body = Cohttp_lwt_body.of_string "{\"id\":0,\"withdrawalDate\":\"\",\"content\":\"\",\"order\":{\"orderId\":0,\"customerId\":0,\"customerGender\":\"\",\"customerFirstname\":\"\",\"customerLastName\":\"\",\"customerStreetAddress\":\"\",\"customerPostCode\":\"\",\"customerCity\":\"\",\"customerCountry\":\"\",\"customerEmail\":\"\",\"orderDate\":\"\",\"deliveryDate\":\"\"},\"dateCreated\":\"\",\"createdByAdmin\":false}" in

Client.call ~headers ~body `PUT uri

= fun (res, body_stream) -> (* Do stuff with the result *)