Payroll Item

A payroll item record exposes a payroll item to REST web services.

Record ID

The record ID for the payroll item REST record is payrollitem.

This record:

  • is not a subrecord

  • has the following subrecords:

    • assetAccount

    • expenseAccount

    • itemType

    • liabilityAccount

    • reportingSection

    • subsidiary

    • vendor

Prerequisites

Before you can use this record with REST web services, you must enable the Token-Based Authentication feature.

Inaccessible Elements

A list of all employees and applying payroll items to employees is not available in REST web services. However, they can be accessed in the UI.

Elements with Different Functionality

The following elements are display-only:

  • itemType

  • limitType

  • subsidiary

Actions

The following actions are available for the payroll item record:

  • Delete

  • Reset

  • Save

  • Save and New

Elements Related to Taxation Features

The payroll item has the following tax-related fields that are not exposed to REST:

  • companytaxoptions

  • emptaxtoptions

Note:

REST web services do not support legacy tax features. To work with taxation through REST web services, you must have the SuiteTax feature enabled. For more information about using SuiteTax, see SuiteTax.

In REST web services, the name key for subrecords is shown as refName. In SOAP web services, the name key is shown as name.

Code Samples

The following code sample shows how to create a payroll item:

            POST
 https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/payrollItem 
  '{ 
  "companyName": "Company 1753208683", 
  "email": "customer@xxxxxx.com", 
  "subsidiary": { 
    "id": 1 
  }, 
  "itemType": { 
    "id": 2 
  }, 
  "name": "Salary REST TEST", 
  "description": "Description for Salary REST Test Payroll Item", 
  "accountcategory": { 
    "id": "Expense" 
  }, 
  "expenseAccount": { 
    "id": 84 
  } 
}' 

          

The following code sample shows how to delete a payroll item:

            DELETE https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/payrollItem/20 

          

The following code sample shows how to update a payroll item:

            PATCH 
https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/payrollItem/<PAYROLL_ITEM_ID> 
{ 
  "name": "Salary Test" 
}' 

          

The following code sample shows how to get a payroll item:

            GET https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/payrollitem/21 
{ 
  "accountcategory": { 
    "id": "Expense", 
    "refName": "Expense" 
  }, 
  "description": "Description for Salary REST Test Payroll Item", 
  "employeePaid": false, 
  "expenseAccount": { 
    "id": "84", 
    "refName": "Payroll Expenses" 
  }, 
  "id": "21", 
  "inactive": false, 
 
  "itemType": { 
    "id": "2", 
    "refName": "Earning:Salary" 
  }, 
  "limitiswithholding": { 
    "id": "wage", 
    "refName": "Wage" 
  }, 
  "name": "Salary REST TEST", 
  "subsidiary": { 
    "id": "1", 
    "refName": "Parent Company" 
  } 
} 

          

Related Topics

General Notices