====Match API Function====
This function is used to request the closest matching capture via [[API_documentation|Capture API]].
===Endpoint===
/capture/match
This may be a **GET** or **POST** request.
For example, the full URL on the server **mycompanyname** in site **default** would be....
https://mycompanyname/s/default/capture/match?name=mycapturetype&...
===Parameters===
**format**: //json// or //xml//. \\
**name**: The code of the [[capture type|capture type]]. \\
**include**: If //1// or //true//, include the content of the match in the output. \\
**before**: A UTC datetime (in YYYY-MM-DD HH:MM:SS format) the match must be before.\\
**filter**: A semi-colon delimited list of = pairs to filter **out** of the results.\\
//Search Criteria//
You can search by adding parameters named after the attributes you are capturing.
These parameter names ignore all spaces and dash/minus characters - an attribute called "Max Power Use" will be 'MaxPowerUse'.
===Response===
The response is a JSON object.
Along with the **id** property that gives you the name of the capture that has the closest match, you're also given details of the //quality// of the match.
In this case, we searched for both **Size** and **Product Code**. Our resulting match only matched against the //product code//, not the size.
{
"id":"1006923343",
"quality":"Size",
"misses":"Product Code",
"percentage":50
}