Store Credit Accounts API Routes
GET /store/store-credit-accounts#
List Customer's Store Credit Accounts
Retrieve the logged-in customer's store credit accounts. The store credit accounts can be filtered by fields such as id. The store credit accounts can also be sorted or paginated.
Authentication: cookie session, JWT bearer token.
Header parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
currency_codestringOptionalusdcreated_atobjectOptionalupdated_atobjectOptionallimitnumberOptionaloffsetnumberOptionalorderstringOptional-.fieldsstringOptional+ 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.$andobject[]Optional$orobject[]OptionallocalestringOptionalen-USwith_deletedbooleanOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberstore_credit_accountsobject[]The list of store credit accounts.
store_credit_accountsobject[]estimate_countnumberOptional400, 401, 404, 409, 422, 500: an error response is returned.
POST /store/store-credit-accounts/claim#
Claim a Store Credit Account
Claim a store credit account as the logged-in customer. The store credit account must not belong to another customer, and it must have amount available to claim. This is typically used to claim anonymous store credit accounts, such as those created for guest users or through gift cards.
Authentication: cookie session, JWT bearer token.
Header parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
localestringOptionalen-USRequest body (application/json)
codestringRequest examples
Responses
200 OK
store_credit_accountobjectThe store credit account's details.
store_credit_accountobject400, 401, 404, 409, 422, 500: an error response is returned.
GET /store/store-credit-accounts/{id}#
Get Customer's Store Credit Account
Retrieve logged-in customer's store credit account by its ID. You can expand the store credit account's relations or select the fields that should be returned.
Authentication: cookie session, JWT bearer token.
Path parameters
idstringHeader parameters
x-publishable-api-keystringx-medusa-localestringOptionalen-USQuery parameters
localestringOptionalen-USRequest examples
Responses
200 OK
store_credit_accountobjectThe store credit account's details.
store_credit_accountobject400, 401, 404, 409, 422, 500: an error response is returned.