Metadata

We support including metadata on most of our resources as a way to add internal information to our system. Metadata takes the form of free-form key-value pairs. This allows easier searching through both the API and web interfaces. Organizations can also add individual rules based on metadata values. You may write metadata both when you create an object and when updating the object.

If you would like to remove metadata that is already on an object, you can unset it by passing in the key-value pair with an empty string or null as the value, like this:

{
  "key-to-delete": ""
}

// OR

{
  "key-to-delete": null
}
{
  "Customer ID": "5584"
}

Querying via metadata in the API

Some endpoints such as List Payment Orders allow you to query for objects via metadata. This can be tricky to get right, especially if your metadata keys or values have spaces. The URL's query parameters needs to be encoded properly. Here's a basic table to show how some common characters get encoded.

Character

Encoded Character

[

%5B

]

%5D

(space)

%20

We put some examples below as a reference for your implementation.

First, let's look at a simple case where your metadata key and value are both strings with no spaces: { "Type": "Loan" }. The query parameters will be metadata%5BType%5D=Loan.

Next, let's say the metadata key has a space in it: { "Entity Type": "Loan" }. The query parameters will be metadata%5BEntity%20Type%5D=Loan.

Finally, here's the case where the metadata key and value both have spaces in them: { "Entity Type": "Loan Funding"}. The query parameters will be metadata%5BEntity%20Type%5D=Loan%20Funding.