Download OpenAPI specification:
This document provides definitions for GeoMarketing, Conversion & Presence modules Analytics Api.
Try it out feature is available through Swagger UI.
The Okube API is designed around the REST architectural style, ensuring a consistent and predictable interface. Key features include:
The Okube API uses standard HTTP status codes to indicate the success or failure of requests. This consistent approach allows for straightforward error handling in your applications.
2xx Success: Request was received, understood, and processed successfully.4xx Client Errors: Request contains invalid syntax or cannot be fulfilled due to client-side issues.5xx Server Errors: Server failed to fulfill a valid request due to internal issues.200 OK: Request succeeded. Response contains requested data.201 Created: Resource was successfully created.204 No Content: Request succeeded, but no content is returned.400 Bad Request: The request contains invalid parameters or malformed syntax.401 Unauthorized: Authentication credentials are missing or invalid.403 Forbidden: Authentication succeeded, but the authenticated user lacks permission.404 Not Found: The requested resource does not exist.422 Unprocessable Entity: Request is well-formed but contains semantic errors.429 Too Many Requests: You've exceeded the rate limit for API calls.500 Internal Server Error: An unexpected error occurred on the server.503 Service Unavailable: Server is temporarily unavailable, typically due to maintenance.All error responses include a JSON body with detailed information to help diagnose the issue.
The Okube API implements efficient pagination for all list endpoints that return collections of resources (e.g., applications, sites, campaigns). This approach optimizes performance and response times when working with large datasets.
All paginated endpoints require the following query parameters:
page: Integer specifying the page number (starting from 1)per_page: Integer specifying the number of items per page (typically 10-100)Paginated responses consist of two primary components:
documents: An array containing the requested resources for the current page_$paginated: Metadata object with the following properties:total: Total number of resources matching the querypage: Current page numberper_page: Number of items per pagepage_count: Total number of pages availablehas_more: Boolean indicating whether additional pages existGET /applications?page=2&per_page=25
This request will return the second page of applications, with 25 items per page.
Many list endpoints support an additional accept: text/csv header to download results in CSV format, bypassing pagination for complete data export.
For detailed schema information, see the PaginatedResponse schemas section.
The Okube API organizes resources hierarchically, with most endpoints scoped under either an Application (client account) or a Site (physical location or digital property). This structure is reflected in the URL patterns used throughout the API.
The API supports multiple ways to identify resources:
Applications serve as top-level containers for most resources and can be referenced in two ways:
/applications/{id}: Using the application's unique identifier/applications/{key}: Using the application's unique keySites represent business locations or digital properties and can be accessed through several URL patterns:
/sites/{id}/applications/{id}/sites/{id}/applications/{id}/sites/{key}/applications/{key}/sites/{id}/applications/{key}/sites/{key}The Okube API secures all requests using JSON Web Tokens (JWT). Two authentication methods are available:
Security Notice: JSON Web Tokens grant access privileges to your data. Always store them securely and never expose them in client-side code, public repositories, or insecure communications channels.
To obtain a 48-hour access token, submit your credentials to the Authentication Endpoint.
Authentication Header Example:
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Important Requirements:
Provide username and password to authenticate.
Returned Jwt is valid for 48 hours
| login required | string User email. |
| password required | string User password. |
| captchaPayload | string internal use: to unlock usr account. |
| setCookie | boolean True to set cookie. |
{- "login": "my@email.com",
- "password": "mypassword"
}{- "success": true,
- "message": "Authentication succeeded.",
- "auth": {
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJraW5kIjoiVXNlciIsImlhdCI6MTY2Nzk5MjIzMiwiZXhwIjoxNjY4MTY1MDMyLCJzdWIiOiI1ODg4ZDcwNzUyZWI0NDViYWIyNjZiM2EifQ.i1Mv24rHME2YthUQEnLuakoNGOl8u79iW2w7Rt83DLk",
- "expiresIn": 172800000
}
}The Analytics endpoints utilize a structured query language that leverages both query parameters and request body for comprehensive configuration.
Query parameters are used to:
from and to parameters.uplift analysis.The request body accepts only application/json content and allows configuration through:
filters to refine data selection.params to specify analytical operations.Detailed specifications for filters and params can be found in each module's documentation.
Filters allow you to select data based on specific scope values. These filters are applied globally across all queries within the request (refer to params for additional details).
The params section defines the core of an analytics query. Each parameter specifies:
kpi (Key Performance Indicator) to analyze.mode, which can be either:histogram for time-series analysisaggregation for consolidated metricsgranularity, which can be:day for daily analysisweek for weekly analysismonth for monthly analysisyear for yearly analysisFor each kpi query, projections can be configured for specific scopes as follows:
all: When set to false, excludes aggregated data by scope.temporals: When set to false, excludes data aggregated by both scope and granularity.Projections for specific scopes are determined based on the data module:
globals: When set to false, excludes data aggregated by no-scope.sites: When set to true, includes data aggregated by site (available in all application queries).campaigns for campaign-level metricslevers for marketing lever analysishomes (IRIS statistical areas)works (IRIS statistical areas)zones (IRIS statistical areas)equipments for device-level analysisAdditionally, for certain scopes, you can specify which property (key, name, etc.) should be projected alongside the data. Detailed information is available in the respective schema documentation.
The API response is an array, where each element includes:
kpi: The Key Performance Indicator that was analyzedscope: The scope level of the analysisgranularity: The time granularity useddata: The resulting datasetThe data object contains query results organized by scope and granularity:
all: Contains metrics aggregated across the entire time period.temporals: Contains metrics organized by time granularity.all and temporals sections.The structure of temporals data depends on the selected mode:
histogram Mode:granularity: day and from: 2023-01-02, key 0 corresponds to 2023-01-02, key 1 to 2023-01-03, and so on.aggregation Mode:granularity: day, key 1 aggregates all Mondays, key 2 aggregates all Tuesdays, within the specified time period.| kpi |
|---|
| acquisition |
| attendance |
| returning |
| posSessions |
| poiSessions |
| timespent |
| timespentPerScope |
| uniqUsers |
| returningPerScope |
| returningFrequencyPerScope |
| os |
| model |
| manufacturer |
| visitorVsPedestrian |
| perPoiSessions |
| posAffinity |
| homeDistanceVisitsPerScope |
| workDistanceVisitsPerScope |
The GeoMarketing module provides location-based analytics across:
homes: Residential areas defined by geographical regions (IRIS statistical divisions)works: Workplace locations defined by geographical regions (IRIS statistical divisions)The module also provides insights across:
sites: Retail and business locationsFor additional information about query structure, parameters, and response formats, please refer to the Analytics documentation.
required | string or string Examples:
Application unique identifier (_id) or external identifier |
| studyId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Study unique identifier (_id) |
| from | string <date> Example: from=2022-01-15 Analytics period start day (included), formated as |
| to | string <date> Example: to=2022-02-15 Analytics period end day (included), formated as |
| uplift | boolean Default: true Example: uplift=false Set to |
See Analytics documentation for more informations.
object (body-filters) | |
Array of objects (Geo Marketing Analytics App Body Param) non-empty |
{- "filters": {
- "homes": [
- "123456789"
]
}, - "params": [
- {
- "kpi": "timespent",
- "mode": "histogram",
- "granularity": "day",
- "sites": true
}, - {
- "kpi": "returning",
- "mode": "aggregation",
- "granularity": "week",
- "temporals": false
}
]
}[- {
- "kpi": "acquisition",
- "granularity": "day",
- "mode": "histogram",
- "data": {
- "all": { },
- "temporals": { },
- "sites": { },
- "homes": { },
- "works": { }
}
}
]/sites/{siteId}/studies/{studyId}/geo-marketing/analytics/applications/{appIdOrKey}/sites/{siteIdOrKey}/studies/{studyId}/geo-marketing/analytics/s/{siteId}/studies/{studyId}/geo-marketing/analytics/a/{appIdOrKey}/s/{siteIdOrKey}/studies/{studyId}/geo-marketing/analytics| siteId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Site unique identifier (_id) |
| studyId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Study unique identifier (_id) |
| from | string <date> Example: from=2022-01-15 Analytics period start day (included), formated as |
| to | string <date> Example: to=2022-02-15 Analytics period end day (included), formated as |
| uplift | boolean Default: true Example: uplift=false Set to |
See Analytics documentation for more informations.
object (body-filters-2) | |
Array of objects (Geo Marketing Analytics Site Body Param) non-empty |
{- "filters": {
- "homes": [
- "123456789"
]
}, - "params": [
- {
- "kpi": "timespent",
- "mode": "histogram",
- "granularity": "day",
- "globals": false
}, - {
- "kpi": "returning",
- "mode": "aggregation",
- "granularity": "week",
- "temporals": false
}
]
}[- {
- "kpi": "acquisition",
- "granularity": "day",
- "mode": "histogram",
- "data": {
- "all": { },
- "temporals": { },
- "homes": { },
- "works": { }
}
}
]| kpi |
|---|
| costByVisit |
| costByOfflineVisit |
| costByOnlineVisit |
| costByConversion |
| costByOfflineConversion |
| costByOnlineConversion |
| ctr |
| globalLeverPerformance |
| offlineVisitsAndConversions |
| onlineVisitsAndConversions |
| offlineVisits |
| onlineVisits |
| offlineVisitsAttributions |
| onlineVisitsAttributions |
| offlineVisitsLinear |
| offlineVisitsShapley |
| offlineVisitsFC |
| offlineVisitsLC |
| onlineVisitsLinear |
| prints |
| clicks |
| openings |
| cost |
| printVsClick |
| printVsClickVsOpenings |
| timeBeforeOfflineVisitPerScope |
| timeBeforeOnlineVisitPerScope |
| offlineRoi |
| offlineRevenues |
| offlineConversions |
| offlineConversionRate |
| onlineRoi |
| onlineRevenues |
| onlineConversions |
| onlineConversionRate |
| roi |
| revenues |
| revenueByOfflineVisit |
| revenueByOnlineVisit |
| offlineRevenueByOfflineVisit |
| onlineRevenueByOnlineVisit |
| venueRate |
| printsByOfflineVisit |
| comparisonOfflineVisits |
| cohortCostByConversion |
| cohortCostByOfflineConversion |
| cohortCostByOnlineConversion |
| cohortOfflineVisitsAndConversions |
| cohortOnlineVisitsAndConversions |
| cohortOfflineRoi |
| cohortOfflineRevenues |
| cohortOfflineConversions |
| cohortOfflineConversionRate |
| cohortOnlineRoi |
| cohortOnlineRevenues |
| cohortOnlineConversions |
| cohortOnlineConversionRate |
| cohortRoi |
| cohortRevenues |
| costByPurchase |
| costByOfflinePurchase |
| costByOnlinePurchase |
| offlineConversionPurchases |
| onlineConversionPurchases |
| offlineVisitsPerCampaign |
| onlineVisitsPerCampaign |
The Conversion module provides analytics across the following scopes:
levers: Marketing channels and mechanismscampaigns: Marketing campaigns and initiativesextras: Campaign attributes in Key:Value formatThe module also provides insights across:
sites: Retail and business locationsFor additional information about query structure, parameters, and response formats, please refer to the Analytics documentation.
required | string or string Examples:
Application unique identifier (_id) or external identifier |
| from | string <date> Example: from=2022-01-15 Analytics period start day (included), formated as |
| to | string <date> Example: to=2022-02-15 Analytics period end day (included), formated as |
| uplift | boolean Default: true Example: uplift=false Set to |
See Analytics documentation for more informations.
object (body-filters-3) | |
Array of objects (Conversion Analytics App Body Param) non-empty |
{- "filters": {
- "campaigns": [
- "324406611",
- "329280927"
]
}, - "params": [
- {
- "kpi": "globalLeverPerformance",
- "mode": "aggregation",
- "granularity": "day",
- "options": {
- "attribution": "linear"
}
}, - {
- "kpi": "costByOnlineVisit",
- "mode": "aggregation",
- "granularity": "day",
- "options": {
- "attribution": "linear"
}
}, - {
- "kpi": "cost",
- "mode": "aggregation",
- "granularity": "day",
- "options": {
- "attribution": "linear"
}
}, - {
- "kpi": "costByOfflineVisit",
- "mode": "aggregation",
- "granularity": "day",
- "options": {
- "attribution": "linear"
}
}, - {
- "kpi": "offlineRevenues",
- "mode": "aggregation",
- "granularity": "day",
- "options": {
- "attribution": "linear"
}
}, - {
- "kpi": "offlineConversions",
- "mode": "aggregation",
- "granularity": "day",
- "options": {
- "attribution": "linear"
}
}
]
}[- {
- "kpi": "globalLeverPerformance",
- "granularity": "day",
- "mode": "aggregation",
- "data": {
- "campaigns": {
- "324400784": {
- "lever": "display",
- "all": {
- "globalLeverPerformance": {
- "prints": 324,
- "onlineVisits": 29,
- "count": 353
}
}
}, - "324406611": {
- "lever": "display",
- "all": {
- "globalLeverPerformance": {
- "onlineVisits": 1,
- "count": 1
}
}
}, - "329260262": {
- "lever": "video",
- "all": {
- "globalLeverPerformance": {
- "clicks": 4,
- "count": 4
}
}
}
}, - "extras": {
- "provider": {
- "Google": {
- "lever": "adwords",
- "noCampaign": true,
- "all": {
- "globalLeverPerformance": {
- "onlineVisits": 76905,
- "offlineVisits": 11,
- "prints": 4980991,
- "clicks": 92133,
- "count": 5150040
}
}
}, - "Facebook": {
- "lever": "facebook",
- "noCampaign": true,
- "all": {
- "globalLeverPerformance": {
- "onlineVisits": 575,
- "clicks": 8709,
- "prints": 1317428,
- "offlineVisits": 59,
- "count": 1326771
}
}
}, - "Teads": {
- "lever": "video",
- "all": {
- "globalLeverPerformance": {
- "prints": 1,
- "clicks": 1,
- "count": 2
}
}
}, - "LeBonCoin": {
- "lever": "display",
- "all": {
- "globalLeverPerformance": {
- "prints": 81,
- "onlineVisits": 2,
- "count": 83
}
}
}, - "Waze": {
- "lever": "waze",
- "all": {
- "globalLeverPerformance": {
- "prints": 1324226,
- "clicks": 5106,
- "count": 1329332
}
}
}
}
}
}
}
]/sites/{siteId}/conversions/levers/analytics/applications/{appIdOrKey}/sites/{siteIdOrKey}/conversions/levers/analytics/s/{siteId}/conversions/levers/analytics/a/{appIdOrKey}/s/{siteIdOrKey}/conversions/levers/analytics| siteId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Site unique identifier (_id) |
| from | string <date> Example: from=2022-01-15 Analytics period start day (included), formated as |
| to | string <date> Example: to=2022-02-15 Analytics period end day (included), formated as |
| uplift | boolean Default: true Example: uplift=false Set to |
See Stats queries documentation for more informations
object (body-filters-4) | |
Array of objects (Conversion Analytics Site Body Param) non-empty |
{- "filters": {
- "levers": [
- "string"
], - "campaigns": [
- "string"
]
}, - "params": [
- {
- "kpi": "costByVisit",
- "granularity": "day",
- "mode": "histogram",
- "groupBy": "day",
- "all": true,
- "temporals": true,
- "globals": true,
- "levers": true,
- "campaigns": true,
- "options": {
- "attribution": "Linear"
}, - "noCampaign": true,
- "extras": "string"
}
]
}[- {
- "kpi": "costByVisit",
- "granularity": "day",
- "mode": "histogram",
- "data": {
- "all": { },
- "temporals": { },
- "levers": { },
- "campaigns": { },
- "extras": { }
}
}
]| kpi |
|---|
| acquisition |
| areaMatching |
| attendance |
| dropouts |
| entering |
| leaving |
| rangeAmplitude |
| returning |
| sessions |
| timespent |
| timespentPerScope |
| uniqUsers |
| visitOrder |
The Presence module provides customer flow analytics across:
equipments: Connected devices and tracking systemsThe module supports hierarchical analysis through:
sites: Retail and business locationsequipments: Connected devices within specific locationsFor additional information about query structure, parameters, and response formats, please refer to the Analytics documentation.
required | string or string Examples:
Application unique identifier (_id) or external identifier |
| from | string <date> Example: from=2022-01-15 Analytics period start day (included), formated as |
| to | string <date> Example: to=2022-02-15 Analytics period end day (included), formated as |
See Analytics documentation for more informations.
object (body-filters-5) | |
Array of objects (Presence Analytics App Body Param) non-empty |
{- "filters": {
- "sites": [
- "123456789"
]
}, - "params": [
- {
- "kpi": "timespent",
- "mode": "histogram",
- "granularity": "day",
- "sites": true
}, - {
- "kpi": "returning",
- "mode": "aggregation",
- "granularity": "week",
- "temporals": false
}
]
}[- {
- "kpi": "sessions",
- "granularity": "day",
- "mode": "histogram",
- "data": {
- "all": {
- "sessions": {
- "count": 25380,
- "value": 25380
}
}, - "temporals": {
- "0": {
- "sessions": {
- "count": 15380,
- "value": 15380
}
}, - "1": {
- "sessions": {
- "count": 6380,
- "value": 6380
}
}, - "2": {
- "sessions": {
- "count": 3620,
- "value": 3620
}
}
}
}
}, - {
- "kpi": "timespent",
- "granularity": "day",
- "mode": "aggregation",
- "data": {
- "all": {
- "timespent": {
- "count": 25380,
- "value": 41270237,
- "avg": 1626.09
}
}, - "temporals": {
- "1": {
- "timespent": {
- "count": 15380,
- "value": 41270237,
- "avg": 1626.09
}
}, - "2": {
- "timespent": {
- "count": 6380,
- "value": 41270237,
- "avg": 1626.09
}
}, - "3": {
- "timespent": {
- "count": 3620,
- "value": 41270237,
- "avg": 1626.09
}
}
}
}
}
]required | string or string Examples:
Application unique identifier (_id) or external identifier |
required | string or string Examples:
Site unique identifier (_id) or external identifier |
| from | string <date> Example: from=2022-01-15 Analytics period start day (included), formated as |
| to | string <date> Example: to=2022-02-15 Analytics period end day (included), formated as |
See Analytics documentation for more informations.
object (body-filters-6) | |
Array of objects (Presence Analytics Site Body Param) non-empty |
{- "filters": {
- "equipments": [
- "123456789"
]
}, - "params": [
- {
- "kpi": "timespent",
- "mode": "histogram",
- "granularity": "day",
- "equipments": true
}, - {
- "kpi": "returning",
- "mode": "aggregation",
- "granularity": "week",
- "temporals": false
}
]
}[- {
- "kpi": "sessions",
- "granularity": "day",
- "mode": "histogram",
- "data": {
- "all": {
- "sessions": {
- "count": 25380,
- "value": 25380
}
}, - "temporals": {
- "0": {
- "sessions": {
- "count": 15380,
- "value": 15380
}
}, - "1": {
- "sessions": {
- "count": 6380,
- "value": 6380
}
}, - "2": {
- "sessions": {
- "count": 3620,
- "value": 3620
}
}
}
}
}, - {
- "kpi": "timespent",
- "granularity": "day",
- "mode": "aggregation",
- "data": {
- "all": {
- "timespent": {
- "count": 25380,
- "value": 41270237,
- "avg": 1626.09
}
}, - "temporals": {
- "1": {
- "timespent": {
- "count": 15380,
- "value": 41270237,
- "avg": 1626.09
}
}, - "2": {
- "timespent": {
- "count": 6380,
- "value": 41270237,
- "avg": 1626.09
}
}, - "3": {
- "timespent": {
- "count": 3620,
- "value": 41270237,
- "avg": 1626.09
}
}
}
}
}
]Sites represent physical locations or digital properties managed within the Okube Analytics platform. The Site endpoints provide comprehensive functionality for creating, retrieving, updating, and listing all sites associated with your applications.
The API supports two distinct site types:
Sites include essential attributes such as:
Sites are linked to:
Sites serve as fundamental organizational units for:
2 modes depending on Accept header
application/json: paginated list of sitestext/csv: CSV export of sites/sites/applications/{appIdOrKey}/sites| page | integer >= 0 Example: page=2 Page offset |
| per_page | integer [ 0 .. 100 ] Example: per_page=5 Items count per page |
| app | string Example: app=app_1 Application _id or key |
| q | string query per name/key/address |
| name | string has name (boolean) |
| active | string Example: active=true is active (boolean) |
| online | string Example: online=true is online (boolean) |
| inProd | string Example: inProd=false is in production (boolean) |
| hasDraft | string Example: hasDraft=false has plan in draft (boolean) |
| keys | Array of strings non-empty [ items non-empty ] Example: keys=site_key_1&keys=site_key_2 keys to filter from |
| tags | Array of strings non-empty [ items non-empty ] Example: tags=tag1&tags=tag2 List of tags to filter from |
| encoding | string Enum: "utf8" "iso-8859-1" "windows-1252" CSV export specific parameter, to set CSV file encoding (utf-8, etc.) |
| Accept | string Default to Set one of the follow values to export data as csv:
|
{- "documents": [
- {
- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-site",
- "keys": [
- "my-site"
], - "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My site",
- "description": "My site description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "tags": [
- "string"
], - "openings": {
- "exceptionals": [
- {
- "startDay": "2019-03-28",
- "endDay": "2019-03-28",
- "daylyOpenings": [
- {
- "from": 900,
- "to": 1800
}
]
}
], - "regulars": [
- {
- "validFrom": "2019-03-28",
- "validThrough": "2019-03-28",
- "rules": [
- {
- "isoWeekDays": [
- 1
], - "dailyOpenings": [
- {
- "from": null,
- "to": null
}
]
}
]
}
]
}
}
], - "_$paginated": {
- "page": 3,
- "limit": 20,
- "count": 20,
- "total": 100,
- "skipped": 40,
- "remained": 40
}
}application/json and multipart/form-data accepted
multipart/form-data should be used when uploading a thumbnail. application/json should be used in most cases.
/sites/applications/{appIdOrKey}/sites (without app as body params)required | Internal Identifier (string) or Application Key (string) (id-or-key) Application id - MUST not be provided when route is prefixed by /applications |
| key | string (key) [ 1 .. 250 ] characters Site external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
| keys | Array of strings (Site Key) [ 1 .. 10 ] items unique [ items [ 1 .. 250 ] characters ] Alternative site keys (for multiple references, should be unique per application) |
| active | boolean Is site active (displayed in stats, computed in analytics etc.) |
| description | string non-empty Description |
| level | integer Number of floors |
| name required | string Site name |
| tags | Array of strings (tags) non-empty Contextual metadata |
| timezone | string (timezone) non-empty Location timezone |
| phoneNumber | string Site phone number |
object | |
object | |
| online required | boolean Value: true Is site online (no geographical address) |
{- "app": "5e1834b0e12d62a85b388a1b",
- "key": "my-site",
- "keys": [
- "my-site"
], - "active": true,
- "description": "My description",
- "level": 1,
- "name": "My site",
- "tags": [
- "tag_1",
- "tag_2"
], - "timezone": "Europe/Paris",
- "phoneNumber": "+33123456789",
- "deliveryContact": {
- "name": "string",
- "email": "user@example.com",
- "phoneNumber": "+33123456789"
}, - "modules": {
- "Presence": "Enabled",
- "Conversion": {
- "radius": 100
}, - "Supervision": "Enabled"
}, - "online": true
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-site",
- "keys": [
- "my-site"
], - "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My site",
- "description": "My site description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "tags": [
- "string"
], - "openings": {
- "exceptionals": [
- {
- "startDay": "2019-03-28",
- "endDay": "2019-03-28",
- "daylyOpenings": [
- {
- "from": 900,
- "to": 1800
}
]
}
], - "regulars": [
- {
- "validFrom": "2019-03-28",
- "validThrough": "2019-03-28",
- "rules": [
- {
- "isoWeekDays": [
- 1
], - "dailyOpenings": [
- {
- "from": 900,
- "to": 1800
}
]
}
]
}
]
}
}/sites/{siteId}/applications/{appIdOrKey}/sites/{siteIdOrKey}| siteId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Site unique identifier (_id) |
{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-site",
- "keys": [
- "my-site"
], - "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My site",
- "description": "My site description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "tags": [
- "string"
], - "openings": {
- "exceptionals": [
- {
- "startDay": "2019-03-28",
- "endDay": "2019-03-28",
- "daylyOpenings": [
- {
- "from": 900,
- "to": 1800
}
]
}
], - "regulars": [
- {
- "validFrom": "2019-03-28",
- "validThrough": "2019-03-28",
- "rules": [
- {
- "isoWeekDays": [
- 1
], - "dailyOpenings": [
- {
- "from": 900,
- "to": 1800
}
]
}
]
}
]
}
}application/json and multipart/form-data accepted
multipart/form-data should be used when uploading a thumbnail. application/json should be used in most cases.
/sites/{siteId}/applications/{appIdOrKey}/sites/{siteIdOrKey}| siteId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Site unique identifier (_id) |
| key | string (key) [ 1 .. 250 ] characters Site external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
| keys | Array of strings (Site Key) [ 1 .. 10 ] items unique [ items [ 1 .. 250 ] characters ] Alternative site keys (for multiple references, should be unique per application) |
boolean or null Is site active (displayed in stats, computed in analytics etc.) | |
string or null non-empty Description | |
| level | integer Number of floors |
| name | string Site name |
Array of Tags (strings) or null Site metadata | |
| timezone | string (timezone) non-empty Location timezone |
string or null Site phone number | |
object | |
object | |
| online | boolean Value: true Is site online (no geographical address) |
{- "key": "my-site",
- "keys": [
- "my-site"
], - "active": true,
- "description": "My description",
- "level": 1,
- "name": "My site",
- "tags": [
- "tag_1",
- "tag_2"
], - "timezone": "Europe/Paris",
- "phoneNumber": "+33123456789",
- "deliveryContact": {
- "name": "string",
- "email": "user@example.com",
- "phoneNumber": "+33123456789"
}, - "modules": {
- "Presence": "Enabled",
- "Conversion": {
- "radius": 100
}, - "Supervision": "Enabled"
}, - "online": true
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-site",
- "keys": [
- "my-site"
], - "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My site",
- "description": "My site description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "tags": [
- "string"
], - "openings": {
- "exceptionals": [
- {
- "startDay": "2019-03-28",
- "endDay": "2019-03-28",
- "daylyOpenings": [
- {
- "from": 900,
- "to": 1800
}
]
}
], - "regulars": [
- {
- "validFrom": "2019-03-28",
- "validThrough": "2019-03-28",
- "rules": [
- {
- "isoWeekDays": [
- 1
], - "dailyOpenings": [
- {
- "from": 900,
- "to": 1800
}
]
}
]
}
]
}
}required | string or string Examples:
Application unique identifier (_id) or external identifier |
| encoding | string Enum: "utf8" "iso-8859-1" "windows-1252" |
| delimiter | string |
| mapper[id] | boolean |
| mapper[key] | string |
| mapper[additional_keys] | string |
| mapper[name] | string |
| mapper[street_number] | string |
| mapper[street] | string |
| mapper[postal_code] | string |
| mapper[city] | string |
| mapper[country] | string |
| mapper[latitude] | string |
| mapper[longitude] | string |
| mapper[timezone] | string |
| mapper[contact_name] | string |
| mapper[contact_email] | string |
| mapper[contact_phone] | string |
| mapper[presence] | string |
| mapper[tracking] | string |
| mapper[conversion] | string |
| file | string |
Points of Interest (POIs) represent specific geographical locations that are relevant for geo-marketing analysis. The POI endpoints allow you to create, retrieve, update, and list locations that are important for your business analysis.
Points of Interest include essential attributes such as:
Points of Interest can be linked to:
POIs serve as crucial reference points for:
2 modes depending on Accept header
application/json: paginated list of Points of Interesttext/csv: CSV export of Points of Interest/pois (with app as body params)/applications/{appIdOrKey}/pois| page | integer >= 0 Example: page=2 Page offset |
| per_page | integer [ 0 .. 100 ] Example: per_page=5 Items count per page |
| app | string Example: app=app_1 Application _id or key |
| q | string query per name/key/address |
| name | string has name (boolean) |
| active | string Example: active=true is active (boolean) |
| keys | Array of strings non-empty [ items non-empty ] Example: keys=poi_ke_1&keys=poi_ke_2 List of Point of Interest keys to filter from |
| tags | Array of strings non-empty [ items non-empty ] Example: tags=tag1&tags=tag2 List of tags to filter from |
| encoding | string Enum: "utf8" "iso-8859-1" "windows-1252" CSV export specific parameter, to set CSV file encoding (utf-8, etc.) |
| Accept | string Default to Set one of the follow values to export data as csv:
|
{- "documents": [
- {
- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-poi",
- "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My Point of interest",
- "description": "My Point of interest description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "timezone": "Europe/Paris",
- "tags": [
- "tag_1",
- "tag_2"
], - "radius": 70,
- "indoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}, - "outdoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}
}
], - "_$paginated": {
- "page": 3,
- "limit": 20,
- "count": 20,
- "total": 100,
- "skipped": 40,
- "remained": 40
}
}Allows to create a single Point of Interest through a JON Payload, or create/update several Points of Interest at once using a csv payload (as multipart/form-data)
/pois/applications/{appIdOrKey}/pois (without app as body params)required | Internal Identifier (string) or Application Key (string) (id-or-key) Application unique identifier (_id) or external identifier |
| key | string (key-5) [ 1 .. 250 ] characters Point of interest external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
| active | boolean Is point of interest active (displayed in stats, computed in analytics etc.) |
| description | string non-empty Description |
| name required | string Point of interest name |
| tags | Array of strings (tags) non-empty Point of interest metadata |
| coordinates required | Array of numbers (coordinates) = 2 characters Point of interest geographical coordinates |
object (address) Point of interest local address | |
| timezone | string (timezone) non-empty Location timezone |
| radius | number [ 1 .. 300 ] Geoloc data capture radius |
object (h3-indexes) Indoors H3 cells | |
object (h3-indexes) Outdoors H3 cells |
{- "app": "5e1834b0e12d62a85b388a1b",
- "key": "my-poi",
- "active": true,
- "description": "My description",
- "name": "My point of interest",
- "tags": [
- "tag_1",
- "tag_2"
], - "coordinates": [
- 2.3522219,
- 48.856614
], - "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "timezone": "Europe/Paris",
- "radius": 1,
- "indoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}, - "outdoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-poi",
- "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My Point of interest",
- "description": "My Point of interest description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "timezone": "Europe/Paris",
- "tags": [
- "tag_1",
- "tag_2"
], - "radius": 70,
- "indoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}, - "outdoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}
}/pois/{poiId}/applications/{appIdOrKey}/pois/{poiIdOrKey}| poiId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b POI unique identifier (_id) |
{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-poi",
- "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My Point of interest",
- "description": "My Point of interest description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "timezone": "Europe/Paris",
- "tags": [
- "tag_1",
- "tag_2"
], - "radius": 70,
- "indoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}, - "outdoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}
}/pois (with app as body params)/applications/{appIdOrKey}/pois| poiId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b POI unique identifier (_id) |
| key | string (key-5) [ 1 .. 250 ] characters Point of interest external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
| active | boolean Is point of interest active (displayed in stats, computed in analytics etc.) |
string or null non-empty Description | |
string or null Point of interest name | |
Array of Tags (strings) or null Point of interest medatada | |
Array of Coordinates (numbers) or null Point of interest geographical coordinates | |
Address (object) or null Point of interest local address | |
| timezone | string (timezone) non-empty Location timezone |
number or null [ 1 .. 300 ] Geoloc data capture radius | |
H3 Indexes (object) or null Indoors H3 cells | |
H3 Indexes (object) or null Outdoors H3 cells |
{- "key": "my-poi",
- "active": true,
- "description": "My description",
- "name": "My point of interest",
- "tags": [
- "tag_1",
- "tag_2"
], - "coordinates": [
- 2.3522219,
- 48.856614
], - "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "timezone": "Europe/Paris",
- "radius": 0,
- "indoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}, - "outdoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-poi",
- "createdAt": "2019-03-28T09:25:15.000Z",
- "updatedAt": "2019-03-28T09:25:15.000Z",
- "application": "5e1834b0e12d62a85b388a1b",
- "name": "My Point of interest",
- "description": "My Point of interest description",
- "active": true,
- "address": {
- "streetNumber": "55",
- "streetName": "rue de la paix",
- "zipCode": "75000",
- "city": "Paris",
- "country": "France",
- "formattedAddress": "55 rue de la paix, 75000 Paris, France",
- "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
- "coordinates": [
- 2.3522219,
- 48.856614
]
}, - "coordinates": [
- 2.3522219,
- 48.856614
], - "timezone": "Europe/Paris",
- "tags": [
- "tag_1",
- "tag_2"
], - "radius": 70,
- "indoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}, - "outdoorIndexes": {
- "resolution": 12,
- "cells": [
- "8c1f902554323ff",
- "8c1f902554143ff",
- "8c1f90255415dff"
]
}
}Campaigns represent marketing activities and promotions tracked within the Okube Analytics platform. The Campaign endpoints allow you to create, retrieve, update, and list all marketing campaigns associated with your applications.
Campaigns include essential attributes such as:
Campaigns are linked to:
2 modes depending on Accept header
application/json: paginated list of Points of Interesttext/csv: CSV export of Points of Interest/campaigns (with app as body params)/applications/{appIdOrKey}/campaigns| page | integer >= 0 Example: page=2 Page offset |
| per_page | integer [ 0 .. 100 ] Example: per_page=5 Items count per page |
| period | string Enum: "computed" "direct" Period mode to filter campaigns (computed|direct) |
| sb | string <epoch> Example: sb=1577836800 Start before |
| sa | string <epoch> Example: sa=1577836800 Start after |
| eb | string <epoch> Example: eb=1577836800 End before |
| ea | string <epoch> Example: ea=1577836800 End after |
| encoding | string Enum: "utf8" "iso-8859-1" "windows-1252" CSV export specific parameter, to set CSV file encoding (utf-8, etc.) |
| tz | string Example: tz=Europe/Paris Timezone to use for the defined period (from/to) |
| from | string <date> Example: from=2019-01-01 Start date of the period to filter campaigns |
| to | string <date> Example: to=2019-01-31 End date of the period to filter campaigns |
| keys | Array of strings non-empty [ items non-empty ] Example: keys=324400784&keys=campaign_id-1234 List of campaign keys to select |
| g | boolean Default: false select only globals campaigns (not attached to a site or a storeset) |
| q | string non-empty Example: q=My campaign Search query (in name/key/lever name/tags/provider/agency/format fields) |
| sites | Array of strings non-empty [ items non-empty ] Example: sites=site_ke_1&sites=58a9b9e0e4b0e8b2b8e9b9e0 List of site ids|keys to select campaigns from |
| tags | Array of strings non-empty [ items non-empty ] Example: tags=tag1&tags=tag2 List of tags to filter from |
| lever | string non-empty Example: lever=display-in-app&lever=58a9b9e0e4b0e8b2b8e9b9e0 Lever to select campaigns from |
| levers | Array of strings non-empty [ items non-empty ] Example: levers=display-in-app&levers=58a9b9e0e4b0e8b2b8e9b9e0 List of levers to select campaigns from |
| provider | string non-empty Example: provider=Provider1 Provider to select campaigns from |
| agency | string non-empty Example: agency=Agency1 Agency to select campaigns from |
| format | string non-empty Example: format=Format1 Format to select campaigns from |
string or string or string Extra fields to select campaigns from | |
| with_extra | boolean Default: false Map extra field to campaign response body |
| extra_mode | string Default: "or" Enum: "and" "or" Extra fields mode (AND or OR) to filter by extra fields |
| trigger | boolean Default: false is campaign associated to a trigger lever (form step) |
{- "documents": [
- {
- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-campaign",
- "application": "5e1834b0e12d62a85b388a1b",
- "lever": "5e1834b0e12d62a85b388a1b",
- "_cachedLeverName": "Display in app",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "name": "Campaign display name",
- "description": "Campaign description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "computedFrom": "2019-03-28",
- "computedTo": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2,
- "_cachedLeverTrigger": false,
- "provider": "Provider1",
- "agency": "Agency1",
- "format": "Format1",
- "extra": [
- {
- "key": "Custom",
- "value": "value"
}
], - "costs": [
- {
- "amount": 100.5,
- "method": "cpc",
- "module": "dprint",
- "from": "2023-01-01",
- "to": "2023-12-31"
}
]
}
], - "_$paginated": {
- "page": 3,
- "limit": 20,
- "count": 20,
- "total": 100,
- "skipped": 40,
- "remained": 40
}
}Create campaign(s)
required | Internal Identifier (string) or Application Key (string) (id-or-key) Application id - MUST not be provided when route is prefixed by /applications |
| key required | string (key-3) [ 1 .. 250 ] characters Campaign external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
Internal Identifier (string) or Lever Key (string) (id-or-key-2) Ignored value, only used for legacy purposes | |
| name | string Campaign name |
| description | string Campaign description |
| provider | string Campaign provider ref |
| agency | string Campaign agency ref |
| format | string Campaign format ref |
| from | string <date> Campaign start date |
| to | string <date> Campaign end date |
| extra | object Campaign extra fields |
Array of Internal Identifier (string) or Site Key (string) (Site Id or Key) | |
Array of objects (Cost) |
{- "app": "5e1834b0e12d62a85b388a1b",
- "key": "my-campaign",
- "lever": "5e1834b0e12d62a85b388a1b",
- "name": "Campaign name",
- "description": "Campaign description",
- "provider": "Provider1",
- "agency": "Agency1",
- "format": "Format1",
- "from": "2019-03-20",
- "to": "2019-03-20",
- "extra": {
- "key1": "value1",
- "key2": "value2"
}, - "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "costs": [
- {
- "amount": 100.5,
- "method": "cpc",
- "module": "dprint",
- "from": "2023-01-01",
- "to": "2023-12-31"
}
]
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-campaign",
- "application": "5e1834b0e12d62a85b388a1b",
- "lever": "5e1834b0e12d62a85b388a1b",
- "_cachedLeverName": "Display in app",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "name": "Campaign display name",
- "description": "Campaign description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "computedFrom": "2019-03-28",
- "computedTo": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2,
- "_cachedLeverTrigger": false,
- "provider": "Provider1",
- "agency": "Agency1",
- "format": "Format1",
- "extra": [
- {
- "key": "Custom",
- "value": "value"
}
], - "costs": [
- {
- "amount": 100.5,
- "method": "cpc",
- "module": "dprint",
- "from": "2023-01-01",
- "to": "2023-12-31"
}
]
}Get a campaign by id or key.
/campaigns/{campaignId}/applications/{appIdOrKey}/campaigns/{campaignId}| campaignId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Campaign unique identifier (_id) |
{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-campaign",
- "application": "5e1834b0e12d62a85b388a1b",
- "lever": "5e1834b0e12d62a85b388a1b",
- "_cachedLeverName": "Display in app",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "name": "Campaign display name",
- "description": "Campaign description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "computedFrom": "2019-03-28",
- "computedTo": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2,
- "_cachedLeverTrigger": false,
- "provider": "Provider1",
- "agency": "Agency1",
- "format": "Format1",
- "extra": [
- {
- "key": "Custom",
- "value": "value"
}
], - "costs": [
- {
- "amount": 100.5,
- "method": "cpc",
- "module": "dprint",
- "from": "2023-01-01",
- "to": "2023-12-31"
}
]
}Update a campaign by id or key.
/campaigns/{campaignId}/applications/{appIdOrKey}/campaigns/{campaignId}| campaignId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Campaign unique identifier (_id) |
| key | string (key-3) [ 1 .. 250 ] characters Campaign external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
string or null Campaign name | |
string or null Campaign description | |
string or null Campaign provider ref | |
string or null Campaign agency ref | |
string or null Campaign format ref | |
string or null <date> Campaign start date | |
string or null <date> Campaign end date | |
object or null Campaign extra fields | |
Array of Tags (strings) or null Campaign metadata | |
(Array of Site Id or Key (Internal Identifier (string) or Site Key (string))) or null | |
Array of Cost (objects) or null |
{- "key": "my-campaign",
- "name": "Campaign name",
- "description": "Campaign description",
- "provider": "Provider1",
- "agency": "Agency1",
- "format": "Format1",
- "from": "2019-03-20",
- "to": "2019-03-20",
- "extra": {
- "key1": "value1",
- "key2": "value2"
}, - "tags": [
- "tag_1",
- "tag_2"
], - "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "costs": [
- {
- "amount": 100.5,
- "method": "cpc",
- "module": "dprint",
- "from": "2023-01-01",
- "to": "2023-12-31"
}
]
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "key": "my-campaign",
- "application": "5e1834b0e12d62a85b388a1b",
- "lever": "5e1834b0e12d62a85b388a1b",
- "_cachedLeverName": "Display in app",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "name": "Campaign display name",
- "description": "Campaign description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "computedFrom": "2019-03-28",
- "computedTo": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2,
- "_cachedLeverTrigger": false,
- "provider": "Provider1",
- "agency": "Agency1",
- "format": "Format1",
- "extra": [
- {
- "key": "Custom",
- "value": "value"
}
], - "costs": [
- {
- "amount": 100.5,
- "method": "cpc",
- "module": "dprint",
- "from": "2023-01-01",
- "to": "2023-12-31"
}
]
}Geomarketing Studies are analytical projects that evaluate geographic data to optimize business decisions. The Study endpoints enable you to create, retrieve, update, and list all geomarketing analyses associated with your applications.
Geomarketing Studies include essential attributes such as:
Studies are linked to:
Geomarketing Studies facilitate critical business insights for:
2 modes depending on Accept header
application/json: paginated list of Points of Interesttext/csv: CSV export of Points of Interest/studies (with app as body params)/applications/{appIdOrKey}/studies| page | integer >= 0 Example: page=2 Page offset |
| per_page | integer [ 0 .. 100 ] Example: per_page=5 Items count per page |
| sb | string <epoch> Example: sb=1577836800 Start before |
| sa | string <epoch> Example: sa=1577836800 Start after |
| eb | string <epoch> Example: eb=1577836800 End before |
| ea | string <epoch> Example: ea=1577836800 End after |
| encoding | string Enum: "utf8" "iso-8859-1" "windows-1252" CSV export specific parameter, to set CSV file encoding (utf-8, etc.) |
| tz | string Example: tz=Europe/Paris Timezone to use for the defined period (from/to) |
| from | string <date> Example: from=2019-01-01 Start date of the period to filter studies |
| to | string <date> Example: to=2019-01-31 End date of the period to filter studies |
| keys | Array of strings non-empty [ items non-empty ] Example: keys=324400784&keys=study_id-1234 List of study keys to select |
| g | boolean Default: false select only globals studies (not attached to a site or a storeset) |
| q | string non-empty Example: q=My study Search query (in name/key/lever name/tags/provider/agency/format fields) |
| sites | Array of strings non-empty [ items non-empty ] Example: sites=site_key_1&sites=58a9b9e0e4b0e8b2b8e9b9e0 List of site ids|keys to select studies from |
| pois | Array of strings non-empty [ items non-empty ] Example: pois=poi_key_1&pois=58a9b9e0e4b0e8b2b8e9b9e0 List of POI ids|keys to select studies from |
| tags | Array of strings non-empty [ items non-empty ] Example: tags=tag1&tags=tag2 List of tags to filter from |
{- "documents": [
- {
- "_id": "5e1834b0e12d62a85b388a1b",
- "application": "5e1834b0e12d62a85b388a1b",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "pois": [
- "5e1834b0e12d62a85b388a1b"
], - "key": "my-study",
- "name": "Study display name",
- "description": "Study description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2
}
], - "_$paginated": {
- "page": 3,
- "limit": 20,
- "count": 20,
- "total": 100,
- "skipped": 40,
- "remained": 40
}
}Create study(ies)
required | Internal Identifier (string) or Application Key (string) (id-or-key) Application id - MUST not be provided when route is prefixed by /applications |
| key required | string (key-6) [ 1 .. 250 ] characters Study external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
| name | string Study name |
| description | string Study description |
| from | string <date> Study start date |
| to | string <date> Study end date |
| extra | object Study extra fields |
Array of Internal Identifier (string) or Site Key (string) (Site Id or Key) List of associated site ids|keys | |
Array of Internal Identifier (string) or POI Key (string) (Point of interest Id or Key) List of associated POI ids|keys |
{- "app": "5e1834b0e12d62a85b388a1b",
- "key": "my-study",
- "name": "Study name",
- "description": "Study description",
- "from": "2019-03-20",
- "to": "2019-03-20",
- "extra": {
- "key1": "value1",
- "key2": "value2"
}, - "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "pois": [
- "5e1834b0e12d62a85b388a1b"
]
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "application": "5e1834b0e12d62a85b388a1b",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "pois": [
- "5e1834b0e12d62a85b388a1b"
], - "key": "my-study",
- "name": "Study display name",
- "description": "Study description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2
}Get a study by id or key
| studyId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Study unique identifier (_id) |
{- "_id": "5e1834b0e12d62a85b388a1b",
- "application": "5e1834b0e12d62a85b388a1b",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "pois": [
- "5e1834b0e12d62a85b388a1b"
], - "key": "my-study",
- "name": "Study display name",
- "description": "Study description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2
}Update a study by id or key
| studyId required | string^[a-fA-F0-9]{24}$ Example: 5e1834b0e12d62a85b388a1b Study unique identifier (_id) |
| key | string (key-6) [ 1 .. 250 ] characters Study external identifier. Accepts any character format, including spaces, but control characters are not allowed. |
string or null Study name | |
string or null Study description | |
string or null <date> Study start date | |
string or null <date> Study end date | |
Array of Tags (strings) or null Study metadata | |
(Array of Site Id or Key (Internal Identifier (string) or Site Key (string))) or null | |
(Array of Point of interest Id or Key (Internal Identifier (string) or POI Key (string))) or null |
{- "key": "my-study",
- "name": "Study name",
- "description": "Study description",
- "from": "2019-03-20",
- "to": "2019-03-20",
- "tags": [
- "tag_1",
- "tag_2"
], - "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "pois": [
- "5e1834b0e12d62a85b388a1b"
]
}{- "_id": "5e1834b0e12d62a85b388a1b",
- "application": "5e1834b0e12d62a85b388a1b",
- "sites": [
- "5e1834b0e12d62a85b388a1b"
], - "pois": [
- "5e1834b0e12d62a85b388a1b"
], - "key": "my-study",
- "name": "Study display name",
- "description": "Study description",
- "from": "2019-03-28",
- "to": "2019-03-28",
- "tags": [
- "tag_1",
- "tag_2"
], - "flag": 2
}