Payslips

GET /2023-03-01/xhr/payruns/{payrun_id}

Retrieves payslips from a specific payrun.

Supported integrations:

  • brain payroll
  • brightpay connect
  • deel
  • gusto
  • justworks
  • moorepay
  • onpay
  • oyster
  • parolla.ie
  • paycircle
  • payfit
  • pento.io
  • quickbooks online
  • remote.com
  • sageone
  • shape payroll
  • simplepay.ie
  • staffology
  • xero uk

Path parameters

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • id string | null Required

      The Affix-assigned id of the payslip

    • remote_id string | null Required

      the remote system-assigned id of the payrun

    • employee_id string Required
    • employee_remote_id string Required
    • payrun_id string Required
    • payrun_remote_id string Required
    • payrun_type string | null Required

      Values are regular, one_time, off_cycle, correction, reversal, or null.

    • currency string | null Required

      Values are usd, gbp, or eur.

    • gross_pay number | null Required

      if USD/EUR/GBP, in cent

    • net_pay number | null Required

      if USD/EUR/GBP, in cent

    • start_date string(date) Required
    • end_date string(date) Required
    • payment_date string(date) Required
    • earnings array[object] | null Required
      Hide earnings attributes Show earnings attributes object

      The breakdown of gross pay

      • name string Required
      • amount number Required

        if USD/EUR/GBP, in cent

      • hours number | null Required

        hours, if applicable

    • contributions array[object] | null Required

      Items paid by the employer that are not included in gross pay, such as employer-paid portion of private health insurance

      Hide contributions attributes Show contributions attributes object
    • deductions array[object] | null Required
      Hide deductions attributes Show deductions attributes object
    • taxes array[object] | null Required
      Hide taxes attributes Show taxes attributes object
  • 202 application/json

    Accepted + pending (async job started)

    Hide headers attribute Show headers attribute
    • Retry your call after the specified amount of seconds

    Hide response attribute Show response attribute object
  • 401 application/json

    Authentication Error

    Hide response attributes Show response attributes object
    • error string Required

      The type of error

      Value is authentication_error.

    • message string Required

      A descriptive description of the error

    • code string Required

      Values are incorrect_username_or_password, incorrect_mfa_or_otp, reauthentication_required // cookies are now expired, additional_account_setup_required // password reset, etc, captcha_challenge // amazon type1 captcha challenge (currently unsovable), no_valid_accounts // not used currently but reserved for future use, or insufficient_permission // not enough privileges (ie not an admin, or not enough provider scopes on a provider api token for the Affix scopes requested).

  • 429 application/json

    Rate Limited / Too Many Requests

    Hide headers attribute Show headers attribute
    • Retry your call after the specified amount of seconds

    Hide response attribute Show response attribute object
  • 500 application/json

    Server Error

    Hide response attribute Show response attribute object
  • 501 application/json

    Not Implemented

    Hide response attribute Show response attribute object
GET /2023-03-01/xhr/payruns/{payrun_id}
curl \
 -X GET https://api.affixapi.com/2023-03-01/xhr/payruns/{payrun_id} \
 -H "Authorization: $API_KEY"
Response examples (200)
[
  {
    "id": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
    "remote_id": "19202938",
    "employee_id": "d2f972d0-2526-434b-9409-4c3b468e08f0",
    "employee_remote_id": "19202938",
    "payrun_id": "35347df1-95e7-46e2-93cc-66f1191edca5",
    "payrun_remote_id": "19202938",
    "payrun_type": "regular",
    "currency": "eur",
    "gross_pay": 134267,
    "net_pay": 86578,
    "start_date": "2020-01-01",
    "end_date": "2020-01-31",
    "payment_date": "2020-01-27",
    "earnings": [
      {
        "name": "SALARY",
        "hours": 80,
        "amount": 100234
      },
      {
        "name": "OVERTIME",
        "hours": 8,
        "amount": 834234
      }
    ],
    "contributions": [
      {
        "name": "Private Health Insurance (Employer)",
        "amount": 13454
      },
      {
        "name": "Transportation allowance benefit (Employer)",
        "amount": 3454
      },
      {
        "name": "Other (Employer)",
        "amount": 3454
      }
    ],
    "deductions": [
      {
        "name": "Transportation allowance benefit",
        "amount": 3454
      },
      {
        "name": "Private Health Insurance (Employee)",
        "amount": 3454
      }
    ],
    "taxes": [
      {
        "name": "PRSI",
        "amount": 725,
        "employer_tax": false
      },
      {
        "name": "PSC (Class S)",
        "amount": 125,
        "employer_tax": false
      },
      {
        "name": "Income Tax",
        "amount": 10025,
        "employer_tax": false
      },
      {
        "name": "Payroll Tax",
        "amount": 10025,
        "employer_tax": true
      }
    ]
  }
]
Response examples (202)
# Headers
Retry-After: 42

# Payload
{
  "message": "string"
}
Response examples (401)
{
  "error": "authentication_error",
  "message": "Your password is incorrect",
  "code": "incorrect_username_or_password"
}
Response examples (429)
# Headers
Retry-After: 42

# Payload
{
  "message": "string"
}
Response examples (500)
{
  "message": "string"
}
Response examples (501)
{
  "message": "string"
}