---
title: "PATCH /v1/partners/{partnersId}/subscriptions/{subscriptionsId}/lineItems/{lineItemsId}"
method: PATCH
path: "/v1/partners/{partnersId}/subscriptions/{subscriptionsId}/lineItems/{lineItemsId}"
tags: ["partners"]
---

# PATCH /v1/partners/{partnersId}/subscriptions/{subscriptionsId}/lineItems/{lineItemsId}

`PATCH /v1/partners/{partnersId}/subscriptions/{subscriptionsId}/lineItems/{lineItemsId}`

## Request

- Base URL: `https://paymentsresellersubscription.googleapis.com`
- URL: `https://paymentsresellersubscription.googleapis.com/v1/partners/{partnersId}/subscriptions/{subscriptionsId}/lineItems/{lineItemsId}`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/sdm.service`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/sdm.service`
- TypeScript: <https://skmtc.dev/google/apis/paymentsresellersubscription/docs/v1/partners/:partnersId/subscriptions/:subscriptionsId/lineItems/:lineItemsId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates a line item of a subscription. It should be authenticated with a service account.

## Path parameters

- `partnersId` string, required
- `subscriptionsId` string, required
- `lineItemsId` string, required

## Query parameters

- `requestId` string
- `updateMask` string, google-fieldmask

## Request body

- SubscriptionLineItem: Individual line item definition of a subscription.
  - `amount` Amount: Describes the amount unit including the currency code.
    - `amountMicros` string, int64: Required. Amount in micros (1_000_000 micros = 1 currency unit)
    - `currencyCode` string: Required. Currency codes in accordance with [ISO-4217 Currency Codes] (https://en.wikipedia.org/wiki/ISO_4217). For example, USD.
  - `bundleDetails` SubscriptionLineItemBundleDetails: The bundle details for a line item corresponding to a hard bundle.
    - `bundleElementDetails` SubscriptionLineItemBundleDetailsBundleElementDetails[]: Output only. The details for each element in the hard bundle.
      - `product` string: Output only. Product resource name that identifies the bundle element. The format is 'partners/{partner_id}/products/{product_id}'.
      - `userAccountLinkedTime` string, google-datetime: Output only. The time when this product is linked to an end user.
  - `description` string: Output only. Description of this line item.
  - `finiteBillingCycleDetails` FiniteBillingCycleDetails: Details for a subscription line item with finite billing cycles.
    - `billingCycleCountLimit` string, int64: The number of a subscription line item billing cycles after which billing will stop automatically.
  - `lineItemFreeTrialEndTime` string, google-datetime: Output only. The free trial end time will be populated after the line item is successfully processed. End time of the line item free trial period, in ISO 8061 format. For example, "2019-08-31T17:28:54.564Z". It will be set the same as createTime if no free trial promotion is specified.
  - `lineItemIndex` integer: Output only. A unique index of the subscription line item.
  - `lineItemPromotionSpecs` SubscriptionPromotionSpec[]: Optional. The promotions applied on the line item. It can be: - an introductory pricing promotion. - a free trial promotion. This feature is not enabled. If used, the request will be rejected. When used as input in Create or Provision API, specify its resource name only.
    - `freeTrialDuration` Duration: Describes the length of a period of a time.
      - `count` integer: number of duration units to be included.
      - `unit` 'UNIT_UNSPECIFIED' | 'MONTH' | 'DAY' | 'HOUR': The unit used for the duration
    - `introductoryPricingDetails` PromotionIntroductoryPricingDetails: The details of a introductory pricing promotion.
      - `introductoryPricingSpecs` PromotionIntroductoryPricingDetailsIntroductoryPricingSpec[]: Output only. Specifies the introductory pricing periods.
        - `discountAmount` Amount: Describes the amount unit including the currency code.
          - `amountMicros` string, int64: Required. Amount in micros (1_000_000 micros = 1 currency unit)
          - `currencyCode` string: Required. Currency codes in accordance with [ISO-4217 Currency Codes] (https://en.wikipedia.org/wiki/ISO_4217). For example, USD.
        - `discountRatioMicros` string, int64: Output only. The discount percentage in micros. For example, 50,000 represents 5%.
        - `recurrenceCount` integer: Output only. The duration of an introductory offer in billing cycles.
        - `regionCode` string: Output only. 2-letter ISO region code where the product is available in. Ex. "US".
    - `promotion` string: Required. Promotion resource name that identifies a promotion. The format is 'partners/{partner_id}/promotions/{promotion_id}'.
    - `type` 'PROMOTION_TYPE_UNSPECIFIED' | 'PROMOTION_TYPE_FREE_TRIAL' | 'PROMOTION_TYPE_INTRODUCTORY_PRICING': Output only. The type of the promotion for the spec.
  - `name` string: Identifier. Resource name of the line item. Format: partners/{partner}/subscriptions/{subscription}/lineItems/{lineItem}
  - `oneTimeRecurrenceDetails` SubscriptionLineItemOneTimeRecurrenceDetails: Details for a ONE_TIME recurrence line item.
    - `servicePeriod` ServicePeriod: A description of what time period or moment in time the product or service is being delivered over.
      - `endTime` string, google-datetime: Optional. The end time of the service period. Time is exclusive.
      - `startTime` string, google-datetime: Required. The start time of the service period. Time is inclusive.
  - `planType` 'LINE_ITEM_PLAN_TYPE_UNSPECIFIED' | 'LINE_ITEM_PLAN_TYPE_BASE' | 'LINE_ITEM_PLAN_TYPE_ADDON': Optional. Output only. The plan type of the line item.
  - `product` string: Required. Product resource name that identifies the product associated with this line item. The format is 'partners/{partner_id}/products/{product_id}'.
  - `productPayload` ProductPayload: Specifies product specific payload.
    - `googleHomePayload` GoogleHomePayload: Payload specific for Google Home products.
      - `attachedToGoogleStructure` boolean: Output only. This identifies whether the subscription is attached to a Google Home structure.
      - `googleStructureId` string: Optional. Structure identifier on Google side.
      - `partnerStructureId` string: Optional. This identifies the structure ID on partner side that the subscription should be applied to. Only required when the partner requires structure mapping.
    - `googleOnePayload` GoogleOnePayload: Payload specific to Google One products.
      - `campaigns` string[]: Campaign attributed to sales of this subscription.
      - `offering` 'OFFERING_UNSPECIFIED' | 'OFFERING_VAS_BUNDLE' | 'OFFERING_VAS_STANDALONE' | 'OFFERING_HARD_BUNDLE' | 'OFFERING_SOFT_BUNDLE': The type of offering the subscription was sold by the partner. e.g. VAS.
      - `salesChannel` 'CHANNEL_UNSPECIFIED' | 'CHANNEL_RETAIL' | 'CHANNEL_ONLINE_WEB' | 'CHANNEL_ONLINE_ANDROID_APP' | 'CHANNEL_ONLINE_IOS_APP': The type of sales channel through which the subscription was sold.
      - `storeId` string: The identifier for the partner store where the subscription was sold.
    - `youtubePayload` YoutubePayload: Payload specific to Youtube products.
      - `accessEndTime` string, google-datetime: Output only. The access expiration time for this line item.
      - `partnerEligibilityIds` string[]: The list of eligibility_ids which are applicable for the line item.
      - `partnerPlanType` 'PARTNER_PLAN_TYPE_UNSPECIFIED' | 'PARTNER_PLAN_TYPE_STANDALONE' | 'PARTNER_PLAN_TYPE_HARD_BUNDLE' | 'PARTNER_PLAN_TYPE_SOFT_BUNDLE': Optional. Specifies the plan type offered to the end user by the partner.
  - `recurrenceType` 'LINE_ITEM_RECURRENCE_TYPE_UNSPECIFIED' | 'LINE_ITEM_RECURRENCE_TYPE_PERIODIC' | 'LINE_ITEM_RECURRENCE_TYPE_ONE_TIME': Output only. The recurrence type of the line item.
  - `state` 'LINE_ITEM_STATE_UNSPECIFIED' | 'LINE_ITEM_STATE_ACTIVE' | 'LINE_ITEM_STATE_INACTIVE' | 'LINE_ITEM_STATE_NEW' | 'LINE_ITEM_STATE_ACTIVATING' | 'LINE_ITEM_STATE_DEACTIVATING' | 'LINE_ITEM_STATE_WAITING_TO_DEACTIVATE' | 'LINE_ITEM_STATE_OFF_CYCLE_CHARGING': Output only. The state of the line item.

## Response `200`

Successful response

- SubscriptionLineItem: Individual line item definition of a subscription.
  - `amount` Amount: Describes the amount unit including the currency code.
    - `amountMicros` string, int64: Required. Amount in micros (1_000_000 micros = 1 currency unit)
    - `currencyCode` string: Required. Currency codes in accordance with [ISO-4217 Currency Codes] (https://en.wikipedia.org/wiki/ISO_4217). For example, USD.
  - `bundleDetails` SubscriptionLineItemBundleDetails: The bundle details for a line item corresponding to a hard bundle.
    - `bundleElementDetails` SubscriptionLineItemBundleDetailsBundleElementDetails[]: Output only. The details for each element in the hard bundle.
      - `product` string: Output only. Product resource name that identifies the bundle element. The format is 'partners/{partner_id}/products/{product_id}'.
      - `userAccountLinkedTime` string, google-datetime: Output only. The time when this product is linked to an end user.
  - `description` string: Output only. Description of this line item.
  - `finiteBillingCycleDetails` FiniteBillingCycleDetails: Details for a subscription line item with finite billing cycles.
    - `billingCycleCountLimit` string, int64: The number of a subscription line item billing cycles after which billing will stop automatically.
  - `lineItemFreeTrialEndTime` string, google-datetime: Output only. The free trial end time will be populated after the line item is successfully processed. End time of the line item free trial period, in ISO 8061 format. For example, "2019-08-31T17:28:54.564Z". It will be set the same as createTime if no free trial promotion is specified.
  - `lineItemIndex` integer: Output only. A unique index of the subscription line item.
  - `lineItemPromotionSpecs` SubscriptionPromotionSpec[]: Optional. The promotions applied on the line item. It can be: - an introductory pricing promotion. - a free trial promotion. This feature is not enabled. If used, the request will be rejected. When used as input in Create or Provision API, specify its resource name only.
    - `freeTrialDuration` Duration: Describes the length of a period of a time.
      - `count` integer: number of duration units to be included.
      - `unit` 'UNIT_UNSPECIFIED' | 'MONTH' | 'DAY' | 'HOUR': The unit used for the duration
    - `introductoryPricingDetails` PromotionIntroductoryPricingDetails: The details of a introductory pricing promotion.
      - `introductoryPricingSpecs` PromotionIntroductoryPricingDetailsIntroductoryPricingSpec[]: Output only. Specifies the introductory pricing periods.
        - `discountAmount` Amount: Describes the amount unit including the currency code.
          - `amountMicros` string, int64: Required. Amount in micros (1_000_000 micros = 1 currency unit)
          - `currencyCode` string: Required. Currency codes in accordance with [ISO-4217 Currency Codes] (https://en.wikipedia.org/wiki/ISO_4217). For example, USD.
        - `discountRatioMicros` string, int64: Output only. The discount percentage in micros. For example, 50,000 represents 5%.
        - `recurrenceCount` integer: Output only. The duration of an introductory offer in billing cycles.
        - `regionCode` string: Output only. 2-letter ISO region code where the product is available in. Ex. "US".
    - `promotion` string: Required. Promotion resource name that identifies a promotion. The format is 'partners/{partner_id}/promotions/{promotion_id}'.
    - `type` 'PROMOTION_TYPE_UNSPECIFIED' | 'PROMOTION_TYPE_FREE_TRIAL' | 'PROMOTION_TYPE_INTRODUCTORY_PRICING': Output only. The type of the promotion for the spec.
  - `name` string: Identifier. Resource name of the line item. Format: partners/{partner}/subscriptions/{subscription}/lineItems/{lineItem}
  - `oneTimeRecurrenceDetails` SubscriptionLineItemOneTimeRecurrenceDetails: Details for a ONE_TIME recurrence line item.
    - `servicePeriod` ServicePeriod: A description of what time period or moment in time the product or service is being delivered over.
      - `endTime` string, google-datetime: Optional. The end time of the service period. Time is exclusive.
      - `startTime` string, google-datetime: Required. The start time of the service period. Time is inclusive.
  - `planType` 'LINE_ITEM_PLAN_TYPE_UNSPECIFIED' | 'LINE_ITEM_PLAN_TYPE_BASE' | 'LINE_ITEM_PLAN_TYPE_ADDON': Optional. Output only. The plan type of the line item.
  - `product` string: Required. Product resource name that identifies the product associated with this line item. The format is 'partners/{partner_id}/products/{product_id}'.
  - `productPayload` ProductPayload: Specifies product specific payload.
    - `googleHomePayload` GoogleHomePayload: Payload specific for Google Home products.
      - `attachedToGoogleStructure` boolean: Output only. This identifies whether the subscription is attached to a Google Home structure.
      - `googleStructureId` string: Optional. Structure identifier on Google side.
      - `partnerStructureId` string: Optional. This identifies the structure ID on partner side that the subscription should be applied to. Only required when the partner requires structure mapping.
    - `googleOnePayload` GoogleOnePayload: Payload specific to Google One products.
      - `campaigns` string[]: Campaign attributed to sales of this subscription.
      - `offering` 'OFFERING_UNSPECIFIED' | 'OFFERING_VAS_BUNDLE' | 'OFFERING_VAS_STANDALONE' | 'OFFERING_HARD_BUNDLE' | 'OFFERING_SOFT_BUNDLE': The type of offering the subscription was sold by the partner. e.g. VAS.
      - `salesChannel` 'CHANNEL_UNSPECIFIED' | 'CHANNEL_RETAIL' | 'CHANNEL_ONLINE_WEB' | 'CHANNEL_ONLINE_ANDROID_APP' | 'CHANNEL_ONLINE_IOS_APP': The type of sales channel through which the subscription was sold.
      - `storeId` string: The identifier for the partner store where the subscription was sold.
    - `youtubePayload` YoutubePayload: Payload specific to Youtube products.
      - `accessEndTime` string, google-datetime: Output only. The access expiration time for this line item.
      - `partnerEligibilityIds` string[]: The list of eligibility_ids which are applicable for the line item.
      - `partnerPlanType` 'PARTNER_PLAN_TYPE_UNSPECIFIED' | 'PARTNER_PLAN_TYPE_STANDALONE' | 'PARTNER_PLAN_TYPE_HARD_BUNDLE' | 'PARTNER_PLAN_TYPE_SOFT_BUNDLE': Optional. Specifies the plan type offered to the end user by the partner.
  - `recurrenceType` 'LINE_ITEM_RECURRENCE_TYPE_UNSPECIFIED' | 'LINE_ITEM_RECURRENCE_TYPE_PERIODIC' | 'LINE_ITEM_RECURRENCE_TYPE_ONE_TIME': Output only. The recurrence type of the line item.
  - `state` 'LINE_ITEM_STATE_UNSPECIFIED' | 'LINE_ITEM_STATE_ACTIVE' | 'LINE_ITEM_STATE_INACTIVE' | 'LINE_ITEM_STATE_NEW' | 'LINE_ITEM_STATE_ACTIVATING' | 'LINE_ITEM_STATE_DEACTIVATING' | 'LINE_ITEM_STATE_WAITING_TO_DEACTIVATE' | 'LINE_ITEM_STATE_OFF_CYCLE_CHARGING': Output only. The state of the line item.

---

[API](https://skmtc.dev/google/apis/paymentsresellersubscription.md) - [All operations](https://skmtc.dev/google/apis/paymentsresellersubscription/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/paymentsresellersubscription/revisions/88dd477f884b?raw)
