Studio

Consume a Studio action

Server-only exactly-once confirmation of a Studio action against its bound successful render.

post/api/v1/studio/actions/consume

Request

  • Base URL: https://api.sudomock.com
  • URL: https://api.sudomock.com/api/v1/studio/actions/consume
  • Auth: API key in header x-api-key

Request body

version1 required

Version of the Studio action message format.

request_idstring uuid required

Identifier of the action message, so a repeated call returns the same receipt.

message_session_idstring uuid required

Identifier of the Studio session that emitted the action.

type'studio.mockup-saved' | 'studio.design-submitted' required

Studio result this request confirms.

Example request

{
  "message_session_id": "7d1b4a90-2e63-4f18-bb27-1c9a0e4d7f52",
  "payload": {
    "mockup_uuid": "c315f78f-d2c7-4541-b240-a9372842de94",
    "render_uuid": "9b2e5f31-4c8d-4a76-8f0b-2d7e6c1a9354"
  },
  "request_id": "0f9c2d1e-7b44-4a2f-9a0d-6c1f2b8e5d33",
  "type": "studio.mockup-saved",
  "version": 1
}

Response

Successful Response

successtrue

Always true when the action was confirmed.

replayedboolean required

True when this action was already confirmed and its receipt is returned again.

Example response

{
  "receipt": {
    "request_id": "0f9c2d1e-7b44-4a2f-9a0d-6c1f2b8e5d33",
    "message_session_id": "7d1b4a90-2e63-4f18-bb27-1c9a0e4d7f52",
    "action_id": "add-to-cart",
    "action_context": {
      "shop": "your-store.myshopify.com",
      "product_id": "8342019283",
      "variant_id": "44912837465"
    },
    "mockup_uuid": "c315f78f-d2c7-4541-b240-a9372842de94",
    "render_uuid": "9b2e5f31-4c8d-4a76-8f0b-2d7e6c1a9354",
    "render_parameters": {
      "export_options": {
        "image_format": "webp",
        "image_size": 1920,
        "quality": 95
      },
      "print_areas": [
        {
          "adjustments": {
            "blend_mode": "multiply",
            "opacity": 90
          },
          "artwork_url": "https://example.com/design.png",
          "placement": {
            "fit": "fit",
            "position": "center"
          },
          "uuid": "223e4567-e89b-12d3-a456-426614174001"
        }
      ]
    },
    "artwork_sources": [
      {
        "uuid": "6f1c8d42-0b57-4e39-a6d8-3c95b1e740af",
        "surface_uuid": "2b7e4f19-8c3d-4a60-9e15-7d0c6b3a58e2",
        "smart_object_uuid": "a3d95c07-61e2-4f8b-b204-5e9c1f7d3a86",
        "url": "https://cdn.example.com/design-cutout.png"
      }
    ]
  },
  "order_assets": {
    "preview_url": "https://cdn.sudomock.com/mockup-assets/order-assets/c315f78f-d2c7-4541-b240-a9372842de94/9b2e5f31-4c8d-4a76-8f0b-2d7e6c1a9354/preview/render_9b2e5f31-4c8d-4a76-8f0b-2d7e6c1a9354.webp",
    "artwork_urls": [
      "https://cdn.sudomock.com/mockup-assets/order-assets/c315f78f-d2c7-4541-b240-a9372842de94/9b2e5f31-4c8d-4a76-8f0b-2d7e6c1a9354/a3d95c07-61e2-4f8b-b204-5e9c1f7d3a86/5f1c0b2a7d434e9a.png"
    ],
    "print_file_urls": [
      "https://cdn.sudomock.com/mockup-assets/order-assets/c315f78f-d2c7-4541-b240-a9372842de94/9b2e5f31-4c8d-4a76-8f0b-2d7e6c1a9354/print/3f9c2a7e5b1d4c8a9e6f0b2d7a4c1e8f5b3d9a6c2e7f1b4d8a0c5e9f3b7d2a6c.png"
    ]
  }
}

Changes

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