Pacotes
Conjuntos de serviços e produtos com preços próprios.
Valores dos exemplos
Digite uma vez e todos os exemplos desta página passam a usá-los. A chave de API fica só nesta página e nunca é guardada.
GET/v1/packages
Lista os pacotes do catálogo.
ListarEm caso de sucesso: 200.Permissão: Ler.
Parâmetros da consulta
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
page | integer | Não | min 1 · default 1 |
pageSize | integer | Não | min 1 · max 100 · default 25 |
q | string | Não | min length 1 · max length 200 |
archived | string | Não |
Resposta
30 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
[].archived | boolean | Sim |
[].createdAt | string (date-time) | Sim |
[].createdBy | string (uuid) | Sim |
[].currency | string | Sim |
[].description | null nos exemplos | Sim |
[].discount | null nos exemplos | Sim |
[].discountAmount | integer | Sim |
[].discountPrices | object | Sim |
[].id | string (uuid) | Sim |
[].images | array of object | Sim |
[].images[].id | string (uuid) | Sim |
[].images[].url | string (uri) | Sim |
[].items | array of object | Sim |
[].items[].catalogPrice | integer | Sim |
[].items[].description | null nos exemplos | Sim |
[].items[].kind | string | Sim |
[].items[].name | string | Sim |
[].items[].prices | object | Sim |
[].items[].quantity | integer | Sim |
[].items[].serviceId | string (uuid) | Sim |
[].items[].sku | null nos exemplos | Sim |
[].items[].unitPrice | integer | Sim |
[].name | string | Sim |
[].organizationId | string (uuid) | Sim |
[].publicVisible | boolean | Sim |
[].subtotal | integer | Sim |
[].total | integer | Sim |
[].totals | object | Sim |
[].updatedAt | string (date-time) | Sim |
[].updatedBy | string (uuid) | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/packages" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/packages", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/packages",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/packages");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/packages")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/packages", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/packages"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/packages");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
[
{
"archived": true,
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"currency": "USD",
"description": null,
"discount": null,
"discountAmount": 1,
"discountPrices": {},
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"images": [
{}
],
"items": [
{}
],
"name": "Ana Lima",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"publicVisible": true,
"subtotal": 1,
"total": 1,
"totals": {},
"updatedAt": "2026-11-21T14:00:00.000Z",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]POST/v1/packages
Cria um pacote de serviços e produtos.
CriarEm caso de sucesso: 201.Permissão: Criar.
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
name | string | Sim | min length 1 · max length 100 |
description | string | null | Não | |
currency | string | Não | pattern ^[A-Z]{3}$ |
items | array of object | Sim | min items 1 · max items 50 |
items[].serviceId | string (uuid) | Sim | |
items[].quantity | integer | Não | min 1 · max 100000 · default 1 |
items[].unitPrice | integer | Não | min 0 · max 10000000000000 |
items[].prices | object of integer | Não | |
discount | object | null | Não | |
discountPrices | object of integer | Não | |
publicVisible | boolean | Não | |
archived | boolean | Não |
Resposta
37 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
archived | boolean | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
currency | string | Sim |
description | null nos exemplos | Sim |
discount | object | null | Sim |
discount.type | string | Sim |
discount.value | number | Sim |
discountAmount | integer | Sim |
discountPrices | object | Sim |
discountPrices.USD | integer | Não |
id | string (uuid) | Sim |
images | array of any | Sim |
items | array of object | Sim |
items[].catalogPrice | integer | Sim |
items[].description | string | null | Sim |
items[].kind | string | Sim |
items[].name | string | Sim |
items[].prices | object | Sim |
items[].prices.BRL | integer | Não |
items[].prices.USD | integer | Não |
items[].quantity | integer | Sim |
items[].serviceId | string (uuid) | Sim |
items[].sku | string | null | Sim |
items[].unitPrice | integer | Sim |
name | string | Sim |
organizationId | string (uuid) | Sim |
publicVisible | boolean | Sim |
subtotal | integer | Sim |
total | integer | Sim |
totals | object | Sim |
totals.USD | object | Não |
totals.USD.discountAmount | integer | Sim |
totals.USD.subtotal | integer | Sim |
totals.USD.total | integer | Sim |
updatedAt | string (date-time) | Sim |
updatedBy | string (uuid) | Sim |
Exemplo
curl -X POST "https://api.firmado.app/v1/packages" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
],
"description": "…",
"currency": "USD"
}'const res = await fetch("https://api.firmado.app/v1/packages", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
],
"description": "…",
"currency": "USD"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/packages",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {},
},
],
"description": "…",
"currency": "USD",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/packages");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
],
"description": "…",
"currency": "USD"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/packages")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
],
"description": "…",
"currency": "USD"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
],
"description": "…",
"currency": "USD"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/packages", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/packages"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
],
"description": "…",
"currency": "USD"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/packages");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
],
"description": "…",
"currency": "USD"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (201), com valores de exemplo:
{
"archived": true,
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"currency": "USD",
"description": null,
"discount": {
"type": "…",
"value": 1
},
"discountAmount": 1,
"discountPrices": {
"USD": 1
},
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"images": [],
"items": [
{
"catalogPrice": 1,
"description": "…",
"kind": "…",
"name": "Ana Lima",
"prices": {},
"quantity": 1,
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"sku": "…",
"unitPrice": 1
}
],
"name": "Ana Lima",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"publicVisible": true,
"subtotal": 1,
"total": 1,
"totals": {
"USD": {
"subtotal": 1,
"discountAmount": 1,
"total": 1
}
},
"updatedAt": "2026-11-21T14:00:00.000Z",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}DELETE/v1/packages/{id}
Exclui um pacote; propostas e faturas mantêm suas cópias.
ExcluirEm caso de sucesso: 204.Permissão: Excluir.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Exemplo
curl -X DELETE "https://api.firmado.app/v1/packages/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/packages/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/packages/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/packages/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/packages/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/packages/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/packages/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/packages/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/packages/{id}
Retorna um pacote com seus itens e preços.
Ver umEm caso de sucesso: 200.Permissão: Ler.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Resposta
30 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
archived | boolean | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
currency | string | Sim |
description | null nos exemplos | Sim |
discount | object | null | Sim |
discount.type | string | Sim |
discount.value | integer | Sim |
discountAmount | integer | Sim |
discountPrices | object | Sim |
id | string (uuid) | Sim |
images | array of any | Sim |
items | array of object | Sim |
items[].catalogPrice | integer | Sim |
items[].description | null nos exemplos | Sim |
items[].kind | string | Sim |
items[].name | string | Sim |
items[].prices | object | Sim |
items[].quantity | integer | Sim |
items[].serviceId | string (uuid) | Sim |
items[].sku | null nos exemplos | Sim |
items[].unitPrice | integer | Sim |
name | string | Sim |
organizationId | string (uuid) | Sim |
publicVisible | boolean | Sim |
subtotal | integer | Sim |
total | integer | Sim |
totals | object | Sim |
updatedAt | string (date-time) | Sim |
updatedBy | string (uuid) | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/packages/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/packages/{id}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/packages/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/packages/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/packages/{id}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/packages/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/packages/{id}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/packages/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"archived": true,
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"currency": "USD",
"description": null,
"discount": {
"type": "…",
"value": 1
},
"discountAmount": 1,
"discountPrices": {},
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"images": [],
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 1,
"prices": {},
"kind": "…",
"sku": null,
"name": "Ana Lima",
"description": null,
"catalogPrice": 1
}
],
"name": "Ana Lima",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"publicVisible": true,
"subtotal": 1,
"total": 1,
"totals": {},
"updatedAt": "2026-11-21T14:00:00.000Z",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}PATCH/v1/packages/{id}
Altera um pacote: itens, preços e visibilidade.
AtualizarEm caso de sucesso: 200.Permissão: Atualizar.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
name | string | Não | min length 1 · max length 100 |
description | string | null | Não | |
currency | string | Não | pattern ^[A-Z]{3}$ |
items | array of object | Não | min items 1 · max items 50 |
items[].serviceId | string (uuid) | Sim | |
items[].quantity | integer | Não | min 1 · max 100000 · default 1 |
items[].unitPrice | integer | Não | min 0 · max 10000000000000 |
items[].prices | object of integer | Não | |
discount | object | null | Não | |
discountPrices | object of integer | Não | |
publicVisible | boolean | Não | |
archived | boolean | Não |
Resposta
37 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
archived | boolean | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
currency | string | Sim |
description | null nos exemplos | Sim |
discount | object | null | Sim |
discount.type | string | Sim |
discount.value | integer | Sim |
discountAmount | integer | Sim |
discountPrices | object | Sim |
discountPrices.USD | integer | Não |
id | string (uuid) | Sim |
images | array of any | Sim |
items | array of object | Sim |
items[].catalogPrice | integer | Sim |
items[].description | null nos exemplos | Sim |
items[].kind | string | Sim |
items[].name | string | Sim |
items[].prices | object | Sim |
items[].prices.BRL | integer | Não |
items[].prices.USD | integer | Não |
items[].quantity | integer | Sim |
items[].serviceId | string (uuid) | Sim |
items[].sku | null nos exemplos | Sim |
items[].unitPrice | integer | Sim |
name | string | Sim |
organizationId | string (uuid) | Sim |
publicVisible | boolean | Sim |
subtotal | integer | Sim |
total | integer | Sim |
totals | object | Sim |
totals.USD | object | Não |
totals.USD.discountAmount | integer | Sim |
totals.USD.subtotal | integer | Sim |
totals.USD.total | integer | Sim |
updatedAt | string (date-time) | Sim |
updatedBy | string (uuid) | Sim |
Exemplo
curl -X PATCH "https://api.firmado.app/v1/packages/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
]
}'const res = await fetch("https://api.firmado.app/v1/packages/{id}", {
method: "PATCH",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
]
}),
})
const data = await res.json()import requests
res = requests.patch(
"https://api.firmado.app/v1/packages/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {},
},
],
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/packages/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/packages/{id}")
req = Net::HTTP::Patch.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
]
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
]
}`)
req, _ := http.NewRequest("PATCH", "https://api.firmado.app/v1/packages/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/packages/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.firmado.app/v1/packages/{id}");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"description": "…",
"currency": "USD",
"items": [
{
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"quantity": 1,
"unitPrice": 0,
"prices": {}
}
]
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"archived": true,
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"currency": "USD",
"description": null,
"discount": {
"type": "…",
"value": 1
},
"discountAmount": 1,
"discountPrices": {
"USD": 1
},
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"images": [],
"items": [
{
"catalogPrice": 1,
"description": null,
"kind": "…",
"name": "Ana Lima",
"prices": {},
"quantity": 1,
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"sku": null,
"unitPrice": 1
}
],
"name": "Ana Lima",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"publicVisible": true,
"subtotal": 1,
"total": 1,
"totals": {
"USD": {
"subtotal": 1,
"discountAmount": 1,
"total": 1
}
},
"updatedAt": "2026-11-21T14:00:00.000Z",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}POST/v1/packages/{id}/images
Envia uma foto para um pacote.
Atualizar/{id}/imagesEm caso de sucesso: 201.Permissão: Atualizar.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Corpo: um formulário multipart, com o arquivo em `file`
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
file | string (binary) | Sim |
Resposta
3 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
images | array of object | Sim |
images[].id | string (uuid) | Sim |
images[].url | string (uri) | Sim |
Exemplo
curl -X POST "https://api.firmado.app/v1/packages/{id}/images" \
-H "X-Api-Key: fmd_..." \
-F "file=@./file.pdf"import { openAsBlob } from "node:fs"
const form = new FormData()
form.append("file", await openAsBlob("./file.pdf"), "file.pdf")
const res = await fetch("https://api.firmado.app/v1/packages/{id}/images", {
method: "POST",
headers: { "X-Api-Key": "fmd_..." },
body: form,
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/packages/{id}/images",
headers={"X-Api-Key": "fmd_..."},
files={"file": open("file.pdf", "rb")},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/packages/{id}/images");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
CURLOPT_POSTFIELDS => ["file" => new CURLFile("file.pdf")],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/packages/{id}/images")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req.set_form([["file", File.open("file.pdf")]], "multipart/form-data")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)var buf bytes.Buffer
form := multipart.NewWriter(&buf)
part, _ := form.CreateFormFile("file", "file.pdf")
f, _ := os.Open("file.pdf")
io.Copy(part, f)
form.Close()
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/packages/{id}/images", &buf)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", form.FormDataContentType())
res, err := http.DefaultClient.Do(req)// Multipart is simplest with OkHttp (com.squareup.okhttp3:okhttp)
var body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("file", "file.pdf", RequestBody.create(new File("file.pdf"), null))
.build();
var request = new Request.Builder()
.url("https://api.firmado.app/v1/packages/{id}/images")
.header("X-Api-Key", "fmd_...")
.method("POST", body)
.build();
var response = new OkHttpClient().newCall(request).execute();using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/packages/{id}/images");
request.Content = new MultipartFormDataContent { { new StreamContent(File.OpenRead("file.pdf")), "file", "file.pdf" } };
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (201), com valores de exemplo:
{
"images": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"url": "https://example.com"
}
]
}DELETE/v1/packages/{id}/images/{imageId}
Remove a foto de um pacote.
Excluir/{id}/images/{imageId}Em caso de sucesso: 200.Permissão: Excluir.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim | |
imageId | string | Sim |
Exemplo
curl -X DELETE "https://api.firmado.app/v1/packages/{id}/images/{imageId}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/packages/{id}/images/{imageId}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.delete(
"https://api.firmado.app/v1/packages/{id}/images/{imageId}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/packages/{id}/images/{imageId}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/packages/{id}/images/{imageId}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/packages/{id}/images/{imageId}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/packages/{id}/images/{imageId}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/packages/{id}/images/{imageId}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Eventos de webhook
Mudanças desta funcionalidade que os webhooks podem enviar.
package.createdCriarpackage.updatedAtualizarpackage.deletedExcluir