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

# products/{productId}/licenses

PATCH https://ecosystemapi.ninjatrader.com/v1/products/{productId}/licenses/{licenseId}
Content-Type: application/json

Update a license for a product. [Vendor Only]

Reference: https://docs.ninjatrader.com/marketplace/rest-api-endpoints/products/product-id-licenses

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: ecosystem
  version: 1.0.0
paths:
  /products/{productId}/licenses/{licenseId}:
    patch:
      operationId: productIdLicenses
      summary: products/{productId}/licenses
      description: Update a license for a product. [Vendor Only]
      tags:
        - products
      parameters:
        - name: productId
          in: path
          required: true
          schema:
            type: string
        - name: licenseId
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdResponse'
        '400':
          description: Bad Request - The request was invalid or cannot be served
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Authentication is required or failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - The request was understood but refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found - The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error - An unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateLicenseForProductsByProductIdAndLicenseIdRequest
servers:
  - url: https://ecosystemapi.ninjatrader.com/v1
    description: production
  - url: https://ecosystemapi-d.ninjatrader.com/v1
    description: development
components:
  schemas:
    UpdateLicenseForProductsByProductIdAndLicenseIdRequestProduct:
      type: object
      properties:
        email:
          type: string
        expirationDateUTC:
          type:
            - string
            - 'null'
      title: UpdateLicenseForProductsByProductIdAndLicenseIdRequestProduct
    UpdateLicenseForProductsByProductIdAndLicenseIdRequest:
      type: object
      properties:
        product:
          $ref: >-
            #/components/schemas/UpdateLicenseForProductsByProductIdAndLicenseIdRequestProduct
      required:
        - product
      description: UpdateLicenseForProductsByProductIdAndLicenseIdRequest
      title: UpdateLicenseForProductsByProductIdAndLicenseIdRequest
    ErrorMessage:
      type: string
      description: ErrorMessage
      title: ErrorMessage
    IdResponse:
      type: object
      properties:
        result:
          type:
            - number
            - 'null'
          format: double
        errorText:
          $ref: '#/components/schemas/ErrorMessage'
      required:
        - result
        - errorText
      description: IdResponse
      title: IdResponse
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          format: double
        error:
          type: string
        requestId:
          type: string
      required:
        - statusCode
        - error
        - requestId
      description: ErrorResponse
      title: ErrorResponse
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{
  "product": {
    "email": "Eunice_Bauch75@example.net",
    "expirationDateUTC": "2025-09-20T09:37:17.426Z"
  }
}
```

**Response**

```json
{
  "result": 7170529050632360,
  "errorText": "ceno"
}
```

**SDK Code**

```python
import requests

url = "https://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId"

payload = { "product": {
        "email": "Eunice_Bauch75@example.net",
        "expirationDateUTC": "2025-09-20T09:37:17.426Z"
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"product":{"email":"Eunice_Bauch75@example.net","expirationDateUTC":"2025-09-20T09:37:17.426Z"}}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId"

	payload := strings.NewReader("{\n  \"product\": {\n    \"email\": \"Eunice_Bauch75@example.net\",\n    \"expirationDateUTC\": \"2025-09-20T09:37:17.426Z\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"product\": {\n    \"email\": \"Eunice_Bauch75@example.net\",\n    \"expirationDateUTC\": \"2025-09-20T09:37:17.426Z\"\n  }\n}"

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.patch("https://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"product\": {\n    \"email\": \"Eunice_Bauch75@example.net\",\n    \"expirationDateUTC\": \"2025-09-20T09:37:17.426Z\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId', [
  'body' => '{
  "product": {
    "email": "Eunice_Bauch75@example.net",
    "expirationDateUTC": "2025-09-20T09:37:17.426Z"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"product\": {\n    \"email\": \"Eunice_Bauch75@example.net\",\n    \"expirationDateUTC\": \"2025-09-20T09:37:17.426Z\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["product": [
    "email": "Eunice_Bauch75@example.net",
    "expirationDateUTC": "2025-09-20T09:37:17.426Z"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://ecosystemapi.ninjatrader.com/v1/products/productId/licenses/licenseId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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