Upload your logo
curl --request POST \
--url https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype"
files = { "file": ("example-file", open("example-file", "rb")) }
response = requests.post(url, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype', 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.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "TAX_ISSUER_PROVIDER_ID_NOT_FOUND",
"origin": "ACCOUNTING",
"message": "Tax issuer provider id not exists"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "TAX_ISSUER_NOT_FOUND",
"origin": "ACCOUNTING",
"message": "Tax issuer not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "ACCOUNTING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "file",
"message": "file is required",
"code": "FILE_REQUIRED"
}
]
}Upload your logo
Uploads the logo printed on your service invoices (NFSe).
POST
/
realms
/
{realmId}
/
organizations
/
{organizationId}
/
tax-issuer
/
{taxIssuer}
/
logotype
Upload your logo
curl --request POST \
--url https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype"
files = { "file": ("example-file", open("example-file", "rb")) }
response = requests.post(url, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST'};
options.body = form;
fetch('https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype', 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.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-issuer/{taxIssuer}/logotype")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "TAX_ISSUER_PROVIDER_ID_NOT_FOUND",
"origin": "ACCOUNTING",
"message": "Tax issuer provider id not exists"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "TAX_ISSUER_NOT_FOUND",
"origin": "ACCOUNTING",
"message": "Tax issuer not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "ACCOUNTING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "file",
"message": "file is required",
"code": "FILE_REQUIRED"
}
]
}Send the image as
multipart/form-data, in the part file. The logo is printed on the NFSe PDF, so it must be a PNG or a JPEG (content type image/png or image/jpeg) of up to 1 MB. Uploading a new logo replaces the previous one.
If the tax provider rejects the request, the error is returned with the provider’s error code and a status of 400, 409, 422 or 502.Path Parameters
ID of your realm.
Format: UUID
ID of the organization.
Format: UUID
ID of your tax issuer — the id returned by Get your tax issuer.
Format: UUID
Body
multipart/form-data
Your logo image, as a multipart/form-data file part. It must be a PNG or a JPEG (content type image/png or image/jpeg) of up to 1 MB (1,048,576 bytes).
Response
No Content. The operation succeeded and the response has no body.