curl --request PUT \
--url https://external.pleo.io/v1/installations/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"status": "ACTIVATED",
"metadata": {
"externalApplicationId": "123456789"
}
}
'import requests
url = "https://external.pleo.io/v1/installations/me"
payload = {
"status": "ACTIVATED",
"metadata": { "externalApplicationId": "123456789" }
}
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({status: 'ACTIVATED', metadata: {externalApplicationId: '123456789'}})
};
fetch('https://external.pleo.io/v1/installations/me', 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/installations/me",
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([
'status' => 'ACTIVATED',
'metadata' => [
'externalApplicationId' => '123456789'
]
]),
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/installations/me"
payload := strings.NewReader("{\n \"status\": \"ACTIVATED\",\n \"metadata\": {\n \"externalApplicationId\": \"123456789\"\n }\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/installations/me")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"status\": \"ACTIVATED\",\n \"metadata\": {\n \"externalApplicationId\": \"123456789\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/installations/me")
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 \"status\": \"ACTIVATED\",\n \"metadata\": {\n \"externalApplicationId\": \"123456789\"\n }\n}"
response = http.request(request)
puts response.read_body{
"applicationId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2021-01-01T00:00:00Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"key": "value"
},
"resource": "urn:pleo:company:123e4567-e89b-12d3-a456-426614174000",
"status": "ACTIVATED",
"updatedAt": "2021-01-01T00:00:00Z",
"errorCode": "NOT_ENTITLED"
}"Bad request""Cannot update installation due to infrastructure issue"Update a client installation
Send a request to this endpoint if you want to modify the installation status or the metadata.
curl --request PUT \
--url https://external.pleo.io/v1/installations/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"status": "ACTIVATED",
"metadata": {
"externalApplicationId": "123456789"
}
}
'import requests
url = "https://external.pleo.io/v1/installations/me"
payload = {
"status": "ACTIVATED",
"metadata": { "externalApplicationId": "123456789" }
}
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({status: 'ACTIVATED', metadata: {externalApplicationId: '123456789'}})
};
fetch('https://external.pleo.io/v1/installations/me', 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/installations/me",
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([
'status' => 'ACTIVATED',
'metadata' => [
'externalApplicationId' => '123456789'
]
]),
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/installations/me"
payload := strings.NewReader("{\n \"status\": \"ACTIVATED\",\n \"metadata\": {\n \"externalApplicationId\": \"123456789\"\n }\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/installations/me")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"status\": \"ACTIVATED\",\n \"metadata\": {\n \"externalApplicationId\": \"123456789\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/installations/me")
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 \"status\": \"ACTIVATED\",\n \"metadata\": {\n \"externalApplicationId\": \"123456789\"\n }\n}"
response = http.request(request)
puts response.read_body{
"applicationId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2021-01-01T00:00:00Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"key": "value"
},
"resource": "urn:pleo:company:123e4567-e89b-12d3-a456-426614174000",
"status": "ACTIVATED",
"updatedAt": "2021-01-01T00:00:00Z",
"errorCode": "NOT_ENTITLED"
}"Bad request""Cannot update installation due to infrastructure issue"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Installation request
Response
Installation updated.
The unique identifier of the application this installation is for.
"123e4567-e89b-12d3-a456-426614174000"
The date and time when the installation was created.
"2021-01-01T00:00:00Z"
The unique identifier of the installation.
"123e4567-e89b-12d3-a456-426614174000"
Additional information about the installation.
Show child attributes
Show child attributes
{ "key": "value" }
The resource that the installation is for.
"urn:pleo:company:123e4567-e89b-12d3-a456-426614174000"
ACTIVATED, INACTIVE, AUTHORIZED, PENDING_INTEGRATION The date and time when the installation was last updated.
"2021-01-01T00:00:00Z"
Explains the error that inactivated the installation. This appear if the installation status is inactive.
"NOT_ENTITLED"