curl --request POST \
--url https://int-prodtest.m1amdocs.io/v3/entitlement \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"subscription": {
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>",
"paymentMethod": {
"id": "<string>",
"primary": true,
"active": true
}
},
"items": [
{
"merchantProductCode": "<string>",
"itemId": "<string>",
"commerceProductCode": "<string>",
"partnerCustomerId": "<string>",
"quantity": 500,
"metadata": {}
}
],
"id": "<string>",
"commerceManaged": false
}
}
'import requests
url = "https://int-prodtest.m1amdocs.io/v3/entitlement"
payload = { "subscription": {
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>",
"paymentMethod": {
"id": "<string>",
"primary": True,
"active": True
}
},
"items": [
{
"merchantProductCode": "<string>",
"itemId": "<string>",
"commerceProductCode": "<string>",
"partnerCustomerId": "<string>",
"quantity": 500,
"metadata": {}
}
],
"id": "<string>",
"commerceManaged": False
} }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscription: {
account: {
id: '<string>',
externalId: '<string>',
parent: '<string>',
paymentMethod: {id: '<string>', primary: true, active: true}
},
items: [
{
merchantProductCode: '<string>',
itemId: '<string>',
commerceProductCode: '<string>',
partnerCustomerId: '<string>',
quantity: 500,
metadata: {}
}
],
id: '<string>',
commerceManaged: false
}
})
};
fetch('https://int-prodtest.m1amdocs.io/v3/entitlement', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscription' => [
'account' => [
'id' => '<string>',
'externalId' => '<string>',
'parent' => '<string>',
'paymentMethod' => [
'id' => '<string>',
'primary' => true,
'active' => true
]
],
'items' => [
[
'merchantProductCode' => '<string>',
'itemId' => '<string>',
'commerceProductCode' => '<string>',
'partnerCustomerId' => '<string>',
'quantity' => 500,
'metadata' => [
]
]
],
'id' => '<string>',
'commerceManaged' => false
]
]),
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"
payload := strings.NewReader("{\n \"subscription\": {\n \"account\": {\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"parent\": \"<string>\",\n \"paymentMethod\": {\n \"id\": \"<string>\",\n \"primary\": true,\n \"active\": true\n }\n },\n \"items\": [\n {\n \"merchantProductCode\": \"<string>\",\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"partnerCustomerId\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n }\n ],\n \"id\": \"<string>\",\n \"commerceManaged\": false\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://int-prodtest.m1amdocs.io/v3/entitlement")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subscription\": {\n \"account\": {\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"parent\": \"<string>\",\n \"paymentMethod\": {\n \"id\": \"<string>\",\n \"primary\": true,\n \"active\": true\n }\n },\n \"items\": [\n {\n \"merchantProductCode\": \"<string>\",\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"partnerCustomerId\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n }\n ],\n \"id\": \"<string>\",\n \"commerceManaged\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-prodtest.m1amdocs.io/v3/entitlement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscription\": {\n \"account\": {\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"parent\": \"<string>\",\n \"paymentMethod\": {\n \"id\": \"<string>\",\n \"primary\": true,\n \"active\": true\n }\n },\n \"items\": [\n {\n \"merchantProductCode\": \"<string>\",\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"partnerCustomerId\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n }\n ],\n \"id\": \"<string>\",\n \"commerceManaged\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "<string>",
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>"
},
"items": [
{
"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": "input-conflict",
"message": "<string>"
}Create Entitlement
Provision one or more entitlement items under a subscription. The account and each item’s merchantProductCode are mandatory. If an item’s itemId is supplied it is honored; otherwise MarketONE generates one and returns it in the response.
curl --request POST \
--url https://int-prodtest.m1amdocs.io/v3/entitlement \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"subscription": {
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>",
"paymentMethod": {
"id": "<string>",
"primary": true,
"active": true
}
},
"items": [
{
"merchantProductCode": "<string>",
"itemId": "<string>",
"commerceProductCode": "<string>",
"partnerCustomerId": "<string>",
"quantity": 500,
"metadata": {}
}
],
"id": "<string>",
"commerceManaged": false
}
}
'import requests
url = "https://int-prodtest.m1amdocs.io/v3/entitlement"
payload = { "subscription": {
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>",
"paymentMethod": {
"id": "<string>",
"primary": True,
"active": True
}
},
"items": [
{
"merchantProductCode": "<string>",
"itemId": "<string>",
"commerceProductCode": "<string>",
"partnerCustomerId": "<string>",
"quantity": 500,
"metadata": {}
}
],
"id": "<string>",
"commerceManaged": False
} }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscription: {
account: {
id: '<string>',
externalId: '<string>',
parent: '<string>',
paymentMethod: {id: '<string>', primary: true, active: true}
},
items: [
{
merchantProductCode: '<string>',
itemId: '<string>',
commerceProductCode: '<string>',
partnerCustomerId: '<string>',
quantity: 500,
metadata: {}
}
],
id: '<string>',
commerceManaged: false
}
})
};
fetch('https://int-prodtest.m1amdocs.io/v3/entitlement', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscription' => [
'account' => [
'id' => '<string>',
'externalId' => '<string>',
'parent' => '<string>',
'paymentMethod' => [
'id' => '<string>',
'primary' => true,
'active' => true
]
],
'items' => [
[
'merchantProductCode' => '<string>',
'itemId' => '<string>',
'commerceProductCode' => '<string>',
'partnerCustomerId' => '<string>',
'quantity' => 500,
'metadata' => [
]
]
],
'id' => '<string>',
'commerceManaged' => false
]
]),
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"
payload := strings.NewReader("{\n \"subscription\": {\n \"account\": {\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"parent\": \"<string>\",\n \"paymentMethod\": {\n \"id\": \"<string>\",\n \"primary\": true,\n \"active\": true\n }\n },\n \"items\": [\n {\n \"merchantProductCode\": \"<string>\",\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"partnerCustomerId\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n }\n ],\n \"id\": \"<string>\",\n \"commerceManaged\": false\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://int-prodtest.m1amdocs.io/v3/entitlement")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"subscription\": {\n \"account\": {\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"parent\": \"<string>\",\n \"paymentMethod\": {\n \"id\": \"<string>\",\n \"primary\": true,\n \"active\": true\n }\n },\n \"items\": [\n {\n \"merchantProductCode\": \"<string>\",\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"partnerCustomerId\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n }\n ],\n \"id\": \"<string>\",\n \"commerceManaged\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-prodtest.m1amdocs.io/v3/entitlement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscription\": {\n \"account\": {\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"parent\": \"<string>\",\n \"paymentMethod\": {\n \"id\": \"<string>\",\n \"primary\": true,\n \"active\": true\n }\n },\n \"items\": [\n {\n \"merchantProductCode\": \"<string>\",\n \"itemId\": \"<string>\",\n \"commerceProductCode\": \"<string>\",\n \"partnerCustomerId\": \"<string>\",\n \"quantity\": 500,\n \"metadata\": {}\n }\n ],\n \"id\": \"<string>\",\n \"commerceManaged\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": "<string>",
"account": {
"id": "<string>",
"externalId": "<string>",
"parent": "<string>"
},
"items": [
{
"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": "input-conflict",
"message": "<string>"
}Authorizations
The authorization key obtained from MarketONE.
Headers
A unique, client‑generated identifier used to ensure idempotent request processing. When provided, the server uses this key to recognize and safely handle retry attempts of the same request, preventing duplicate operations (e.g., double charges or duplicate resource creation). If the same key is reused with an identical request, the server returns the original response instead of processing the request again.
Body
Request to provision one or more entitlement items under a subscription. The account and each item's merchantProductCode are mandatory.
Show child attributes
Show child attributes
Response
OK
Response returned when provisioning entitlements under a subscription.
Show child attributes
Show child attributes
Was this page helpful?

