# 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).](/stackcue-docs/get-started/let-us-integrate-to-zatca/standard-b2b-compliance-check.md)

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


---

# 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/generate-production-certificate.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.
