curl --request GET \
--url https://api.openfiskal.com/v1/operations/{operationId} \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/operations/{operationId}"
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}', 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}",
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}"
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}")
.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}")
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>",
"merchant_id": "<string>",
"source": "POS",
"status": "open",
"currency": "EUR",
"resource_version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pretax_amount": "<string>",
"tax_amount": "<string>",
"tip_amount": "<string>",
"total_amount": "<string>",
"line_items": [
{
"id": "<string>",
"type": "item",
"title": "<string>",
"quantity": 123,
"unit_price": "<string>",
"total_amount": "<string>",
"sku_identifier": "TSHIRT-BLUE-M",
"taxes": [
{
"id": "<string>",
"name": "<string>",
"rate": "<string>",
"tax_amount": "<string>"
}
],
"gift_card_id": "<string>"
}
],
"payments": [
{
"id": "<string>",
"payment_id": "<string>",
"method": "<string>",
"amount": "<string>",
"currency": "<string>",
"status": "captured",
"processor": "<string>",
"card_brand": "<string>",
"processor_reference": "<string>",
"processed_at": "2023-11-07T05:31:56Z",
"gift_card_id": "<string>"
}
],
"type": "sale",
"cart_level_discounts": [
{
"id": "<string>",
"amount": "<string>",
"description": "<string>"
}
],
"location_id": "<string>",
"register_id": "<string>",
"session_id": "<string>",
"external_id": "<string>",
"fiscal_information": {
"regime": "KassenSichV",
"document_number": "<string>",
"document_type": "<string>",
"tss_serial_number": "<string>",
"pos_client_serial_number": "<string>",
"signature_algorithm": "<string>",
"time_format": "<string>",
"start_event": {
"signed_at": "2023-11-07T05:31:56Z"
},
"end_event": {
"signed_at": "2023-11-07T05:31:56Z",
"transaction_counter": 123,
"signature": "<string>",
"public_key": "<string>",
"process_type": "<string>",
"process_data": "<string>"
},
"verification": {
"qr_data": "<string>"
}
},
"completed_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"note": "<string>"
}{
"code": "unauthorized",
"message": "Authentication failed.",
"retryable": false
}{
"code": "forbidden",
"message": "The authenticated caller cannot access this resource.",
"retryable": false
}{
"code": "not_found",
"message": "The requested resource does not exist.",
"retryable": false
}Get operation
Returns a single operation. The response is a discriminated union on type: goods movement (sale / return / exchange) or session lifecycle (session_open / session_cash_adjustment / session_close).
curl --request GET \
--url https://api.openfiskal.com/v1/operations/{operationId} \
--header 'Authorization: Bearer <token>' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>'import requests
url = "https://api.openfiskal.com/v1/operations/{operationId}"
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}', 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}",
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}"
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}")
.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}")
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>",
"merchant_id": "<string>",
"source": "POS",
"status": "open",
"currency": "EUR",
"resource_version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"pretax_amount": "<string>",
"tax_amount": "<string>",
"tip_amount": "<string>",
"total_amount": "<string>",
"line_items": [
{
"id": "<string>",
"type": "item",
"title": "<string>",
"quantity": 123,
"unit_price": "<string>",
"total_amount": "<string>",
"sku_identifier": "TSHIRT-BLUE-M",
"taxes": [
{
"id": "<string>",
"name": "<string>",
"rate": "<string>",
"tax_amount": "<string>"
}
],
"gift_card_id": "<string>"
}
],
"payments": [
{
"id": "<string>",
"payment_id": "<string>",
"method": "<string>",
"amount": "<string>",
"currency": "<string>",
"status": "captured",
"processor": "<string>",
"card_brand": "<string>",
"processor_reference": "<string>",
"processed_at": "2023-11-07T05:31:56Z",
"gift_card_id": "<string>"
}
],
"type": "sale",
"cart_level_discounts": [
{
"id": "<string>",
"amount": "<string>",
"description": "<string>"
}
],
"location_id": "<string>",
"register_id": "<string>",
"session_id": "<string>",
"external_id": "<string>",
"fiscal_information": {
"regime": "KassenSichV",
"document_number": "<string>",
"document_type": "<string>",
"tss_serial_number": "<string>",
"pos_client_serial_number": "<string>",
"signature_algorithm": "<string>",
"time_format": "<string>",
"start_event": {
"signed_at": "2023-11-07T05:31:56Z"
},
"end_event": {
"signed_at": "2023-11-07T05:31:56Z",
"transaction_counter": 123,
"signature": "<string>",
"public_key": "<string>",
"process_type": "<string>",
"process_data": "<string>"
},
"verification": {
"qr_data": "<string>"
}
},
"completed_at": "2023-11-07T05:31:56Z",
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"note": "<string>"
}{
"code": "unauthorized",
"message": "Authentication failed.",
"retryable": false
}{
"code": "forbidden",
"message": "The authenticated caller cannot access this resource.",
"retryable": false
}{
"code": "not_found",
"message": "The requested resource does not exist.",
"retryable": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Merchant identifier returned by the merchants resource.
Path Parameters
Response
Operation returned
- SaleOperation
- ReturnOperation
- ExchangeOperation
- SessionOpenOperation
- SessionCashAdjustmentOperation
- SessionCashCountOperation
- SessionCloseOperation
POS, ONLINE open, completed, voided ISO 4217 currency code.
"EUR"
Current server-issued version for the operation, starting at 1. Returned as ETag header.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
sale "sale"
Cart-level (order-level) discounts applied across the SALE. Empty array when none. Surfaced separately from line items so consumers do not need to back-derive from totals.
Show child attributes
Show child attributes
Only set for source: POS.
Only set for source: POS.
The RegisterSession this Operation is bound to. Set on every POS Operation; null for ONLINE goods-movement (no register, hence no session). On session-event variants this is the session being opened, adjusted, or closed; on goods-movement variants it is the session the operation was rung up during.
Merchant or POS identifier for the upstream order.
The Fiskaly signature attached to this Operation, when one exists. Null until the operation has been signed.
- FiscalInformationKassenSichV
- FiscalInformationRKSV
- FiscalInformationRT
Show child attributes
Show child attributes
Merchant free-text note for the goods-movement event.
Was this page helpful?