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 Forms API
version: 1.0.0
description: 'Operations tagged Forms 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: Forms
paths:
/api/forms/generate:
post:
summary: 'Compute and save a Modelo 303 or 130 for a quarter (preview: true to only…'
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/GenerateInput'
tags:
- Forms
operationId: postApiFormsGenerate
x-operation-id-source: derived
servers:
- url: https://declararfacil.com
/api/forms/export:
post:
summary: Download the AEAT upload file or the PDF of a generated form (binary attachment)
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/ExportInput'
tags:
- Forms
operationId: postApiFormsExport
x-operation-id-source: derived
servers:
- url: https://declararfacil.com
/api/forms/390:
get:
summary: Modelo 390 (annual IVA) 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'
parameters:
- name: year
in: query
schema:
type: integer
tags:
- Forms
operationId: getApiForms390
x-operation-id-source: derived
post:
summary: Generate the Modelo 390
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:
type: object
properties:
year:
type: integer
allowIncomplete:
type: boolean
tags:
- Forms
operationId: postApiForms390
x-operation-id-source: derived
servers:
- url: https://declararfacil.com
/api/forms/303:
get:
summary: Stored Modelo 303 boxes of a quarter
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'
parameters:
- name: year
in: query
schema:
type: integer
- name: quarter
in: query
schema:
type: integer
minimum: 1
maximum: 4
tags:
- Forms
operationId: getApiForms303
x-operation-id-source: derived
servers:
- url: https://declararfacil.com
/api/forms/130:
get:
summary: Stored Modelo 130 boxes of a quarter
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'
parameters:
- name: year
in: query
schema:
type: integer
- name: quarter
in: query
schema:
type: integer
minimum: 1
maximum: 4
tags:
- Forms
operationId: getApiForms130
x-operation-id-source: derived
servers:
- url: https://declararfacil.com
components:
schemas:
ExportInput:
type: object
required:
- modelo
- format
properties:
modelo:
type: string
enum:
- '303'
- '130'
format:
type: string
enum:
- aeat
- pdf
year:
type: integer
quarter:
type: integer
GenerateInput:
type: object
required:
- modelo
properties:
modelo:
type: string
enum:
- '303'
- '130'
year:
type: integer
quarter:
type: integer
minimum: 1
maximum: 4
preview:
type: boolean
description: true = compute and show boxes without saving
compensationBox78:
type: number
description: 'Modelo 303: amount to compensate from previous periods (box 78)'
tipoDeclaracion:
type: string
enum:
- C
- D
description: 'Modelo 303 Q4 negative result: C compensar, D devolución'
iban:
type: string
description: Required with tipoDeclaracion D
manualCumulativeData:
type: object
description: Modelo 130 edge cases only
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