Get receipt by operation
curl --request GET \
--url https://api.openfiskal.com/v1/operations/{operationId}/receipt \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/operations/{operationId}/receipt"
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.openfiskal.com/v1/operations/{operationId}/receipt', 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.openfiskal.com/v1/operations/{operationId}/receipt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-OpenFiskal-Merchant: <x-openfiskal-merchant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/operations/{operationId}/receipt"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openfiskal.com/v1/operations/{operationId}/receipt")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/operations/{operationId}/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"operation_id": "<string>",
"merchant_id": "<string>",
"location_id": "<string>",
"register_id": "<string>",
"status": "available",
"currency": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"issuer": {
"legal_name": "<string>",
"location_name": "<string>",
"register_name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country_code": "DEU"
},
"tax_id": "<string>"
},
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"total_amount": 123,
"id": "<string>",
"tax_rate": "<string>",
"tax_amount": 123
}
],
"totals": {
"total_gross": 123,
"total_net": 123,
"total_tax": 123
},
"payments": [
{
"method": "<string>",
"amount": 123,
"details": {}
}
],
"links": {
"self": "<string>",
"pdf": "<string>",
"hosted": "<string>"
},
"external_reference": "<string>",
"fiscal": {},
"metadata": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}Receipts
Get receipt by operation
Read the hosted receipt generated for a completed operation.
GET
/
operations
/
{operationId}
/
receipt
Get receipt by operation
curl --request GET \
--url https://api.openfiskal.com/v1/operations/{operationId}/receipt \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/operations/{operationId}/receipt"
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.openfiskal.com/v1/operations/{operationId}/receipt', 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.openfiskal.com/v1/operations/{operationId}/receipt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-OpenFiskal-Merchant: <x-openfiskal-merchant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/operations/{operationId}/receipt"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openfiskal.com/v1/operations/{operationId}/receipt")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/operations/{operationId}/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"operation_id": "<string>",
"merchant_id": "<string>",
"location_id": "<string>",
"register_id": "<string>",
"status": "available",
"currency": "<string>",
"issued_at": "2023-11-07T05:31:56Z",
"issuer": {
"legal_name": "<string>",
"location_name": "<string>",
"register_name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"country_code": "DEU"
},
"tax_id": "<string>"
},
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"total_amount": 123,
"id": "<string>",
"tax_rate": "<string>",
"tax_amount": 123
}
],
"totals": {
"total_gross": 123,
"total_net": 123,
"total_tax": 123
},
"payments": [
{
"method": "<string>",
"amount": 123,
"details": {}
}
],
"links": {
"self": "<string>",
"pdf": "<string>",
"hosted": "<string>"
},
"external_reference": "<string>",
"fiscal": {},
"metadata": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Response
Receipt returned
Available options:
available, archived Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?