Get receipt
curl --request GET \
--url https://api.openfiskal.com/v1/receipts/{receiptId} \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/receipts/{receiptId}"
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/receipts/{receiptId}', 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/receipts/{receiptId}",
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/receipts/{receiptId}"
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/receipts/{receiptId}")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/receipts/{receiptId}")
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": {}
}Receipts
Get receipt
Read a hosted receipt by receipt ID.
GET
/
receipts
/
{receiptId}
Get receipt
curl --request GET \
--url https://api.openfiskal.com/v1/receipts/{receiptId} \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/receipts/{receiptId}"
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/receipts/{receiptId}', 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/receipts/{receiptId}",
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/receipts/{receiptId}"
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/receipts/{receiptId}")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/receipts/{receiptId}")
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": {}
}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?