Update bill
curl --request PATCH \
--url https://api.grainledger.com/api/v1/bills/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billNumber": "INV-1042",
"billDate": "2026-06-15",
"dueDate": "2026-07-15",
"amount": 850
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
billNumber: 'INV-1042',
billDate: '2026-06-15',
dueDate: '2026-07-15',
amount: 850
})
};
fetch('https://api.grainledger.com/api/v1/bills/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.grainledger.com/api/v1/bills/{id}"
payload = {
"billNumber": "INV-1042",
"billDate": "2026-06-15",
"dueDate": "2026-07-15",
"amount": 850
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"billNumber": "<string>",
"billDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123,
"postingMode": "STANDARD",
"paidAmount": 123,
"creditedAmount": 123,
"remainingAmount": 123,
"status": "<string>",
"vendorId": "<string>",
"fundId": "<string>"
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}Bills
Update bill
PATCH
https://api.grainledger.com
/
api
/
v1
/
bills
/
{id}
Update bill
curl --request PATCH \
--url https://api.grainledger.com/api/v1/bills/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billNumber": "INV-1042",
"billDate": "2026-06-15",
"dueDate": "2026-07-15",
"amount": 850
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
billNumber: 'INV-1042',
billDate: '2026-06-15',
dueDate: '2026-07-15',
amount: 850
})
};
fetch('https://api.grainledger.com/api/v1/bills/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.grainledger.com/api/v1/bills/{id}"
payload = {
"billNumber": "INV-1042",
"billDate": "2026-06-15",
"dueDate": "2026-07-15",
"amount": 850
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"billNumber": "<string>",
"billDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"amount": 123,
"postingMode": "STANDARD",
"paidAmount": 123,
"creditedAmount": 123,
"remainingAmount": 123,
"status": "<string>",
"vendorId": "<string>",
"fundId": "<string>"
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}{
"code": "forbidden",
"message": "You do not have access to this organization.",
"error": "You do not have access to this organization.",
"details": {
"fields": [
{
"field": "amount",
"code": "invalid_type"
}
]
}
}Authorizations
ApiKeyAuthGrainOAuth2BearerAuth
Headers
Body
application/json
Last modified on October 10, 2026