Admin Sector: Expense Requests
Reject Expense Request
Reject a pending expense request. Restricted to Manager / Admin / Director / Finance.
PATCH
/
api
/
v1
/
expense-requests
/
{expense_request_id}
/
reject
Reject Expense Request
curl --request PATCH \
--url https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"requesterId": "<string>",
"requestType": "<string>",
"paymentMethod": "<string>",
"totalAmount": "<string>",
"currency": "<string>",
"status": "<string>",
"paidAmount": 0,
"usedAmount": 0,
"supplierId": "<string>",
"notes": "<string>",
"linkedAdvanceRequestId": "<string>",
"sourceTemplateId": "<string>",
"createdAt": "<string>",
"lineItems": [
{
"id": "<string>",
"expenseRequestId": "<string>",
"description": "<string>",
"amount": "<string>",
"quantity": "<string>",
"unitPrice": "<string>",
"supplierId": "<string>",
"managementAccountId": "<string>",
"receiptUrl": "<string>",
"createdAt": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
application/json
Response
Successful Response
Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Show child attributes
Show child attributes
Previous
Transfer To EmployeeTransfer funds to employee for an approved expense request.
Creates a transfer_record and updates expense_request status to 'paid'.
Restricted to Accountant / Manager / Admin / Director / Finance.
Next
⌘I
Reject Expense Request
curl --request PATCH \
--url https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/api/v1/expense-requests/{expense_request_id}/reject")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"requesterId": "<string>",
"requestType": "<string>",
"paymentMethod": "<string>",
"totalAmount": "<string>",
"currency": "<string>",
"status": "<string>",
"paidAmount": 0,
"usedAmount": 0,
"supplierId": "<string>",
"notes": "<string>",
"linkedAdvanceRequestId": "<string>",
"sourceTemplateId": "<string>",
"createdAt": "<string>",
"lineItems": [
{
"id": "<string>",
"expenseRequestId": "<string>",
"description": "<string>",
"amount": "<string>",
"quantity": "<string>",
"unitPrice": "<string>",
"supplierId": "<string>",
"managementAccountId": "<string>",
"receiptUrl": "<string>",
"createdAt": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}