OverviewPlatformsAPI ReferenceResources
Commerce

Record a marketing activity

PUThttps://zernio.com/api/v1/commerce/marketing-activities

Creates or updates (by remoteId) an activity in the store's Marketing section, so the merchant sees a post, ad or message you ran for them, with its link and UTM parameters for attribution. Use your own id (for example the Zernio post or ad id) as remoteId.

PlatformsShopify

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Body

application/json

What every request needs

accountIdstringRequired
remoteIdstring, max 255Required
titlestringRequired
urlstring (uri)Required
tacticstringRequiredOne of ad | post | message | newsletter | link | affiliate | retargeting | loyalty | seo
channelstringRequiredOne of social | search | display | email | referral
statusstringRequiredOne of active | inactive | paused | scheduled
Optional parameters6 fields
previewImageUrlstring (uri)
utmobject
campaignstringRequired
sourcestringRequired
mediumstringRequired
budgetobject
typestringRequiredOne of daily | lifetime
amountstringRequired

Decimal in the store currency.

adSpendstring

Decimal in the store currency.

startedAtstring (date-time)
endedAtstring (date-time)

Responses

Success· the request worked

Errors· the request failed

PUT/v1/commerce/marketing-activities
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.commerce.upsertCommerceMarketingActivity({  body: {    accountId: 'account_abc123',    remoteId: 'remote_abc123',    title: 'Example',    url: 'https://example.com',    tactic: 'ad',    channel: 'social',    status: 'active',  },});console.log(data);
{  "marketingActivity": {    "id": "string",    "remoteId": "string"  }}
OpenAPI specification
Was this page helpful?