curl --request PUT \
--url https://external.pleo.io/v1/vendors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"companyId": "c082afd8-c1d2-46ee-8f56-1512638f0e67",
"defaultCurrency": "DKK",
"externalId": "<string>",
"name": "Pleo",
"code": "<string>",
"country": "DK",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>"
}
'import requests
url = "https://external.pleo.io/v1/vendors/{id}"
payload = {
"companyId": "c082afd8-c1d2-46ee-8f56-1512638f0e67",
"defaultCurrency": "DKK",
"externalId": "<string>",
"name": "Pleo",
"code": "<string>",
"country": "DK",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
companyId: 'c082afd8-c1d2-46ee-8f56-1512638f0e67',
defaultCurrency: 'DKK',
externalId: '<string>',
name: 'Pleo',
code: '<string>',
country: 'DK',
registrationNumber: '<string>',
taxRegistrationNumber: '<string>'
})
};
fetch('https://external.pleo.io/v1/vendors/{id}', 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://external.pleo.io/v1/vendors/{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 => json_encode([
'companyId' => 'c082afd8-c1d2-46ee-8f56-1512638f0e67',
'defaultCurrency' => 'DKK',
'externalId' => '<string>',
'name' => 'Pleo',
'code' => '<string>',
'country' => 'DK',
'registrationNumber' => '<string>',
'taxRegistrationNumber' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$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://external.pleo.io/v1/vendors/{id}"
payload := strings.NewReader("{\n \"companyId\": \"c082afd8-c1d2-46ee-8f56-1512638f0e67\",\n \"defaultCurrency\": \"DKK\",\n \"externalId\": \"<string>\",\n \"name\": \"Pleo\",\n \"code\": \"<string>\",\n \"country\": \"DK\",\n \"registrationNumber\": \"<string>\",\n \"taxRegistrationNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://external.pleo.io/v1/vendors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"companyId\": \"c082afd8-c1d2-46ee-8f56-1512638f0e67\",\n \"defaultCurrency\": \"DKK\",\n \"externalId\": \"<string>\",\n \"name\": \"Pleo\",\n \"code\": \"<string>\",\n \"country\": \"DK\",\n \"registrationNumber\": \"<string>\",\n \"taxRegistrationNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/vendors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"companyId\": \"c082afd8-c1d2-46ee-8f56-1512638f0e67\",\n \"defaultCurrency\": \"DKK\",\n \"externalId\": \"<string>\",\n \"name\": \"Pleo\",\n \"code\": \"<string>\",\n \"country\": \"DK\",\n \"registrationNumber\": \"<string>\",\n \"taxRegistrationNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"companyId": "c082afd8-c1d2-46ee-8f56-1512638f0e67",
"defaultCurrency": "DKK",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Pleo",
"state": "DRAFT",
"code": "<string>",
"country": "UNDEFINED",
"createdAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}"Invalid vendor update request""Vendor not found""Conflicting vendor update"Update a Vendor
Updates a Vendor for a company in Pleo.
curl --request PUT \
--url https://external.pleo.io/v1/vendors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"companyId": "c082afd8-c1d2-46ee-8f56-1512638f0e67",
"defaultCurrency": "DKK",
"externalId": "<string>",
"name": "Pleo",
"code": "<string>",
"country": "DK",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>"
}
'import requests
url = "https://external.pleo.io/v1/vendors/{id}"
payload = {
"companyId": "c082afd8-c1d2-46ee-8f56-1512638f0e67",
"defaultCurrency": "DKK",
"externalId": "<string>",
"name": "Pleo",
"code": "<string>",
"country": "DK",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
companyId: 'c082afd8-c1d2-46ee-8f56-1512638f0e67',
defaultCurrency: 'DKK',
externalId: '<string>',
name: 'Pleo',
code: '<string>',
country: 'DK',
registrationNumber: '<string>',
taxRegistrationNumber: '<string>'
})
};
fetch('https://external.pleo.io/v1/vendors/{id}', 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://external.pleo.io/v1/vendors/{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 => json_encode([
'companyId' => 'c082afd8-c1d2-46ee-8f56-1512638f0e67',
'defaultCurrency' => 'DKK',
'externalId' => '<string>',
'name' => 'Pleo',
'code' => '<string>',
'country' => 'DK',
'registrationNumber' => '<string>',
'taxRegistrationNumber' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$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://external.pleo.io/v1/vendors/{id}"
payload := strings.NewReader("{\n \"companyId\": \"c082afd8-c1d2-46ee-8f56-1512638f0e67\",\n \"defaultCurrency\": \"DKK\",\n \"externalId\": \"<string>\",\n \"name\": \"Pleo\",\n \"code\": \"<string>\",\n \"country\": \"DK\",\n \"registrationNumber\": \"<string>\",\n \"taxRegistrationNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://external.pleo.io/v1/vendors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"companyId\": \"c082afd8-c1d2-46ee-8f56-1512638f0e67\",\n \"defaultCurrency\": \"DKK\",\n \"externalId\": \"<string>\",\n \"name\": \"Pleo\",\n \"code\": \"<string>\",\n \"country\": \"DK\",\n \"registrationNumber\": \"<string>\",\n \"taxRegistrationNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/vendors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"companyId\": \"c082afd8-c1d2-46ee-8f56-1512638f0e67\",\n \"defaultCurrency\": \"DKK\",\n \"externalId\": \"<string>\",\n \"name\": \"Pleo\",\n \"code\": \"<string>\",\n \"country\": \"DK\",\n \"registrationNumber\": \"<string>\",\n \"taxRegistrationNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"companyId": "c082afd8-c1d2-46ee-8f56-1512638f0e67",
"defaultCurrency": "DKK",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Pleo",
"state": "DRAFT",
"code": "<string>",
"country": "UNDEFINED",
"createdAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
}"Invalid vendor update request""Vendor not found""Conflicting vendor update"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pleo's internal identifier of the vendor.
"123e4567-e89b-12d3-a456-426614174000"
Body
Pleo's internal identifier for the company the Vendor is associated with.
"c082afd8-c1d2-46ee-8f56-1512638f0e67"
Default currency in which the vendor's financial operations,such as purchases, payments, or invoices, are primarily conducted. (ISO 4217 currency code (3 letters))
"DKK"
Unique external identifier of the vendor, assigned by the target ERP/accounting system, used by the client for identification. Can be the same as code if no other identifier is available.
The name field represents the official name of the Vendor as it is recorded in the target ERP/accounting system. This name is used to uniquely identify the vendor within the accounting workflow and is visible to the Pleo bookkeeper.
"Pleo"
Current state of the Vendor. ACTIVE means the vendor is in-sync with target ERP/accounting system. DRAFT means the vendor needs to be created in the target ERP/accounting system.
DRAFT, ACTIVE, ARCHIVED Unique identifier assigned to the vendor in the target ERP/accounting system for aiding users in identifying the correct record.
Country of registration of the Vendor (ISO 3166-1 alpha-2 country code (2 letters))
UNDEFINED, AC, AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BU, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CP, CR, CS, CU, CV, CW, CX, CY, CZ, DE, DG, DJ, DK, DM, DO, DZ, EA, EC, EE, EG, EH, ER, ES, ET, EU, EZ, FI, FJ, FK, FM, FO, FR, FX, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, IC, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NT, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SF, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SU, SV, SX, SY, SZ, TA, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TP, TR, TT, TV, TW, TZ, UA, UG, UK, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XI, XU, XK, YE, YT, YU, ZA, ZM, ZR, ZW "DK"
Unique identification of a registered vendor in a country.
VAT/GST/TaxId number of the Vendor.
Response
Vendor updated
Show child attributes
Show child attributes