Skip to main content
Skip to main content

retrieve - Promotion Module Reference

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

This method retrieves a promotion by its ID.

Example

A simple example that retrieves a promotion by its ID:

const promotion =
await promotionModuleService.retrieve("promo_123")

To specify relations that should be retrieved:

const promotion = await promotionModuleService.retrieve(
"promo_123",
{
relations: ["application_method"],
}
)

Parameters

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

Returns

PromisePromise<PromotionDTO>Required
The retrieved promotion.
Was this section helpful?