> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.navipartner.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.navipartner.com/_mcp/server.

# Get using Id

GET https://api.npretail.app/{tenant}/{environment}/{company}/membership/card/{cardId}

Retrieve details about a specific card using its unique card ID. This endpoint provides detailed information about the card, such as the member it belongs to, its status, and its validity.

Reference: https://docs.navipartner.com/apis/api-reference/memberships/service-card/get-card-id

## Authentication

- `x-np-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required) — Your Entra Tenant ID. [More details.](/paths#1-tenant)
- `environment` (string, required) — Your Business Central Environment. [More details.](/paths#2-environment)
- `company` (string, required) — Your Business Central Company. [More details.](/paths#3-company)
- `cardId` (UUID, required) — Unique identifier for a card.

## Response

### 200

- `card` (MemberCardDTOResponse, required) — This is a composite type representing a MemberCard along with the associated Member and Membership. It includes information about the member who holds the card and the membership the card is tied to.

## Types

### MemberCardDTOResponse

This is a composite type representing a MemberCard along with the associated Member and Membership. It includes information about the member who holds the card and the membership the card is tied to.

- `cardNumber` (string, required) — Unique identifier for a card.
- `createdAt` (datetime, required) — Date and time when the entity was created.
- `member` (MemberEntityResponse, required) — The MemberEntityResponse extends the MemberEntityRequest and includes additional properties such as the member's ID, membership number, and blocked status. This DTO is used when returning a member's details.
- `membership` (CardMembershipEntity, required) — The membership the card is tied to, as returned together with a card.
- `modifiedAt` (datetime, required) — Date and time when the entity was updated.
- `temporary` (boolean, required) — Indicates whether the card is temporary.
- `blocked` (boolean, optional) — Indicates whether the entity is blocked.
- `blockedAt` (datetime, optional) — Date and time when the entity was blocked.
- `cardId` (UUID, optional) — Unique identifier for a card.
- `expiryDate` (date, optional) — The expiry date of the card.
- `pinCode` (string, optional) — The PIN code associated with the card.

### MemberEntityResponse

The MemberEntityResponse extends the MemberEntityRequest and includes additional properties such as the member's ID, membership number, and blocked status. This DTO is used when returning a member's details.

- `blocked` (boolean, required) — Indicates whether the entity is blocked.
- `memberId` (UUID, required) — Unique identifier for a member.
- `memberNumber` (string, required) — Unique number identifying the member.
- `address` (string, optional) — The address of the member.
- `attributes` (list of AttributeValueListResponse, optional)
- `birthday` (date, optional) — The birth date of the member.
- `blockedAt` (datetime, optional) — Date and time when the entity was blocked.
- `city` (string, optional) — The city where the member resides.
- `country` (string, optional) — The country where the member resides.
- `email` (string, optional) — The email address of the member.
- `firstName` (string, optional) — The first name of the member.
- `gender` (enum, optional) — The gender of the member.
  - Allowed values: `notSpecified`, `female`, `male`, `other`
- `hasNotes` (boolean, optional) — Indicates if the member has extra information such as notes attached.
- `hasPicture` (boolean, optional) — Indicates if the member has a picture.
- `lastName` (string, optional) — The last name of the member.
- `middleName` (string, optional) — The middle name of the member.
- `nationalIdentifier` (NationalIdentifierResponse, optional) — A NationalIdentifier is used to represent a person's national identification number in a structured way. It includes the type of identifier and its value.
- `newsletter` (enum, optional) — Indicates whether the member is subscribed to the newsletter.
  - Allowed values: `unknown`, `yes`, `no`
- `phoneNo` (string, optional) — The phone number of the member.
- `postCode` (string, optional) — The postal code of the member's address.
- `preferredLanguage` (string, optional) — The preferred language of the member.
- `storeCode` (string, optional) — A unique identifier for a store - a logical grouping defining a subset of membership items. This is used to filter the list of membership related items returned by the API.

### CardMembershipEntity

The membership the card is tied to, as returned together with a card.

- `autoRenewalActivated` (boolean, required) — Indicates if the membership is set to auto-renew.
- `blocked` (boolean, required) — Indicates whether the entity is blocked.
- `communityCode` (string, required) — Code representing the community associated with the membership.
- `issueDate` (date, required) — The date the membership was issued.
- `membershipCode` (string, required) — Code representing the type of membership.
- `membershipDescription` (string, required) — Description of the membership type.
- `membershipId` (UUID, required) — Unique identifier for a membership.
- `membershipNumber` (string, required) — Unique membership number.
- `passDesignHandle` (string, required) — The NP Passes wallet pass design selected on the membership type (Membership Setup). NP Passes renders the card's wallet pass with this design. Empty when the membership type has no NP Passes design.
- `attributes` (list of AttributeValueListResponse, optional)
- `blockedAt` (datetime, optional) — Date and time when the entity was blocked.
- `customerNumber` (string, optional) — Customer number associated with the membership.
- `documentId` (string, optional) — Unique identifier for the membership document.
- `validFromDate` (date, optional) — Start of the consecutive frame of the membership that is currently valid. `null` when the frame has no defined start — perpetual memberships, activate-on-first-use memberships that haven't been used yet, or memberships that aren't currently valid.
- `validUntilDate` (date, optional) — End of the consecutive frame of the membership that is currently valid. `9999-12-31` for perpetual memberships. `null` when the frame has no defined end — activate-on-first-use memberships that haven't been used yet, or memberships that aren't currently valid.

### AttributeValueListResponse

This response contains a list of attribute values associated with a specific membership entity.

- `id` (UUID, required)
- `code` (string, required) — The key code for the attribute. This is a unique identifier for the attribute.
- `type` (enum, required) — The datatype of the attribute.
  - Allowed values: `text`, `code`, `date`, `datetime`, `decimal`, `integer`, `boolean`, `unknown`
- `caption` (string, required) — The caption of the attribute.
- `value` (string, required) — The value of the attribute. This is the actual data associated with the attribute.

### NationalIdentifierResponse

A NationalIdentifier is used to represent a person's national identification number in a structured way. It includes the type of identifier and its value.

- `type` (string, required) — Type of national ID. Available values are implementation dependent. Common values are - *none* : No national ID provided / free text, without validation is always allowed - *dk_cpr* : (example) Danish CPR number [dk_cpr, dk_cvr, dk_vat] requires customization. - *se_pnr* : (example) Swedish PNR number [se_pnr, se_cnr, se_onr, se_vat] requires customization.
- `description` (string, required) — Description of the national ID
- `canonical` (string, required) — Canonical form of the national ID
- `unmasked` (string, required) — Unmasked form of the national ID
- `masked` (string, required) — Masked form of the national ID

## Examples

**Response**

```json
{
  "card": {
    "cardNumber": "MC1234567890",
    "createdAt": "2024-09-17T00:00:00",
    "member": {
      "blocked": false,
      "memberId": "12345678-abcd-1234-5678-1234567890ab",
      "memberNumber": "M123456789",
      "address": "123 Main Street",
      "birthday": "1980-01-01",
      "city": "New York",
      "country": "USA",
      "email": "john.doe@acme.com",
      "firstName": "John",
      "gender": "male",
      "hasNotes": true,
      "hasPicture": true,
      "lastName": "Doe",
      "middleName": "A.",
      "nationalIdentifier": {
        "type": "dk_cpr",
        "description": "DK CPR number",
        "canonical": "1111111118",
        "unmasked": "111111-1118",
        "masked": "111111-****"
      },
      "newsletter": "yes",
      "phoneNo": "+1234567890",
      "postCode": "12345",
      "preferredLanguage": "EN",
      "storeCode": "EN"
    },
    "membership": {
      "autoRenewalActivated": true,
      "blocked": false,
      "communityCode": "RIVERLAND",
      "issueDate": "2024-09-17",
      "membershipCode": "GOLD",
      "membershipDescription": "Gold Membership with premium benefits",
      "membershipId": "cdef7890-abcd-0123-1234-567890abcdef",
      "membershipNumber": "MS-DEMO-00152",
      "passDesignHandle": "9e99360037c446e6836a3c933c721e56",
      "attributes": [],
      "customerNumber": "D000188",
      "validFromDate": "2024-09-17",
      "validUntilDate": "2025-09-16"
    },
    "modifiedAt": "2024-09-18T00:00:00",
    "temporary": false,
    "blocked": false,
    "cardId": "12345678-abcd-1234-5678-1234567890ab",
    "expiryDate": "2029-09-17",
    "pinCode": "1234"
  }
}
```

**SDK Code**

```python Get Card using Id
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab"

headers = {"x-np-api-key": "<NaviPartner API Key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Get Card using Id
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab';
const options = {method: 'GET', headers: {'x-np-api-key': '<NaviPartner API Key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Card using Id
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Card using Id
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'

response = http.request(request)
puts response.read_body
```

```java Get Card using Id
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Get Card using Id
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

echo $response->getBody();
```

```csharp Get Card using Id
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Get Card using Id
import Foundation

let headers = ["x-np-api-key": "<NaviPartner API Key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/card/12345678-abcd-1234-5678-1234567890ab")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```