Search
GET /product/search/:key/:value
:key
This is key of the field your wish to search by.
Must be one of: productID
, vehicleIdentificationNumber
, registrationNumber
, AP30Pno
:value
The value that you want :key to match against.
If the user to which your API key belongs does not have the Edit all products
permission, a search will only be conducted within the scope of your company.
Wildcards '%' are supported in this argument.
URL encoding
When using wildcards, remember to pass the whole :value argument through a URL encode function. such as PHP's urlencode();
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'YOUR-BASEURL/product/search?fields=vehicleIdentificationNumber,createdAt,AP30Pno',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Api-Key: YOUR-API-KEY'
],
]);
$response = curl_exec($ch);
curl_close($ch);
Parameter | Required | Description |
---|---|---|
fields |
A comma seperated string of fields to retrieve in your search results. Call /product/fields for a list of available fields |
Use the fields
parameter to dictate the fields you need for each product object in the response array.
If your search did not yield any results, an empty array will be returned.
A typical request URI might look like this:
GET /product/search/vehicleIdentificationNumber/AAAAAAAAAAAAAAAAA?fields=createdAt,AP30Pno,registrationNumber
Or, using a wildcard to search for VINS ending with:
Custom fields can have an optional machine name (formerly base names) attached to them, you will get any value for such fields back with the same key as requested in the fields
argument.
{
"message": [
{
"customField_xx": "customField_xx_value",
"customField_yy": "customField_yy_value"
}
],
"status": "success"
}
If customField_xx
has a machine name added f.x. integratorID
then customField_xx
can be optionally replaced.