List Metadata
Lists metadata and metafields for a specific customer or subscription.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Path Parameters
The resource type to which the metafields belong.
Value in
- "subscriptions"
- "customers"
The Advanced Billing id of the customer or the subscription for which the metadata applies
Query Parameters
Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query page=1.
1 <= value1This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query per_page=200.
value <= 20020Response Body
application/json
curl -X GET "https://example.com/subscriptions/0/metadata.json"{ "total_count": 1, "current_page": 1, "total_pages": 1, "per_page": 50, "metadata": [ { "id": 77889911, "value": "green", "resource_id": 1234567, "metafield_id": 112233, "deleted_at": null, "name": "Color" } ]}Update Metafield PUT
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_name` and `name` parameters. - 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.
Create Metadata POST
Creates metadata and metafields for a specific subscription or customer, or updates metadata values of existing metafields for a subscription or customer. Metadata values are limited to 2 KB in size. If you create metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field. You can update the input_type for the metafield with the [Update Metafield](https://maxio-test-wp.pages.dev/api/openapi/custom-fields/updateMetafield) endpoint. >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.