Skip to main content
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 Portugal Guide.

Authorizations

Authorization
string
header
required

Use the Bearer scheme with a valid JWT token to authenticate requests.

Example: Authorization: Bearer <token>

Path Parameters

silo_entry_id
string
required

Silo entry ID of the supplier to register the series for.

Example:

"347c5b04-cde2-11ed-afa1-0242ac120002"

Body

application/json
base
string
required

Base code for the series (without the document type prefix).

Example:

"SERIES-A"

document_type
enum<string>
required

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
enum<string>
required

Type of the series:

  • N: Normal
  • F: Training (Formação)
  • R: Recovery (Recuperação)
Available options:
N,
F,
R
Example:

"N"

Response

Series registered successfully.

id
string

Series ID.

Example:

"1d8ab49a-bd14-11ef-925f-325096b39f47"

code
string

Full series code (document type + base code).

Example:

"FT SERIES-A"

base
string

Base code for the series.

Example:

"SERIES-A"

document_type
string

Document type for the series.

Example:

"FT"

type
string

Type of the series.

Example:

"N"

validation_code
string

AT validation code for the series used to generate ATCUD codes.

Example:

"AAJFJ3N5YS"