Generate CSID and PCSID
Generates CSID and PCSID from ZATCA for the given Device ID.
A new version is available!
You can generate a Device ID, CSID, and PCSID, all in one go with the Register Device API.
Request Method
POST
Request URL
Replace the {{BASE_URL}}
with the one mentioned here based on whether you are using sandbox or production.
Request Headers
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
x-cleartax-auth-token | String | Cannot be empty. | Mandatory. User auth token. |
vat | String | Cannot be empty | Mandatory. VAT or Group VAT of the entity. |
Request Path Params
There are no path parameters for this API.
Request Query Params
There are no query parameters for this API.
Request Body
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
DeviceId | String | Cannot be empty. | Mandatory. The Device ID received in the Generate Device ID API. |
Otp | String | Should be a valid OTP. | Mandatory. The one time password generated by the user on the ZATCA portal. OTP once generated is valid only for 1 hour. |
Sample Request
Response Status Codes
HTTP Status Code | Description |
---|---|
200 | For a successful CSID generation and PCSID generation trigger. |
400 | For any kind of validation issues. |
401 | If the user is not authenticated for the operation. |
403 | If the user is not authorized for the operation. |
Response Schema
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
Status | String | Enum: GENERATED, FAILED | Mandatory. CSID Generation Status. GENERATED: CSID was generated successful. FAILED: CSID failed to generate (had validation errors). |
DeviceId | String | NA | Mandatory. Device ID sent in the request. |
PcsidGenerationActivityId | String | MaxLength: 24 | Optional. PCSID Generation Activity ID. Save this to poll status later using the Get PCSID Generation Status API. |
ErrorList | Array | NA | Optional. Array of Error Details objects. |
Sample Response
Success - HTTP Status Code - 200
Error - HTTP Status Code - 400
API Validations
A PCSID should not have been already generated for the Device ID. This API is not idempotent. In case of a duplicate request, this will throw an exception.
A CSR should have been already created for the Device ID in ClearTax.
API Constraints
This API needs to be authenticated with a valid user authentication token. If the auth token is not present or is invalid, the API will return HTTP Status Code 401.
If the auth token is valid, but the user does not have the authorization to generate device ID, then the API will return HTTP Status Code 403. The user, whose auth token is used, should have an Admin role for the particular VAT used in the request.
Last updated