Skip to main content
Skip to main content

retrieveCampaign - Promotion Module Reference

This documentation provides a reference to the retrieveCampaign method. This belongs to the Promotion Module.

This method retrieves a campaigns by its ID.

Example

A simple example that retrieves a promotion by its ID:

const campaign =
await promotionModuleService.retrieveCampaign("procamp_123")

To specify relations that should be retrieved:

const campaign =
await promotionModuleService.retrieveCampaign(
"procamp_123",
{
relations: ["promotions"],
}
)

Parameters

idstringRequired
The ID of the campaigns.
The configurations determining how the campaign is retrieved. Its properties, such as select or relations, accept the attributes or relations associated with a campaign.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<CampaignDTO>Required
The retrieved campaigns.
Was this section helpful?