> 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.

# Purchase a JM Care Plan

POST //jmcareplanapi.jewelersmutual.com/warranty/sales
Content-Type: application/json

Initiates a JM® Care Plan purchase by submitting customer and transaction details. Returns the resulting sale record upon success.

Reference: https://docs.jewelersmutual.com/jm-care-plan/api-reference/jm-care-plan-sales/sales/purchase-warranty

## Request

### Body (application/json)

This endpoint expects an InitialTransactionRequestDTO.

- `customer` (CustomerDetailsDTO, optional)
- `saleTransactionDate` (datetime, optional)
- `transactionDetails` (TransactionDetailsDTO, optional)

## Response

### 200

OK

- `_links` (Links, optional)

### 201

Created

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

### 403 Forbidden Error

Forbidden

- `any`

### 404 Not Found Error

Not Found

- `any`

## Types

### CustomerDetailsDTO

- `address` (AddressDTO, optional)
- `email` (string, optional)
- `firstName` (string, optional)
- `lastName` (string, optional)
- `phoneNumber` (string, optional)

### TransactionDetailsDTO

- `brand` (string, optional)
- `indicator` (string, optional)
- `itemDescription` (string, optional)
- `itemSku` (string, optional)
- `planRetailPrice` (double, optional)
- `planSalesTax` (double, optional)
- `planSku` (string, optional)
- `productCode` (string, optional)
- `productPrice` (double, optional)
- `referrerCode` (string, optional)
- `salesTax` (double, optional)
- `storeId` (string, optional)
- `transactionId` (string, optional)

### Links

- `empty` (boolean, optional)

### AddressDTO

- `city` (string, optional)
- `state` (string, optional)
- `street` (string, optional)
- `zip` (string, optional)

## Examples

**Response**

```json
{
  "_links": {
    "empty": false
  }
}
```

**SDK Code**

```python
import requests

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

response = requests.post(url)

print(response.json())
```

```javascript
const url = 'https://jmcareplanapi.jewelersmutual.com/warranty/sales';
const options = {method: 'POST'};

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"

	req, _ := http.NewRequest("POST", 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")

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

request = Net::HTTP::Post.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.post("https://jmcareplanapi.jewelersmutual.com/warranty/sales")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://jmcareplanapi.jewelersmutual.com/warranty/sales');

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

```csharp
using RestSharp;

var client = new RestClient("https://jmcareplanapi.jewelersmutual.com/warranty/sales");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://jmcareplanapi.jewelersmutual.com/warranty/sales")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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