Photo mockups

Replace the print areas of a photo mockup

Replaces a ready photo mockup's printable areas. Each area must be a convex four-point shape within the source image.

put/api/v1/sudoai/2d-mockups/{mockup_id}/print-areas

Request

  • Base URL: https://api.sudomock.com
  • URL: https://api.sudomock.com/api/v1/sudoai/2d-mockups/{mockup_id}/print-areas
  • Auth: API key in header x-api-key

Path parameters

mockup_idstring required

Id of the photo mockup whose print areas are replaced.

Request body

Example request

{
  "print_areas": [
    {
      "points": [
        [
          200,
          150
        ],
        [
          600,
          150
        ],
        [
          620,
          550
        ],
        [
          180,
          550
        ]
      ]
    }
  ]
}

Response

Successful Response

successtrue

Always true on a successful response.

Example response

{
  "data": {
    "mockup_id": "893ea326-278b-480b-b130-87dd6aee06dc",
    "print_areas": [
      {
        "name": "Front",
        "points": [
          [
            518,
            646
          ],
          [
            1534,
            638
          ],
          [
            1541,
            1662
          ],
          [
            511,
            1670
          ]
        ],
        "print_area_id": "19be48d4-c810-4420-86e3-7ec2a4d85571",
        "sort_order": 0
      },
      {
        "points": [
          [
            742,
            1742
          ],
          [
            1312,
            1735
          ],
          [
            1318,
            2010
          ],
          [
            736,
            2017
          ]
        ],
        "print_area_id": "a0c7d215-93f8-4f0b-9a64-58b1e2c7d430",
        "sort_order": 1,
        "name": null
      }
    ]
  },
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.