# 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 %}


---

# 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://stackcue.gitbook.io/stackcue-docs/get-started/let-us-integrate-to-zatca/register-devices.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.
