Supported Formats

json

GET /api/project_templates

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden

Examples

GET /api/project_templates
401

Params

Param name Description
offset
optional

items start position

Validations:

  • Must be a Integer

count
optional

items count in payload

Validations:

  • Must be a Integer

order_by
optional

items sort field

Validations:

  • Must be a String

order_asc
optional

items sort order

Validations:

  • Must be a String

mode
optional

retrieve templates from: account or library

Validations:

  • Must be a String

search
optional

Validations:

  • Must be a Hash

q
optional

Validations:

  • Must be a String

assumption
optional

Find the exact match(s) for the assumption

Validations:

  • Must be a Hash


GET /api/project_templates/:id

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
404 Template Not Found.

Params

Param name Description
id
required

Template Id.

Validations:

  • Must be a String


POST /api/project_templates

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
422 Unprocessable Project Template

Examples

POST /api/project_templates
{
  "template": {
    "name": "Madiga"
  }
}
201

Params

Param name Description
template
optional

Template attributes container

Validations:

  • Must be a Hash

template[name]
optional

The name of template

Validations:

  • Must be a String

template[description]
optional

The description of template

Validations:

  • Must be a String

template[instructions]
optional

The instructions of template

Validations:

  • Must be a String

template[language]
optional

The language of template

Validations:

  • Must be a String

template[professions]
optional

The professions(topics) of template

Validations:

  • Must be an array of any type

template[difficulty_level]
optional

Difficult level of template.

Validations:

  • Must be a Integer

template[price_amount]
optional

Price in Cent

Validations:

  • Must be a Integer

template[price_currency]
optional

Price currency code

Validations:

  • Must be a String

template[ready_to_use]
optional

Ready to use

Validations:

  • Must be a Boolean

template[details]
required

Template details attributes container

Validations:

  • Must be an Array of nested elements

template[details][html_type]
optional

Validations:

  • Must be a String

template[details][instruction]
optional

Validations:

  • Must be a String

template[details][read_only]
optional

Validations:

  • Must be a Boolean

template[details][locked]
optional

Validations:

  • Must be a Boolean

template[details][rules]
required

Detail rules attributes container

Validations:

  • Must be an Array of nested elements

template[details][rules][type]
required

The type of rule. Available types are: word_count,character_count,main_keyword,sub_keyword,alternative_keywords,pixel_size,list_item,negative_keywords

Validations:

  • Must be a String

template[details][rules][parameters]
required

Rule parameters attributes container

Validations:

  • Must be an Array of nested elements

template[details][rules][parameters][name]
required

The name of parameter. Available parameters are: minimum,maximum,repetition,location,match,index,indexes,current,keyword,keywords,height,width,list_type,current_width,min_width,max_width,current_height,min_height,max_height

Validations:

  • Must be a String

template[details][rules][parameters][value]
required

Parameter value

Validations:

  • Must be a String

template[details][custom_attributes]
optional

custom attributes of item

Validations:

  • Must be an array of any type


PUT /api/project_templates/:id

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
422 Unprocessable Project Template
404 Template Not Found.

Examples

PUT /api/project_templates/59c241f9a83dc1219d4f4e70
{
  "template": {
    "name": "agidaM"
  }
}
204

Params

Param name Description
id
required

Template ID.

Validations:

  • Must be a String

template
optional

Project template parameter container

Validations:

  • Must be an Array of nested elements

template[name]
optional

Template name

Validations:

  • Must be a String


GET /api/project_templates/:id/export

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
422 Unprocessable Project Template
404 Template Not Found.

Params

Param name Description
id
required

Template ID.

Validations:

  • Must be a String


GET /api/project_templates/:id/empty_sheet

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
422 Unprocessable Project Template
404 Template Not Found.

Params

Param name Description
id
required

Template Id

Validations:

  • Must be a String

project_id
optional

Project Id

Validations:

  • Must be a String

domain_id
optional

Domain Id

Validations:

  • Must be a String


DELETE /api/project_templates/:id

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
422 Unprocessable Project Template
404 Template Not Found.
422 Unprocessable Project Template

Examples

DELETE /api/project_templates/59c241f9a83dc1219d4f4e7b
204

Params

Param name Description
id
required

Template ID.

Validations:

  • Must be a String


GET /api/project_templates/assumptions

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden

Params

Param name Description
term
required

keyword to be searched

Validations:

  • Must be a String

mode
optional

mode to retrieve templates from: account or library

Validations:

  • Must be a String


POST /api/project_templates/:id/my_templates

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
404 Template Not Found.
422 Unprocessable Account
422 Unprocessable Project Template

Params

Param name Description
id
required

Template ID.

Validations:

  • Must be a String


DELETE /api/project_templates/:id/my_templates

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
404 Template Not Found.
422 Unprocessable Account
422 Unprocessable Project Template

Params

Param name Description
id
required

Template ID.

Validations:

  • Must be a String


GET /api/project_templates/content_cache

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
404 Template Not Found.

Params

Param name Description
content_order_id
required

Content Order Id

Validations:

  • Must be a String


POST /api/project_templates/upload_prices
Upload Prices

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
422 Unprocessable entry

Params

Param name Description
file
optional

File that contains prices

Validations:

  • Must be a File


GET /api/project_templates/prices
Shows templates prices

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden

POST /api/project_templates/upload
Upload and create template.

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
422 Unprocessable entry

Params

Param name Description
file
optional

File that contains json data

Validations:

  • Must be a File


GET /api/project_templates/instructions

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden

POST /api/project_templates/save_instructions

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden

Params

Param name Description
html_type
required

html type of the instruction

Validations:

  • Must be a String

language
required

language of the instruction

Validations:

  • Must be a String

instructions
required

Instructions array of text

Validations:

  • Must be an array of any type


POST /api/project_templates/validate_template

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden

Params

Param name Description
details
required

details of the template

Validations:

  • Must be a String

template
required

template to be validate

Validations:

  • Must be a Hash


POST /api/project_templates/build_from_html

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden

Params

Param name Description
name
required

Template name

Validations:

  • Must be a String

order_type
required

Template order type

Validations:

  • Must be a String

language
required

Template language

Validations:

  • Must be a String

genre
required

Template genre

Validations:

  • Must be a String

html_text
required

html text to parse into template

Validations:

  • Must be a String


GET /api/project_templates/by_domain

Supported Formats

json

Errors

Code Description
401 Unauthorized
403 Forbidden
404 Template Not Found.

Params

Param name Description
domain_id
required

Domain Id

Validations:

  • Must be a String