Batch update payrolls

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://restapi.wyzio.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Wyzio MCP server": {
    "url": "https://restapi.wyzio.com/mcp"
  }
}

Close
POST /api-v1/payroll/batch

Updates multiple payrolls. Returns 200 on success, or 400 if any entry fails validation.

Headers

  • WEAL-TOKEN Required

    API token (can be retrieved from account settings)

  • TARGET-ORGANIZATION-ID

    ID of organization, for which the operation must be performed

application/json

Body Required

  • id integer

    Entity ID. If negative value, a new entity will be created

  • organizationId integer

    Organization ID

  • createdOn string Required

    Creation date (format dd/MM/yyyy)

  • paymentDate string Required

    Payment date (format dd/MM/yyyy). Populated from createdOn on the client side before sending

  • calendarYear integer(int32)

    Calendar year

  • monthType string

    Payroll month

    Values are JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, or DECEMBER.

  • monthStartDate string

    Start date of the month period (format yyyy-MM-dd)

  • monthEndDate string

    End date of the month period (format yyyy-MM-dd)

  • staffEntityId integer

    Staff entity ID

  • contactEntityId integer

    Contact entity ID linked to the staff member

  • currencyId integer

    Currency ID

  • employeeInfoId integer

    Employee info ID

  • address object

    Delivery address for the payslip

    Hide address attributes Show address attributes object
    • id integer

      Entity ID. If negative value, a new entity will be created

    • name string

      Address label / name

    • line1 string

      Address line 1

    • line2 string

      Address line 2

    • city string

      City

    • region object

      Region

      Hide region attribute Show region attribute object
      • id integer

        Region ID

    • countryCode2 string

      ISO 3166-1 alpha-2 country code

    • countryId integer

      Country ID

    • postCode string

      Postal code

    • houseNumber string

      House number

    • toTheAttentionOf string

      To the attention of

    • position integer(int32)

      Position order

    • service string

      Service label

  • grossSalary string

    Gross salary as string

  • netSalary string

    Net salary as string

  • payable string

    Payable amount as string

  • description string

    Description or notes

  • status string

    Payroll status

    Values are UNPAID, PAID, PARTIALLY_PAID, or WIRED.

  • staffPayslipId integer

    Staff payslip template ID

  • journalEntryId integer

    Journal entry ID linked to this payroll

  • removedPayrollLineNumbers array[integer]

    Line numbers removed since last save

  • payrollLines array[object]

    Request model for a payroll salary line

    Hide payrollLines attributes Show payrollLines attributes object

    Request model for a payroll salary line

    • id integer

      Entity ID. If negative value, a new entity will be created

    • payrollEntityId integer

      Payroll entity ID this line belongs to

    • payslipLineEntityId integer

      Payslip line entity (template) ID

    • number integer

      Line number for ordering

    • localizations object

      Multilingual name of the line (TranslationEntity with language fields)

      Hide localizations attributes Show localizations attributes object
      • id integer

        Entity ID. If negative value, a new entity will be created

      • en string
      • fr string
      • de string
      • it string
    • payslipValueType string

      Payslip value type

      Values are VALUE or PERCENTAGE.

    • payslipLineType string

      Payslip line type

      Values are EMPLOYEE_LINE, COMPANY_LINE, BOTH, CALCULATION, or SYSTEM.

    • isAutomaticallyAdded boolean

      Whether the line was automatically added from the payslip template

    • isChanged boolean

      Whether something was changed on this line compared to the template

    • isShownOnSalarySlip boolean

      Whether the line is shown on the salary slip

    • description string

      Custom description overriding the localized name

    • baseAmount string

      Base amount as string

    • employeeRate string

      Employee contribution rate as string

    • employerRate string

      Employer contribution rate as string

    • employeeAmount string

      Employee contribution amount as string

    • employerAmount string

      Employer contribution amount as string

    • specialAttributionType string

      Special attribution type

      Values are BASE_SALARY, GROSS_SALARY, NET_SALARY, PAYABLE, CHARGES, EMPLOYEE_ALLOCATION, or SYSTEM_LINE_ADJUSTMENT.

    • orgEmployeeGroupId integer

      Organization employee group ID

  • payrollPayments array[object]

    Request model for a payroll payment

    Hide payrollPayments attributes Show payrollPayments attributes object

    Request model for a payroll payment

    • id integer

      Entity ID. If negative value, a new entity will be created

    • payrollEntityId integer

      Payroll entity ID this payment belongs to

    • requestedDate string Required

      Requested payment date (format dd/MM/yyyy)

    • plannedDate string

      Planned payment date (format dd/MM/yyyy)

    • sentDate string

      Date the payment was sent (format dd/MM/yyyy)

    • valueDate string

      Value date of the payment (format dd/MM/yyyy)

    • requestedAmount string

      Requested amount as string

    • paidAmount string

      Paid amount as string

    • bankCharges string

      Bank charges as string

    • payableByAccountId integer Required

      Chart of accounts ID used as the payable-by account

    • payableToBankId integer

      Bank ID to pay to

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • errorCode object
        Hide errorCode attributes Show errorCode attributes object
        • errorCode string

          Values are NO_ERROR, NOT_IMPLEMENTED_YET, CONTACT_NOT_FOUND, FIELD_REQUIRED, VALIDATION_ERROR, DUPLICATION_ERROR, UNIQUE_CONSTRAINT_VIOLATION, WRONG_PASSWORD_FORMAT, WRONG_PASSWORD, ACTION_DENIED, NOT_FOUND, EXPECTED_ONE_FILE, UNIQUE_VIOLATION, CONTENT_EMPTY, INVALID_TYPE, CONVERSION_ERROR, FILE_PARSE_EXCEPTION, or IN_USE.

        • errorDetailValues array[object]
          Hide errorDetailValues attributes Show errorDetailValues attributes object
          • errorCode string
          • fieldName string
          • data string
          • isSevere boolean
      • freshData

        Refreshed domain data

      • freshRow

        Refreshed table row data

      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer(int64)
        • name string
      • error boolean
      • severeError boolean
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

POST /api-v1/payroll/batch
curl \
 --request POST 'https://wyzio.app/api-v1/payroll/batch' \
 --header "Content-Type: application/json" \
 --data '[{"id":12345678,"organizationId":12345678,"createdOn":"01/06/2026","paymentDate":"01/06/2026","calendarYear":2026,"monthType":"JANUARY","monthStartDate":"2026-06-01","monthEndDate":"2026-06-30","staffEntityId":12345678,"contactEntityId":12345678,"currencyId":12345678,"employeeInfoId":12345678,"address":{"id":12345678,"name":"Main Office","line1":123,"line2":"Suite 4B","city":"Geneva","region":{"id":206},"countryCode2":"CH","countryId":12345678,"postCode":1200,"houseNumber":42,"toTheAttentionOf":"John Doe","position":1,"service":"HR"},"grossSalary":5000.0,"netSalary":3500.0,"payable":3500.0,"description":"June 2026 payroll","status":"DRAFT","staffPayslipId":12345678,"journalEntryId":12345678,"removedPayrollLineNumbers":[1],"payrollLines":[{"id":12345678,"payrollEntityId":12345678,"payslipLineEntityId":12345678,"number":1,"localizations":{"id":12345678,"en":"English translation","fr":"Traduction française","de":"Deutsche Übersetzung","it":"Traduzione in italiano"},"payslipValueType":"AMOUNT","payslipLineType":"EARNING","isAutomaticallyAdded":false,"isChanged":false,"isShownOnSalarySlip":true,"description":"Bonus","baseAmount":5000.0,"employeeRate":5.25,"employerRate":8.0,"employeeAmount":262.5,"employerAmount":400.0,"specialAttributionType":"NONE","orgEmployeeGroupId":12345678}],"payrollPayments":[{"id":12345678,"payrollEntityId":12345678,"requestedDate":"01/06/2026","plannedDate":"05/06/2026","sentDate":"05/06/2026","valueDate":"05/06/2026","requestedAmount":3500.0,"paidAmount":3500.0,"bankCharges":5.0,"payableByAccountId":12345678,"payableToBankId":12345678}]}]'
Request examples
# Headers

# Payload
[
  {
    "id": 12345678,
    "organizationId": 12345678,
    "createdOn": "01/06/2026",
    "paymentDate": "01/06/2026",
    "calendarYear": 2026,
    "monthType": "JANUARY",
    "monthStartDate": "2026-06-01",
    "monthEndDate": "2026-06-30",
    "staffEntityId": 12345678,
    "contactEntityId": 12345678,
    "currencyId": 12345678,
    "employeeInfoId": 12345678,
    "address": {
      "id": 12345678,
      "name": "Main Office",
      "line1": 123,
      "line2": "Suite 4B",
      "city": "Geneva",
      "region": {
        "id": 206
      },
      "countryCode2": "CH",
      "countryId": 12345678,
      "postCode": 1200,
      "houseNumber": 42,
      "toTheAttentionOf": "John Doe",
      "position": 1,
      "service": "HR"
    },
    "grossSalary": 5000.0,
    "netSalary": 3500.0,
    "payable": 3500.0,
    "description": "June 2026 payroll",
    "status": "DRAFT",
    "staffPayslipId": 12345678,
    "journalEntryId": 12345678,
    "removedPayrollLineNumbers": [
      1
    ],
    "payrollLines": [
      {
        "id": 12345678,
        "payrollEntityId": 12345678,
        "payslipLineEntityId": 12345678,
        "number": 1,
        "localizations": {
          "id": 12345678,
          "en": "English translation",
          "fr": "Traduction française",
          "de": "Deutsche Übersetzung",
          "it": "Traduzione in italiano"
        },
        "payslipValueType": "AMOUNT",
        "payslipLineType": "EARNING",
        "isAutomaticallyAdded": false,
        "isChanged": false,
        "isShownOnSalarySlip": true,
        "description": "Bonus",
        "baseAmount": 5000.0,
        "employeeRate": 5.25,
        "employerRate": 8.0,
        "employeeAmount": 262.5,
        "employerAmount": 400.0,
        "specialAttributionType": "NONE",
        "orgEmployeeGroupId": 12345678
      }
    ],
    "payrollPayments": [
      {
        "id": 12345678,
        "payrollEntityId": 12345678,
        "requestedDate": "01/06/2026",
        "plannedDate": "05/06/2026",
        "sentDate": "05/06/2026",
        "valueDate": "05/06/2026",
        "requestedAmount": 3500.0,
        "paidAmount": 3500.0,
        "bankCharges": 5.0,
        "payableByAccountId": 12345678,
        "payableToBankId": 12345678
      }
    ]
  }
]
Response examples (200)
{
  "items": [
    {
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "errorCode": "string",
            "fieldName": "string",
            "data": "string",
            "isSevere": true
          }
        ]
      },
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "error": true,
      "severeError": true
    }
  ]
}