Ordering profile example

The following is an example of an ordering profile, the Image ordering profile:

RequestResponse
{
  "supportedConversionTypes": [
    "Png",
    "Jpg",
    "Jpeg",
    "Gif",
    "Tif",
    "Tiff",
    "Webp",
  ],
  "exclusions": [],
  "presets": [],
  "processingOptions": [
    {
      "type": "fileExtension",
      "values": [
        "Jpg",
        "Png",
        "Tif",
        "Gif",
      ]
    },
    {
      "type": "colorProfile",
      "values": [
        "sRGB",
        "CMYK"
      ]
    },
    {
      "type": "cropAndResize",
      "values": []
    },
    {
      "type": "resolution",
      "values": [
        {
          "Unit": "DPI",
          "Value": 72
        },
        {
          "Unit": "DPI",
          "Value": 150
        },
        {
          "Unit": "DPI",
          "Value": 300
        }
      ]
    },
    {
      "type": "outputDimensions",
      "values": []
    },
    {
      "type": "filename",
      "values": ""
    }
  ]
}

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 types

Extensions

Images

Raw, Jpg, Jpeg, Gif, Tga, Bmp, Cr2, Srw, Raf, Orf, Nef, Erf, Dng, Webp.

Vectors

Png, Ai, Eps, Svg, Psd, Tiff, Tif, Psb.

Documents

Pdf, Pptx, Ppt, Docx, Doc, Xlsx, Xls, Rtf, Txt, Indd, Idml, Key, Csv.

Audio

Wav, Aif, Aiff, Mp3.

Video

Mpeg, Mpg, Flv, Mp4, Mov, Wmv, Avi, WebM, M4v.

Presets

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

Property

Description

name

Defines the name of the preset visible in the selection list on the Download options page.

conversion

Array of conversion parameters, each consisting of a type property and a value property. The following conversion parameters table lists the possible types and values.

isReadOnly

Defines whether the preset instance is read-only. This can be set to true or false.

The following table lists the possible conversion parameters and values:

Conversion parameter

Description

Possible values

FileExtension

Defines the target file extension of the conversion (single value).

Values listed in the supported conversion types table.

Resolution

Defines the resolution of the preset.

  • Unit - Px, Dpi, Cm, Mm, Kbps, Mbps.

  • Value - Integer value.

ColorProfile

Defines the color profile of the preset.

  • sRGB

  • CMYK

ResizeLogic

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

Property linked to the Resize logic property. It defines the width of the resize dimension (integer).

Height

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:

Property

Description

type

The type of conversion parameter.

values

Lists the potential values for the conversion parameter.

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

Processing option

Description

Possible values

FileExtension

Defines the available target file extensions for the custom download.

Values listed in the supported conversion types table.

Resolution

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

Defines the color profile of the custom download.

  • sRGB

  • CMYK

ResizeLogic

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

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

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,