Aller au contenu principal

Webmarketer API (1.0.0)

Introduction

Webmarketer is a marketing tool allowing to collect interactions, events and attribute them. This API allows you to interact with your data.

Date Specification

Webmarketer API uses the date-time format as specified in RFC3339. RFC3339 is a profile of the ISO 8601 standard for date and time formats which is widely used in Internet protocols and standards.

The API uses this format to represent an instant with any timezone offset.

Note : If a timezone offset is not provided, the API will consider the date-time as UTC.

For example, 2022-04-01Z05:00:00, 2022-04-01T06:00:00+01:00 and 2022-04-01T03:00:00-02:00 represent the same instant in UTC, UTC +1 and UTC -2 respectively.

Events

Everything about events

Create an event asynchronously

This endpoint allows you to send an event to Webmarketer.

An event represent an user action on your website or application that you want to track with Webmarketer.

Ensure you have properly configured your event types in Webmarketer before sending events and the event data you are sending matches your declared event-type schema.

With this enpoint, event ingestion is asynchronous, so you will receive a 200 response even if the event is not yet processed or invalid. You can consult the trashed events in the Webmarketer interface.

Request Body schema: application/json
required
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

Your Webmarketer project id

eventType
required
string

Event Type reference of the event to send

eventDate
string <date-time>

Date of the event, see Date Specification section for more information.

trackerId
string

Tracker ID of the user who made the event (if not provided, Webmarketer won't be able to attach the event to user interactions)

nonce
required
string

A unique identifier used to deduplicate event in case of multiple sends

data
required
object

Data of the event (must match the event type schema)

Responses

Request samples

Content type
application/json
{
  • "projectId": "string",
  • "eventType": "purchase",
  • "eventDate": "1955-11-12T22:00:00Z",
  • "trackerId": "23jkfs1ufeuih1fh",
  • "nonce": 123456789,
  • "data": {
    }
}

Response samples

Content type
application/json
"da717cf8-cd33-4a6d-a052-68e2096f06b9"

Create an event synchronously

This endpoint allows you to send an event to Webmarketer.

An event represent an user action on your website or application that you want to track with Webmarketer. Ensure you have properly configured your event types in Webmarketer before sending events and the event data you are sending matches your declared event-type schema.

Event ingestion is synchronous on this endpoint, so you will receive a 200 response when the event is fully processed.

Request Body schema: application/json
required
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

Your Webmarketer project id

eventType
required
string

Event Type reference of the event to send

eventDate
string <date-time>

Date of the event, see Date Specification section for more information.

trackerId
string

Tracker ID of the user who made the event (if not provided, Webmarketer won't be able to attach the event to user interactions)

nonce
required
string

A unique identifier used to deduplicate event in case of multiple sends

data
required
object

Data of the event (must match the event type schema)

Responses

Request samples

Content type
application/json
{
  • "projectId": "string",
  • "eventType": "purchase",
  • "eventDate": "1955-11-12T22:00:00Z",
  • "trackerId": "23jkfs1ufeuih1fh",
  • "nonce": 123456789,
  • "data": {
    }
}

Response samples

Content type
application/json
"da717cf8-cd33-4a6d-a052-68e2096f06b9"

Gets a Raw Event by ID

This endpoint allows you to retrieve a raw event by its id (Event ids are generated by Webmarketer and are globally unique)

The raw event is the event as it was sent to the Webmarketer API, without any transformation, this endpoint does not allow to get the data computed by Webmarketer. If your want to get the computed data, please use the /projects/{projectId}/users/{id}/events or /projects/{projectId}/events/{id} endpoint.

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

id
required
string <uuid> (events-event_id)
Example: bbee1c25-8718-4c95-b720-b00567113233

Id of the event

Responses

Response samples

Content type
application/json
{
  • "_id": "e5be5b04-0721-4a6e-87eb-b880f81a12d2",
  • "projectId": "your-project",
  • "nonce": "e5be5b04-0721-4a6e-87eb-b880f81a12d2",
  • "eventType": "complaint",
  • "trackerId": "ru1cc7QHeklGu2_3MOzLkLncu3KJAQ",
  • "createdAt": "2004-09-22 14:15:00Z",
  • "data": {
    }
}

Get Trashed events

This endpoint allows you to fetch the trashed events.
When an event cannot be processed by Webmarketer (when a mandatory field is missing, or when some fields values are invalid) the event will be stored in the "trash collection", allowing you to investigate and debug.

⚠️ Note: the field key in the errors array will be removed in a near future, the field will be changed to a string.

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

query Parameters
since
string <date-time>
Example: since=2023-08-19T22:00:00.000Z

Allow you to filter by a lower date limit (optional)

until
string <date-time>
Example: until=2023-08-21T21:59:59.999Z

Allow you to filter by a upper date limit (optional)

offset
integer
Example: offset=50

Items to skip (pagination)

limit
integer
Example: limit=10

Max returned items (pagination)

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "total": 36,
  • "data": [
    ]
}

Event insights (without attribution)

This endpoint allows you to generate the insight about event.

⚠️ Note that this endpoint get data from the event without using the attribution, if you want insights about attributed data, please refer to TODO.

This endpoint allows you to retrieve multiple metrics and aggregate them by a date dimension and by event-type if needed.

The metrics can be :

  • Your statistics technical keys (ie: turnover if you used the e-commerce project bootstrap)
  • Your states technical keys (ie: rdv or converted if you declared theses offline states)
  • event-count this one is a built-in metric that count the number of events

The classic date dimension can be :

  • day
  • week
  • month
  • quarter
  • semester
  • year

If needed you can use a non-linear date dimension, allowing you to identify seasonality in your data.

  • dayOfWeek
  • dayOfMonth
  • dayOfYear
  • weekOfYear
  • monthOfYear
  • quarterOfYear
  • semesterOfYear

You can also use the event-type breakdown, this option will generate an output entry for each couple date interval/event-type.

This endpoint is designed to generate graphs so it is not paginated.

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

Request Body schema: application/json
required
since
required
string <date-time>

Allow you to set a lower date limit (optional)

until
required
string <date-time>

Allow you to set an upper date limit (optional)

metrics
required
Array of strings

List of the metrics you want to retrieve, the keys must be the technical keys of state, statistics or event-count.

⚠️ Note that invalid keys will not generate an error, the returned value will always be 0.

groupBy
required
string

The desired breakdown (project or event-type)

interval
required
string

The desired interval can be: day, week, month, quarter, semester, year, dayOfWeek, dayOfMonth, dayOfYear, weekOfYear, monthOfYear, quarterOfYear, semesterOfYear

filter
any

Only pertinent for event-type breakdown, this parameters restrict the retrieved breakdowns.
The endpoint will only return the event types present in this array.
If absent (or with an empty array), all the breakdown values will be returned.

Responses

Request samples

Content type
application/json
{
  • "since": "2023-08-01T22:00:00.000Z",
  • "until": "2023-08-19T22:00:00.000Z",
  • "metrics": [
    ],
  • "groupBy": "`project` or `event-type`",
  • "interval": "`day`, `week`, `month`, `monthOfYear`, etc.",
  • "filter": null
}

Response samples

Content type
application/json
Example

Project breakdown with day interval

[
  • {
    },
  • {
    }
]

Update an event state

This endpoint allows you to update a state of an event.
After being generated, an event state can evolve. It is common to see a call-me-back event pass to a qualified state after having been qualified by your sales team, then set the converted state when the user order.

If in this example, the event seems to only have one state at a time, this is not how Webmarketer models your events.

For the example above, Webmarketer will store :

  • qualified on 2023-08-10T14:30:00Z
  • converted on 2023-08-18T17:30:00Z

Each event state is described with a date.

In the future, this modeling will allow you to analyze the transients between theses states (e.g. how long does it take to get a lead from qualified to converted when it comes from Facebook).

Troubleshooting
If you encounter 404 response telling that "No storageKey matching field in this eventType" :

  • You may have a typo in the state name
  • The state did not exists at the time the event you trying to update where created

In the second case, if you need to update state of past events for which a state did not exists, our team can manually add them to allow historical updates : please contact us.

Even if we love giving you the autonomy to manage your data, we prefer to be cautious about this kind of update, backdating the states can cause inconsistencies (e.g. when renaming states over time), our experts will ensure that "backdating" will not cause side effects)

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

id
required
string <uuid> (events-event_id)
Example: bbee1c25-8718-4c95-b720-b00567113233

Id of the event

storageKey
required
string
Example: converted

The storage key of the state you want to update

Request Body schema: application/json
required
value
required
number

The value of the state (0 or 1)

date
string <date-time>

The date when the state changed, leave it blank if not relevant

Responses

Request samples

Content type
application/json
{
  • "value": 1,
  • "date": "2023-05-04T12:00:00.000Z"
}

Response samples

Content type
application/json
{
  • "statusCode": 401,
  • "message": "Unauthorized"
}

Update an event statistic

This endpoint allows you to update a statistic of an event.
Event statistic allow you to inform Webmarketer about your event metrics (like turnover, or quoted amount).

A classical situation is when an event leads to a sale of 4 000€.

By updating the "turnover" stat, you allow Webmarketer to affect this amount to the campaigns that led to this event (according to your attribution models).

E.g. : with a linear model and two interactions : 50% google (2000€), 50% facebook (2000€)

As for event state, a statistic can also be set to a specific date.

In the future, this modeling will allow you to analyze the transients between theses states (e.g. how long does it take to get a lead from qualified to converted when it comes from Facebook).

Troubleshooting
If you encounter 404 response telling that "No storageKey matching field in this eventType" :

  • You may have a typo in the state name
  • The state did not exists at the time the event you trying to update where created

In the second case, if you need to update state of past events for which a state did not exists, our team can manually add them to allow historical updates : please contact us.

Even if we love giving you the autonomy to manage your data, we prefer to be cautious about this kind of update, backdating the states can cause inconsistencies (e.g. when renaming states over time), our experts will ensure that "backdating" will not cause side effects)

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

id
required
string <uuid> (events-event_id)
Example: bbee1c25-8718-4c95-b720-b00567113233

Id of the event

storageKey
required
string
Example: turnover

The storage key of the statistic you want to update

Request Body schema: application/json
required
value
required
number

The value of the statistic

date
string <date-time>

The date you want the statistic changed, leave it blank if not relevant

Responses

Request samples

Content type
application/json
{
  • "value": 4000,
  • "date": "2023-05-04T12:00:00.000Z"
}

Response samples

Content type
application/json
{
  • "statusCode": 401,
  • "message": "Unauthorized"
}

Gets an Event by ID

This endpoint allows you to retrieve an event by its id (Event ids are generated by Webmarketer and are globally unique)

The event is the computed event from the raw event which was sent to the Webmarketer API (linked user, passed data parsed).

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

id
required
string <uuid> (events-event_id)
Example: bbee1c25-8718-4c95-b720-b00567113233

Id of the event

Responses

Response samples

Content type
application/json
{
  • "_id": "7a67b6b7-14bc-4a91-aefa-c2cdc6fd4741",
  • "projectId": "demo-ecommerce",
  • "userId": "668fdaae3a8d910335ec56b1",
  • "eventDate": "2024-04-16T20:37:02.000Z",
  • "eventType": "order",
  • "attributable": true,
  • "expirationPolicy": null,
  • "event": { },
  • "user": {
    },
  • "metrics": [
    ],
  • "createdAt": "2024-07-11T13:36:53.922Z",
  • "updatedAt": "2024-07-11T13:36:53.922Z"
}

Gets all metrics of a user

This endpoint allows you to retrieve all metric by their user id (Event ids are generated by Webmarketer and are globally unique)

The raw event is the event as it was sent to the Webmarketer API, without any transformation, this endpoint does not allow to get the data computed by Webmarketer. The event is the computed data created from the raw event sent to the Webmarrketer API (linked user, passed data parsed)

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

id
required
string <uuid> (events-event_id)
Example: bbee1c25-8718-4c95-b720-b00567113233

Id of the event

query Parameters
type
string
Enum: "state" "statistic"

The type of metrics wanted (all if not set).

since
string <date-time>

The minimum date for metric metricDate (data.date) (inclusive).

until
string <date-time>

The maximum date for metric metricDate (data.date) (inclusive).

offset
number

The number of skipped items from the original query.

limit
number

The maximum number of item retrieved.

sort
string
Enum: "createdAt" "updatedAt" "metricDate"

The date by which will be sorted retrieved items.

order
string
Enum: "ASC" "DESC"

The order of the sorting.

Responses

Response samples

Content type
application/json
{
  • "_id": "7a67b6b7-14bc-4a91-aefa-c2cdc6fd4741",
  • "projectId": "demo-ecommerce",
  • "userId": "668fdaae3a8d910335ec56b1",
  • "eventDate": "2024-04-16T20:37:02.000Z",
  • "eventType": "order",
  • "attributable": true,
  • "expirationPolicy": null,
  • "event": { },
  • "user": {
    },
  • "metrics": [
    ],
  • "createdAt": "2024-07-11T13:36:53.922Z",
  • "updatedAt": "2024-07-11T13:36:53.922Z"
}

Event Types

Everything about event-types

Get event types

This endpoint allows you to retrieve the list of your project event-types.

The result is paginated.

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

query Parameters
offset
integer
Example: offset=50

Items to skip (pagination)

limit
integer
Example: limit=10

Max returned items (pagination)

search
string
Example: search=form

Pattern to search (in event type's name or reference)

archived
boolean

if set to true, returns the archived event types

storageKey
string
Example: storageKey=first_name

Return only event types containing one field with the passed storage key

reference
string
Example: reference=contact-form

Return the event types with the passed reference

sort
string
Example: sort=name,-createdAt

Sort the event list by the passed fields.

Ascending sort can be done by specifying the property name you want to sort by (name), to sort by descending order, prefix the property name with a minus sign (-name).

You can specify multiple sort by separating them with a comma (,).

Responses

Response samples

Content type
application/json
{
  • "total": 2,
  • "count": 2,
  • "data": [
    ]
}

Create an event-type

This endpoint allows you to create a new event-type.

Request Body schema: application/json
required

The event-type to create

reference
string

Technical reference of the event type

name
string

The name of the event type (displayed in Webmarketer)

Array of objects

The fields, states and statistics of the event type

metadata
object

The metadata of the event type, not used for now

object

Responses

Request samples

Content type
application/json
{
  • "reference": "contact-form",
  • "name": "Contact Form",
  • "fields": [
    ],
  • "metadata": { },
  • "expirationPolicy": {
    }
}

Response samples

Content type
application/json
{
  • "_id": "64ea0e9471360401bc438ef6",
  • "createdAt": "2023-07-21T10:57:00Z",
  • "updatedAt": "2023-08-26T14:35:00Z",
  • "archivedAt": null,
  • "projectId": "your-project",
  • "reference": "contact-form",
  • "name": "Generic Contact form",
  • "fields": [
    ],
  • "metadata": {
    },
  • "phoneParsingConfig": [
    ]
}

Get an event type

This endpoint allows you to retrieve a specific event-type

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

id
required
string

The event type reference

Responses

Response samples

Content type
application/json
{
  • "_id": "64ea0e9471360401bc438ef6",
  • "createdAt": "2023-07-21T10:57:00Z",
  • "updatedAt": "2023-08-26T14:35:00Z",
  • "archivedAt": null,
  • "projectId": "your-project",
  • "reference": "contact-form",
  • "name": "Generic Contact form",
  • "fields": [
    ],
  • "metadata": {
    },
  • "phoneParsingConfig": [
    ]
}

Custom Ads

Everything about Custom Ads

Get custom campaigns

This endpoint allows you to retrieve a paginated list of custom campaigns for a Custom Ads integration.

You can filter the campaigns by active status, campaign ID, campaign slug, name, and explicit status.

Please note that campaign ID is different from the campaign slug. The campaign ID can be retrieved through the GET campaigns endpoint. The campaign slug is a user-defined identifier for the campaign to be used in the URL.

Explicit campaigns are campaigns that were explicitly created by the user. Implicit campaigns are campaigns that were created by the system when traffic is detected with the integration wmktid but no explicit campaign slug is provided.

path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

wmktId
required
string

Webmarketer Id of the integration, can be found on the custom ads integration

query Parameters
active
boolean

Filter by active status (optional)

campaignId
string

Filter by campaign ID (optional)

campaignSlug
string

Filter by campaign slug (optional)

nameLike
string

Only include campaigns where the name match the given string, matching is case insensitive (optional)

explicit
boolean

Display campaigns which were explicitly / implicitly created (optional)

sort
string (custom-ads-campaigns-campaign-filter-sort-type)
Enum: "name" "campaignId" "active"

Sort by field (optional)

order
string (custom-ads-campaigns-order-type)
Enum: "ASC" "DESC"

Sort order (optional)

offset
integer
Example: offset=50

Campaigns to skip (pagination)

limit
integer
Example: limit=10

Max returned campaigns (pagination)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "count": 0,
  • "total": 0,
  • "offset": 0,
  • "limit": 0
}

Create custom campaign

This endpoint allows you to create a custom campaign for a Custom Ads integration.

Please note that :

  • the campaign slug must be unique within the integration,
  • the campaign will be declared as explicit (as it was created by a user).
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

wmktId
required
string

Webmarketer Id of the integration, can be found on the custom ads integration

Request Body schema: application/json
required
campaignSlug
required
string

Campaign slug of your choice, the campaign slug will be used by Webmarketer to identify the campaign from the landing page URL. The campaign slug must be unique within the integration.

name
required
string

The name of the Campaign, used in the Webmarketer interface

active
boolean
Default: true

Campaign status (optional)

Responses

Request samples

Content type
application/json
{
  • "campaignSlug": "string",
  • "name": "string",
  • "active": true
}

Response samples

Content type
application/json
{
  • "id": "string"
}

Get a custom campaign

This endpoint allows you to retrieve a Custom Ads campaign for a given integration.

Note that the campaignId is not the same as the campaign slug, this id is generated by Webmarketer on campaign creation and can be retrieved through the GET campaigns endpoint.

Note that the returned campaign could be an implicit campaign, automatically created by the system when traffic is detected without any associated explicit campaign.

path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

wmktId
required
string

Webmarketer Id of the integration, can be found on the custom ads integration

id
required
string

The campaign ID

Note that the campaign Id is different from the campaign slug. It can be retrieved through the GET campaigns endpoint.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "integrationId": "string",
  • "projectId": "string",
  • "name": "string",
  • "campaignSlug": "string",
  • "active": true,
  • "explicit": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a custom campaign

This endpoint allows you to update a custom campaign for a Custom Ads integration.

You can update the campaign name and its active status.

path Parameters
id
required
string

The campaign ID

Note that the campaign Id is different from the campaign slug. It can be retrieved through the GET campaigns endpoint.

Request Body schema: application/json
name
string

Campaign name (optional)

active
boolean

Campaign status (optional)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "active": true
}

Response samples

Content type
application/json
{
  • "modifiedCount": 0
}

Get a custom campaign outlays

This endpoint allows you to retrieve a paginated list of outlays for a given Custom Ads campaign.

path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

wmktId
required
string

Webmarketer Id of the integration, can be found on the custom ads integration

parentCampaignId
required
string

The parent campaign ID

Note that the campaign Id is different from the campaign slug. It can be retrieved through the GET campaigns endpoint.

query Parameters
sort
string (custom-ads-campaigns-outlay-filter-sort-type)
Enum: "campaignId" "startDate" "endDate" "amount" "country" "region"

Sort by field

order
string (custom-ads-campaigns-order-type)
Enum: "ASC" "DESC"

Order by field

since
string <date-time>

Get outlays since this date

until
string <date-time>

Get outlays until this date

offset
integer
Example: offset=50

Outlays to skip (pagination)

limit
integer
Example: limit=10

Max returned outlays (pagination)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "count": 0,
  • "total": 0,
  • "offset": 0,
  • "limit": 0
}

Create a custom campaign outlay

This endpoint allows you to create an outlay for a given Custom Ads campaign.

Region and country are optional fields and can be used to pass additional information about the outlay (for future reports in Webmarketer).

path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

wmktId
required
string

Webmarketer Id of the integration, can be found on the custom ads integration

parentCampaignId
required
string

The parent campaign ID

Note that the campaign Id is different from the campaign slug. It can be retrieved through the GET campaigns endpoint.

Request Body schema: application/json
required
amount
required
number

The amount of the outlay, in the currency of the integration

startDate
required
string <date-time>

The start date of the outlay, must be less than the end date

endDate
required
string <date-time>

The end date of the outlay, must be greater than the start date

country
string

The country where the outlay was made, optional, not used yet

region
string

The region where the outlay was made, optional, not used yet

Responses

Request samples

Content type
application/json
{
  • "amount": 0,
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "country": "string",
  • "region": "string"
}

Response samples

Content type
application/json
{
  • "id": "string"
}

Get a custom campaign outlay

This endpoint allows you to retrieve an outlay for a given Custom Ads campaign.

path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

wmktId
required
string

Webmarketer Id of the integration, can be found on the custom ads integration

parentCampaignId
required
string

The parent campaign ID

Note that the campaign Id is different from the campaign slug. It can be retrieved through the GET campaigns endpoint.

outlayId
required
string

The outlay Id

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "projectId": "string",
  • "integrationId": "string",
  • "campaignId": "string",
  • "amount": {
    },
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "country": "string",
  • "region": "string",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a custom campaign outlay

This endpoint allows you to update an outlay for a given Custom Ads campaign.

Region and country are optional fields and can be used to pass additional information about the outlay (for future reports in Webmarketer).

path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

wmktId
required
string

Webmarketer Id of the integration, can be found on the custom ads integration

parentCampaignId
required
string

The parent campaign ID

Note that the campaign Id is different from the campaign slug. It can be retrieved through the GET campaigns endpoint.

outlayId
required
string

The outlay ID

Request Body schema: application/json
required
amount
number
startDate
string <date-time>
endDate
string <date-time>
campaignId
object

The campaign ID

Note that the campaign Id is different from the campaign slug. It can be retrieved through the GET campaigns endpoint.

country
string
region
string

Responses

Request samples

Content type
application/json
{
  • "amount": 0,
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "campaignId": { },
  • "country": "string",
  • "region": "string"
}

Response samples

Content type
application/json
{
  • "modifiedCount": 0
}

Interactions

Create offline interaction

This endpoint allows you to create offline interaction.

An offline interaction is a user interaction with your brand out of your website that you want to track with Webmarketer.

Offline interaction can/should be only associated to a custom integration (eg: Google Spreadsheet) according to nodeData property.

nodeData property is used to identify the targeted advertiser node, you must provide a wmktId to allow Webmarketer to identify the integration and the advertiser needed properties (eg: cid for campaign ID).

userData property is used to identify the user, you must only provide identity field according to the project's user schema (eg: email, phone...).

Offline interaction ingestion is synchronous, so you will receive a 400 response if the interaction payload is invalid.

Authorizations:
JwtBearer
path Parameters
projectId
required
string (project_id) [ 3 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The queried Webmarketer project id

Request Body schema: application/json
required
date
string <date-time>

Date of the offline interaction, see Date Specification section for more information.

userData
object

Data used to identify the user

nodeData
object

Data used to identify the advertiser node

Responses

Request samples

Content type
application/json
{
  • "date": "2023-08-01T22:00:00.000Z",
  • "userData": {
    },
  • "nodeData": {
    }
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": "wmktId must be present in nodeData",
  • "error": "Bad Request"
}