curl --request POST \
--url https://external.pleo.io/v1/installations/me:activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://external.pleo.io/v1/installations/me:activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://external.pleo.io/v1/installations/me:activate', 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:activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external.pleo.io/v1/installations/me:activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://external.pleo.io/v1/installations/me:activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/installations/me:activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}Activate the installation for a client
The integration sends a request to this endpoint to activate the installation, post authorisation. The request is sent after the integration has synchronised tags, tax codes, and vendors between the Pleo account and the client. Note that this is applicable when OAuth is used for authorisation.
curl --request POST \
--url https://external.pleo.io/v1/installations/me:activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://external.pleo.io/v1/installations/me:activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://external.pleo.io/v1/installations/me:activate', 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:activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external.pleo.io/v1/installations/me:activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://external.pleo.io/v1/installations/me:activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/installations/me:activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}Authorizations
JWT Bearer token authentication. Include the token in the Authorization header as: Bearer <token>
Response
Installation is successfully activated.
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"
This can be one of InstallationStatus values
"ACTIVATED"
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"
Was this page helpful?