# Method: billingAccounts.orders.modify

- [HTTP request](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#body.aspect_1)
- [Modification](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#Modification)
  - [JSON representation](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#Modification.SCHEMA_REPRESENTATION)
- [AutoRenewalBehavior](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#AutoRenewalBehavior)
- [Try it!](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#try-it)

Modifies an existing `https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders#Order` resource.

### HTTP request

`POST https://cloudcommerceconsumerprocurement.googleapis.com/v1/{name=billingAccounts/*/orders/*}:modify`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. Name of the order to update. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "modifications": [ { object (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#Modification`) } ], "displayName": string, "etag": string } ``` |

| Fields ||
|---|---|
| `modifications[]` | ``object (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#Modification`)`` Optional. Modifications for an existing Order created by an Offer. Required when Offer based Order is being modified, except for when going from an offer to a public plan. |
| `displayName` | `string` Optional. Updated display name of the order, leave as empty if you do not want to update current display name. |
| `etag` | `string` Optional. The weak etag, which can be optionally populated, of the order that this modify request is based on. Validation checking will only happen if the invoker supplies this field. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/Shared.Types/Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `consumerprocurement.orders.modify`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## Modification

Modifications to make on the order.

| JSON representation |
|---|
| ``` { "lineItemId": string, "changeType": enum (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders#LineItemChangeType`), "newLineItemInfo": { object (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders#LineItemInfo`) }, "autoRenewalBehavior": enum (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#AutoRenewalBehavior`) } ``` |

| Fields ||
|---|---|
| `lineItemId` | `string` Required. ID of the existing line item to make change to. Required when change type is \[LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE\] or \[LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CANCEL\]. |
| `changeType` | ``enum (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders#LineItemChangeType`)`` Required. Type of change to make. |
| `newLineItemInfo` | ``object (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders#LineItemInfo`)`` Optional. The line item to update to. Required when changeType is \[LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CREATE\] or \[LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE\]. |
| `autoRenewalBehavior` | ``enum (`https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders/modify#AutoRenewalBehavior`)`` Optional. Auto renewal behavior of the subscription for the update. Applied when changeType is \[LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE\]. Follows plan default config when this field is not specified. |

## AutoRenewalBehavior

Indicates the auto renewal behavior customer specifies on subscription.

| Enums ||
|---|---|
| `AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED` | If unspecified, the auto renewal behavior will follow the default config. |
| `AUTO_RENEWAL_BEHAVIOR_ENABLE` | Auto Renewal will be enabled on subscription. |
| `AUTO_RENEWAL_BEHAVIOR_DISABLE` | Auto Renewal will be disabled on subscription. |