curl --request POST \
--url https://api.debbiecollect.com/v1/{tenantId}/creditors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"id": "My reference",
"name": "John Doe's Factories",
"centralRegisterId": "DK40125949",
"isCompany": true,
"address": {
"address": "Applebys Pl. 7, 1.",
"coAddress": null,
"city": "København K",
"zipcode": "1411",
"country": "Danmark"
},
"notes": "Note to self (and my colleagues).",
"erpLink": "https://example.com?id={{customerReferenceId}}&test",
"acquisitionResponsibleId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"contactId": "bb71f936-c60c-4ad7-82f6-eddca673d30f",
"caseworkerContactId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"defaultWorkflowId": "3057ca58-d39d-48ec-9d79-c45182b92ca0",
"state": "ACTIVE",
"vatRegistered": true,
"aksEnabled": true,
"bankAccountDetails": {
"type": "DANISH",
"registrationNumber": "1234",
"accountNumber": "00012345678"
},
"selfCollection": false
}
EOFimport requests
url = "https://api.debbiecollect.com/v1/{tenantId}/creditors"
payload = {
"id": "My reference",
"name": "John Doe's Factories",
"centralRegisterId": "DK40125949",
"isCompany": True,
"address": {
"address": "Applebys Pl. 7, 1.",
"coAddress": None,
"city": "København K",
"zipcode": "1411",
"country": "Danmark"
},
"notes": "Note to self (and my colleagues).",
"erpLink": "https://example.com?id={{customerReferenceId}}&test",
"acquisitionResponsibleId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"contactId": "bb71f936-c60c-4ad7-82f6-eddca673d30f",
"caseworkerContactId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"defaultWorkflowId": "3057ca58-d39d-48ec-9d79-c45182b92ca0",
"state": "ACTIVE",
"vatRegistered": True,
"aksEnabled": True,
"bankAccountDetails": {
"type": "DANISH",
"registrationNumber": "1234",
"accountNumber": "00012345678"
},
"selfCollection": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'My reference',
name: 'John Doe\'s Factories',
centralRegisterId: 'DK40125949',
isCompany: true,
address: {
address: 'Applebys Pl. 7, 1.',
coAddress: null,
city: 'København K',
zipcode: '1411',
country: 'Danmark'
},
notes: 'Note to self (and my colleagues).',
erpLink: 'https://example.com?id={{customerReferenceId}}&test',
acquisitionResponsibleId: '9409b6d8-cde5-45f1-b8e1-e756847a7077',
contactId: 'bb71f936-c60c-4ad7-82f6-eddca673d30f',
caseworkerContactId: '9409b6d8-cde5-45f1-b8e1-e756847a7077',
defaultWorkflowId: '3057ca58-d39d-48ec-9d79-c45182b92ca0',
state: 'ACTIVE',
vatRegistered: true,
aksEnabled: true,
bankAccountDetails: {type: 'DANISH', registrationNumber: '1234', accountNumber: '00012345678'},
selfCollection: false
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/creditors', 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}/creditors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'My reference',
'name' => 'John Doe\'s Factories',
'centralRegisterId' => 'DK40125949',
'isCompany' => true,
'address' => [
'address' => 'Applebys Pl. 7, 1.',
'coAddress' => null,
'city' => 'København K',
'zipcode' => '1411',
'country' => 'Danmark'
],
'notes' => 'Note to self (and my colleagues).',
'erpLink' => 'https://example.com?id={{customerReferenceId}}&test',
'acquisitionResponsibleId' => '9409b6d8-cde5-45f1-b8e1-e756847a7077',
'contactId' => 'bb71f936-c60c-4ad7-82f6-eddca673d30f',
'caseworkerContactId' => '9409b6d8-cde5-45f1-b8e1-e756847a7077',
'defaultWorkflowId' => '3057ca58-d39d-48ec-9d79-c45182b92ca0',
'state' => 'ACTIVE',
'vatRegistered' => true,
'aksEnabled' => true,
'bankAccountDetails' => [
'type' => 'DANISH',
'registrationNumber' => '1234',
'accountNumber' => '00012345678'
],
'selfCollection' => false
]),
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}/creditors"
payload := strings.NewReader("{\n \"id\": \"My reference\",\n \"name\": \"John Doe's Factories\",\n \"centralRegisterId\": \"DK40125949\",\n \"isCompany\": true,\n \"address\": {\n \"address\": \"Applebys Pl. 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\",\n \"country\": \"Danmark\"\n },\n \"notes\": \"Note to self (and my colleagues).\",\n \"erpLink\": \"https://example.com?id={{customerReferenceId}}&test\",\n \"acquisitionResponsibleId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"contactId\": \"bb71f936-c60c-4ad7-82f6-eddca673d30f\",\n \"caseworkerContactId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"defaultWorkflowId\": \"3057ca58-d39d-48ec-9d79-c45182b92ca0\",\n \"state\": \"ACTIVE\",\n \"vatRegistered\": true,\n \"aksEnabled\": true,\n \"bankAccountDetails\": {\n \"type\": \"DANISH\",\n \"registrationNumber\": \"1234\",\n \"accountNumber\": \"00012345678\"\n },\n \"selfCollection\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.debbiecollect.com/v1/{tenantId}/creditors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"My reference\",\n \"name\": \"John Doe's Factories\",\n \"centralRegisterId\": \"DK40125949\",\n \"isCompany\": true,\n \"address\": {\n \"address\": \"Applebys Pl. 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\",\n \"country\": \"Danmark\"\n },\n \"notes\": \"Note to self (and my colleagues).\",\n \"erpLink\": \"https://example.com?id={{customerReferenceId}}&test\",\n \"acquisitionResponsibleId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"contactId\": \"bb71f936-c60c-4ad7-82f6-eddca673d30f\",\n \"caseworkerContactId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"defaultWorkflowId\": \"3057ca58-d39d-48ec-9d79-c45182b92ca0\",\n \"state\": \"ACTIVE\",\n \"vatRegistered\": true,\n \"aksEnabled\": true,\n \"bankAccountDetails\": {\n \"type\": \"DANISH\",\n \"registrationNumber\": \"1234\",\n \"accountNumber\": \"00012345678\"\n },\n \"selfCollection\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/creditors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"My reference\",\n \"name\": \"John Doe's Factories\",\n \"centralRegisterId\": \"DK40125949\",\n \"isCompany\": true,\n \"address\": {\n \"address\": \"Applebys Pl. 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\",\n \"country\": \"Danmark\"\n },\n \"notes\": \"Note to self (and my colleagues).\",\n \"erpLink\": \"https://example.com?id={{customerReferenceId}}&test\",\n \"acquisitionResponsibleId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"contactId\": \"bb71f936-c60c-4ad7-82f6-eddca673d30f\",\n \"caseworkerContactId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"defaultWorkflowId\": \"3057ca58-d39d-48ec-9d79-c45182b92ca0\",\n \"state\": \"ACTIVE\",\n \"vatRegistered\": true,\n \"aksEnabled\": true,\n \"bankAccountDetails\": {\n \"type\": \"DANISH\",\n \"registrationNumber\": \"1234\",\n \"accountNumber\": \"00012345678\"\n },\n \"selfCollection\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>"
}Create creditor
Create new creditor allows the api consumer to create new creditors
curl --request POST \
--url https://api.debbiecollect.com/v1/{tenantId}/creditors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"id": "My reference",
"name": "John Doe's Factories",
"centralRegisterId": "DK40125949",
"isCompany": true,
"address": {
"address": "Applebys Pl. 7, 1.",
"coAddress": null,
"city": "København K",
"zipcode": "1411",
"country": "Danmark"
},
"notes": "Note to self (and my colleagues).",
"erpLink": "https://example.com?id={{customerReferenceId}}&test",
"acquisitionResponsibleId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"contactId": "bb71f936-c60c-4ad7-82f6-eddca673d30f",
"caseworkerContactId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"defaultWorkflowId": "3057ca58-d39d-48ec-9d79-c45182b92ca0",
"state": "ACTIVE",
"vatRegistered": true,
"aksEnabled": true,
"bankAccountDetails": {
"type": "DANISH",
"registrationNumber": "1234",
"accountNumber": "00012345678"
},
"selfCollection": false
}
EOFimport requests
url = "https://api.debbiecollect.com/v1/{tenantId}/creditors"
payload = {
"id": "My reference",
"name": "John Doe's Factories",
"centralRegisterId": "DK40125949",
"isCompany": True,
"address": {
"address": "Applebys Pl. 7, 1.",
"coAddress": None,
"city": "København K",
"zipcode": "1411",
"country": "Danmark"
},
"notes": "Note to self (and my colleagues).",
"erpLink": "https://example.com?id={{customerReferenceId}}&test",
"acquisitionResponsibleId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"contactId": "bb71f936-c60c-4ad7-82f6-eddca673d30f",
"caseworkerContactId": "9409b6d8-cde5-45f1-b8e1-e756847a7077",
"defaultWorkflowId": "3057ca58-d39d-48ec-9d79-c45182b92ca0",
"state": "ACTIVE",
"vatRegistered": True,
"aksEnabled": True,
"bankAccountDetails": {
"type": "DANISH",
"registrationNumber": "1234",
"accountNumber": "00012345678"
},
"selfCollection": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'My reference',
name: 'John Doe\'s Factories',
centralRegisterId: 'DK40125949',
isCompany: true,
address: {
address: 'Applebys Pl. 7, 1.',
coAddress: null,
city: 'København K',
zipcode: '1411',
country: 'Danmark'
},
notes: 'Note to self (and my colleagues).',
erpLink: 'https://example.com?id={{customerReferenceId}}&test',
acquisitionResponsibleId: '9409b6d8-cde5-45f1-b8e1-e756847a7077',
contactId: 'bb71f936-c60c-4ad7-82f6-eddca673d30f',
caseworkerContactId: '9409b6d8-cde5-45f1-b8e1-e756847a7077',
defaultWorkflowId: '3057ca58-d39d-48ec-9d79-c45182b92ca0',
state: 'ACTIVE',
vatRegistered: true,
aksEnabled: true,
bankAccountDetails: {type: 'DANISH', registrationNumber: '1234', accountNumber: '00012345678'},
selfCollection: false
})
};
fetch('https://api.debbiecollect.com/v1/{tenantId}/creditors', 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}/creditors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'My reference',
'name' => 'John Doe\'s Factories',
'centralRegisterId' => 'DK40125949',
'isCompany' => true,
'address' => [
'address' => 'Applebys Pl. 7, 1.',
'coAddress' => null,
'city' => 'København K',
'zipcode' => '1411',
'country' => 'Danmark'
],
'notes' => 'Note to self (and my colleagues).',
'erpLink' => 'https://example.com?id={{customerReferenceId}}&test',
'acquisitionResponsibleId' => '9409b6d8-cde5-45f1-b8e1-e756847a7077',
'contactId' => 'bb71f936-c60c-4ad7-82f6-eddca673d30f',
'caseworkerContactId' => '9409b6d8-cde5-45f1-b8e1-e756847a7077',
'defaultWorkflowId' => '3057ca58-d39d-48ec-9d79-c45182b92ca0',
'state' => 'ACTIVE',
'vatRegistered' => true,
'aksEnabled' => true,
'bankAccountDetails' => [
'type' => 'DANISH',
'registrationNumber' => '1234',
'accountNumber' => '00012345678'
],
'selfCollection' => false
]),
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}/creditors"
payload := strings.NewReader("{\n \"id\": \"My reference\",\n \"name\": \"John Doe's Factories\",\n \"centralRegisterId\": \"DK40125949\",\n \"isCompany\": true,\n \"address\": {\n \"address\": \"Applebys Pl. 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\",\n \"country\": \"Danmark\"\n },\n \"notes\": \"Note to self (and my colleagues).\",\n \"erpLink\": \"https://example.com?id={{customerReferenceId}}&test\",\n \"acquisitionResponsibleId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"contactId\": \"bb71f936-c60c-4ad7-82f6-eddca673d30f\",\n \"caseworkerContactId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"defaultWorkflowId\": \"3057ca58-d39d-48ec-9d79-c45182b92ca0\",\n \"state\": \"ACTIVE\",\n \"vatRegistered\": true,\n \"aksEnabled\": true,\n \"bankAccountDetails\": {\n \"type\": \"DANISH\",\n \"registrationNumber\": \"1234\",\n \"accountNumber\": \"00012345678\"\n },\n \"selfCollection\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.debbiecollect.com/v1/{tenantId}/creditors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"My reference\",\n \"name\": \"John Doe's Factories\",\n \"centralRegisterId\": \"DK40125949\",\n \"isCompany\": true,\n \"address\": {\n \"address\": \"Applebys Pl. 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\",\n \"country\": \"Danmark\"\n },\n \"notes\": \"Note to self (and my colleagues).\",\n \"erpLink\": \"https://example.com?id={{customerReferenceId}}&test\",\n \"acquisitionResponsibleId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"contactId\": \"bb71f936-c60c-4ad7-82f6-eddca673d30f\",\n \"caseworkerContactId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"defaultWorkflowId\": \"3057ca58-d39d-48ec-9d79-c45182b92ca0\",\n \"state\": \"ACTIVE\",\n \"vatRegistered\": true,\n \"aksEnabled\": true,\n \"bankAccountDetails\": {\n \"type\": \"DANISH\",\n \"registrationNumber\": \"1234\",\n \"accountNumber\": \"00012345678\"\n },\n \"selfCollection\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.debbiecollect.com/v1/{tenantId}/creditors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"My reference\",\n \"name\": \"John Doe's Factories\",\n \"centralRegisterId\": \"DK40125949\",\n \"isCompany\": true,\n \"address\": {\n \"address\": \"Applebys Pl. 7, 1.\",\n \"coAddress\": null,\n \"city\": \"København K\",\n \"zipcode\": \"1411\",\n \"country\": \"Danmark\"\n },\n \"notes\": \"Note to self (and my colleagues).\",\n \"erpLink\": \"https://example.com?id={{customerReferenceId}}&test\",\n \"acquisitionResponsibleId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"contactId\": \"bb71f936-c60c-4ad7-82f6-eddca673d30f\",\n \"caseworkerContactId\": \"9409b6d8-cde5-45f1-b8e1-e756847a7077\",\n \"defaultWorkflowId\": \"3057ca58-d39d-48ec-9d79-c45182b92ca0\",\n \"state\": \"ACTIVE\",\n \"vatRegistered\": true,\n \"aksEnabled\": true,\n \"bankAccountDetails\": {\n \"type\": \"DANISH\",\n \"registrationNumber\": \"1234\",\n \"accountNumber\": \"00012345678\"\n },\n \"selfCollection\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>"
}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 creditor is being created for
Body
New creditor object
Name of the creditor.
Whether the creditor is a company.
Id from your internal systems. For example your ERP creditor id.
Central register id. For example "DK40125949"
The creditors' address
Show child attributes
Show child attributes
Creditor notes.
Link to creditors' ERP system ( https://example.com?id={{customerReferenceId}}&test ).
Id of the user who is responsible for the acquisition of the creditor.
Id of the client user who is case responsible.
Id of the caseworker user who is case responsible.
Id of the default workflow.
The state of the creditor
LEAD, SIGNED_ON, ACTIVE, CANCELLED, CEASED Whether the creditor is vat registered or not.
Whether Experian AKS is enabled or not.
The creditors' bank account
Show child attributes
Show child attributes
Whether the creditor is collecting for themselves or not.