Create a specification
Arguments
inputSpecificationInput!
nameString!
optionsSpecificationOptions!
fileFormats[String!]!
A list of file formats. Can be any of:JPEG
,TIFF
,PNG
orPSD
. The amount of file formats chosen has an impact on the price.backgroundString!
The background, possible values:original
: the original background will be kept.transparent
: transparent background can not be used if JPEG is the only file format.- a hexadecimal color code (e.g.,
#FFFFFF
).
maxDimensionsString
The maximum width and height (e.g.,1000px × 1000px
).maxFileSizeString
The maximum file size (e.g.,16 MB
).cropString
The way the image will be cropped, possible values:original
: no additional cropping.trim
: cropped tightly.- An aspect ratio: 2 digits connected with a dash (e.g.,
3-2
). - An exact width and height (e.g.,
1000px × 1000px
).
rotateUprightBoolean!
Iftrue
the images will be rotated upright when needed.verticalAlignmentString
The vertical alignment is eithertop
,center
orbottom
. Should be present in case crop is trim or an aspect ratio.marginMargin
The margin, each margin field must end with eitherpx
or%
(e.g.,5%
).topString!
rightString!
bottomString!
leftString!
dpiInt
Dots per inch.colorProfileString
EithersRGB
,Adobe RGB
orCMYK
.extraSpecificationExtraOptions!
Extra options: these have an impact on the price.newShadowBoolean!
A cast shadow is added: gives an artificial effect which creates the impression that your product is floating in front of a flat surface. Incompatible withoriginalShadow
.originalShadowBoolean!
The original shadow is kept when removing the background. Incompatible withnewShadow
.removeDustAndScratchesBoolean!
Dust and scratches are removed, giving the product a nice, clean look.reflectionBoolean!
A reflection shadow creates the impression that your product is placed on a reflective surface like a mirror.clippingPathBoolean!
A precise hand drawn clipping path is created around the object, positioned 1px on top of the object to ensure complete background cut away.maskBoolean!
A mask is supplied for transparency.
Result
The result is a Specification object.
type Mutation {
createSpecification(
input: SpecificationInput!
): Specification!
}
input SpecificationInput {
name: String!
options:SpecificationOptionsInput!
}
input SpecificationOptionsInput {
fileFormats: [String!]!
background: String!
maxDimensions: String
maxFileSize:String
crop: String!
verticalAlignment: String
margin: MarginInput
dpi: Int
colorProfile: String
extra: SpecificationExtraOptionsInput!
}
input SpecificationExtraOptionsInput {
shadow: Boolean!
reflection: Boolean!
clippingPath: Boolean!
mask: Boolean!
}
input MarginInput {
top: String!
right: String!
bottom: String!
left: String!
}
EXAMPLE
mutation ($input: SpecificationInput!) {
createSpecification(input: $input) {
id
name
isCustom
}
}
VARIABLES
{
"input": {
"name": "Test",
"options": {
"fileFormats": ["JPEG"],
"background": "#FFFFFF",
"crop": "tim",
"margin": {"top": "5%", "right": "5%", "bottom": "5%", "left": "5%"},
"extra": {"mask": false, "clippingPath": false, "reflection": false, "shadow": false}
}
}
}
RESULT
{
"data": {
"createSpecification": {
"id": "S16573",
"name": "Test",
"isCustom": true
}
}
}