List Cards
Learn to retrieve Marqeta cards’ information.
In this lesson, we’ll learn to get a list of all Marqeta cards owned by a specific user. We’ll also learn to get information about a specific card.
Get all cards owned by a specific user
We can get a list of all Marqeta cards associated with a particular user by making a GET
request to the {BASE_URL}/cards/user/{token}
endpoint. The path parameter ({token}
) refers to the token of the user that we want to retrieve information from. This gives us a list of all the cards associated with that specific user.
This endpoint allows us to filter the visibility of the response fields if necessary. It also supports pagination, which allows us to retrieve a specific range of resources from a complete and sorted list of the returned resources.
Moreover, this endpoint supports object expansion, which lets us optimize API calls and response sizes. It allows us to specify which objects to expand from those returned in the response. For example, as part of the response, this endpoint returns the token
of the user who owns the card. We can specify if we want to retrieve the complete user object corresponding to the returned token
as part of the response. This gives us the card object data and the user data with one API call instead of two.
Request parameters
The request parameters of the endpoint are provided in the table below:
Get hands-on with 1400+ tech skills courses.