Coverage
Update coverage option
Updates a specified coverage option for the portfolio
PUT
/
api
/
{portfolio}
/
portfolios
/
v1
/
coverageOptions
/
{coverageUuid}
Update coverage option
curl --request PUT \
--url https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"premiumInPennies": 2500,
"coverageAmountInPennies": 10000000,
"providerTermsUrl": "https://partner.com/terms/coverage-123",
"providerCoverageId": "COVERAGE_PARTNER_123",
"description": "Premium tenant protection insurance with up to $100,000 coverage"
}
'import requests
url = "https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}"
payload = {
"premiumInPennies": 2500,
"coverageAmountInPennies": 10000000,
"providerTermsUrl": "https://partner.com/terms/coverage-123",
"providerCoverageId": "COVERAGE_PARTNER_123",
"description": "Premium tenant protection insurance with up to $100,000 coverage"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
premiumInPennies: 2500,
coverageAmountInPennies: 10000000,
providerTermsUrl: 'https://partner.com/terms/coverage-123',
providerCoverageId: 'COVERAGE_PARTNER_123',
description: 'Premium tenant protection insurance with up to $100,000 coverage'
})
};
fetch('https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}', 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://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'premiumInPennies' => 2500,
'coverageAmountInPennies' => 10000000,
'providerTermsUrl' => 'https://partner.com/terms/coverage-123',
'providerCoverageId' => 'COVERAGE_PARTNER_123',
'description' => 'Premium tenant protection insurance with up to $100,000 coverage'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}"
payload := strings.NewReader("{\n \"premiumInPennies\": 2500,\n \"coverageAmountInPennies\": 10000000,\n \"providerTermsUrl\": \"https://partner.com/terms/coverage-123\",\n \"providerCoverageId\": \"COVERAGE_PARTNER_123\",\n \"description\": \"Premium tenant protection insurance with up to $100,000 coverage\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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.put("https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"premiumInPennies\": 2500,\n \"coverageAmountInPennies\": 10000000,\n \"providerTermsUrl\": \"https://partner.com/terms/coverage-123\",\n \"providerCoverageId\": \"COVERAGE_PARTNER_123\",\n \"description\": \"Premium tenant protection insurance with up to $100,000 coverage\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"premiumInPennies\": 2500,\n \"coverageAmountInPennies\": 10000000,\n \"providerTermsUrl\": \"https://partner.com/terms/coverage-123\",\n \"providerCoverageId\": \"COVERAGE_PARTNER_123\",\n \"description\": \"Premium tenant protection insurance with up to $100,000 coverage\"\n}"
response = http.request(request)
puts response.read_body{
"itemTypeUuid": "4b5c6d7e-8f9a-0b1c-2d3e-4f5a6b7c8d9e",
"coverageUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}Headers
Api key required to authenticate your request. Please reach out to monument for a key.
Example:
"monument-2230012-2312321"
Path Parameters
Body
application/json
Value paid monthly by the person that uses this coverage
Example:
2500
Value paid by the insurance company in case of a claim
Example:
10000000
Url to the acceptance terms for the partner's coverage
Example:
"https://partner.com/terms/coverage-123"
This id represents the coverage item in the partner's database
Example:
"COVERAGE_PARTNER_123"
Value for the coverage description and new itemType name and description
Example:
"Premium tenant protection insurance with up to $100,000 coverage"
⌘I
Update coverage option
curl --request PUT \
--url https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"premiumInPennies": 2500,
"coverageAmountInPennies": 10000000,
"providerTermsUrl": "https://partner.com/terms/coverage-123",
"providerCoverageId": "COVERAGE_PARTNER_123",
"description": "Premium tenant protection insurance with up to $100,000 coverage"
}
'import requests
url = "https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}"
payload = {
"premiumInPennies": 2500,
"coverageAmountInPennies": 10000000,
"providerTermsUrl": "https://partner.com/terms/coverage-123",
"providerCoverageId": "COVERAGE_PARTNER_123",
"description": "Premium tenant protection insurance with up to $100,000 coverage"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
premiumInPennies: 2500,
coverageAmountInPennies: 10000000,
providerTermsUrl: 'https://partner.com/terms/coverage-123',
providerCoverageId: 'COVERAGE_PARTNER_123',
description: 'Premium tenant protection insurance with up to $100,000 coverage'
})
};
fetch('https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}', 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://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'premiumInPennies' => 2500,
'coverageAmountInPennies' => 10000000,
'providerTermsUrl' => 'https://partner.com/terms/coverage-123',
'providerCoverageId' => 'COVERAGE_PARTNER_123',
'description' => 'Premium tenant protection insurance with up to $100,000 coverage'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}"
payload := strings.NewReader("{\n \"premiumInPennies\": 2500,\n \"coverageAmountInPennies\": 10000000,\n \"providerTermsUrl\": \"https://partner.com/terms/coverage-123\",\n \"providerCoverageId\": \"COVERAGE_PARTNER_123\",\n \"description\": \"Premium tenant protection insurance with up to $100,000 coverage\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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.put("https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"premiumInPennies\": 2500,\n \"coverageAmountInPennies\": 10000000,\n \"providerTermsUrl\": \"https://partner.com/terms/coverage-123\",\n \"providerCoverageId\": \"COVERAGE_PARTNER_123\",\n \"description\": \"Premium tenant protection insurance with up to $100,000 coverage\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.prd.monument.io/api/{portfolio}/portfolios/v1/coverageOptions/{coverageUuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"premiumInPennies\": 2500,\n \"coverageAmountInPennies\": 10000000,\n \"providerTermsUrl\": \"https://partner.com/terms/coverage-123\",\n \"providerCoverageId\": \"COVERAGE_PARTNER_123\",\n \"description\": \"Premium tenant protection insurance with up to $100,000 coverage\"\n}"
response = http.request(request)
puts response.read_body{
"itemTypeUuid": "4b5c6d7e-8f9a-0b1c-2d3e-4f5a6b7c8d9e",
"coverageUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
