Metadata

Metadata allows you to store custom key-value pairs on API objects. This data is purely for your application’s use and is not used by Bias.

Usage

Update metadata

bias.customers.update("cus_id", {
  metadata: {
      internal_id: "0d234c20-bc41-4cae-bfeb-4e4bbd7d8ce4",
      notes: "Preferred customer"
  }
})

Remove a metadata key

bias.customers.update("cus_id", {
  metadata: {
      notes: null
  }
})

Clear all metadata

bias.customers.update("cus_id", {
  metadata: null
})

Limitations

  • Keys must be strings (40 chars max)
  • Values can be strings, numbers, or booleans (500 chars max)
  • Maximum 50 key-value pairs per object