> This page is for JM Care Plan.

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

# Look up a sale by transaction ID

GET //jmcareplanapi.jewelersmutual.com/warranty/sales

Retrieves the internal sale link identity associated with a given external transaction ID. Useful for correlating third-party or upstream transactions with JM® Care Plan sales records.

Reference: https://docs.jewelersmutual.com/jm-care-plan/api-reference/jm-care-plan-sales/sales/find-sale-by-external-transaction-id

## Request

### Query parameters

- `externalTransactionId` (string, required) — externalTransactionId

## Response

### 200

OK

- `_links` (Links, optional)
- `id` (string, optional)

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

### 403 Forbidden Error

Forbidden

- `any`

### 404 Not Found Error

Not Found

- `any`

## Types

### Links

- `empty` (boolean, optional)

## Examples

**Response**

```json
{
  "_links": {
    "empty": false
  },
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

**SDK Code**

```python
import requests

url = "https://jmcareplanapi.jewelersmutual.com/warranty/sales"

querystring = {"externalTransactionId":"TXN-20240615-987654"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript
const url = 'https://jmcareplanapi.jewelersmutual.com/warranty/sales?externalTransactionId=TXN-20240615-987654';
const options = {method: 'GET'};

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://jmcareplanapi.jewelersmutual.com/warranty/sales?externalTransactionId=TXN-20240615-987654"

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

	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://jmcareplanapi.jewelersmutual.com/warranty/sales?externalTransactionId=TXN-20240615-987654")

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

request = Net::HTTP::Get.new(url)

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://jmcareplanapi.jewelersmutual.com/warranty/sales?externalTransactionId=TXN-20240615-987654")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://jmcareplanapi.jewelersmutual.com/warranty/sales?externalTransactionId=TXN-20240615-987654');

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

```csharp
using RestSharp;

var client = new RestClient("https://jmcareplanapi.jewelersmutual.com/warranty/sales?externalTransactionId=TXN-20240615-987654");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://jmcareplanapi.jewelersmutual.com/warranty/sales?externalTransactionId=TXN-20240615-987654")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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()
```