Update plan
View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.
Copy / Export
Updates a plan with the `CREATED` or `ACTIVE` status. For an `INACTIVE` plan, you can make only status updates.
You can patch these attributes and objects:
You can patch these attributes and objects:
AuthorizationBearer <token>
Flow
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
- Manage plan & subscription
https://uri.paypal.com/services/subscriptions
Path Parameters
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
An array of patch objects.
openumRequiredThe operation.
Allowed values
- "add"
- The target location is an array index. Inserts a new value into the array at the specified index.
- The target location is an object parameter that does not already exist. Adds a new parameter to the object.
- The target location is an object parameter that does exist. Replaces that parameter's value.
- "remove"
- "replace"
- "move"
- "copy"
- "test"
Depending on the target location reference, completes one of these functions:
value parameter defines the value to add. For more information, see 4.1. add.Removes the value at the target location. For the operation to succeed, the target location must exist. For more information, see 4.2. remove.
Replaces the value at the target location with a new value. The operation object must contain a
value parameter that defines the replacement value. For the operation to succeed, the target location must exist. For more information, see 4.3. replace.Removes the value at a specified location and adds it to the target location. The operation object must contain a
from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to move the value. For the operation to succeed, the from location must exist. For more information, see 4.4. move.Copies the value at a specified location to the target location. The operation object must contain a
from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to copy the value. For the operation to succeed, the from location must exist. For more information, see 4.5. copy.Tests that a value at the target location is equal to a specified value. The operation object must contain a
value parameter that defines the value to compare to the target location's value. For the operation to succeed, the target location must be equal to the value value. For test, equal indicates that the value at the target location and the value that value defines are of the same JSON type. The data type of the value determines how equality is defined:For more information, see 4.6. test.pathstringOptionalThe JSON Pointer to the target document location at which to complete the operation.
valuePatch ValueOptionalThe value to apply. The
remove, copy, and move operations do not require a value. Since JSON Patch allows any type for value, the type property is not specified.fromstringOptionalThe JSON Pointer to the target document location from which to move the value. Required for the
move operation.Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/billing/plans/string" \ -H "Content-Type: string" \ -H "Content-Type: application/json" \ -d '[ { "op": "add" } ]'Empty
