Delete Employee Salary

Delete Employee Salary

Purpose

To delete payroll/location from your organization.

Request URL

https://live.membroz.com/api/payrolls/[payrollid]

Request Method

DELETE
Note
  • Send authkey in https header
  • You can delete only one payroll per request.
  • Enterprise customer can replace domain name with their hosting Url. for example https://app.xyz.com/api/payrolls
  • API return success message or return error message.

Request JSON

Attribute Data Type Mandatory Description
PAYROLLID String yes The record ID of the payroll you want to update. it is pass in request /api/payrolls/[payrollid]

Sample Request

curl --location --request DELETE 'https://live.membroz.com/api/payrolls/[payrollid]'\
--header 'authkey: XXXXXXXXXX' \
--data-raw ''
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://live.membroz.com/api/payrolls/[payrollid]")
  .method("DELETE", body)
  .addHeader("authkey", "XXXXXXXXXX")
  .build();
Response response = client.newCall(request).execute();
 "https://live.membroz.com/api/payrolls/[payrollid]",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "authkey: XXXXXXXXXX"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://live.membroz.com/api/payrolls/[payrollid]"

payload = {}
headers = {
  'authkey': 'XXXXXXXXXX'}

response = requests.request("DELETE", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
require "uri"
require "net/http"

url = URI("https://live.membroz.com/api/payrolls/[payrollid]")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["authkey"] = "XXXXXXXXXX"

response = https.request(request)
puts response.read_body
var client = new RestClient("https://live.membroz.com/api/payrolls/[payrollid]");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("authkey", "XXXXXXXXXX");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Possible Errors

HTTP Status Error Code Message Reason
permission denied 403 You do not have permission

Sample Response

{
    "message": "DELETED"
}
Send Message
Hello!
How can we help!