Archives

Upload payslip file

Changed on

Upload payslip file.

post/archives/-/payslips/uploadRawFile

Request

  • Base URL
    https://sandbox.smileapi.io/v1
  • URL
    https://sandbox.smileapi.io/v1/archives/-/payslips/uploadRawFile
  • Auth
    HTTP basic

Request body

userIdstring required
fileExtensionType'PDF' | 'PNG' | 'JPG' | 'JPEG' required

raw file type

fileContentstring required

Payslip file content, use base64 of file byte data

Response

OK

code'OK' | 'CREATED' | 'INVALID_CREDENTIALS' | 'INVALID_PARAMETERS' | 'INVALID_TOKEN' | 'UNAUTHORIZED_ACCESS' | 'MISSING_RESOURCE' | 'REQUEST_LIMIT_EXCEEDED' | 'SERVER_ERROR' | 'UNSUPPORTED_METHOD' | 'SERVER_UNAVAILABLE' | 'TIME_LIMIT_EXCEEDED'

Request status code

messagestring

Message response to the request

requestIdstring

Unique ID that is added to the body of every response for easy traceability of the request in our logs.

Example response

{
  "code": "OK",
  "message": "Success",
  "requestId": "5b79399a-6852-4234-bb0e-ad472648282d",
  "data": {
    "id": "17bbf36498de4d68a0d4f86c7b62f69f",
    "createdAt": "2021-04-14T09:30:24Z",
    "providerId": "user-provided",
    "userId": "tenant-5c1a2e8678e3494eba303ad1afa54ee8",
    "type": "PAYSLIP",
    "state": {
      "status": "STARTED",
      "updatedAt": "2021-04-14T09:30:24Z"
    },
    "rawFiles": [
      {
        "id": "17bbf36498de4d68a0d4f86c7b62f69f",
        "createdAt": "2021-04-14T09:30:24Z",
        "name": "Screen Shot 2021-04-14 at 5.30.24 PM",
        "subType": "PERSONAL_INFORMATION",
        "size": 3048,
        "format": "PNG",
        "url": "https://file.smileapi.io/tenants/smileapi/users/smileapi-17bbf36498de4d68a0d4f86c7b62f69f/files/file-17bbf36498de4d68a0d4f86c7b62f69f.jpeg"
      }
    ],
    "analysis": {
      "startDate": "2000-01-21",
      "endDate": "2000-01-21",
      "payDate": "2000-01-21",
      "currency": "PHP",
      "expireDate": "2000-01-21",
      "dateOfBirth": "2000-01-21",
      "maritalStatus": "Married",
      "gender": "Male"
    },
    "extraction": {
      "analysis": {
        "startDate": "2000-01-21",
        "endDate": "2000-01-21",
        "payDate": "2000-01-21",
        "currency": "PHP"
      }
    }
  }
}

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new BANK_STATEMENT enum value to the // response property for the response status

    • info

      added to the / response property allOf list for the response status

    • info

      added EMPLOYMENT_CERTIFICATE discriminator mapping keys to the / response property for the response status

    • info

      the response property ////// became required for the status

    • info

      the response property ////// became required for the status

    • info

      the response property ////// became required for the status

    • info

      the response property ////// became required for the status

    • info

      the response property ////// became required for the status

    • info

      the response property ////// became required for the status