cURL
curl --request POST \
--url https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base": "SERIES-A",
"document_type": "FT",
"type": "N"
}
'import requests
url = "https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series"
payload = {
"base": "SERIES-A",
"document_type": "FT",
"type": "N"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base: 'SERIES-A', document_type: 'FT', type: 'N'})
};
fetch('https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series', 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.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series",
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([
'base' => 'SERIES-A',
'document_type' => 'FT',
'type' => 'N'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series"
payload := strings.NewReader("{\n \"base\": \"SERIES-A\",\n \"document_type\": \"FT\",\n \"type\": \"N\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base\": \"SERIES-A\",\n \"document_type\": \"FT\",\n \"type\": \"N\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base\": \"SERIES-A\",\n \"document_type\": \"FT\",\n \"type\": \"N\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1d8ab49a-bd14-11ef-925f-325096b39f47",
"code": "FT SERIES-A",
"base": "SERIES-A",
"document_type": "FT",
"type": "N",
"validation_code": "AAJFJ3N5YS"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}AT Portugal
Register series
Register a new series with the AT for the supplier.
POST
/
apps
/
at-pt
/
v1
/
entry
/
{silo_entry_id}
/
series
cURL
curl --request POST \
--url https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base": "SERIES-A",
"document_type": "FT",
"type": "N"
}
'import requests
url = "https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series"
payload = {
"base": "SERIES-A",
"document_type": "FT",
"type": "N"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base: 'SERIES-A', document_type: 'FT', type: 'N'})
};
fetch('https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series', 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.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series",
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([
'base' => 'SERIES-A',
'document_type' => 'FT',
'type' => 'N'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series"
payload := strings.NewReader("{\n \"base\": \"SERIES-A\",\n \"document_type\": \"FT\",\n \"type\": \"N\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base\": \"SERIES-A\",\n \"document_type\": \"FT\",\n \"type\": \"N\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/apps/at-pt/v1/entry/{silo_entry_id}/series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base\": \"SERIES-A\",\n \"document_type\": \"FT\",\n \"type\": \"N\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1d8ab49a-bd14-11ef-925f-325096b39f47",
"code": "FT SERIES-A",
"base": "SERIES-A",
"document_type": "FT",
"type": "N",
"validation_code": "AAJFJ3N5YS"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}This endpoint registers a new series for the supplier. The series will be validated and registered with the Portuguese Tax Authority, and a validation code (used to generate ATCUD codes) will be returned.
For a detailed explanation of the
type field (N, F, R) and other Portugal-specific series requirements, see the Series management section of the AT supplier registration guide.Authorizations
Use the Bearer scheme with a valid JWT token to authenticate requests.
Example: Authorization: Bearer <token>
Path Parameters
Silo entry ID of the supplier to register the series for.
Example:
"347c5b04-cde2-11ed-afa1-0242ac120002"
Body
application/json
Base code for the series (without the document type prefix).
Example:
"SERIES-A"
Document type for the series:
FT: Invoice (Fatura)FS: Simplified Invoice (Fatura Simplificada)FR: Invoice-Receipt (Fatura-Recibo)ND: Debit Note (Nota de Débito)NC: Credit Note (Nota de Crédito)RG: Receipt (Recibo)GR: Delivery Note (Guia de Remessa)GT: Waybill (Guia de Transporte)
Available options:
FT, FS, FR, ND, NC, RG, GR, GT Example:
"FT"
Type of the series:
N: NormalF: Training (Formação)R: Recovery (Recuperação)
Available options:
N, F, R Example:
"N"
Response
Series registered successfully.
Series ID.
Example:
"1d8ab49a-bd14-11ef-925f-325096b39f47"
Full series code (document type + base code).
Example:
"FT SERIES-A"
Base code for the series.
Example:
"SERIES-A"
Document type for the series.
Example:
"FT"
Type of the series.
Example:
"N"
AT validation code for the series used to generate ATCUD codes.
Example:
"AAJFJ3N5YS"
Was this page helpful?