Core API 1.0
Using API
API Endpoint | api.socifi.com |
---|---|
Protocol | https* |
Authentication | Basic (Key + Secret) |
Response format | JSON |
* A secure version of http protocol must be always used.
Resource Documentation
The documentation is located on our API servers. This brings great benefit not only in keeping them up to date but also you can use it as a sandbox. You can view all the routes and make a request directly in the sandbox UI.
Head over now to the resources documentation.
Query Parameters (filtering)
Most of query parameters and filters are described in each resource documentation.
Time filters
Time-based filtering is common and sometimes difficult to set up.
- The easiest way is to use the timestamp. We support the 13 digit format. This is best when using programmatically.
- Another option is to use JavaScript string like 12-21-2014 or ISO Date like 2015-05-19T10:07:59.000Z Using this during testing is great as it is easy to read.
Single and array value filters
Some filters have the option to use either a single value or array of values.
Let's assume you want to fetch live data (/live resource).
- You can fetch those data for one brand using ?brand=13
- Or ask for data from more brands using the format as follows ?brand=[13,14,20,21]
Partial Response
Sometimes you want to fetch only a few fields and not whole response. This can be particularly useful mainly for large data sets.
To get more details on partial response please check this Google post.
To find out more about the syntax used head over to JSON mask specification.
Query key | Description |
---|---|
fields | A string of fields according to JSON mask specification. |
Restrictions
- Ad statistics are not available for self promo
Example
- Get only brand names and strip the rest
- Authenticate with User: demo and Password: demo
- GET https://api.socifi.com/brands?fields=brands/name
Table of Contents