Duplicate Document
curl --request POST \
--url https://api.factioapp.com/documents/{document_id}/duplicate \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"issue_date": "2023-12-25"
}
'import requests
url = "https://api.factioapp.com/documents/{document_id}/duplicate"
payload = {
"idempotency_key": "<string>",
"issue_date": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({idempotency_key: '<string>', issue_date: '2023-12-25'})
};
fetch('https://api.factioapp.com/documents/{document_id}/duplicate', 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.factioapp.com/documents/{document_id}/duplicate",
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([
'idempotency_key' => '<string>',
'issue_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"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.factioapp.com/documents/{document_id}/duplicate"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"issue_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.factioapp.com/documents/{document_id}/duplicate")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"issue_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.factioapp.com/documents/{document_id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"issue_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issuer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"establishment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emission_point_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_type": "01",
"sequential": 123,
"access_key": "<string>",
"status": "DRAFT",
"idempotency_key": "<string>",
"issue_date": "2023-12-25",
"subtotal": "<string>",
"total_discount": "<string>",
"total_tax": "<string>",
"total": "<string>",
"buyer_id_type": "<string>",
"buyer_id": "<string>",
"buyer_name": "<string>",
"buyer_email": "<string>",
"buyer_address": "<string>",
"modified_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified_document_type": "<string>",
"modified_document_number": "<string>",
"modified_document_issue_date": "2023-12-25",
"reason": "<string>",
"authorization_number": "<string>",
"authorization_date": "2023-11-07T05:31:56Z",
"sri_environment": "TEST",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payments": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}documents
Duplicate Document
Create an editable DRAFT by duplicating a viable invoice.
POST
/
documents
/
{document_id}
/
duplicate
Duplicate Document
curl --request POST \
--url https://api.factioapp.com/documents/{document_id}/duplicate \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"issue_date": "2023-12-25"
}
'import requests
url = "https://api.factioapp.com/documents/{document_id}/duplicate"
payload = {
"idempotency_key": "<string>",
"issue_date": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({idempotency_key: '<string>', issue_date: '2023-12-25'})
};
fetch('https://api.factioapp.com/documents/{document_id}/duplicate', 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.factioapp.com/documents/{document_id}/duplicate",
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([
'idempotency_key' => '<string>',
'issue_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"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.factioapp.com/documents/{document_id}/duplicate"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"issue_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.factioapp.com/documents/{document_id}/duplicate")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"issue_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.factioapp.com/documents/{document_id}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"issue_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issuer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"establishment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emission_point_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_type": "01",
"sequential": 123,
"access_key": "<string>",
"status": "DRAFT",
"idempotency_key": "<string>",
"issue_date": "2023-12-25",
"subtotal": "<string>",
"total_discount": "<string>",
"total_tax": "<string>",
"total": "<string>",
"buyer_id_type": "<string>",
"buyer_id": "<string>",
"buyer_name": "<string>",
"buyer_email": "<string>",
"buyer_address": "<string>",
"modified_document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified_document_type": "<string>",
"modified_document_number": "<string>",
"modified_document_issue_date": "2023-12-25",
"reason": "<string>",
"authorization_number": "<string>",
"authorization_date": "2023-11-07T05:31:56Z",
"sri_environment": "TEST",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payments": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Cookies
Body
application/json
Response
Successful Response
Schema for Document response — current state and authorization info.
Types of fiscal documents supported by the SRI.
Available options:
01, 04, 05, 06, 07 Status values for document lifecycle.
Available options:
DRAFT, VALIDATED, NUMBER_RESERVED, XML_GENERATED, SIGNED, RECEPTION_PENDING, SUBMITTED_TO_SRI, RECEIVED_BY_SRI, AUTHORIZATION_PENDING, AUTHORIZED, REJECTED, RECEPTION_RETRY_SCHEDULED, AUTHORIZATION_RETRY_SCHEDULED, RECEPTION_UNKNOWN, AUTHORIZATION_UNKNOWN, MANUAL_REVIEW_REQUIRED, FAILED_PERMANENT, CANCELLATION_REQUESTED, CANCELLED, VOIDED_BY_NC Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$SRI environment types.
Available options:
TEST, PRODUCTION Show child attributes
Show child attributes