Anexar arquivo a um cliente/pessoa com o conteúdo em JSON (base64)
curl --request POST \
--url https://api.juridiq.com.br/file/people/{id}/json \
--header 'Content-Type: application/json' \
--header 'x-juridiq-api-key: <api-key>' \
--data '
{
"file": {
"name": "<string>",
"content_base64": "<string>",
"mime_type": "<string>"
}
}
'import requests
url = "https://api.juridiq.com.br/file/people/{id}/json"
payload = { "file": {
"name": "<string>",
"content_base64": "<string>",
"mime_type": "<string>"
} }
headers = {
"x-juridiq-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-juridiq-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: {name: '<string>', content_base64: '<string>', mime_type: '<string>'}})
};
fetch('https://api.juridiq.com.br/file/people/{id}/json', 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.juridiq.com.br/file/people/{id}/json",
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([
'file' => [
'name' => '<string>',
'content_base64' => '<string>',
'mime_type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-juridiq-api-key: <api-key>"
],
]);
$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.juridiq.com.br/file/people/{id}/json"
payload := strings.NewReader("{\n \"file\": {\n \"name\": \"<string>\",\n \"content_base64\": \"<string>\",\n \"mime_type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-juridiq-api-key", "<api-key>")
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.juridiq.com.br/file/people/{id}/json")
.header("x-juridiq-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file\": {\n \"name\": \"<string>\",\n \"content_base64\": \"<string>\",\n \"mime_type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juridiq.com.br/file/people/{id}/json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-juridiq-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": {\n \"name\": \"<string>\",\n \"content_base64\": \"<string>\",\n \"mime_type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"previewUrl": "<string>",
"downloadUrl": "<string>",
"size": "<string>",
"type": {
"extension": "<string>",
"formatted": "<string>"
},
"createdAt": "<string>",
"id": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"translateMessage": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"translateMessage": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"translateMessage": "<string>"
}Files
Anexar arquivo a um cliente/pessoa com o conteúdo em JSON (base64)
POST
/
file
/
people
/
{id}
/
json
Anexar arquivo a um cliente/pessoa com o conteúdo em JSON (base64)
curl --request POST \
--url https://api.juridiq.com.br/file/people/{id}/json \
--header 'Content-Type: application/json' \
--header 'x-juridiq-api-key: <api-key>' \
--data '
{
"file": {
"name": "<string>",
"content_base64": "<string>",
"mime_type": "<string>"
}
}
'import requests
url = "https://api.juridiq.com.br/file/people/{id}/json"
payload = { "file": {
"name": "<string>",
"content_base64": "<string>",
"mime_type": "<string>"
} }
headers = {
"x-juridiq-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-juridiq-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: {name: '<string>', content_base64: '<string>', mime_type: '<string>'}})
};
fetch('https://api.juridiq.com.br/file/people/{id}/json', 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.juridiq.com.br/file/people/{id}/json",
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([
'file' => [
'name' => '<string>',
'content_base64' => '<string>',
'mime_type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-juridiq-api-key: <api-key>"
],
]);
$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.juridiq.com.br/file/people/{id}/json"
payload := strings.NewReader("{\n \"file\": {\n \"name\": \"<string>\",\n \"content_base64\": \"<string>\",\n \"mime_type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-juridiq-api-key", "<api-key>")
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.juridiq.com.br/file/people/{id}/json")
.header("x-juridiq-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file\": {\n \"name\": \"<string>\",\n \"content_base64\": \"<string>\",\n \"mime_type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juridiq.com.br/file/people/{id}/json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-juridiq-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": {\n \"name\": \"<string>\",\n \"content_base64\": \"<string>\",\n \"mime_type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"previewUrl": "<string>",
"downloadUrl": "<string>",
"size": "<string>",
"type": {
"extension": "<string>",
"formatted": "<string>"
},
"createdAt": "<string>",
"id": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"translateMessage": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"translateMessage": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"translateMessage": "<string>"
}Authorizations
Chave de API do escritório (criada no painel). Envie o valor no header x-juridiq-api-key. A API aberta aplica rate limit por chave (veja a documentação de integradores).
Path Parameters
ID da entidade (processo, cliente ou tarefa)
Body
application/json
Arquivo em base64
Show child attributes
Show child attributes
Response
Default Response
Nome do arquivo
URL temporária para visualização
URL temporária para download
Tamanho formatado
Show child attributes
Show child attributes
Data de criação formatada
ID interno do arquivo (quando existir no banco)

