Patch user on customer
curl --request PATCH \
--url https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isCompany": false,
"lang": "DA",
"users": [
{
"contact": true,
"lang": "en",
"details": {
"name": "Hans Hansen",
"email": "example@debbie.dk",
"phone": {
"locale": "45",
"number": "12345678"
},
"address": {
"address": "Applebys Plads 7, 1.",
"coAddress": null,
"city": "København K",
"zipcode": "1411"
},
"cpr": "1209981919",
"cvr": null
}
}
]
}
'import requests
url = "https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}"
payload = {
"isCompany": False,
"lang": "DA",
"users": [
{
"contact": True,
"lang": "en",
"details": {
"name": "Hans Hansen",
"email": "example@debbie.dk",
"phone": {
"locale": "45",
"number": "12345678"
},
"address": {
"address": "Applebys Plads 7, 1.",
"coAddress": None,
"city": "København K",
"zipcode": "1411"
},
"cpr": "1209981919",
"cvr": None
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
isCompany: false,
lang: 'DA',
users: [
{
contact: true,
lang: 'en',
details: {
name: 'Hans Hansen',
email: 'example@debbie.dk',
phone: {locale: '45', number: '12345678'},
address: {
address: 'Applebys Plads 7, 1.',
coAddress: null,
city: 'København K',
zipcode: '1411'
},
cpr: '1209981919',
cvr: null
}
}
]
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'isCompany' => false,
'lang' => 'DA',
'users' => [
[
'contact' => true,
'lang' => 'en',
'details' => [
'name' => 'Hans Hansen',
'email' => 'example@debbie.dk',
'phone' => [
'locale' => '45',
'number' => '12345678'
],
'address' => [
'address' => 'Applebys Plads 7, 1.',
'coAddress' => null,
'city' => 'København K',
'zipcode' => '1411'
],
'cpr' => '1209981919',
'cvr' => null
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}"
payload := strings.NewReader("{\n \"isCompany\": false,\n \"lang\": \"DA\",\n \"users\": [\n {\n \"contact\": true,\n \"lang\": \"en\",\n \"details\": {\n \"name\": \"Hans Hansen\",\n \"email\": \"example@debbie.dk\",\n \"phone\": {\n \"locale\": \"45\",\n \"number\": \"12345678\"\n },\n \"address\": {\n \"address\": \"Applebys Plads 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\"\n },\n \"cpr\": \"1209981919\",\n \"cvr\": null\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isCompany\": false,\n \"lang\": \"DA\",\n \"users\": [\n {\n \"contact\": true,\n \"lang\": \"en\",\n \"details\": {\n \"name\": \"Hans Hansen\",\n \"email\": \"example@debbie.dk\",\n \"phone\": {\n \"locale\": \"45\",\n \"number\": \"12345678\"\n },\n \"address\": {\n \"address\": \"Applebys Plads 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\"\n },\n \"cpr\": \"1209981919\",\n \"cvr\": null\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isCompany\": false,\n \"lang\": \"DA\",\n \"users\": [\n {\n \"contact\": true,\n \"lang\": \"en\",\n \"details\": {\n \"name\": \"Hans Hansen\",\n \"email\": \"example@debbie.dk\",\n \"phone\": {\n \"locale\": \"45\",\n \"number\": \"12345678\"\n },\n \"address\": {\n \"address\": \"Applebys Plads 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\"\n },\n \"cpr\": \"1209981919\",\n \"cvr\": null\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}Customers
Patch user on customer
Patch user information on a user associated with a customer
PATCH
/
v1
/
{tenantId}
/
customers
/
{customerId}
/
users
/
{userId}
Patch user on customer
curl --request PATCH \
--url https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isCompany": false,
"lang": "DA",
"users": [
{
"contact": true,
"lang": "en",
"details": {
"name": "Hans Hansen",
"email": "example@debbie.dk",
"phone": {
"locale": "45",
"number": "12345678"
},
"address": {
"address": "Applebys Plads 7, 1.",
"coAddress": null,
"city": "København K",
"zipcode": "1411"
},
"cpr": "1209981919",
"cvr": null
}
}
]
}
'import requests
url = "https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}"
payload = {
"isCompany": False,
"lang": "DA",
"users": [
{
"contact": True,
"lang": "en",
"details": {
"name": "Hans Hansen",
"email": "example@debbie.dk",
"phone": {
"locale": "45",
"number": "12345678"
},
"address": {
"address": "Applebys Plads 7, 1.",
"coAddress": None,
"city": "København K",
"zipcode": "1411"
},
"cpr": "1209981919",
"cvr": None
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
isCompany: false,
lang: 'DA',
users: [
{
contact: true,
lang: 'en',
details: {
name: 'Hans Hansen',
email: 'example@debbie.dk',
phone: {locale: '45', number: '12345678'},
address: {
address: 'Applebys Plads 7, 1.',
coAddress: null,
city: 'København K',
zipcode: '1411'
},
cpr: '1209981919',
cvr: null
}
}
]
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'isCompany' => false,
'lang' => 'DA',
'users' => [
[
'contact' => true,
'lang' => 'en',
'details' => [
'name' => 'Hans Hansen',
'email' => 'example@debbie.dk',
'phone' => [
'locale' => '45',
'number' => '12345678'
],
'address' => [
'address' => 'Applebys Plads 7, 1.',
'coAddress' => null,
'city' => 'København K',
'zipcode' => '1411'
],
'cpr' => '1209981919',
'cvr' => null
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}"
payload := strings.NewReader("{\n \"isCompany\": false,\n \"lang\": \"DA\",\n \"users\": [\n {\n \"contact\": true,\n \"lang\": \"en\",\n \"details\": {\n \"name\": \"Hans Hansen\",\n \"email\": \"example@debbie.dk\",\n \"phone\": {\n \"locale\": \"45\",\n \"number\": \"12345678\"\n },\n \"address\": {\n \"address\": \"Applebys Plads 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\"\n },\n \"cpr\": \"1209981919\",\n \"cvr\": null\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isCompany\": false,\n \"lang\": \"DA\",\n \"users\": [\n {\n \"contact\": true,\n \"lang\": \"en\",\n \"details\": {\n \"name\": \"Hans Hansen\",\n \"email\": \"example@debbie.dk\",\n \"phone\": {\n \"locale\": \"45\",\n \"number\": \"12345678\"\n },\n \"address\": {\n \"address\": \"Applebys Plads 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\"\n },\n \"cpr\": \"1209981919\",\n \"cvr\": null\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/customers/{customerId}/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isCompany\": false,\n \"lang\": \"DA\",\n \"users\": [\n {\n \"contact\": true,\n \"lang\": \"en\",\n \"details\": {\n \"name\": \"Hans Hansen\",\n \"email\": \"example@debbie.dk\",\n \"phone\": {\n \"locale\": \"45\",\n \"number\": \"12345678\"\n },\n \"address\": {\n \"address\": \"Applebys Plads 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\"\n },\n \"cpr\": \"1209981919\",\n \"cvr\": null\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}Authorizations
Authentication can be done by using a bearer token in the Authorization header. This is done using the following format Authorization: Bearer {token}.
Path Parameters
Id of the tenant the customer belongs to
Id of the customer
Id of the user on the customer
Body
application/json
Patch user on customer body
Whether the user is the contact person
The language of the user
Available options:
bm, ba, eu, be, bn, bh, bi, bs, br, bg, my, ca, ch, ce, ny, zh, cv, kw, co, cr, hr, cs, da, dv, nl, dz, en, eo, et, ee, fo, fj, fi, fr, ff, gl, ka, de, el, gn, gu, ht, ha, he, hz, hi, ho, hu, ia, id, ie, ga, ig, ik, io, is, it, iu, ja, jv, kl, kn, kr, ks, kk, km, ki, rw, ky, kv, kg, ko, ku, kj, la, lb, lg, li, ln, lo, lt, lu, lv, gv, mk, mg, ms, ml, mt, mi, mr, mh, mn, na, nv, nd, ne, ng, nb, nn, no, ii, nr, oc, oj, cu, om, or, os, pa, pi, fa, pl, ps, pt, qu, rm, rn, ro, ru, sa, sc, sd, se, sm, sg, sr, gd, sn, si, sk, sl, so, st, es, su, sw, ss, sv, ta, te, tg, th, ti, bo, tk, tl, tn, to, tr, ts, tt, tw, ty, ug, uk, ur, uz, ve, vi, vo, wa, cy, wo, fy, xh, yi, yo, za, zu Show child attributes
Show child attributes
Response
Successful operation
The response is of type object.
⌘I