# CashReceiptSK (`santa77/cashreceiptsk`)

Actor will send you full detail of cash receipt in JSON format based on QR code content printed on cash receipt. It's for cash receipts issued at Slovakia by E-KASA.

- **URL**: https://beta-securitybyobscurity.apify.com/santa77/cashreceiptsk.md
- **Developed by:** [Santa77](https://beta-securitybyobscurity.apify.com/santa77) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 4 total users, 2 monthly users, 28.6% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.
You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

# README

## CashReceiptSK

Actor will send you full detail of cash receipt based on QR code content. It's for cash receipts issued at Slovakia by E-KASA.

### Input

Input is an single cash receipt named receiptId.

```json
{
  "receiptId": "O-7AF0CFF74D45483FB0CFF74D45283FA1"
}
```

### Output

Output is an full digital copy of cash receipt's details.

```json
[{
  "userId": "6f77a69018c141e10aaf8f3f99a8f6de56f1b5f4bfb08e2cb6a6acaa7244209e",
  "receipt": {
    "receiptId": "O-7AF0CFF74D45483FB0CFF74D45283FA1",
    "ico": "35974133",
    "cashRegisterCode": "88820221179000047",
    "issueDate": "28.06.2022 11:37:35",
    "createDate": "28.06.2022 11:37:35",
    "customerId": null,
    "dic": "2022117900",
    "icDph": "SK2022117900",
    "invoiceNumber": null,
    "okp": "67AB9F5F-5A4BED89-74F875DB-5348D3E4-465B0C1C",
    "paragon": false,
    "paragonNumber": null,
    "pkp": "XSJ7lje1x6wHufB4aCVQ0aBvv/7T50xXG9lW1PfrMnza9Ig/qiV6ZRC1eGbTRoSVJ/YBQ17XdcxjiVkNgla2QzApS8ArSENwpiwVj+tPDoSIgivnYFH9nBjBRQlYoSwNW+XC9EBBGOsPwKQJW0TQh7e2/h4vcxehAlHahsxU7X1JCMquvF/eO8p+MJ6Jpv3yXrWg5N6tvyOQ0+rOIbgbar4wa1eX8Y7gHocxCqTLy88IdWAgxfqlweIpokAdLIMMx0s/enOAaeRQpUCVmbH03iBSsXv8G6jwdtdcdtcpKJJexyxyPxk8FpmbfRnp2jm3c9fsuC6fDKMc2r6yvUwcZg==",
    "receiptNumber": 1474,
    "type": "PD",
    "taxBaseBasic": 6.25,
    "taxBaseReduced": 0,
    "totalPrice": 7.5,
    "freeTaxAmount": 0,
    "vatAmountBasic": 1.25,
    "vatAmountReduced": 0,
    "vatRateBasic": 20,
    "vatRateReduced": 10,
    "items": [
      {
        "name": "Nafukovací matrac FLOCKED RP=0,2 €/KS   ",
        "itemType": "V",
        "quantity": 1,
        "vatRate": 20,
        "price": -10,
        "referenceReceiptId": "O-2DEAA24D30054C0BAAA24D30050C0BA5"
      },
      {
        "name": "Nafukovací matrac LUNEN Š137xD191xV22   ",
        "itemType": "K",
        "quantity": 1,
        "vatRate": 20,
        "price": 20
      },
      {
        "name": "Zľava               ",
        "itemType": "Z",
        "quantity": 1,
        "vatRate": 20,
        "price": -2.5
      }
    ],
    "organization": {
      "buildingNumber": null,
      "country": "Slovensko",
      "dic": "2022117900",
      "icDph": "SK2022117900",
      "ico": "35974133",
      "municipality": "Bratislava - mestská časť Staré Mesto",
      "name": "JYSK s.r.o.",
      "postalCode": "81108",
      "propertyRegistrationNumber": "14",
      "streetName": "Šoltésovej",
      "vatPayer": true
    },
    "unit": {
      "cashRegisterCode": "88820221179000047",
      "buildingNumber": "4869",
      "country": "Slovensko",
      "municipality": "Rimavská Sobota",
      "postalCode": "97901",
      "propertyRegistrationNumber": "7",
      "streetName": "Petra Hostinského",
      "name": null,
      "unitType": "STANDARD"
    },
    "exemption": false
  },
  "status": "OK"
}]
```

# Actor input Schema

## `receiptId` (type: `string`):

ID readed from QR code on cash receipt.

## Actor input object example

```json
{
  "receiptId": "O-7AF0CFF74D45483FB0CFF74D45283FA1"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "receiptId": "O-7AF0CFF74D45483FB0CFF74D45283FA1"
};

// Run the Actor and wait for it to finish
const run = await client.actor("santa77/cashreceiptsk").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "receiptId": "O-7AF0CFF74D45483FB0CFF74D45283FA1" }

# Run the Actor and wait for it to finish
run = client.actor("santa77/cashreceiptsk").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "receiptId": "O-7AF0CFF74D45483FB0CFF74D45283FA1"
}' |
apify call santa77/cashreceiptsk --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=santa77/cashreceiptsk",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CashReceiptSK",
        "description": "Actor will send you full detail of cash receipt in JSON format based on QR code content printed on cash receipt. It's for cash receipts issued at Slovakia by E-KASA.",
        "version": "0.0",
        "x-build-id": "MBOD5KyoZUD0KHIFB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/santa77~cashreceiptsk/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-santa77-cashreceiptsk",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/santa77~cashreceiptsk/runs": {
            "post": {
                "operationId": "runs-sync-santa77-cashreceiptsk",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/santa77~cashreceiptsk/run-sync": {
            "post": {
                "operationId": "run-sync-santa77-cashreceiptsk",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "receiptId"
                ],
                "properties": {
                    "receiptId": {
                        "title": "ID of cash receipt",
                        "type": "string",
                        "description": "ID readed from QR code on cash receipt."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
