Dart InnovationsDocs
Product Keys Delivery
dartinnovations.com

Post keys to an API

Send each delivered product key, with order details, to an external system through a REST API call.

Post to an API sends a delivered key, with details from the order, to any external system that has a REST API. It is available from version 2.0.

You need to know what the target API expects: its endpoint, authentication and request body.

Turn on Post to an API#

  1. Go to DART > Product Keys > Configuration.
  2. Scroll down to Post to an API and set it to Yes.
  3. Fill in the fields described below.
  4. Select Save Config.

The Post to an API settings with endpoint, method, authentication, request body and content type fields

From version 2.1.0, you can override these settings for an individual product.

Settings#

Field Description
API Endpoint The full URL of the endpoint to call.
API Method POST, PUT or GET.
API Authentication Type Basic Authentication, Bearer Token or API Key.
API Authentication Header The raw headers to send, as a JSON array of name/value objects. You can include extra headers, as long as they are correctly formatted. For Basic Authentication, use {"username": "password"}.
API Request Body The body your endpoint expects. Use the short codes below to insert order values.
API Content Type The content type of the request, for example JSON.

Short codes#

Use these short codes in API Request Body. They are replaced with values from the order when the request is sent.

Short code Value
{{product_name}} The full product name.
{{sku}} The product SKU.
{{user_name}} The customer's full name from the order.
{{user_email}} The customer's email address.
{{product_key}} The product key delivered in this order.

Example: send keys to License Web#

Dart Innovations uses this feature to send product keys to its activation portal, License Web. The License Web API authenticates with an API key pair, and it uses the SKU as the unique product code.

Set API Authentication Type to API Key and API Authentication Header to:

[
  { "name": "ApiKey", "value": "<your-api-key>" },
  { "name": "ApiSecret", "value": "<your-api-secret>" }
]

Set API Request Body to:

{
  "productName": "{{product_name}}",
  "productCode": "{{sku}}",
  "userName": "{{user_name}}",
  "email": "{{user_email}}",
  "licenseKey": "{{product_key}}",
  "sendEmail": false
}

Type at least two letters. Use ↑ ↓ and Enter to open a result.