Back to neotek ↗Get Sandbox Access

WPSFileDownload

GEThttps://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:

ParameterRequiredDescription
payrollReferenceRequiredthe reference from SubmitPayrollBatch, exactly as returned

Query parameters:

ParameterRequiredDescription
bankCodeRequiredwhich bank executed the batch: RJHISARI or ARNBSARI

Headers:

ParameterRequiredDescription
authorizationRequiredBearer <ACCESS_TOKEN>
cURL
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

JSON
{  "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

JSON
{  "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

StatusCodesCause
400 ERROR_CATEGORY_VALIDATION_FAILEDINVALID_BANK_CODE, INVALID_REFERENCEUnknown bankCode, or a malformed reference
401 ERROR_CATEGORY_AUTH_FAILEDAUTH_FAILED, CREDENTIALS_NOT_FOUND, UNAUTHORIZEDToken missing or expired, or no vault credentials for your app with that bank
404 ERROR_CATEGORY_NOT_FOUNDNOT_FOUNDNo batch matches that payrollReference at that bank
500 ERROR_CATEGORY_SYSTEM_FAILURESYSTEM_ERROR, INTERNAL_ERRORGateway-side failure
503 ERROR_CATEGORY_TEMPORARY_FAILURESERVICE_UNAVAILABLE, BANK_UNAVAILABLE, NETWORK_ERROR, NETWORK_TIMEOUT, REQUEST_TIMEOUTBank unreachable — retry with backoff