Ordering profile example

The following is an example of an ordering profile:

RequestResponseshell
{
  "supportedConversionTypes": ["Png", "Jpg", "Jpeg", "Gif", "Tif", "Tiff"],
  "presets": [
    {
      "name": "Web",
      "conversion": [
        {
          "type": "colorProfile",
          "value": "sRGB"
        },
        {
          "type": "fileExtension",
          "value": "Png"
        }
      ],
      "isReadOnly": "true"
    }
  ],
  "processingOptions": [
    {
      "type": "colorProfile",
      "values": ["sRGB", "CMYK"]
    },
    {
      "type": "resolution",
      "values": [
        {
          "Unit": "DPI",
          "Value": 72
        },
        {
          "Unit": "DPI",
          "Value": 150
        },
        {
          "Unit": "DPI",
          "Value": 300
        }
      ]
    },
    {
      "type": "fileExtension",
      "values": ["Jpg", "Png", "Tif"]
    }
  ]
}

Profiles such as this contain the following properties:

  • supportedConversionTypes is an array of the file extensions supported by the media engine for conversions.

  • presets is an array of predefined media conversions that are available in the renditions list on the Download options page.

  • processingOptions is an array of the processing options available for custom downloads on the Download options page.

Supported conversion types

The supportedConversionTypes property is an array containing file types supported for conversion, including the following:

Media typeExtensions
ImagesRaw, Jpg, Jpeg, Gif, Tga, Bmp, Cr2, Srw, Raf, Orf, Nef, Erf, Dng.
VectorsPng, Ai, Eps, Svg, Psd, Tiff, Tif, Psb.
DocumentsPdf, Pptx, Ppt, Docx, Doc, Xlsx, Xls, Rtf, Txt, Indd, Idml, Key, Csv.
AudioWav, Aif, Aiff, Mp3.
VideosMpeg, Mpg, Flv, Mp4, Mov, Wmv, Avi, WebM, M4v.

Presets

The presets property is an array of preset objects, each containing the following properties:

PropertyDescription
nameDefines the name of the preset visible in the selection list on the Download options page.
conversionArray of conversion parameters, each consisting of a type property and a value property. The following conversion parameters table lists the possible types and values.
isReadOnlyDefines whether the preset instance is read-only. This can be set to true or false.
Conversion parameterExampleDescriptionPossible values
FileExtension
RequestResponseshell
{ "type":"fileExtension", "value":"Png"}
Defines the target file extension of the conversion (single value).
Values listed in the supported conversion types table.
Resolution
RequestResponseshell
{ "type":"resolution", "value": { "Unit": "DPI",  "Value": 150  }}
Defines the resolution of the preset.
  • Unit - Px, Dpi, Cm, Mm, Kbps, Mbps.
  • Value - Integer value.
ColorProfile
RequestResponseshell
{ "type": "colorProfile",  "value": "sRGB"}
Defines the color profile of the preset.
  • sRGB
  • CMYK
ResizeLogic
RequestResponseshell
{ "type": "resizeLogic",  "value": "DoNotResize"}
Defines the resize logic of the preset.
  • DoNotResize - Do not resize.
  • FillFramesProportionally - Fill the frame proportionally. Expands the image to fill the whole container.
  • FitImagesProportionally - Fit the frame proportionally. Resizes the image to fit within the bounds of its container with no cropping.
Width
RequestResponseshell
{ "type":"width",  "value": 595}
Property linked to the Resize logic property. It defines the width of the resize dimension (integer).
Height
RequestResponseshell
{ "type":"height",  "value": 842}
Property linked to the Resize logic property. It defines the height of the resize dimension (integer).

The current example creates a Web conversion preset that applies the sRGB color profile and the Png file extension.

Processing options

The processingOptions property is an array of processing option objects, each containing the following properties:

PropertyDescription
typeThe type of conversion parameter.
valuesLists the potential values for the conversion parameter.

The following conversion parameters table lists the possible processing option types and values:

Processing optionExampleDescriptionPossible values
FileExtension
RequestResponseshell
{ "type":"fileExtension", "values":[ "Png", "Jpg" ]}
Defines the available target file extensions for the custom download.
Values listed in the supported conversion types table.
Resolution
RequestResponseshell
{ "type":"resolution", "values": [ { "Unit": "DPI",  "Value": 72  },  { "Unit":"DPI", "Value": 150 } { "Unit":"DPI", "Value": 300 } ]}
One or more potential resolutions, each consisting of a pair of properties representing a unit of measure and a corresponding value.
  • Unit - Px, Dpi, Cm, Mm, Kbps, Mbps.
  • Value - Integer value.
ColorProfile
RequestResponseshell
{ "type": "colorProfile",  "values": [ "sRGB", "CMYK" ]}
Defines the color profile of the custom download.
  • sRGB
  • CMYK
ResizeLogic
RequestResponseshell
{ "type": "resizeLogic",  "values": [ "DoNotResize", "FillFramesProportionally", "FitImagesProportionally" ]}
Defines the resize logic options for the custom download. Choosing a value other than Do not resize adds the Width and Height fields to the selection UI.
  • DoNotResize - Do not resize.
  • FillFramesProportionally - Fill the frame proportionally. Expands the image to fill the whole container.
  • FitImagesProportionally - Fit the frame proportionally. Resizes the image to fit within the bounds of its container with no cropping.
Width
RequestResponseshell
{ "type":"width",  "values": [ 200, 300 ]}
Integer value linked to the Resize logic property. It defines the width of the converted file. If you do not provide a value here, users will be asked to provide one when they request a conversion.
Height
RequestResponseshell
{ "type":"height",  "values": [ 200, 300 ]}
Integer value linked to the Resize logic property. It defines the height of the converted file. If you do not provide a value here, users will be asked to provide one when they request a conversion.

In the current example, the available processing options are:

  • color profile with the possible options: sRGB and CMYK.
  • resolution with the possible options: 72, 150, and 300.
  • file extension with the possible values: Jpg, Png, and Tif.

Do you have some feedback for us?

If you have suggestions for improving this article,