Skip to content

UANATACA RA API DOCUMENTATION (v1)

Download OpenAPI description
Languages
Servers

https://api.uanataca.com/

Operations
Operations
Operations
Operations

Request

Gets the list of scratchcards

Query
registration_authoritystring

Registration authority number

snstring

Number of scratchcard

curl -i -X GET \
  'https://api.uanataca.com/api/v1/scratchcards?registration_authority=string&sn=string'

Responses

Successful Response

Bodyapplication/json
countstring

The number of existing scratchcards

nextstring

The list next page endpoint

previousstring

The list previous page endpoint

resultsArray of objects
Response
application/json
{ "count": "550", "next": "null", "previous": "null", "results": [ {}, {}, {} ] }

Request

Get details from a scratchcard.

Path
idstringrequired

The scratchcard unique id

curl -i -X GET \
  'https://api.uanataca.com/api/v1/scratchcards/{id}'

Responses

Successful Response

Bodyapplication/json
pknumber

The scratchcard database id

snnumber

The scratchcard serial number

secretsobject

Credentials associated to a scratchcard.

registration_authoritynumber

The registration authority for the scratchcard

Response
application/json
{ "pk": 1045, "sn": 1200948, "secrets": { "erc": "8117606937", "enrollment_code": ",8cj6Ax2", "pin": "85376977", "puk": "86175206" }, "registration_authority": 121 }

Request

Get first unused scratchcard.

Bodyapplication/json
rastring

The registration authority id

curl -i -X GET \
  https://api.uanataca.com/api/v1/scratchcards/get_first_unused \
  -H 'Content-Type: application/json' \
  -d '{
    "ra": "string"
  }'

Responses

Successful Response

Bodyapplication/json
pknumber

The scratchcard database id

snnumber

The scratchcard serial number

secretsobject
registration_authoritynumber

The registration authority id the scratchcard is associated

Response
application/json
{ "pk": 1193, "sn": 1256948, "secrets": { "erc": "6292998123", "enrollment_code": "_,463vt:", "pin": "08695572", "puk": "52351291" }, "registration_authority": 121 }

Request

Get the status of a known scratchcard.

Body*/*required
snstring

The scratchcard id number

curl -i -X POST \
  https://api.uanataca.com/api/v1/scratchcards/isused \
  -H 'Content-Type: */*' \
  -d '[object Object]'

Responses

Successful Response

Bodytext/plain
Response
text/plain
true

Request

Revoke, suspend or activate certificates associated to the request that use the specified scratchcard.

Bodyapplication/json
scratchcardstringrequired

The scratchcard id number

ercstringrequired

The scratchcard revocation code

reasonstringrequired

The reason associated to the scratchcard revocation:

  • UNSPECIFIED - Unspecified reason
  • KEYCOMPROMISE - Compromised keys
  • AFFILIATIONCHANGED - Affiliation changed
  • SUPERSEDED - Superseded
  • CESSATIONOFOPERATION - Ceased
  • PRIVILEGESWITHDRAWN - Privileges withdrawn

The reason to suspend or activate a certificate when this is suspended:

  • CERTIFICATEHOLD - Suspend a certificate
  • NOT_REVOKED - Activate a certificate that was suspended
Enum"UNSPECIFIED""KEYCOMPROMISE""AFFILIATIONCHANGED""SUPERSEDED""CESSATIONOFOPERATION""PRIVILEGESWITHDRAWN""CERTIFICATEHOLD""NOT_REVOKED"
curl -i -X POST \
  https://api.uanataca.com/api/v1/scratchcards/revoke \
  -H 'Content-Type: application/json' \
  -d '{
    "scratchcard": "string",
    "erc": "string",
    "reason": "UNSPECIFIED"
  }'

Responses

Successful Response

Bodyapplication/json
datastring

The certificate associated to the revoked scratchard

profilestring

The certificate profile associated to the scratchcard

subjectstring

The certificate subject information

issuerstring

The certificate issuer information

valid_fromstring

The date when the certificate was enabled from (the format is YYYY-MM-DD)

valid_tostring

The date when the certificate was no longer enabled (the format is YYYY-MM-DD)

serial_numberstring

The serial number associated to the scratchcard

statusstring

The scratchcard status id

pkstring

The request id associated to the scratchcard

revocation_reasonstring

The revocation reason id

typestring

The revocation type

Response
application/json
{ "data": "MIIHyzCCBbOgAwIBAgIIdWWgCtrot88wDQYJKoZIhvcNAQELBQAwgb0xCzAJBgNVBAYTAkVTMUQwQgYDVQQHDDtCYXJjZWxvbmEgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LnVhbmF0YW...", "profile": "PFnubeAF", "subject": "CN=Name Surname1 Surname2, 2.5.4.5=IDCIT-TSTAPI74S23C129Y, 2.5.4.42=Name, 2.5.4.4=Surname1 Surname2, C=ES", "issuer": "2.5.4.97=VATES-A66721499, CN=UANATACA CA1 DEVEL 2016, OU=AC-UANATACA, O=UANATACA S.A., L=Barcelona (see current address at www.uanataca.com/address), C=ES", "valid_from": "2019-01-22T16:42:00Z", "valid_to": "2019-01-23T16:42:00Z", "serial_number": "0b7687af3c8a833f", "status": "2", "pk": "25139", "revocation_reason": "1", "type": "FIRSTISSUE" }

Request

Get the request associated to the scratchcard.

Bodyapplication/json
scratchcardstringrequired

The scratchcard id number

ercstringrequired

The scratchcard enrollment code (password for accessing Uanataca services)

curl -i -X POST \
  https://api.uanataca.com/api/v1/scratchcards/whoami \
  -H 'Content-Type: application/json' \
  -d '{
    "scratchcard": "string",
    "erc": "string"
  }'

Responses

Successful Response

Bodyapplication/json
object

A JSON object containing the request information associated to a scratchcard

Response
application/json
{ "pk": 25139, "given_name": "Name", "surname_1": "Surname1", "surname_2": "Surname2", "sex": null, "id_document_type": "TIN", "id_document_country": "IT", "serial_number": "A1111111E", "country_name": "ES", "citizenship": null, "residence": "ES", "organization_email": null, "email": "mail@domain", "title": null, "organization_name": null, "organizational_unit_1": null, "organizational_unit_2": null, "organization_identifier": null, "responsible_name": null, "responsible_first_surname": null, "responsible_second_surname": null, "responsible_email": null, "responsible_serial": null, "responsible_position": null, "subscriber_responsible_serial": null, "administrative_unit": null, "empowerment": null, "representation": null, "circumstances": null, "limit": null, "registration": null, "process_application": null, "entity_owner": null, "entity_owner_serial_number": null, "description": null, "certificate_set": [], "profile": "PFnubeAFCiudadano", "scratchcard": "5053349", "status": "ENROLLREADY", "registering_user": { "pk": 1, "permission_profile": 1, "registration_authority": 1, "request": 235 }, "approving_user": { "pk": 1, "permission_profile": 1, "registration_authority": 1, "request": 235 }, "producing_user": null, "registration_authority": 41, "secure_element": 2, "validity_time": "730", "smartcard_sn": "", "citizen_tax_number": "", "birth_date": null, "birth_country": null, "birth_city": "", "birth_province": "", "birth_state": "", "birth_district": "", "birth_canton": "", "id_document_description": "", "id_document_issuer": "", "organization_rol": null, "professional_id_number": null, "mobile_phone_number": "+34600112233", "fix_phone_number": "", "residence_address": "", "residence_city": "", "residence_province": "", "residence_postal_code": "", "residence_state": "", "residence_district": "", "residence_canton": "", "organization_tax_number": null, "organization_address": null, "organization_city": null, "organization_province": null, "organization_country": null, "organization_postal_code": null, "organization_state": null, "organization_url": null, "responsible_legal_level": null, "subscriber": null, "responsible_legal_documents": null, "special_conditions": null, "responsible_registry_data": null, "approving_rao": { "pk": 1, "given_name": "RAO_Name", "surname_1": "RAO_Surname1", "surname_2": "RAO_Surname2", "certificate": {}, "id_document_number": "A22222222W", "id_document_description": "", "id_document_issuer": "", "registration_authority": [], "registration_authority_master": 1 }, "producing_rao": null, "id_document_number": "", "id_responsible_document_type": null, "id_responsible_document_country": null, "id_responsible_document_number": null, "organizational_unit_3": null }

Request

Move scratchcards from an ra to another one.

Bodyapplication/json
from_rastringrequired

The source RA id that will give the scratchcards

⚠ If from_ra/to_ra is used, from_sn/to_sn cannot be used

to_rastringrequired

The destination RA id that will receive the scratchcards

⚠ If from_ra/to_ra is used, from_sn/to_sn cannot be used

amountstringrequired

The amount of scratchcards to be transferred

from_snstringrequired

The scratchcard starting id

⚠ If from_sn/to_sn is used, from_ra/to_ra cannot be used

to_snstringrequired

The scratchcard ending id

⚠ If from_sn/to_sn is used, from_ra/to_ra cannot be used

curl -i -X POST \
  https://api.uanataca.com/api/v1/scratchcards/move \
  -H 'Content-Type: application/json' \
  -d '{
    "from_ra": "string",
    "to_ra": "string",
    "amount": "string",
    "from_sn": "string",
    "to_sn": "string"
  }'

Responses

Successful Response

Bodyapplication/json
movednumber

The number of moved scratchcards

detailsstring

An associated message (appears in case of any inconsistency)

Response
application/json
{ "moved": 1000 }
Operations
Operations
Operations