# Generate Production Certificate

A production certificate is required to send invoices to ZATCA. which is generated by using the `stackcueComplianceIdentifier` received from pervious [API (compliance CSID).](https://zatca-api-documentation.stackcue.com/get-started/let-us-integrate-to-zatca/standard-b2b-compliance-check)

{% hint style="info" %}
All compliance checks must be completed before initiating production certificate.
{% endhint %}

## API Referance

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

**Headers**

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

**Body**

| Name                           | Type   | Description                                                         |
| ------------------------------ | ------ | ------------------------------------------------------------------- |
| `stackcueComplianceIdentifier` | string | compliance identifier received from the compliance csid API request |

**Example**

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

```json
{
   "stackcueComplianceIdentifier": "156b70d2b-7ed9-46c3-bdd7-6a90dd6c0162"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Success Response" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "zatcaResponse": {
        "requestID": 30368,
        "tokenType": "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3",
        "dispositionMessage": "ISSUED",
        "binarySecurityToken": "TUlJRDNqQ0NBNFNnQXdJQkFnSVRFUUFBT0FQRjk....",
        "secret": "CkYsEXfV8c1gFHAtFWoZv73pGMvh/Qyo4LzKM2h/8Hg="
    },
    "stackcueHelper": {
        "CerIssueDate": "11-01-2024 09:19:30",
        "CerExpDate": "09-01-2029 09:19:30",
        "stackcueProductionIdentifier": "11359f3e-e9be-4d73-aa0d-d9edab0bbe2b",
        "overallStatus": 1
    }
}
</code></pre>

{% endtab %}
{% endtabs %}

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

```json
{
    "errors": [
        "No Compliance certificate found"
    ],
    "stackcueHelper": {
        "overallStatus": 0
    }
}
```

{% endtab %}
{% endtabs %}
