Brivio API reference
Saft

Start a SAF-T D406 import (≤ 50 MB): returns a signed PUT URL to object storage; then call parse. 503 when object storage is not configured. (scope: saft_import:write)

POST
/saft/imports

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key as Bearer token

Header Parameters

Idempotency-Key*string

Required. Retries with the same key replay the first response instead of starting a second job (24 h).

Lengthlength <= 200

Request Body

application/json
  1. body
filename*string
Lengthlength <= 255
byte_size*integer

Exact size; the signed PUT refuses a larger body.

Range1 <= value <= 52428800
sha256*string
Match^[0-9a-fA-F]{64}$

Response Body

OK

application/json
  1. response
data*
error*null
curl -X POST "https://example.com/saft/imports" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "filename": "string",    "byte_size": 1,    "sha256": "string"  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "awaiting_upload",    "filename": "string",    "byte_size": 0,    "sha256": "string",    "has_file": true,    "storage_expires_at": "2019-08-24T14:15:22Z",    "preview": {      "header": {        "taxRegistrationNumber": "string",        "companyName": "string",        "startDate": "string",        "endDate": "string",        "currency": "string"      },      "counts": {        "accounts": 0,        "parties": 0,        "invoices": 0,        "products": 0,        "physical_stock": 0,        "journal_entries": 0,        "payments": 0,        "assets": 0      },      "trial_balance": {        "rows": [          {            "account_code": "string",            "debit": 0,            "credit": 0          }        ],        "total_debit": 0,        "total_credit": 0,        "balanced": true      },      "control_total_mismatches": [        "string"      ],      "warnings": [        "string"      ],      "unknown_accounts": [        "string"      ],      "has_stock_section": true    },    "result": {},    "imported_count": 0,    "updated_count": 0,    "skipped_count": 0,    "error_count": 0,    "errors": [      {        "row": 0,        "field": "string",        "message": "string"      }    ],    "created_at": "2019-08-24T14:15:22Z",    "finished_at": "2019-08-24T14:15:22Z",    "upload": {      "url": "http://example.com",      "method": "PUT",      "headers": {        "property1": "string",        "property2": "string"      },      "expires_at": "2019-08-24T14:15:22Z"    }  },  "error": null}