How does it work?
Lorem submenu 1
Lorem submenu 2
Lorem menu 2
Lorem menu 3

Placeit API Usage

How the API works

Print-on-demand users will render the iframe with the placeit API url, users can interact with the grid stages and set different parameters for filtering the results, and will be able to enter specific stages and edit them in order to make a download.

As an alternative option the user downloads can be sent to the Print-on-demand partner, but they will need to specify 2 url parameters:

  • pod_subscription
  • pod_id

The API is a Placeit path designed to run inside an iframe; the path accepts different url parameters to build the desired results for the template grid preview.

Setting it up

The placeit API basepath is: https://placeit.net/api/v3/stages

The template grid view has a default query:

  • Stages with T-Shirt devices tags
  • Free stages and image-only image types (The same default filter we use in free mockups custom experience)

To this basepath you can specify different pod attributes according to the results to show in the template grid preview, the filter parameters are the following:

  • Pod_limit:
    • With this parameter, the user can specify the limit of stages it wants to show across all the grid pages.
  • Pod_tags:
    • With this parameter the user can specify which tags for filtering want to set in the grid results
  • Pod_types:
    • With this parameter the user can specify which types tags for filtering want to set in the grid results
  • Pod_devices:
    • With this parameter the user can specify which device tags for filtering want to set in the grid results
  • Pod_gender:
    • With this parameter the user can specify which gender tags for filtering want to set in the grid results
  • Pod_age:
    • With this parameter the user can specify which age tags for filtering want to set in the grid results
  • Pod_ethnicity:
    • With this parameter the user can specify which ethnicity tags for filtering want to set in the grid results
  • Pod_models:
    • With this parameter the user can specify which model tags for filtering want to set in the grid results
  • customG_0:
    • Url of the input image that wants to be set in the mockup results from the grid
  • Pod_subscription:
    • If the pod client wants to receive the user processed images, it should set an endpoint where Placeit is going to send the high resolution images from the user
    • Url should have SSL (https)
  • Pod_id:
    • If the pod client wants to receive the user-processed images, it should set the previous pod_subscription param and an identifier that will be attached with the images sent to the pod client url. This will let the client know which image belongs to which user

General Examples

Example of url to be used in the iframe:

This url will return all the stages with Instagram device tags, only 5 stages and will render the input image specified in the customG_0 parameter.

https://placeit.net/api/v3/stages?pod_devices=Instagram&pod_limit=5&customG_0=https://assets-1.placeit.net/image_library/57f855ee85ec5c9854a5986b6d56d9c3/images/small.jpg

Example of url to be used in the iframe for sending user downloads to pod client:

https://placeit.net/api/v3/stages?pod_devices=Instagram&pod_limit=5&pod_subscription=https://pod_url.com/user_image&pod_id=12345&customG_0=https://assets-1.placeit.net/image_library/57f855ee85ec5c9854a5986b6d56d9c3/images/small.jpg