Updates metafields on your Site for a resource type. Depending on the request structure, you can update or add metafields and metadata to the Subscriptions or Customers resource.
With this endpoint, you can:
Add metafields. If the metafield specified in current_name does not exist, a new metafield is added.
Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
Change the name of a metafield.
Note: To keep the metafield name the same and only update the metadata for the metafield, you must use the current metafield name in both the
current_nameandnameparameters.
Change the input type for the metafield. For example, you can change a metafield input type from text to a dropdown. If you change the input type from text to a dropdown or radio, you must update the specific subscriptions or customers where the metafield was used to reflect the updated metafield and metadata.
Add metadata values to the existing metadata for a dropdown or radio metafield.
Note: Updates to metadata overwrite. To add one or more values, you must specify all metadata values including the new value you want to add.
Add new metadata to a dropdown or radio for a metafield that was created without metadata.
Remove metadata for a dropdown or radio for a metafield.
Note: Updates to metadata overwrite existing values. To remove one or more values, specify all metadata values except those you want to remove.
Add or update scope settings for a metafield.
Note: Scope changes overwrite existing settings. You must specify the complete scope, including the changes you want to make.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
The resource type to which the metafields belong.
Value in
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/metafields.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{}'