POST admin/network/membershippolicy/updateprogramrule

Upsert ONE program's rule. Body: { entityId, programKey, inherit?, requiredPlanIds?, programEnforcementMode?, programGraceDaysAfterExpiry?, clearPlanIds?, clearEnforcementMode?, clearGraceDays? }. inherit = true DELETES the row (back to the network default). Otherwise this is a PARTIAL write: an omitted field keeps its stored value, and the clear* flags are how a caller says "inherit this field again". An unknown programKey or an unknown mode is REFUSED with InvalidParameter rather than silently coerced — on a single-key write, dropping the key would look like a successful save that did nothing. Returns the whole refreshed rule set (same shape as getprogramrules).

Request Information

Parameters

NameDescriptionAdditional information
inVO
No documentation available.

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "entityType": "sample string 1",
  "entityId": "sample string 2",
  "forEmbed": true,
  "pageSuffix": "sample string 4",
  "curUserId": "sample string 5",
  "isSSO": true,
  "requestHost": "sample string 7",
  "applicationPath": "sample string 8",
  "secureApplicationPath": "sample string 9",
  "absoluteApplicationPath": "sample string 10",
  "isHttps": true,
  "isMobileDevice": true,
  "isElectron": true,
  "isFullEmbed": true,
  "clientType": 0,
  "clientVersion": "sample string 15",
  "clientOS": "sample string 16",
  "clientBuild": "sample string 17",
  "premiumAppId": "sample string 18",
  "clientWidth": 19,
  "clientHeight": 20,
  "timezone": 21,
  "requireGeneralMembership": true,
  "requiredMembershipPlanIds": [
    1,
    2,
    3
  ],
  "enforcementMode": "sample string 1",
  "graceDaysAfterExpiry": 1,
  "scopePrograms": [
    "sample string 1",
    "sample string 2",
    "sample string 3"
  ],
  "autoGrantEnabled": true,
  "autoGrantPackageId": 1,
  "autoGrantScope": "sample string 2",
  "programKey": "sample string 3",
  "inherit": true,
  "requiredPlanIds": [
    1,
    2,
    3
  ],
  "programEnforcementMode": "sample string 4",
  "programGraceDaysAfterExpiry": 1,
  "clearPlanIds": true,
  "clearEnforcementMode": true,
  "clearGraceDays": true,
  "packageId": 8,
  "pageType": 0
}

application/xml, text/xml

Sample:
<MembershipPolicyInVO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Web.API.VO.Input.Network">
  <ClientHeight xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">20</ClientHeight>
  <ClientType xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">Site</ClientType>
  <ClientWidth xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">19</ClientWidth>
  <absoluteApplicationPath xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 10</absoluteApplicationPath>
  <applicationPath xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 8</applicationPath>
  <cachedKey xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 9</cachedKey>
  <clientBuild xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 17</clientBuild>
  <clientOS xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 16</clientOS>
  <clientVersion xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 15</clientVersion>
  <curUserId xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 5</curUserId>
  <isElectron xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">true</isElectron>
  <isFullEmbed xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">true</isFullEmbed>
  <isHttps xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">true</isHttps>
  <isMobileDevice xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">true</isMobileDevice>
  <isSSO xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">true</isSSO>
  <premiumAppId xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 18</premiumAppId>
  <requestHost xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 7</requestHost>
  <secureApplicationPath xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 9</secureApplicationPath>
  <timezone xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">21</timezone>
  <entityId xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 2</entityId>
  <entityType xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 1</entityType>
  <forEmbed xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">true</forEmbed>
  <pageSuffix xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">sample string 4</pageSuffix>
  <pageType xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Input">FrontPage</pageType>
  <autoGrantEnabled>true</autoGrantEnabled>
  <autoGrantPackageId>1</autoGrantPackageId>
  <autoGrantScope>sample string 2</autoGrantScope>
  <clearEnforcementMode>true</clearEnforcementMode>
  <clearGraceDays>true</clearGraceDays>
  <clearPlanIds>true</clearPlanIds>
  <enforcementMode>sample string 1</enforcementMode>
  <graceDaysAfterExpiry>1</graceDaysAfterExpiry>
  <inherit>true</inherit>
  <packageId>8</packageId>
  <programEnforcementMode>sample string 4</programEnforcementMode>
  <programGraceDaysAfterExpiry>1</programGraceDaysAfterExpiry>
  <programKey>sample string 3</programKey>
  <requireGeneralMembership>true</requireGeneralMembership>
  <requiredMembershipPlanIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
    <d2p1:int>3</d2p1:int>
  </requiredMembershipPlanIds>
  <requiredPlanIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
    <d2p1:int>3</d2p1:int>
  </requiredPlanIds>
  <scopePrograms xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
    <d2p1:string>sample string 3</d2p1:string>
  </scopePrograms>
</MembershipPolicyInVO>

application/x-www-form-urlencoded

Sample:

Sample not available.

multipart/form-data

Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="requireGeneralMembership"

True
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="requiredMembershipPlanIds[0]"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="requiredMembershipPlanIds[1]"

2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="requiredMembershipPlanIds[2]"

3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="enforcementMode"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="graceDaysAfterExpiry"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="scopePrograms[0]"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="scopePrograms[1]"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="scopePrograms[2]"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="autoGrantEnabled"

True
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="autoGrantPackageId"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="autoGrantScope"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="programKey"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="inherit"

True
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="requiredPlanIds[0]"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="requiredPlanIds[1]"

2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="requiredPlanIds[2]"

3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="programEnforcementMode"

sample string 4
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="programGraceDaysAfterExpiry"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="clearPlanIds"

True
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="clearEnforcementMode"

True
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="clearGraceDays"

True
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="packageId"

8
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="pageType"

FrontPage
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="cachedKey"

sample string 9
--MultipartDataMediaFormatterBoundary1q2w3e--

Response Information

No documentation available.

Response body formats

application/json, text/json

Sample:
{
  "isDone": true,
  "code": 0,
  "message": "sample string 2",
  "data": {},
  "cachedKey": "sample string 4",
  "correlationId": "00ea65ce-00a8-4149-af50-10fe81f7ae1d",
  "jwtTokenForSPA": "sample string 6",
  "jwtTokenIndexForSPA": 1
}

application/xml, text/xml

Sample:
<ResultOutVO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/imLeagues.Internal.API.VO.Output.Common">
  <CachedKey>sample string 4</CachedKey>
  <Code>None</Code>
  <CorrelationId>00ea65ce-00a8-4149-af50-10fe81f7ae1d</CorrelationId>
  <Data />
  <IsDone>true</IsDone>
  <JwtTokenForSPA>sample string 6</JwtTokenForSPA>
  <JwtTokenIndexForSPA>1</JwtTokenIndexForSPA>
  <Message>sample string 2</Message>
</ResultOutVO>

multipart/form-data

Sample:

Sample not available.