API Specification
Beneficiaries
Update a beneficiary.
code examples curl location globoff request patch 'https //sand api monoova com/global/v1/beneficiaries/{id}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "beneficiary" { "name" { "first name" "", "last name" "" }, "mobile" { "isd" "", "number" "" }, "address" { "address line 1" "", "city" "", "postcode" "" }, "card details" { "card number" "" } } }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "beneficiary" { "name" { "first name" "", "last name" "" }, "mobile" { "isd" "", "number" "" }, "address" { "address line 1" "", "city" "", "postcode" "" }, "card details" { "card number" "" } } }); var requestoptions = { method 'patch', headers myheaders, body raw, redirect 'follow' }; fetch("https //sand api monoova com/global/v1/beneficiaries/{id}", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //sand api monoova com/global/v1/beneficiaries/{id}") https = net http new(url host, url port) https use ssl = true request = net http patch new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "beneficiary" { "name" { "first name" "", "last name" "" }, "mobile" { "isd" "", "number" "" }, "address" { "address line 1" "", "city" "", "postcode" "" }, "card details" { "card number" "" } } }) response = https request(request) puts response read body import requests import json url = "https //sand api monoova com/global/v1/beneficiaries/{id}" payload = json dumps({ "beneficiary" { "name" { "first name" "", "last name" "" }, "mobile" { "isd" "", "number" "" }, "address" { "address line 1" "", "city" "", "postcode" "" }, "card details" { "card number" "" } } }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("patch", url, headers=headers, data=payload) print(response text) responses // a beneficiary { "beneficiary" { "id" 0, "status" "", "reason for payment" "", "relation with customer" "", "name" { "first name" "", "middle name" "", "last name" "" }, "country" { "id" 0, "name" "", "country code" "" }, "currency" { "id" 0, "name" "", "currency code" "" }, "address" { "address line 1" "", "address line 2" "", "suburb" "", "city" "", "province" "", "postcode" "", "country code" "" }, "remuneration type" { "id" 0, "name" "", "label" "" }, "bank details" { "bank name" "", "bank code" "", "branch code" "", "branch name" "", "account name" "", "account number" "", "local code" "", "international code" "", "pay id" "", "bsb" "" }, "card details" { "id" 0, "token" false, "last digits" "", "updated at" "" } } }// unauthorized // forbidden // not found // invalid request { "errors" { "request field" \[ "" ] } }// internal server error