WPSFileDownload
https://test.api.neotek.sa/b2b-unified/v1/payroll/wps/{payrollReference}Sandbox URL · in Production call https://api.neotek.sa
The bank-signed WPS file for a processed batch, ready to upload to Mudad.
Path parameters:
| Parameter | Required | Description |
|---|---|---|
payrollReference | Required | the reference from SubmitPayrollBatch, exactly as returned |
Query parameters:
| Parameter | Required | Description |
|---|---|---|
bankCode | Required | which bank executed the batch: RJHISARI or ARNBSARI |
Headers:
| Parameter | Required | Description |
|---|---|---|
authorization | Required | Bearer <ACCESS_TOKEN> |
curl -G 'https://test.api.neotek.sa/b2b-unified/v1/payroll/wps/{payrollReference}' \ --header 'authorization: Bearer <ACCESS_TOKEN>' \ -d 'bankCode=ARNBSARI'The file is generated 3 to 5 business days after the batch is processed, so it is not available immediately after PayrollStatus reports completion.
Response — file ready
{ "success": true, "code": "SUCCESS", "message": "WPS file downloaded successfully", "wpsContent": "RJHI\t1234567\tSA204000010006087354059\tSAR\t20260420\t14700.00\t..."}wpsContent is the raw tab-separated file carrying the bank's digital signature. Save it as .txt and upload it to Mudad unmodified — any change to the whitespace and Mudad rejects it.
Response — file not ready yet
{ "success": false, "code": "WPS_NOT_READY", "message": "WPS file is not yet available. Please retry in a few business days.", "category": "ERROR_CATEGORY_TEMPORARY_FAILURE"}The not-ready response is HTTP 200, not an error status. Branch on the success field rather than the HTTP status here — code that only checks for a non-2xx will treat a missing file as a successful download.
Errors — each failure carries an error category and a specific code
| Status | Codes | Cause |
|---|---|---|
400 ERROR_CATEGORY_VALIDATION_FAILED | INVALID_BANK_CODE, INVALID_REFERENCE | Unknown bankCode, or a malformed reference |
401 ERROR_CATEGORY_AUTH_FAILED | AUTH_FAILED, CREDENTIALS_NOT_FOUND, UNAUTHORIZED | Token missing or expired, or no vault credentials for your app with that bank |
404 ERROR_CATEGORY_NOT_FOUND | NOT_FOUND | No batch matches that payrollReference at that bank |
500 ERROR_CATEGORY_SYSTEM_FAILURE | SYSTEM_ERROR, INTERNAL_ERROR | Gateway-side failure |
503 ERROR_CATEGORY_TEMPORARY_FAILURE | SERVICE_UNAVAILABLE, BANK_UNAVAILABLE, NETWORK_ERROR, NETWORK_TIMEOUT, REQUEST_TIMEOUT | Bank unreachable — retry with backoff |