> This page is for Entria 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.

# List the alterations available for a membership card

GET https://api.entria.app/api/membership/alterations

Given a valid membership card, lists the renewals the member may buy for it — never an upgrade, a cancel or an extend, for now; cached up to 5 minutes — as products a storefront can render and add to a cart. The response is exactly what `GET /api/member/alterations` returns to a logged-in member; only the auth and the input differ. Name the membership by its card (`cardNumber` + `membershipCode`), or — for a member looked up with `GET /api/members` — by `email` + `membershipNumber`, resolved server-side the same way the member route resolves its own. Business Central decides which options apply and what each costs; each option is returned as the Medusa MEMBERSHIP_RENEW product that sells it, priced at the amount BC quoted rather than at the catalog price. Add one with a MEMBERSHIP_RENEW cart line, passing the same card number, or the same `email` + `membershipNumber` with this token. Because the response describes a named person’s membership and prices an offer against it, this endpoint requires a bearer access token in the `Authorization` header, in addition to the `x-entria` store header used by every endpoint. Obtain a token from `POST /oauth/token`; it must have been issued for the same store as this request.

Reference: https://docs.navipartner.com/entria-api/entria-api-reference/membership/get-get-membership-alterations

## Authentication

- `Authorization` header (bearer token, required) — OAuth client token, for a partner backend only. A short-lived access token for endpoints that return personal data about any member. Obtain one from POST /oauth/token (RFC 7523 JWT-bearer), signing the assertion with the private key of the key pair registered for your store. Sent as `Authorization: Bearer <token>`. This is separate from the `x-entria` store header, which is still required.

## Request

### Query parameters

- `cardNumber` (string, optional) — The membership card number printed on or encoded on the card. With `membershipCode`; or send `email` + `membershipNumber` instead.
- `membershipCode` (string, optional) — The membership type code the card is expected to belong to.
- `email` (string, optional) — The member’s email, as passed to `GET /api/members`. With `membershipNumber`.
- `membershipNumber` (string, optional) — One of that member’s memberships, from `GET /api/members`. With `email`.
- `locale` (string, optional) — BCP 47 locale code (e.g. da-DK, en-US). Defaults to DEFAULT_LOCALE env binding.

### Headers

- `x-entria` (string, required) — Identifies which store this request is for. Required on every store-scoped route. It is not authentication and not a secret — it grants no privileges and is safe to send from a browser. You receive the value once your Entria backend has been created and configured. Missing header returns 400; an unknown store returns 404.

## Response

### 200

The alteration options BC offers for this card, as MEMBERSHIP_RENEW products. An empty array means the membership currently has none.

- `list of MembershipAlterationProduct`

## Errors

### 400 Bad Request Error

Invalid request, or Business Central rejected the lookup.

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

### 401 Unauthorized Error

Missing, malformed or invalid access token.

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

### 403 Forbidden Error

Access token not valid for this store, API auth not enabled for it, or the card or membership is not valid for the given membership code.

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

### 404 Not Found Error

The `membershipNumber` is not one of the member’s unblocked memberships (`code: MEMBERSHIP_NOT_FOUND`), whatever the reason.

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

### 429 Too Many Requests Error

Too many requests — rate limit exceeded

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

### 500 Internal Server Error

The alterations could not be read — an upstream failure on our side, reported and safe to retry.

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

### 502 Bad Gateway Error

Business Central could not be asked for some of this membership's options, so the list would be incomplete. Retry; an empty 200 means the membership genuinely has none.

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

### 503 Service Unavailable Error

API authentication is not configured for this deployment.

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

## Types

### MembershipAlterationProduct

- `sku` (string, required, nullable)
- `title` (string, required)
- `description` (string, required)
- `handle` (string, required)
- `media` (list of ProductDiscriminatorMappingMembershipRenewMediaItems, required)
- `price` (double, required, nullable)
- `basePrice` (double, required, nullable)
- `subscription` (boolean, required, nullable)
- `membershipLegalText` (string, required, nullable)
- `lifecycleAction` (string, required)
- `addon` (ProductDiscriminatorMappingMembershipRenewAddon, optional, nullable)
- `validFrom` (string, optional, nullable)
- `validUntil` (string, optional, nullable)

### ErrorResponseDetailsItems

- `path` (string, required)
- `message` (string, required)

### ProductDiscriminatorMappingMembershipRenewMediaItems

- `id` (string, required)
- `url` (string, required)
- `altText` (string, required)

### ProductDiscriminatorMappingMembershipRenewAddon

- `price` (double, required)
- `title` (string, required)
- `id` (string, required)

## Examples

**Response**

```json
[
  {
    "sku": "string",
    "title": "string",
    "description": "string",
    "handle": "string",
    "media": [
      {
        "id": "string",
        "url": "string",
        "altText": "string"
      }
    ],
    "price": 1.1,
    "basePrice": 1.1,
    "subscription": true,
    "membershipLegalText": "string",
    "lifecycleAction": "string",
    "addon": {
      "price": 1.1,
      "title": "string",
      "id": "string"
    },
    "validFrom": "string",
    "validUntil": "string",
    "type": "MEMBERSHIP_RENEW"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.entria.app/api/membership/alterations"

headers = {
    "x-entria": "x-entria",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript
const url = 'https://api.entria.app/api/membership/alterations';
const options = {
  method: 'GET',
  headers: {'x-entria': 'x-entria', Authorization: 'Bearer <token>'}
};

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

```go
package main

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

func main() {

	url := "https://api.entria.app/api/membership/alterations"

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

	req.Header.Add("x-entria", "x-entria")
	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.entria.app/api/membership/alterations")

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

request = Net::HTTP::Get.new(url)
request["x-entria"] = 'x-entria'
request["Authorization"] = 'Bearer <token>'

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.entria.app/api/membership/alterations")
  .header("x-entria", "x-entria")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.entria.app/api/membership/alterations', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-entria' => 'x-entria',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.entria.app/api/membership/alterations");
var request = new RestRequest(Method.GET);
request.AddHeader("x-entria", "x-entria");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-entria": "x-entria",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.entria.app/api/membership/alterations")! 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()
```