Update a subscription order item
Experimental

Request

Updates a subscription order item. This is an experimental endpoint and may be changed or removed in the future.

Security
SecretApiKey or JWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required

ID of the resource.

itemIdstringrequired

ID of the subscription item.

Bodyapplication/jsonrequired

Update item request.

quantityFillednumber, (double)

Filled quantity of the subscription item (experimental property).

Example:5.125
excludeFromMrrboolean

Specifies if this item should be excluded from monthly recurring revenue calculations.

planobject

Details of the subscription item plan.

curl -i -X PATCH \
  'https://www.rebilly.com/_mock/catalog/all/subscriptions/{id}/items/{itemId}' \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "quantityFilled": 5.125,
    "excludeFromMrr": true,
    "plan": {
      "productOptions": {
        "color": "red",
        "size": "xxl"
      }
    }
  }'

Responses

Order item updated.

Headers
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the order item.

quantityinteger, [ 0 .. 1000000000 ]

Number of product units in the specified plan.

quantityFillednumber, (double)

Number of filled product units.

Example:5.125
planOriginalPlan (object) or (FlexiblePlan (OneTimeSalePlan (object) or SubscriptionPlan (object) or TrialOnlyPlan (object)))required
One of:

Use an existing plan without changes for the current order.

To create a new plan, see Create a plan.

usageLimitsUsageLimits (object) or null
One of:

Specifies the soft and hard usage limit thresholds for an item with a metered billing plan. This value is ignored when the plan is not metered.

usageStatusUsageStatus (object) or null
One of:

Current status of the usage limits.

revisionintegerread-only

Revision number that increments with each overriding change to this specific plan item.

isModifiedbooleanread-only

Specifies if the plan information is modified for this subscription.

isGrandfatheredbooleanread-only

Specifies if the current plan revision number is greater than the plan item revision number.

excludeFromMrrboolean

Specifies if this item should be excluded from monthly recurring revenue calculations.

_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

planIdstring, <= 50 charactersdeprecated

ID of the plan.

Note: This field is deprecated. Use the plan.id field instead.

Example:"plan_0YV7DENSVGDBW9S71XZNNYYQ0X"
Response
{ "id": "string", "planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "quantity": 1000000000, "quantityFilled": 5.125, "plan": { "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21" }, "usageLimits": { "softLimit": {}, "hardLimit": {}, "trialLimit": 20.725 }, "usageStatus": { "isSoftLimitReached": false, "isHardLimitReached": false, "isTrialLimitReached": false }, "revision": 0, "isModified": true, "isGrandfathered": true, "excludeFromMrr": true, "_embedded": { "product": {} } }