Create
Creates a session associated with the nif/nie and initiates the authentication process against the AEAT/DGT
Note: The session will be valid for 5 minutes.
Authorizations:
query Parameters
externalId required | string (ExternalIdParams) ExternalId identifier |
Request Body schema: application/json
challengeMethod | string (CHALLENGE_METHOD) Enum: "CLAVE_MOVIL" "APP" "SMS" |
validationDate required | string <dd-MM-yyyy> with NIF (Número Identificación Fiscal): Date of validity of the identification document with NIE (Número Identificación Extranjero): Date of birth of the holder |
supportNumber | string^[0-9]{7}[A-Za-z]{1}$ NIE support number (obligatory if NIE is provided) |
nie | string^[XYZ]{1}[0-9]{7}[A-Za-z]{1}$ NIE (Número Identificación Extranjero): NIE of the holder |
nif | string^[0-9]{8}[A-Za-z]{1}$ NIF (Número Identificación Fiscal): NIF of the holder |
agency | string (AGENCY) Enum: "AEAT" "DGT" |
Responses
Request samples
- Payload
{- "challengeMethod": "CLAVE_MOVIL",
- "validationDate": "string",
- "supportNumber": "string",
- "nie": "string",
- "nif": "string",
- "agency": "AEAT"
}
Response samples
- 200
- 4XX
- 5XX
{- "data": {
- "item": {
- "credentialInfo": [
- {
- "qrImageBase64": "string",
- "code": "string",
- "challengeMethod": "CLAVE_MOVIL",
- "agency": "AEAT"
}
], - "status": "CREATED",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "type": "string"
}
}
Sandbox Configuration
When the apikey is configured for Sandbox mode then this request returns a list of the datasets availables for the sandbox.
Authorizations:
query Parameters
externalId required | string (ExternalIdParams) ExternalId identifier |
Responses
Response samples
- 200
- 4XX
{- "data": {
- "item": {
- "credentialNumbers": [
- {
- "type": "UNKNOWN",
- "id": "string",
- "validationDate": "2019-08-24T14:15:22Z",
- "supportNumber": "string"
}
]
}, - "type": "string"
}
}
Update
Request to update the pin of a credential in order to complete the authentication process against the AEAT
Authorizations:
path Parameters
sessionId required | string <uuid> (SessionIdentifierParams) Session identifier |
query Parameters
externalId required | string (ExternalIdParams) ExternalId identifier |
Request Body schema: application/json
pin required | string = 3 characters ^[a-zA-Z0-9]+$ Pin received from the application or by sms |
agency | string (AGENCY) Enum: "AEAT" "DGT" |
Responses
Request samples
- Payload
{- "pin": "str",
- "agency": "AEAT"
}
Response samples
- 200
- 4XX
- 5XX
{- "data": {
- "item": {
- "credentialInfo": [
- {
- "qrImageBase64": "string",
- "code": "string",
- "challengeMethod": "CLAVE_MOVIL",
- "agency": "AEAT"
}
], - "status": "CREATED",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "type": "string"
}
}
Validate
Request to validate a credential in order to complete the authentication process against the AEAT
Authorizations:
path Parameters
sessionId required | string <uuid> (SessionIdentifierParams) Session identifier |
query Parameters
agency required | string (AgencyParams) Enum: "AEAT" "DGT" |
externalId required | string (ExternalIdParams) ExternalId identifier |
Responses
Response samples
- 200
- 4XX
- 5XX
{- "data": {
- "item": {
- "credentialInfo": [
- {
- "qrImageBase64": "string",
- "code": "string",
- "challengeMethod": "CLAVE_MOVIL",
- "agency": "AEAT"
}
], - "status": "CREATED",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "type": "string"
}
}
GetDocument
Authorizations:
path Parameters
sessionId required | string <uuid> (SessionIdentifierParams) Session identifier |
query Parameters
externalId required | string (ExternalIdParams) ExternalId identifier |
documentType required | string (DocumentTypeParams) Enum: "debtCertificate" "txt" "xml" |
taxYear | string (TaxYearQueryParam) Enum: "2020" "2021" "2022" "2023" |
Responses
Response samples
- 200
- 4XX
- 5XX
{- "data": {
- "item": "string",
- "type": "string"
}
}
Retrieve
This request returns the tax information of the indicated session by extracting the information from the XML submitted to the AEAT for the selected year.
Note: the information obtained from the XML is only that required by the client configured for the apiKey provided.
Note: client can have the API mode configured to return the response in JSON, or in REDIRECT mode, which returns a redirection that must be on a whitelist provided by the client and must be passed through the "redirectUrl" querystring."
Authorizations:
path Parameters
sessionId required | string <uuid> (SessionIdentifierParams) Session identifier |
query Parameters
taxYear required | string (TaxYearQueryParam) Enum: "2020" "2021" "2022" "2023" |
externalId required | string (ExternalIdParams) ExternalId identifier |
redirectUrl | string (RedirectUrlParams) Redirect URL |
Responses
Response samples
- 200
- 409
- 4XX
- 5XX
{- "data": {
- "item": {
- "taxYear": "2020",
- "country": "string",
- "additionalAddress": "string",
- "postalCode": "string",
- "province": "string",
- "provinceCode": "string",
- "town": "string",
- "townCode": "string",
- "streetNumber": "string",
- "streetNumberType": "string",
- "streetType": "string",
- "streetName": "string",
- "streetCode": "string",
- "companies": [
- {
- "name": "string",
- "cif": "string"
}
], - "freelanceActivities": [
- {
- "cnae": [
- {
- "description": "string",
- "id": "string"
}
], - "group": "string",
- "description": "string",
- "activity": "string",
- "iae": "string"
}
], - "freelanceIncomes": 0,
- "rentalIncomes": 0,
- "grossSalary": 0,
- "totalIncomes": 0,
- "isFreelance": true,
- "isRenter": true,
- "isUnemployed": true,
- "isRetired": true,
- "phone": "string",
- "email": "string",
- "birthYear": "string",
- "birthMonth": "string",
- "birthDay": "string",
- "birthDate": "2019-08-24",
- "civilStatus": "Single",
- "gender": "Male",
- "secondSurname": "string",
- "surname": "string",
- "name": "string",
- "fullName": "string",
- "nie": "string",
- "nif": "string",
- "iae": [
- "string"
], - "externalId": "string",
- "clientId": "string",
- "credentialId": "f568fec0-10b6-4b94-9daf-e62c50c9bf3e",
- "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459"
}, - "type": "string"
}
}
Reference
This request returns the reference of the user for the AEAT service
Authorizations:
path Parameters
sessionId required | string <uuid> (SessionIdentifierParams) Session identifier |
query Parameters
externalId required | string (ExternalIdParams) ExternalId identifier |
Responses
Response samples
- 200
- 409
- 4XX
- 5XX
{- "data": {
- "item": {
- "code": "string",
- "externalId": "string",
- "clientId": "string",
- "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459"
}, - "type": "string"
}
}
Retrieve
This request returns the vehicles information of the indicated session by extracting the information from DGT.
Note: the information obtained from DGT is only that required by the client configured for the apiKey provided.
Note: client can have the API mode configured to return the response in JSON, or in REDIRECT mode, which returns a redirection that must be on a whitelist provided by the client and must be passed through the "redirectUrl" querystring."
Authorizations:
path Parameters
sessionId required | string <uuid> (SessionIdentifierParams) Session identifier |
query Parameters
externalId required | string (ExternalIdParams) ExternalId identifier |
redirectUrl | string (RedirectUrlParams) Redirect URL |
Responses
Response samples
- 200
- 409
- 4XX
- 5XX
{- "data": {
- "item": {
- "vehicles": [
- {
- "insuranceCompany": "string",
- "startDateInsurance": "string",
- "model": "string",
- "brand": "string",
- "registrationNumber": "string"
}
], - "externalId": "string",
- "clientId": "string",
- "credentialId": "f568fec0-10b6-4b94-9daf-e62c50c9bf3e",
- "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459"
}, - "type": "string"
}
}