# Internal server error returned by PCSID API

**URL:** <https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468>\
**Category:** FATOORA portal and Simulation portal\
**Created:** [August 11, 2023, 11:01am UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468 "2023-08-11T11:01:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![felix.alderson](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@felix.alderson](https://zatca1.discourse.group/u/felix.alderson)\
**Post date:** [August 11, 2023, 11:01am UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/1 "2023-08-11T11:01:36Z")

</div>

When attempting to register a workstation against the Simulation portal, we are successfully submitting invoices against the compliance invoice API, but receiving an internal server error retrieving a PCSID from the Production CSID (onboarding) API.  
StatusCode = InternalServerError  
API response content = {““code””:““Invalid-Request””,““message””:““System failed to process your request””}  
We have previously successfully registered workstations against the Simulation portal (prior to Aug 8th) with no change from the side of our integration, so this appears to be an issue on the server side.

---

<div class="post-metadata">

**Author:** ![Ankit.K.Tiwari](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@Ankit.K.Tiwari](https://zatca1.discourse.group/u/Ankit.K.Tiwari)\
**Post date:** [August 14, 2023, 8:58am UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/2 "2023-08-14T08:58:56Z")

</div>

The bug is resolved, please try again.

---

<div class="post-metadata">

**Author:** ![felix.alderson](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@felix.alderson](https://zatca1.discourse.group/u/felix.alderson)\
**Post date:** [August 14, 2023, 9:29am UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/3 "2023-08-14T09:29:08Z")

</div>

Thank you, we are able to register again as of this morning.

---

<div class="post-metadata">

**Author:** ![AMahran](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@AMahran](https://zatca1.discourse.group/u/AMahran)\
**Post date:** [August 20, 2023, 12:10pm UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/4 "2023-08-20T12:10:50Z")

</div>

We are still getting the same error as of today when we try to get Prodcution CSID.

{““code””:““Invalid-Request””,““message””:““System failed to process your request””}

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 21, 2023, 1:09pm UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/5 "2023-08-21T13:09:54Z")

</div>

We are also getting same error while using production CSID api

Request  
{  
“compliance\_request\_id”: “1692621015604”  
}

Response  
{  
“code”: “Invalid-Request”,  
“message”: “System failed to process your request”  
}

Request id : 1692621015604

Log: 500 Internal server error

Please help us to resolve the issue.

---

<div class="post-metadata">

**Author:** ![jiri](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jiri](https://zatca1.discourse.group/u/jiri)\
**Post date:** [August 24, 2023, 8:36am UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/6 "2023-08-24T08:36:05Z")

</div>

When onboarding to the Simulation, please, ensure that you use certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing

If the issue still persists, please, share the full postman collection (incl. the CSR) with ZATCA via the official channels or your RM, so it can be further investigated based on your specific inputs. Thank you.

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 24, 2023, 10:32am UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/7 "2023-08-24T10:32:29Z")

</div>

Thanks for your response.

We are using below command to generate csr in simulation portal.

fatoora -sim -csr -csrConfig csr-config-saico.properties

where we have to use this property “certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing” whether csr config file or else

Please help us.

---

<div class="post-metadata">

**Author:** ![Amerah\_Almutairi](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Amerah\_Almutairi](https://zatca1.discourse.group/u/Amerah_Almutairi)\
**Post date:** [August 27, 2023, 10:06am UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/8 "2023-08-27T10:06:48Z")

</div>

Kindly note that no need to use this property (certificateTemplateName) incase if you are using the SDK to generate the CSR, you need to use the property template file in SDK (data/input) directory, with the command **fatoora -sim -csr -csrConfig csr-config-saico.properties**

However, there is another way to generate the CSR using the configuration file (Config.conf) and Openssl, so in this case you need to make sure that you are using the right certificate template for simulation **certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing**

---

<div class="post-metadata">

**Author:** ![kmanickam.c](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kmanickam.c](https://zatca1.discourse.group/u/kmanickam.c)\
**Post date:** [August 27, 2023, 1:54pm UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/10 "2023-08-27T13:54:23Z")

</div>

We used the same mechanism as per the above thread still same issue. Can you please help us to resolve the issue?

Please find the below CSR property file

csr.common.name=SAICO-23456-300071179800003  
csr.serial.number=1-SAICO|2-SAICO1|3-1234567891  
csr.organization.identifier=300071179800003  
csr.organization.unit.name=HEADOFFICE  
csr.organization.name=SAICO  
csr.country.name=SA  
csr.invoice.type=1000  
csr.location.address=Riyadh  
csr.industry.business.category=INSURANCE

---

<div class="post-metadata">

**Author:** ![jiri](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jiri](https://zatca1.discourse.group/u/jiri)\
**Post date:** [August 27, 2023, 2:22pm UTC](https://zatca1.discourse.group/t/internal-server-error-returned-by-pcsid-api/468/11 "2023-08-27T14:22:03Z")

</div>

Please, try to perform the task via Postman collection. If the issue still persists, please, share the postman collection with ZATCA via the official channels or your RM for further investigation as the technical team needs to analyze the provided inputs and steps.
