Manage entitlements using Graph API
Resolve an organization’s default entitlement
If this gives a count > 1:
/graph/Organization[@id='ORG_ID']/~OneToMany/Entitlement{count}
Then use:
/graph/Organization[@id='ORG_ID']/~OneToMany/Entitlement[@defaultEntitlement=true]
Else this is sufficient:
/graph/Organization[@id='ORG_ID']/~OneToMany/Entitlement
Note:
- 
    
If an organization is assigned more than one entitlement instances, exactly one of them must have
defaultEntitlement=true. - 
    
If an organization has only one entitlement and its
defaultEntitlement=trueOR null, it’s treated as the default. 
Create or update an organization’s default entitlement
POST /graph
Content-Type: application/json
{
	"__objType": "Entitlement",
	"referenceFields": {
		"__objType": "HashMap",
		"Entries": [{
			"__objType": "KeyValue",
			"value": {
				"__objType": "String",
				"value": "${ORGANIZATION_ID}"
			},
			"key": {
				"__objType": "String",
				"value": "ref_Organization_id"
			}
		}]
	},
	"active": true,
	"title": "${ORGANIZATION_NAME} default entitlement",
	"defaultEntitlement": true,
	"id": "${ENTITLEMENT_ID}"
}
To create or update a non-default entitlement, just change defaultEntitlement=false.