$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "documents": [
< {
< "url": "https://example.com/invoice.pdf",
< "filename": "invoice.pdf"
< }
< ],
< "fields": [
< {
< "name": "invoice_number",
< "description": "The unique invoice identifier",
< "type": "string"
< },
< {
< "name": "invoice_date",
< "description": "The invoice issue date",
< "type": "date"
< },
< {
< "name": "supplier_name",
< "description": "The legal name of the supplier",
< "type": "string"
< },
< {
< "name": "total_amount",
< "description": "The final amount including taxes",
< "type": "number"
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/actors/obaskly~ai-data-extraction-api/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'