Understand and create lookup caches
Relative URI |
Method |
Success code |
Description |
/lookupcaches |
GET |
200 |
Gets a list of all the lookup caches in your account. |
/lookupcaches/<_lookupcacheId> |
GET |
200 |
Gets high-level fields such as name, description, etc from a lookup cache in your account. |
/lookupcaches/<_lookupcacheId> |
DELETE |
200 |
Deletes a lookup cache from your account. |
/lookupcaches/<_lookupcacheId>/getData |
POST |
200 |
Gets data from a lookup cache in your account.
|
/lookupcaches/<_lookupcacheId>/data |
POST |
200 |
Upserts data to a lookup cache in your account. The request body accepts an array of keys to be upserted. Maximum limit of 1000 entries as key-value pairs |
/lookupcaches/<_lookupcacheId>/data |
DELETE |
200 |
Deletes the data from a lookup cache in your account. The request body accepts an array of keys to be deleted. Maximum limit: 1000 keys provided as array strings |
/lookupcaches/<_lookupcacheId>/data/purge |
DELETE |
204 |
Purges the data from a lookup cache in your account |
Authentication
Lookup cache APIs, like other integrator.io APIs, use API tokens for authentication. For more information, see Getting started with standard REST API.
Common error codes and what they mean
Code |
What it means |
Possible reason |
400 |
Bad Request |
Invalid reference or value |
401 |
Unauthorized |
Permissions not adequate |
403 |
Forbidden |
Bad request CSRF |
404 |
Not Found Error |
Invalid reference or value |
415 |
Unsupported Media |
Content-Type should match application/json |
422 |
Unprocessable Entity |
Required field not present |
Given below are a few examples:
Request
POST /v1/lookupcaches/<_lookupcacheId>/getData
Parameters
Name |
Description |
---|---|
_lookupCacheId * |
The lookup cache ID |
Request body
{ "keys": [ "keyExist", "keyExist1", "keyExist2" ] }
Sample response
{ "data": [ { "key": "keyExist", "value": "value1" }, { "key": "keyExist1", "value": "value2" }, { "key": "keyExist2", "value": { "value3": "value4" } } ], "success": true }
Request
POST /v1/lookupcaches/{_lookupCacheId}/data
Parameters
Name |
Description |
---|---|
_lookupCacheId |
The lookup cache ID |
Request body
{ "data": [ { "key": "key_3001", "value": { "Fname": "Joe", "Add": "SF" } }, { "key": "key_3002", "value": { "Fname": "James", "Add": "NY" } } ] }
Sample response
{ "success": true, "data":[ { "key": "key_3001", "success": true }, { "key": "key_3002", "success": true } ] }