Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Declararfacil Com Historical API
version: 1.0.0
description: 'Operations tagged Historical across 2 of this provider''s published API definitions: declararfacil-com-agent-openapi.json, declararfacil-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://declararfacil.com
tags:
- name: Historical
paths:
/api/historical:
get:
summary: Previously filed Modelo 303 / 130 / 349 data
security:
- linkToken: []
responses:
'200':
description: OK
'401':
description: 'invalid_token: unknown or replaced token; start a new connection with POST /api/agent/v1/connect'
'402':
description: 'subscription_required: no active subscription; the body carries subscribe_url, steps, next_step and tell_the_user'
tags:
- Historical
operationId: getApiHistorical
x-operation-id-source: derived
post:
summary: Store a previously filed Modelo 303 / 130 / 349
security:
- linkToken: []
responses:
'200':
description: OK
'401':
description: 'invalid_token: unknown or replaced token; start a new connection with POST /api/agent/v1/connect'
'402':
description: 'subscription_required: no active subscription; the body carries subscribe_url, steps, next_step and tell_the_user'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/HistoricalModeloInput'
tags:
- Historical
operationId: postApiHistorical
x-operation-id-source: derived
servers:
- url: https://declararfacil.com
components:
schemas:
HistoricalModeloInput:
type: object
required:
- modelo
- year
properties:
modelo:
type: string
enum:
- '303'
- '130'
- '349'
year:
type: integer
quarter:
type: integer
minimum: 1
maximum: 4
sourceType:
type: string
enum:
- UPLOADED_FORM
- MANUAL_ENTRY
default: UPLOADED_FORM
description: UPLOADED_FORM when read from a filed form, MANUAL_ENTRY when typed from the user's notes
casillas:
type: object
description: Every box printed on the form, keyed by its printed two- or three-digit number ('01', '71', '110', '120'). Monetary amounts in EUR; rate boxes in percent. Omitted keys preserve existing values, null clears, zero is stored. 130 boxes are cumulative. Aggregate aliases must agree with the same submitted box
additionalProperties:
type:
- number
- 'null'
nif:
type:
- string
- 'null'
apellidosNombre:
type:
- string
- 'null'
numeroJustificante:
type:
- string
- 'null'
description: AEAT receipt number exactly as printed; does not itself mark a filing as verified
sourceDocumentUrl:
type:
- string
- 'null'
filed:
type: boolean
description: Explicit assertion that this source was filed with AEAT. Separate from internal verified status. Omitted means unknown.
datosExtraidos:
type:
- object
- 'null'
additionalProperties: true
description: Original extraction retained for provenance; does not populate boxes automatically. Replay casillas explicitly to repair an earlier import.
period:
type: string
description: '349 only: 1T..4T or 01..12. May use quarter for quarterly forms.'
operacionesIntracomunitarias:
type: array
items:
type: object
required:
- pais
- vatIdEU
- nombreOperador
- clave
- baseImponible
properties:
pais:
type: string
vatIdEU:
type: string
nombreOperador:
type: string
clave:
type: string
baseImponible:
type: number
rectificaciones:
type: array
items:
type: object
additionalProperties: true
totalOperaciones:
type:
- integer
- 'null'
importeTotalOperaciones:
type:
- number
- 'null'
rectificaciones:
type: array
items:
type: object
additionalProperties: true
ivaDevengado:
type:
- number
- 'null'
description: 'Modelo 303: total IVA devengado (box 27)'
ivaDeducible:
type:
- number
- 'null'
description: 'Modelo 303: total IVA deducible (box 45)'
ivaResultado:
type:
- number
- 'null'
description: 'Modelo 303: result (box 71)'
source_file:
type:
- string
- 'null'
securitySchemes:
linkToken:
type: http
scheme: bearer
description: The df_ token handed out by the connect poll, or the last segment of the user's personal link (/agente/<token>).
x-refined-from:
- declararfacil-com-agent-openapi.json
- declararfacil-com-openapi.json