100% found this document useful (1 vote)
55 views18 pages

CPFB Apex Apispecs

The document outlines the API Services Interface Specifications for the submission of CPF contributions by employers through the Central Provident Fund Board (CPFB). It includes a revision history, detailed API endpoint information, JSON request payload structure, and response formats. The document serves as a guide for software developers to integrate CPF contribution submissions into their payroll systems, ensuring compliance with specified formats and authentication requirements.

Uploaded by

Ali Khaliq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
55 views18 pages

CPFB Apex Apispecs

The document outlines the API Services Interface Specifications for the submission of CPF contributions by employers through the Central Provident Fund Board (CPFB). It includes a revision history, detailed API endpoint information, JSON request payload structure, and response formats. The document serves as a guide for software developers to integrate CPF contribution submissions into their payroll systems, ensuring compliance with specified formats and authentication requirements.

Uploaded by

Ali Khaliq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Central provident fund Board

API Services Interface Specifications


Submission of CPF Contributions (APEX)
Version 1.0
REVISION HISTORY

Version Effective Date Summary of Changes Author

0.1 24 Feb 22 Initial version CPFB


0.2 25 Mar 22 a) Updated API endpoints CPFB
b) Updated file name for documentation from GovTech
c) Updated the validation file in Annex (Item 3)
0.3 10 Apr 22 Updated API endpoints CPFB
0.4 2 Jun 22 a) Updated section 1.3 regarding the limit for submission CPFB
file
b) Updated the validation messages in Annex (Item 3)
0.5 29 Jun 22 a) Updated section 2.3 “submissionDateTime” format to CPFB
“yyyy-MM-ddTHH:mm:ssZ”
b) Updated section 2.3/2.4 “timestamp” format to “yyyy-
MM-ddTHH:mm:ssZ”
c) Updated section 2.2 “deductionDate” format to ““yyyy-
MM-dd”
d) Removed section 2.2 “submissionFileType”
e) Added sample submission file (in Base64) in Annex (Item
1)
f) Updated the validation messages in Annex (Item 3)
0.6 14 Sep 22 a) Removed parameters relating to foreign worker levy CPFB
(FWL) as MOM will cease the collection of FWL through
CPFB
b) Removed section 2.2 “submitterNric”
c) Updated section 2.1 API endpoints
0.7 10 Jan 23 Updated section 2.1 API staging endpoint CPFB
0.8 2 Oct 23 Updated section 2.5 Response Code and Messages CPFB
0.9 4 Jul 24 Updated section 2.1 API staging endpoint CPFB
1.0 16 Jan 25 Updated link to submission file specification in Annex (Item CPFB
2)

Official (Open)
1
Contents
1. INTRODUCTION............................................................................................3
1.1 PURPOSE..................................................................................................................... 3
1.2 DEFINITIONS, ACRONYMS, AND ABBREVIATIONS...................................................................3
1.3 GENERAL USAGE........................................................................................................... 3
1.4 STAGING (UAT) USAGE.................................................................................................. 3
1.5 PRODUCTION USAGE...................................................................................................... 3
1.6 COMMON INTERFACE INFORMATION...................................................................................4
2. PAYROLL API SERVICE..................................................................................5
2.1 API ENDPOINT.............................................................................................................. 5
2.2 JSON REQUEST PAYLOAD............................................................................................... 5
2.2.1 Input Details...................................................................................................... 5
2.2.2 Schema Definition.............................................................................................. 6
2.2.3 Sample JSON Request Payload...........................................................................7
2.3 SUCCESS RESPONSE....................................................................................................... 7
2.3.1 Output Details.................................................................................................... 7
2.3.2 Schema Definition.............................................................................................. 9
2.3.3 Sample Success JSON Response Object...........................................................11
2.4 ERROR RESPONSE....................................................................................................... 12
2.4.1 Output Details.................................................................................................. 12
2.4.2 Schema Definition............................................................................................ 12
2.4.3 Sample Error JSON Response Object................................................................13
2.5 RESPONSE CODE AND MESSAGES...................................................................................13
3. ANNEX...................................................................................................... 14

Official (Open)
2
1. INTRODUCTION
1.1 Purpose
The Central Provident Fund Board (CPFB) provides the submission of contribution details
application programming interface (API) service to allow software developers (SWD) to
incorporate within their payroll software the feature for employers to submit CPF contributions
to CPFB.

To consume the API, the user must be authenticated to APEX 2.0. Please refer to the
documentation “[For SWD] How to call API using OAuth Authz Code Flow.pdf” provided by
GovTech on the steps required.

This document only contains information specific to consuming the API.

1.2 Definitions, Acronyms, and Abbreviations


Terms Description
API Application Program Interface
CDAC Chinese Development Assistance Council
ECF Eurasian Community Fund
MAS Monetary Authority of Singapore
MBMF Mosque Building and Mendaki Fund
MEPS MAS Electronic Payment System
SDL Skills Development Levy
SINDA Singapore Indian Development Association
SWD Software Developers

1.3 General Usage


The submission file cannot be more than 5MB (est. 30,000 records).

1.4 Staging (UAT) Usage


The Staging environment is designed to mimic the actual Production environment so that
developers can test the API integration before submitting actual data to the Production
environment.

To access Staging environment, developers must have onboarded APEX Cloud (Refer to the
documentation at https://docs.developer.tech.gov.sg/docs/complete-apex-user-guide).

1.5 Production Usage


The use of CPFB API(s) in the Production environment is only intended for the purpose as
indicated in the API service description. Any other forms of use, including all forms of tests, are
strictly prohibited. In the event such activities are found to have occurred in the Production
environment, you will be deemed to have breached the API Terms of Use, which may result in
the suspension or termination of your account.

Official (Open)
3
1.6 Common Interface Information
 JSON is case sensitive by specifications.
 All date strings are to be represented in compliance to the ISO-8601 standard.
 All string fields are subject to validation of the following acceptable characters that is
allowed (in red):
o [a-zA-Z0-9‘@#()\-,./&+_ ] (Note: whitespace is included)
 All properties follow the camel-case convention.
 Unless stated as optional, all JSON object properties must be specified.
 Unless otherwise specified, all JSON services are invoked using HTTP verb POST.

Official (Open)
4
2. PAYROLL API SERVICE
2.1 API Endpoint
Environment Method Endpoint
Sandbox POST https://sandbox.api.gov.sg/cpf/employer-cpf-
(UAT) contributions/v{version
number}/submitCPFContributions
Production POST https://public.api.gov.sg/cpf/employer-cpf-
contributions/v{version
number}/submitCPFContributions
*{version number} is dependent on the available version of the API in APEX.

2.2 JSON Request Payload


Client invoking this service will be expected to submit the following JSON request object with
the following parameters (section 2.2.1) in the HTTP request. Note that the parameters names
are case sensitive. (Refer to the documentation “[For SWD] How to call API using OAuth Authz
Code Flow.pdf” provided by GovTech).

The JSON request needs to be modified with escape strings and serialised in order to be
acceptable by API service.

2.2.1 Input Details


After authentication, SWD will need to provide the following details in the table below to CPFB
when calling the API service.

Parameter Name Length Type Description


CPF Submission Number for the submission.
csn 17 String
Ex: 123456789A-PTE-01
Name of the submission file.
submissionFileName 255 String
Ex: 123456789A-PTE-01_May2022
Mode of payment for the submission.
G – Direct Debit
paymentMode 1 String
P – PayNow
M – MEPS
Optional - Only applicable if paymentMode
is ‘G’.
Deduction date in “yyyy-MM-dd” format.
Ex: 2022-06-14
deductionDate 10 Date
If the submission is before 5.15pm, the
deduction date must be 2 working days later
else the deduction date must be 3 working
days later.
Submission file must be converted into Byte
Array and encoded with Base64 String.
submissionFile - String
Refer Annex (1) & (2) for Sample submission
file and specification.
Official (Open)
5
Official (Open)
6
2.2.2 Schema Definition
JSON request object schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"csn": {
"type": "string"
},
"submissionFileName": {
"type": "string"
},
"paymentMode": {
"type": "string"
},
"deductionDate": {
"type": "string"
},
"submissionFile": {
"type": "string"
}
},
"required": [
"csn",
"submissionFileName",
"paymentMode",
"deductionDate",
"submissionFile"
]
}

Official (Open)
7
2.2.3 Sample JSON Request Payload
{
"csn": "123456789A-PTE-01",
"submissionFileName": "123456789A-PTE-01_May2022",
"paymentMode": "P",
"deductionDate": "",
"submissionFile":
"RiAxMjM0NTY3ODlBUFRFMDEgMDUyMDIyMDUwMTEwMDAxNUZUUC5EVEwgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCkYwMTIzNDU2Nzg5QVBURTAxIDA1Mj
AyMjA1MDEwMDAwMDAwNjkwMDAwMDAwMDAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIApGMDEyMzQ1Njc4OUFQVEUwMSAwNTIwMjIwNTAyMDAwMDAwMDEwMDAwMDAwM
DAwMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKRjAxMjM0NTY
3ODlBUFRFMDEgMDUyMDIyMDUwNDAwMDAwMDAyMDAwMDAwMDAwMDIgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgCkYwMTIzNDU2Nzg5QVBURTAxIDA1MjAyMjA1MDcwMD
AwMDAwMTUwMDAwMDAwMDAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIApGMDEyMzQ1Njc4OUFQVEUwMSAwNTIwMjIwNTEwMDAwMDAwMDMwMDAwMDAwMDAwMSAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKRjAxMjM0NTY3ODlBUFRFMDE
gMDUyMDIyMDUxMTAwMDAwMDAyMDAwMDAwMDAwMDAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgCkYxMTIzNDU2Nzg5QVBURTAxIDA1MjAyMjA1MDFTMTIzNDU2N0EwMD
AwMDAwMzAwMDAwMDAwMTc1ODM5MDAwMDAwMDAwMEVFbXBsb3llZSBBICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIApGMTEy
MzQ1Njc4OUFQVEUwMSAwNTIwMjIwNTA0UzEyMzQ1NjdBMDAwMDAwMDEwMDAwMDAwMDAwMDAwMDAwM
DAwMDAwMDAgRW1wbG95ZWUgQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKRjExMjM0NTY3ODlBUFRFMDEgMDUyMDIyMDU
wMVMyMzQ1Njc4QjAwMDAwMDAzMDAwMDAwMDA0NDcwMDAwMDAwMDAwMDAwRUVtcGxveWVlIEIgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgCkYxMTIzNDU2Nzg5QVBURTAxIDA1MjAyMjA1MDRTMjM0NTY3OEIwMDAwMDAwMTAwMD
AwMDAwMDAwMDAwMDAwMDAwMDAwMCBFbXBsb3llZSBCICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIApGMTEyMzQ1Njc4OUFQ
VEUwMSAwNTIwMjIwNTAxUzM0NTY3ODlDMDAwMDAwMDA5MDAwMDAwMDIzNDc5MTAwMDAwMDAwMDBFR
W1wbG95ZWUgQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAKRjExMjM0NTY3ODlBUFRFMDEgMDUyMDIyMDUwMlMzNDU2Nzg
5QzAwMDAwMDAxMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwIEVtcGxveWVlIEMgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgC
kY5MTIzNDU2Nzg5QVBURTAxIDA1MDAwMDAxNDAwMDAwMDAwMDE2NDAwMCAgICAgICAgICAgICAgIC
AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA
gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo="
}

2.3 Success Response


If the submission request is successful, below output details will be sent to the client as the
response.

2.3.1 Output Details


Parameter Name Length Type Description
Timestamp of the response message in
timestamp 24 String “yyyy-MM-ddTHH:mm:ssZ” format.
Ex: 2022-06-09T15:09:38+0800
Response code after processing the
responseCode 2 String request.
 Ex: 00
Official (Open)
8
Response Message after processing the
responseMessage 80 String request.
Ex: Success
CPF Submission Number for the
csn 17 String submission.
Ex: 123456789A-PTE-01
Company name of the employer.
companyName 80 String
Ex: ABC Pte. Ltd.
Status of the submission.
submissionStatus 15 String
Ex: Submitted
File name of the text file from the input.
submissionFileName 255 String
Ex: 123456789A-PTE-01_May2022
Timestamp of the submission in “yyyy-
submissionDateTime 24 String MM-ddTHH:mm:ssZ” format.
Ex: 2022-06-09T15:09:38+0800
Mode of payment for the submission.
G – Direct Debit
paymentMode 1 String P – PayNow
M – MEPS
Ex: G
Advice code generated for the
adviceCode 2 String submission.
Valid values 01-99
Contribution month in “MMM yyyy”
monthPaid 8 String format.
Ex: May 2022
Optional – Only applicable when the
payment mode is ‘G’.
deductionDate 10 String Deduction date in “yyyy-MM-dd”
format.
Ex: 2022-06-14
PayNow QR code generated for
payment.
Base64
paynowQrCode - It contains Base64 encoded byte array
String
string of the QR code image file.
(Only applicable for PayNow payments)
Total CPF contributions for all the
totalContribution 21 String employees.
Ex: 69000 (for $690.00)
Total CPF late payment interest amount.
cpfLatePaymentInterest 21 String
Ex: 15000 (for $150.00)
Total SDL to be paid amount (local
skillsDevelopmentLevy 21 String employees + foreign employees).
Ex: 20000 (for $200.00)
totalCommunityChest 21 String Total Community Chest amount for the
submission.

Official (Open)
9
Ex: 30000 (for $300.00)
Total MBMF amount for the submission.
totalMbmf 21 String
Ex: 1000 (for $10.00)
Total SINDA amount for the submission.
totalSinda 21 String
Ex: 1000 (for $10.00)
Total CDAC amount for the submission.
totalCdac 21 String
Ex: 20000 (for $200.00)
Total ECF amount for the submission.
totalEcf 21 String
Ex: 10000 (for $100.00)
Total amount for the submission.
grandTotal 21 String
Ex: 150000 (for $1500.00)

2.3.2 Schema Definition


{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"timestamp": {
"type": "string"
},
"responseCode": {
"type": "string"
},
"responseMessage": {
"type": "string"
},
"responseData": {
"type": "object",
"properties": {
"csn": {
"type": "string"
},
"companyName": {
"type": "string"
},
"submitterNric": {
"type": "string"
},
"submissionStatus": {
"type": "string"
},
"submissionFileName": {
"type": "string"
},
"submissionDateTime": {
"type": "string"
},
"paymentMode": {
"type": "string"
},
"deductionDate": {
"type": "string"
},
"paynowQrCode": {
"type": "string"
},
"monthPaid": {
"type": "string"
},

Official (Open)
10
"adviceCode": {
"type": "string"
},
"totalContribution": {
"type": "string"
},
"cpfLatePaymentInterest": {
"type": "string"
},
"skillsDevelopmentLevy": {
"type": "string"
},
"totalCommunityChest": {
"type": "string"
},
"totalMbmf": {
"type": "string"
},
"totalSinda": {
"type": "string"
},
"totalCdac": {
"type": "string"
},
"totalEcf": {
"type": "string"
},
"grandTotal": {
"type": "string"
}
},
"required": [
"csn",
"companyName",
"submitterNric",
"submissionFileName",
"submissionDateTime",
"paymentMode",
"deductionDate",
"paynowQrCode",
"submissionStatus",
"monthPaid",
"adviceCode",
"totalContribution",
"cpfLatePaymentInterest",
"skillsDevelopmentLevy",
"totalCommunityChest",
"totalMbmf",
"totalSinda",
"totalCdac",
"totalEcf",
"grandTotal"
]
}
},
"required": [
"timestamp",
"responseCode",
"responseMessage",
"responseData"
]
}

Official (Open)
11
2.3.3 Sample Success JSON Response Object
A successful call to the API service means that the submission is accepted. A JSON response
object that contains the following parameters will be returned in the HTTP response.
{
"timestamp":
2022-06-
09T15:09:38+0800,
"responseCode":
"00",
"responseMessage"
: "Success",
"responseData": {
"csn":
"123456789A-PTE-01",
"companyNa
me": "ABC Pte. Ltd.",
"submitter
Nric":
"SXXXX123A
",
"submissio
nFileName": "123456789A-
PTE-01_May2022",
"submissio
nDateTime": "2022-06-
09T15:09:38+0800",
"paymentMo
de": "P",
"deduction
Date": null,
"paynowQrC
ode":
"+7gbg6aZeAODQLuzga4AzRw
gLseq44E3KHBPoO7swHu1gU7
F7irI3AXB1rDMlTUoAFsXXAH
d33DLAN3hSTgLuAO0PozuOux
6kjAHdztM7g7G86zdcEO3PU6
dQTu0OBAa1jOhho0gIED3MFd
3xBwV0j2GdwF3K2rP4O756uO
BNwdaPsM7s6G82xdcAd3vY5z
wB0aHGhwdzbAHaCBA9zBXR0J
uEODfQZ3ZwPcrQvuLs9XHQm4
O9AalqHibBjA1gV3cNc3zDJw
V0gC7s4GuAM0cIC7HquOBNyh
wT6Du7MB7tYFOxe4qyNwl+Ro
svBtmImekwxnUh017A84rKsG
wV0MUXAHd9FzwB3czSPrqkFw
1+zAHdzBXfQcaHCuABrc1SC4
G6Ialkuz03OcSWgAd+uqQXAX
QxTcIUn0HGhwrswjcFeD4K7Z
aZTgDu6i50ADuAM0uJtl4G6I
gju4i54D7uoI3K2rBsHdEAV3
cIck0XOgwbkyj8BdDYK7ZqdR
grtmJ+AODeAO7moQ3MUQBXdw
Fz0H3MHdPLKuGgR3zQ7cwR3c
Rc+BBufKPAJ3NQjuhqiG5dLs
9BxnEhrA3bpqENzFEAV3SBI9
B9ydK/
MI3NUguGt24A7u4C56DjSAO0
CDuxoEd0NUwwJ30XPAXR2Bu3
XVILgLuIM7JImeAw3OlXkE7m
oQ3DU7jRLcNTvRc6AB3AEa3A

Official (Open)
12
XcDVFwB3fRc8BdHYG7ddUguG
t24A7u4C56DjQ4V+YRuKtBcN
fsNEqXZqfnOJPQAO7grgbB3S
BMDowCh+buh6vk/
MFMHakjl9r3wwa4gzu4g7tGC
Rzg7jyrI5c6AndwB3dw1yidZ
xe4W9el9tURuAu4g7tGCRzOp
DpSRy61D+7gDu7gDu7WdYG7O
lJHLnUE7uAO7uCuUQKH4Q3u1
nWpfXUE7uBuiIK7RgkczqQ6U
kcu8wjcwR3cwV2jtK5Lz1FH6
sjlPIM7uGvQ4K5RAofhDe7qy
KX2wR3cwR3cwV2jBA5wd57Vk
UsdgTu4gzu4a5TOs0vPUUcul
zoScAd3cNcogcPwVkfqyKX2w
R3cwR3cwR04XOCujtSRSx2BO
7iDO7hrlM6z4Q3u1nWpfXUE7
uBuiIK7RgkczqQ6UkcutQ/
u4A7u4K5RWtcF7upIHbmcZ3A
Hdw0a3DVK4DC8wV0dudQ+uIM
7uBui4K5RAge4O8/
qyKWOwB3cwR3cNUrgcOk56sg
JdznP4A7uGjS4a5TAYXiDuzp
yqX1wB3cRP5i5Zz8A+wHYmUx
WrCTbufLDM3yDuwgEu2doAHd
nEkbtFbgLuAu4AwckwSi4gw6
M2ivnGdxFwN09gzu4O5PgDu7
gDu7gLgLB7hkawB3cYdReOc/
gLgLuwAHu4G6vQEcN2ivnGdx
FwN09gzu4O5MwCu7gLuAuAsH
uGdzBHdxh1F45z+AuAu7gDu7
gDu6gowbBHdzBXQSC3TO4g7s
zCaP2CtwF3EUgGJJgFNxBB0b
tlfMM7iLg7p7BHdydSdABd3A
Hd3AXgWD3DA3gDu4waq/
AXcBdwB04IAnc7RXogLu9cp7
BXQTc3TO4g7szCaPgDu7gDu4
iEOyewR3cwR1G7ZXzDO4i4A7
u4A7u9gp01KC9AndwF4Fg9wz
u4O5Mwii4g7uAuwgEQxKMgju
4w6i9cp7BXQTc3TO4g7szCTp
qENzBHdyTtZBcih+C6+
+5gmBnQ+1bV9+AfnA3kFwKGN
zBHdzBHWSt6zwLuBtIhii4qw
UD2NkAHevqG+AO7uDuAndwB3
cDWM8BWevqG+AO7gYSuDuT4A
7u",
"submissio
nStatus":
"Submitted
",
"monthPaid
": "May 2022",
"adviceCod
e": "05",
"totalCont
ribution": "69000",
"cpfLatePa
ymentInterest": "15000",
"skillsDev
elopmentLevy": "20000",
"totalComm
unityChest": "30000",
"totalMbmf
": "0",

Official (Open)
13
"totalSind
a": "0",
"totalCdac
": "20000",
"totalEcf"
: "10000",
"grandTota
l ": "164000"
}
}

For successful submission, an acknowledgement email will also be sent to the email address(es)
maintained in CPF EZPay.

2.4 Error Response


2.4.1 Output Details
If there is any error, the following parameters will be returned in the HTTP response.

Parameter Name Length Type Description


Timestamp of the response message in
timestamp 24 String “yyyy-MM-ddTHH:mm:ssZ” format.
Ex: 2022-06-09T15:09:38+0800
Response code after processing the
responseCode 3 String request.
 Ex: 00
Response message after processing the
responseMessage 80 String request.
Ex: Success
Error code for the input validation.
errorCode 25 String Not Applicable for the server error.
Ex: ERT1302_1000015
Error message for the input validation.
Not Applicable for the server error.
errorMessage 500 String
Ex: Line 1: The file has invalid header
record(s).

2.4.2 Schema Definition


{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"timestamp": {
"type": "string"
},
"responseCode": {
"type": "string"
},
"responseMessage": {
"type": "string"
},
"errors": {
"type": "object",
"properties": {
"errorCode": {

Official (Open)
14
"type": "string"
},
"errorMessage": {
"type": "string"
}
},
"required": [
"errorCode",
"errorMessage"
]
}
},
"required": [
"timestamp"
"responseCode",
"responseMessage",
]
}

2.4.3 Sample Error JSON Response Object


Input Validation Error
When the input parameters or submission file has failed validation, the call to the service is
unsuccessful. A JSON response object that contains the following parameters will be returned in
the HTTP response.
{
"timestamp": 2022-06-09T15:09:38+0800,
"responseCode": "01",
"responseMessage": "Input Validation Failed",
"errors": {
"errorCode": "ERT1302_1000015",
"errorMessage": "Line 1: The file has invalid header record(s)."
}
}

Refer to the Annex (3) for the errorCode and errorMessage details.

Server Error
When an exception occurs during the processing of the request, a JSON response object that
contains the following parameters will be returned in the HTTP response.
{
"timestamp": 2022-06-09T15:09:38+0800
"responseCode": "500",
"responseMessage": "Internal Server Error",
}

2.5 Response Code and Messages


Response Code Response Message Remarks
00 Success
Refer to the Annex (3) for the
01 Input Validation Failed
errorCode and errorMessage details.
03 Unknown Error
04 Maintenance
401 Unauthorized Access
500 Internal Server Error

Official (Open)
15
Official (Open)
16
3. ANNEX
S/No. Name File

1 Sample submission file

(In Base64)
https://www.cpf.gov.sg/content/
dam/web/employer/making-cpf-
2 Submission file specification
contributions/documents/
CPFEZPayFTPSpecifications.pdf

3 File validation error details

Official (Open)
17

You might also like