Gift Cards API Routes

A gift card is a prepaid card that customers can use to purchase products in the store. Customers can purchase gift cards for themselves or others, and then use them to pay for their orders. These API routes allow logged-in customers to create and manage their gift cards.

Gift Cards are available through the Loyalty Plugin.

GET /store/gift-cards/{idOrCode}#

Get a Gift Card

Retrieve a gift card by its ID or code. You can expand the gift card's relations or select the fields that should be returned.

Plugin: This API route is only available when the loyalty plugin is installed in the MedusaGo application.

Authentication: none.

Path parameters

idOrCodestring
The gift card's ID or code.

Header parameters

x-publishable-api-keystring
Publishable API Key created in the Medusa Admin.
x-medusa-localestringOptional
The locale in BCP 47 format to retrieve localized content.
Example: en-US

Query parameters

fieldsstringOptional
Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.
localestringOptional
The locale in BCP 47 format to retrieve localized content.
Example: en-US

Request examples

Responses

200 OK

400, 401, 404, 409, 422, 500: an error response is returned.

Found a problem with this page?Report Issue
Edited Nov 14·Edit this page