curl --request PUT \
--url https://int-prodtest.m1amdocs.io/v3/entitlement/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"itemId": "<string>",
"commerceProductCode": "<string>",
"merchantProductCode": "<string>",
"quantity": 500,
"metadata": {}
}
'import requests
url = "https://int-prodtest.m1amdocs.io/v3/entitlement/{id}"
payload = {
"itemId": "<string>",
"commerceProductCode": "<string>",
"merchantProductCode": "<string>",
"quantity": 500,
"metadata": {}
}
headers = {
"X-API-KEY": "<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': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
itemId: '<string>',
commerceProductCode: '<string>',
merchantProductCode: '<string>',
quantity: 500,
metadata: {}
})
};
fetch('https://int-prodtest.m1amdocs.io/v3/entitlement/{id}', 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://int-prodtest.m1amdocs.io/v3/entitlement/{id}",
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([
'itemId' => '<string>',
'commerceProductCode' => '<string>',
'merchantProductCode' => '<string>',
'quantity' => 500,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://int-prodtest.m1amdocs.io/v3/entitlement/{id}"
payload := strings.NewReader("{\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"merchantProductCode\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<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://int-prodtest.m1amdocs.io/v3/entitlement/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"merchantProductCode\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-prodtest.m1amdocs.io/v3/entitlement/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"merchantProductCode\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "<string>",
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>"
},
"item": {
"itemId": "<string>",
"commerceProductCode": "<string>",
"merchantProductCode": "<string>",
"partnerCustomerId": "<string>",
"quantity": 500,
"partnerSubscriptionId": "<string>",
"externalPartnerSubscriptionId": "<string>",
"partnerCode": "<string>",
"serviceStatus": "UNPROVISIONED",
"createdDate": "<string>",
"updatedDate": "<string>",
"startServiceDate": "<string>",
"endServiceDate": "<string>",
"activatedDate": "<string>",
"metadata": {}
}
}
}{
"code": "invalid-request",
"message": "<string>",
"validationErrors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"code": "authentication-required",
"message": "<string>"
}{
"code": "forbidden",
"message": "<string>"
}{
"code": "not-found",
"message": "<string>"
}Update Entitlement
Update a single entitlement identified by the entitlement id. All fields are optional. The itemId and commerceProductCode cannot be modified independently; when changing either of them the merchantProductCode representing that combination must also be supplied. Returns the updated entitlement as a single item.
curl --request PUT \
--url https://int-prodtest.m1amdocs.io/v3/entitlement/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"itemId": "<string>",
"commerceProductCode": "<string>",
"merchantProductCode": "<string>",
"quantity": 500,
"metadata": {}
}
'import requests
url = "https://int-prodtest.m1amdocs.io/v3/entitlement/{id}"
payload = {
"itemId": "<string>",
"commerceProductCode": "<string>",
"merchantProductCode": "<string>",
"quantity": 500,
"metadata": {}
}
headers = {
"X-API-KEY": "<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': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
itemId: '<string>',
commerceProductCode: '<string>',
merchantProductCode: '<string>',
quantity: 500,
metadata: {}
})
};
fetch('https://int-prodtest.m1amdocs.io/v3/entitlement/{id}', 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://int-prodtest.m1amdocs.io/v3/entitlement/{id}",
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([
'itemId' => '<string>',
'commerceProductCode' => '<string>',
'merchantProductCode' => '<string>',
'quantity' => 500,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://int-prodtest.m1amdocs.io/v3/entitlement/{id}"
payload := strings.NewReader("{\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"merchantProductCode\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<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://int-prodtest.m1amdocs.io/v3/entitlement/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"merchantProductCode\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-prodtest.m1amdocs.io/v3/entitlement/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"merchantProductCode\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "<string>",
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>"
},
"item": {
"itemId": "<string>",
"commerceProductCode": "<string>",
"merchantProductCode": "<string>",
"partnerCustomerId": "<string>",
"quantity": 500,
"partnerSubscriptionId": "<string>",
"externalPartnerSubscriptionId": "<string>",
"partnerCode": "<string>",
"serviceStatus": "UNPROVISIONED",
"createdDate": "<string>",
"updatedDate": "<string>",
"startServiceDate": "<string>",
"endServiceDate": "<string>",
"activatedDate": "<string>",
"metadata": {}
}
}
}{
"code": "invalid-request",
"message": "<string>",
"validationErrors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"code": "authentication-required",
"message": "<string>"
}{
"code": "forbidden",
"message": "<string>"
}{
"code": "not-found",
"message": "<string>"
}Authorizations
The authorization key obtained from MarketONE.
Path Parameters
The id parameter is the entitlement identifier.
Body
Entitlement update request for a single entitlement (identified by the entitlement id in the path). All fields are optional. The itemId and commerceProductCode cannot be modified independently; when changing either of them the merchantProductCode representing that combination must also be supplied.
The entitlement item identifier. Cannot be changed on its own - must be sent together with the corresponding merchantProductCode.
The commerce (reseller/service provider) product code. Cannot be changed on its own - must be sent together with the corresponding merchantProductCode.
The merchant product code. Required when changing itemId or commerceProductCode.
Populate the quantity that this entitlement should represent. Required for products with QUANTITY entitlementType.
x >= 1500
A set of key/value pairs that you can attach to an object. Useful for storing additional information.
Show child attributes
Show child attributes
Response
OK
Response returned when updating a single entitlement. Mirrors the provisioning response but contains a single item rather than a list.
Show child attributes
Show child attributes
Was this page helpful?

