Update Revenue Head

//A code snippet of how to consume the API

var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2RlbW8ubW9uaWNyZWRpdC5jb20vYXBpL3YxL2NvcmUvYXV0aC9sb2dpbiIsImlhdCI6MTY2ODk2NzQ0MywiZXhwIjoxNjY4OTcxMDQzLCJuYmYiOjE2Njg5Njc0NDMsImp0aSI6ImF0UE9GVHE4cU4yN2lBWlciLCJzdWIiOiJVU0FETUlOIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.shrbQUV29vXRF30qMeBN3zxlc5JXd03QyMeD6ekzudU");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "revname": "test",
  "revenue_code": "123",
  "settlement_bank_id": "SB6283c76a96d67",
  "display": "yes"
});

var requestOptions = {
  method: 'PUT',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://demo.backend.monicredit.com/api/v1/payment/revenue_head/REV62840c1315289", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

PUT {{BaseURL}}/payment/revenue_head/REV000000

Headers

NameTypeDescription

Authorization*

String

{{bearer_token}}

Request Body

NameTypeDescription

revname*

String

Test

rev_status*

String

REVHEAD

revenue_code*

String

0000

settlement_bank_id*

String

SB00000

display*

String

yes

{
    "status": true,
    "message": "revenue_head.updated",
    "data": {
        "id": "REV000000",
        "name": "test",
        "type": "REVHEAD",
        "revenue_code": "123",
        "settlement_bank_id": "SB000000",
        "display": "yes",
        "created_at": "2022-05-17T20:56:51.000000Z",
        "updated_at": "2022-05-17T20:59:31.000000Z"
    }
}

Last updated