Update Metadata
Updates metadata and metafields on the Site and the customer or subscription specified, and updates the metadata value on a subscription or customer.
If you update 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 to the Site and to the subscription or customer you specify. You can update the input_type for the metafield with the Update Metafield endpoint.
Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for the Subscription resource and another 100 for the Customer resource.
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
Request Body
application/json
Response Body
application/json
application/json
curl -X PUT "https://example.com/subscriptions/0/metadata.json" \ -H "Content-Type: application/json" \ -d '{}'[ { "id": 0, "value": "string", "resource_id": 0, "name": "string", "deleted_at": "2019-08-24T14:15:22Z", "metafield_id": 0 }]