List Metafields
Lists the metafields and their associated details for a Site and resource type. You can filter the request to a specific metafield.
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"
Query Parameters
Filter by the name of the metafield.
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 <= 20020Controls the order in which results are returned.
Use in query direction=asc.
Value in
- "asc"
- "desc"
Response Body
application/json
curl -X GET "https://example.com/subscriptions/metafields.json"{ "total_count": 1, "current_page": 1, "total_pages": 0, "per_page": 50, "metafields": [ { "id": 0, "name": "string", "scope": { "csv": "0", "statements": "0", "invoices": "0", "portal": "0", "public_show": "0", "public_edit": "0" }, "data_count": 0, "input_type": "text", "enum": null } ]}Update Reason Code PUT
Updates an existing reason code for a given site.
Create Metafields POST
Creates metafields on a Site for either the Subscriptions or Customers resource. Metafields and their metadata are created in the Custom Fields configuration page on your Site. Metafields can be populated with metadata when you create them or later with the [Update Metafield](https://maxio-test-wp.pages.dev/api/openapi/custom-fields/updateMetafield), [Create Metadata](https://maxio-test-wp.pages.dev/api/openapi/custom-fields/createMetadata), or [Update Metadata](https://maxio-test-wp.pages.dev/api/openapi/custom-fields/updateMetadata) endpoints. The Create Metadata and Update Metadata endpoints allow you to add metafields and metadata values to a specific subscription or customer. Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers. > Note: After creating a metafield, the resource type cannot be modified. In the UI and product documentation, metafields and metadata are called Custom Fields. - Metafield is the custom field - Metadata is the data populating the custom field. See [Custom Fields Reference](https://docs.maxio.com/hc/en-us/articles/24266140850573-Custom-Fields-Reference) and [Custom Fields Tab](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab) for information on using Custom Fields in the Advanced Billing UI.