# Register Devices

## Make a Compliance CSID API request

Registering a device such as POS machine, Invoicing system, web application, etc.. with zatca is achived by calling compliance CSID API.

## API Referance

<mark style="color:green;">`POST`</mark> `{{baseurl}}/api/compliance`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

<table><thead><tr><th width="279">Name</th><th width="143">Type</th><th width="116">Validation</th><th>Description</th></tr></thead><tbody><tr><td><p></p><pre class="language-postman_json"><code class="lang-postman_json">commonName
</code></pre></td><td>string</td><td>Mandatory</td><td>Name of asset tracking number used by tax payer</td></tr><tr><td><pre><code>email
</code></pre></td><td>string</td><td>Mandatory</td><td>E-Mail address of the organization</td></tr><tr><td><pre><code>location
</code></pre></td><td>string</td><td>Mandatory</td><td>Location of the company branch</td></tr><tr><td><pre><code>companyName
</code></pre></td><td>string</td><td>Mandatory</td><td>Name of the company</td></tr><tr><td><pre><code>vatNumber
</code></pre></td><td>string</td><td>Mandatory</td><td>VAT registread number</td></tr><tr><td><pre><code>isRequiredSimplifiedDoc
</code></pre></td><td>boolean (true/false)</td><td>Mandatory</td><td>If this compliance certificate need ability to submit simplified invoices (B2C) make it true. otherwise false</td></tr><tr><td><pre><code>isRequiredStandardDoc
</code></pre></td><td>boolean (true/false)</td><td>Mandatory</td><td>If this compliance certificate need ability to submit standard invoices (B2B) make it true. otherwise false</td></tr><tr><td><pre><code>deviceSerialNumber1
</code></pre></td><td>string</td><td>Mandatory</td><td>Serial number of invoicing device part 1</td></tr><tr><td><pre><code>deviceSerialNumber2
</code></pre></td><td>string</td><td>Mandatory</td><td>Serial number of invoicing device part 2</td></tr><tr><td><pre><code>deviceSerialNumber3
</code></pre></td><td>string</td><td>Mandatory</td><td>Serial number of invoicing device part 3</td></tr><tr><td><pre><code>regAddress
</code></pre></td><td>string</td><td>Mandatory</td><td>Register address of the branch of company</td></tr><tr><td><pre><code>businesscategory
</code></pre></td><td>string</td><td>Mandatory</td><td>Business category</td></tr><tr><td><pre><code>otp
</code></pre></td><td>string</td><td>Mandatory</td><td>OTP received from fatoora portal</td></tr><tr><td></td><td></td><td></td><td></td></tr></tbody></table>

**Samples**

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "commonName" : "Jeem",
    "email": "sales@jeem.net.sa",
    "location": "Dammam",
    "companyName": "Jeem IT",
    "vatNumber": "310565828400003",
    "isRequiredSimplifiedDoc": true,
    "isRequiredStandardDoc": true,
    "deviceSerialNumber1": "stackcue",
    "deviceSerialNumber2": "ESGUnit",
    "deviceSerialNumber3": "9sfgbdb02-665",
    "regAddress": "KHOBAR",
    "businesscategory": "Software and IT",
    "otp": "272482"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample success response" %}

```json
{
    "zatcaResponse": {
        "requestID": 1234567890123,
        "dispositionMessage": "ISSUED",
        "binarySecurityToken": "TUlJQ0FEQ0NBYWFnQXdJQkFnSUdBWkZTblJYY01Bb0dDQ3FHU000OUJBTUNNQlV4RXpBUkJnTlZCQU1NQ21WSmJuWnZhV05wYm1jd0hoY05NalF3T0RFME1qQXpPREkzV2hjTk1qa3dPREV6TWpFd01EQXdXakJSTVJVd0V3WURWUVFEREF4emRHRmphMk4xWlM1amIyMHhEekFOQmdOVkJBc01Ca1JoYlcxaGJURWFNQmdHQTF....",
        "secret": "sajT6YmbFYz96sySOJAwuaWPeFQY4MjXZV6IxamaB+I=",
        "errors": null
    },
    "stackcueHelper": {
        "overallStatus": 1,
        "stackcueComplianceIdentifier": "4786f351-4114-440d-a7d1-5dd7d2ee576a",
        "CerIssueDate": "14-08-2024 20:38:27",
        "CerExpDate": "13-08-2029 21:00:00"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Error Response" %}

```json
{
    "errors": [
        "[vatNumber] VAT number should start and end with 3."
    ],
    "stackcueHelper": {
        "overallStatus": 0
    }
}
```

{% endtab %}
{% endtabs %}
