Metadata

Metadata keeps your own data on API objects as key-value pairs, such as the ID of a matching record in your system. Bias returns it with the object and doesn’t act on it.

Usage

Updating metadata sets the keys you send and keeps the rest. A null value removes that key, and metadata: null removes every key.

Update metadata

PATCH https://api.biaspay.com/v1/customers/cus_aB4DEXqbFGOlpEOxwp0Fx1

{
    "metadata": {
        "internal_id": "0d234c20-bc41-4cae-bfeb-4e4bbd7d8ce4",
        "notes": "Preferred customer"
    }
}

Remove a metadata key

PATCH https://api.biaspay.com/v1/customers/cus_aB4DEXqbFGOlpEOxwp0Fx1

{
    "metadata": {
        "notes": null
    }
}

Clear all metadata

PATCH https://api.biaspay.com/v1/customers/cus_aB4DEXqbFGOlpEOxwp0Fx1

{
    "metadata": null
}

Limits

  • Keys are strings of up to 40 characters and can’t be empty.
  • Values are strings, numbers or booleans. String values can be up to 1000 characters.