# Padrón alcance 13

### Requisitos previos

Para poder usar esta guía, primero necesitarás:

* [Integrar Afip SDK en tu proyecto](/readme.md#integracion)

***

La especificación de este Web Service se encuentra disponible en <https://www.afip.gob.ar/ws/ws-padron-a13/manual-ws-sr-padron-a13-v1.2.pdf>

<details>

<summary>Identificador <kbd>ws_sr_padron_a13</kbd></summary>

Producción <img src="/files/iohwi1qUyKiK8yUDvvwl" alt="Produccion" data-size="line">

Desarrollo <img src="/files/6YHgXT19BNK85qgwfTR8" alt="Desarrollo" data-size="original">

</details>

#### Métodos disponibles

1. [Obtener datos del contribuyente](#obtener-datos-del-contribuyente)
2. [Obtener CUIT a partir de un DNI](#obtener-cuit-a-partir-de-un-dni)
3. [Obtener estado del servidor](#obtener-estado-del-servidor)

### **Obtener datos del contribuyente**

Nos devolverá un objeto con los detalles o `null` en caso de no existir en el padrón.

{% tabs %}
{% tab title="Node" %}

```js
// CUIT del contribuyente
const taxId = 20111111111;

const taxpayerDetails = await afip.RegisterScopeThirteen.getTaxpayerDetails(taxId);
```

{% endtab %}

{% tab title="PHP" %}

```php
// CUIT del contribuyente
$tax_id = 20111111111;

$taxpayer_details = $afip->RegisterScopeThirteen->GetTaxpayerDetails($tax_id); 
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
# CUIT del contribuyente
tax_id = 20111111111

taxpayer_details = afip.RegisterScopeThirteen.getTaxpayerDetails(tax_id)
```

{% endtab %}

{% tab title="Python" %}

```python
# CUIT del contribuyente
tax_id = 20111111111

taxpayer_details = afip.RegisterScopeThirteen.getTaxpayerDetails(tax_id)
```

{% endtab %}

{% tab title=".NET" %}

```csharp
// CUIT del contribuyente
long taxId = 20111111111;

var taxpayerDetails = await afip.RegisterScopeThirteen.GetTaxpayerDetailsAsync(taxId);
```

{% endtab %}

{% tab title="API" %}
**Endpoint**

<mark style="color:blue;">`POST`</mark> `https://app.afipsdk.com/api/v1/afip/requests`

**Ejemplo**

```json
{
    "environment": "dev",
    "method": "getPersona",
    "wsid": "ws_sr_padron_a13",
    "params": {
        "token": "{{token}}",
        "sign": "{{sign}}",
        "cuitRepresentada": "20409378472",
        "idPersona" : 20111111111
    }
}
```

{% endtab %}
{% endtabs %}

### **Obtener CUIT a partir de un DNI**

Nos devolverá el CUIT o `null` en caso de no existir en el padrón

{% tabs %}
{% tab title="Node" %}

```js
// DNI
const nationalId = 11111111;

const taxID = await afip.RegisterScopeThirteen.getTaxIDByDocument(nationalId);
```

{% endtab %}

{% tab title="PHP" %}

```php
// DNI
$national_id = 11111111;

$tax_id = $afip->RegisterScopeThirteen->GetTaxIDByDocument($national_id);
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
# DNI
national_id = 11111111

tax_id = afip.RegisterScopeThirteen.getTaxIDByDocument(national_id)
```

{% endtab %}

{% tab title="Python" %}

```python
# DNI
national_id = 11111111

tax_id = afip.RegisterScopeThirteen.getTaxIDByDocument(national_id)
```

{% endtab %}

{% tab title=".NET" %}

```csharp
// DNI
long nationalId = 11111111;

var taxID = await afip.RegisterScopeThirteen.GetTaxIDByDocumentAsync(nationalId);
```

{% endtab %}

{% tab title="API" %}
**Endpoint**

<mark style="color:blue;">`POST`</mark> `https://app.afipsdk.com/api/v1/afip/requests`

**Ejemplo**

```json
{
    "environment": "dev",
    "method": "getIdPersonaListByDocumento",
    "wsid": "ws_sr_padron_a13",
    "params": {
        "token": "{{token}}",
        "sign": "{{sign}}",
        "cuitRepresentada": "20409378472",
        "documento" : 11111111
    }
}
```

{% endtab %}
{% endtabs %}

### **Obtener estado del servidor**

{% hint style="warning" %}
No te confíes mucho de este método, ARCA siempre devuelve que esta todo bien incluso cuando hay algo fallando.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
const serverStatus = await afip.RegisterScopeThirteen.getServerStatus();

console.log('Este es el estado del servidor:');
console.log(serverStatus);
```

{% endtab %}

{% tab title="PHP" %}

```php
$server_status = $afip->RegisterScopeThirteen->GetServerStatus();

echo 'Este es el estado del servidor:';
echo '<pre>';
print_r($server_status);
echo '</pre>';
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
server_status = afip.RegisterScopeThirteen.getServerStatus

puts "Este es el estado del servidor:"
puts server_status
```

{% endtab %}

{% tab title="Python" %}

```python
server_status = afip.RegisterScopeThirteen.getServerStatus

print("Este es el estado del servidor:")
print(server_status)
```

{% endtab %}

{% tab title=".NET" %}

```csharp
var serverStatus = await afip.RegisterScopeThirteen.GetServerStatusAsync();

Console.WriteLine('Este es el estado del servidor:');
Console.WriteLine(JsonSerializer.Serialize(serverStatus));
```

{% endtab %}

{% tab title="API" %}
**Endpoint**

<mark style="color:blue;">`POST`</mark> `https://app.afipsdk.com/api/v1/afip/requests`

**Ejemplo**

```json
{
    "environment": "dev",
    "method": "dummy",
    "wsid": "ws_sr_padron_a13",
    "params": {}
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.afipsdk.com/siguientes-pasos/web-services/padron-alcance-13.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
