Shopware ESD

Ever wanted to sell digital downloads with Shopware 6? With our Shopware ESD plugin it's finally possible. One of the most requested features is coming to Shopware 6 🤟

Enable sending of Emails

In order to send confirmations Emails of downloads or serial numbers, you first have to enable sending of the Email templates within the plugin configuration.

Assign a Saleschannel

Before Shopware can send the Email Template, you have to assign it to a sales channel. Go to Settings -> E-mail templates and search for ESD. You will find two Email types:

  • ESD - order download link
  • ESD - serial number

Make sure you're searching on every page or change the Items per page to 100 at the bottom of the table

Now edit the E-Mail template and assign a Saleschannel.

After saving the E-Mail Template with the assigned E-Mail template, the ESD Plugin is now sending an E-Mail with the Download link - or serial number - after a customer bought and paid an ESD product.

* Require - Shared Headers

For all API calls, the following headers are expected:

  • “Authorization: Bearer <API_TOKEN>”
  • "Content-Type: application/json"

Create an ESD within your product via API

Endpoint

The API consists of the following endpoints:

Method Route Description
POST api/v3/sas-product-esd To create a new ESD for product

Parameters

Parameter Type Value
id string A random generated UUID
productId string This is a product Id of your target product
hasSerial bool To enable and disable the serial
hasCustomDownloadLimit bool To enable/disable the custom limited
hasUnlimitedDownload bool To set unlimited download this ESD
downloadLimitNumber int The number of the limit download on each ESD order line item
esdMedia JSON You also can add the ESD here, to check the parameter please click here

Examples

To create a new ESD for your product

Sample Request

POST {your-shopware-domain}/api/v3/sas-product-esd

Json parameters

{
  "id": "552d71fd35934d9e80a09a3bc6ec0a68",
  "productId": "5b1a8675a956474aa4cf3c88200d5313",
  "hasSerial": true,
  "hasCustomDownloadLimit": true,
  "hasUnlimitedDownload": false,
  "downloadLimitNumber": 10,
  "esdMedia": [
    {
      "esdId": "a695aac053234fd3a6ab79e57a4229fb",
      "mediaId": "f1262055487649aeb0e19063a31a7d3a"
    },
    {
      "esdId": "a695aac053234fd3a6ab79e57a4229fb",
      "mediaId": "3a4a78a97d9e46f095938247f2448c07"
    }
  ]
}

Get an ESD

Endpoint

The API consists of the following endpoints:

Method Route Description
GET api/v3/sas-product-esd/{esd-id} To get the data detail of esd-id

Examples

Get an ESD by esd-id

Sample Request

GET {your-shopware-domain}/api/v3/sas-product-esd/{esd-id}

Sample Response

{
  "data": {
    "id": "a695aac053234fd3a6ab79e57a4229fb",
    "type": "sas_product_esd",
    "attributes": {
      "productId": "a7a6195afc8a4a27aa7caa650f1f76f8",
      "productVersionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
      "hasSerial": false,
      "hasCustomDownloadLimit": true,
      "hasUnlimitedDownload": false,
      "downloadLimitNumber": 3,
      "createdAt": "2020-09-05T13:15:38.845+00:00",
      "updatedAt": "2020-09-05T13:33:48.158+00:00",
      "apiAlias": null
    },
    "links": {...},
    "relationships": {...},
    "meta": null
  },
  "included": [],
  "links": {...}
  }
}

Update an ESD

Endpoint

The API consists of the following endpoints:

Method Route Description
PATCH api/v3/sas-product-esd/{esd-id} To update the data detail of esd-id

Parameters

Parameter Type Value
productId string This is a product Id of your target product
hasSerial bool To enable and disable the serial
hasCustomDownloadLimit bool To enable/disable the custom limited
hasUnlimitedDownload bool To set unlimited download this ESD
downloadLimitNumber int The number of the limit download on each ESD order line item

Examples

UPDATE an ESD by esd-id

Sample Request

PATCH {your-shopware-domain}/api/v3/sas-product-esd/{esd-id}

JSON parameters

{
  "hasSerial": false,
  "hasCustomDownloadLimit": true,
  "hasUnlimitedDownload": false,
  "downloadLimitNumber": 10
}

Delete an ESD

Endpoint

The API consists of the following endpoints:

Method Route Description
DELETE api/v3/sas-product-esd/{esd-id} To delete the data detail of esd-id

Examples

DELETE an ESD by esd-id

Sample Request

DELETE {your-shopware-domain}/api/v3/sas-product-esd/{esd-id}

Create ESD Media

Endpoint

The API consists of the following endpoints:

Method Route Description
POST api/v3/sas-product-esd-media To create a new ESD Media

Parameters

Parameter Type Value
id string A random generated UUID
esdId string This is an ESD Id of your target ESD
mediaId string This is a media-id you want to add into the ESD

Examples

To create a new ESD media for your target ESD

Sample Request

POST {your-shopware-domain}/api/v3/sas-product-esd-media

JSON parameters

{
  "id": "661013076b8a4a10a355d3fb88643d1d",
  "esdId": "4e3568ef311a453abd2bcd9e78f994af",
  "mediaId": "3a4a78a97d9e46f095938247f2448c07"
}

Get an ESD media

Endpoint

The API consists of the following endpoints:

Method Route Description
GET api/v3/sas-product-esd-media/{esd-media-id} To get the data detail of esd-media-id

Examples

Get an ESD media by esd-media-id

Sample Request

GET {your-shopware-domain}/api/v3/sas-product-esd-media/{esd-media-id}

Sample Response

{
  "data": {
    "id": "661013076b8a4a10a355d3fb88643d1d",
    "type": "sas_product_esd_media",
    "attributes": {
      "esdId": "4e3568ef311a453abd2bcd9e78f994af",
      "mediaId": "02325bcdea24482e9a4f7c0b98895d7c",
      "createdAt": "2020-09-05T14:06:32.067+00:00",
      "updatedAt": "2020-09-05T14:08:54.383+00:00",
      "apiAlias": null
    },
    "links": {...},
    "relationships": {...},
    "meta": null
  },
  "included": [...],
  "links": {...}
}

Update an ESD media

Endpoint

The API consists of the following endpoints:

Method Route Description
PATCH api/v3/sas-product-esd-media/{esd-media-id}

Examples

Update an ESD serial by esd-media-id

Sample Request

PATCH {your-shopware-domain}/api/v3/sas-product-esd-media/{esd-media-id}

Sample Response

{
  "esdId": "4e3568ef311a453abd2bcd9e78f994af",
  "mediaId": "02325bcdea24482e9a4f7c0b98895d7c"
}

Delete an ESD media

Endpoint

The API consists of the following endpoints:

Method Route Description
DELETE api/v3/sas-product-esd-media/{esd-media-id}

Examples

DELETE an ESD by esd-media-id

Sample Request

DELETE {your-shopware-domain}/api/v3/sas-product-esd-media/{esd-media-id}

Create ESD Serial

Endpoint

The API consists of the following endpoints:

Method Route Description
POST api/v3/sas-product-esd-serial To create a new ESD Serial

Parameters

Parameter Type Value
id string A random generated UUID
esdId string This is an ESD Id of your target ESD
serial string The serial

Examples

To create a new ESD serial for your target ESD

Sample Request

POST {your-shopware-domain}/api/v3/sas-product-esd-serial

JSON parameters

{
  "id": "661013076b8a4a10a355d3fb88643d1d",
  "esdId": "4e3568ef311a453abd2bcd9e78f994af",
  "serial": "ABC1234"
}

Get an ESD serial

Endpoint

The API consists of the following endpoints:

Method Route Description
GET api/v3/sas-product-esd-serial/{esd-serial-id} To get the data detail of esd-serial-id

Examples

Get an ESD serial by esd-serial-id

Sample Request

GET {your-shopware-domain}/api/v3/sas-product-esd-serial/{esd-serial-id}

Sample Response

{
  "data": {
    "id": "3a55e7f68939495a8e9e6b6f4ee693bb",
    "type": "sas_product_esd_serial",
    "attributes": {
      "esdId": "4e3568ef311a453abd2bcd9e78f994af",
      "serial": "ACXAD98",
      "createdAt": "2020-09-05T13:56:53.377+00:00",
      "updatedAt": null,
      "apiAlias": null
    },
    "links": {...},
    "relationships": {...},
    "meta": null
  },
  "included": [],
  "links": {...}
}

Update an ESD serial

Endpoint

The API consists of the following endpoints:

Method Route Description
PATCH api/v3/sas-product-esd-serial/{esd-serial-id}

Examples

Update an ESD serial by esd-serial-id

Sample Request

PATCH {your-shopware-domain}/api/v3/sas-product-esd-serial/{esd-serial-id}

Sample Response

{
  "serial": "ACXAD981"
}

Delete an ESD serial

Endpoint

The API consists of the following endpoints:

Method Route Description
DELETE api/v3/sas-product-esd-serial/{esd-serial-id}

Examples

DELETE an ESD serial by esd-serial-id

Sample Request

DELETE {your-shopware-domain}/api/v3/sas-product-esd-serial/{esd-serial-id}