Record a marketing activity
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.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
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" }}Delete a URL redirect
Deletes the redirect; the old path answers 404 again. Shopify only. Needs navigation.write.
Delete a marketing activity
Deletes the marketing activity you created with PUT /v1/commerce/marketing-activities, identified by the `remoteId` you gave it. Shopify only. Needs marketing.write.