Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

The Wizart Visualizer API allows developers to programmatically access the same powerful features used in the Wizart Visualizer app. By leveraging the API, you can integrate realistic room visualizations, apply products like flooring and wall coverings, and manage interiors—all within your own applications.

This guide will walk you through the essential steps to start using the Wizart Visualizer API effectively.

1. Subscribing to the Visualizer API

The Visualizer API is available for purchase on AWS Marketplace, where you can subscribe to different pricing plans based on your usage needs. To subscribe, you'll need an AWS account. If you don’t have one, you’ll need to sign up.

How to Subscribe via AWS Marketplace

  1. Create or Sign In to Your AWS Account: If you don’t have an AWS account, sign up for an account here. If you already have one, sign in to your account.

  2. Visit the Visualizer API Product Page: Once signed in, go to the Visualizer API page on AWS Marketplace (insert the exact URL here).

  3. Choose a Plan: Review the available pricing plans:

    • Basic Plan: Pay-as-you-go, no request limit, but a higher cost per request.

    • Other Plans: Includes a fixed number of requests, with additional requests charged at a lower rate than the Basic Plan.

    The user can choose both the plan and the subscription duration. After selecting a plan, you will need to press the Pay button, which will direct you to a registration form.

  4. Fill in the Registration Form: It is important to properly fill in your personal name, email, and company name in the registration form. This data will be used to create your personal account in the Wizart Administrative Panel (WAP).

  5. Submit and Wait for Confirmation: After submitting the form and receiving a confirmation message, wait a few minutes for an email with access details and further instructions. This email will be sent to the address you provided during registration.

  6. Complete Purchase: Follow the on-screen instructions to finalize your purchase through AWS.

Pricing and Request Limits

Each tariff plan includes a fixed number of requests per contract. If your usage exceeds this quota, additional requests will incur a fee. Payable requests include:

  • Uploaded Images: Each image uploaded through the API counts as one request.

  • Renders: Each render generated via the API counts as one request.

The Basic Plan has no limits, and you pay for each request you make, but the cost per request is higher compared to subscription plans. If you anticipate higher usage, subscription plans may offer better cost-efficiency.


2. API Reference and Postman Integration

We provide an extensive API reference that outlines all available endpoints. Whether you're fetching products, managing rooms, or applying materials, this reference is your go-to guide for interacting with the API.

Postman Integration

The API reference is Postman-ready. You can import the collection into your Postman account to start making requests immediately. This is an excellent way to familiarize yourself with the API without needing to write code upfront.

Here’s how:

Now you’re ready to start experimenting with the endpoints!


3. API Authentication Setup

Every request to the Wizart Visualizer API must be authenticated using your API Token.

  • Upon subscribing to the API, you’ll receive an API token via email.

  • This token should be included in every request's headers like this:

    X-Api-Key: your-api-token

Additionally, the API uses Device-Tokens, which are generated by your application for each unique session. These tokens ensure that interactions are scoped to individual users or sessions, providing an extra layer of security.

Here’s how to include a Device-Token:

Device-Token: your-device-token


4. Accessing the Wizart Admin Panel

Once your API token is set up, you will also have access to the Wizart Admin Panel, a platform that helps you explore and manage products and interiors. The Admin Panel gives you a head start by providing an initial set of products and interiors shared with your account.

Each product, room, and collection has a unique identifier (UUID), which is essential for making requests through the Visualizer API. You can easily browse through the available products and interiors in the Admin Panel, find the necessary UUIDs, and use them when configuring your API requests.

In addition to reviewing the preloaded data, you’ll eventually be able to upload and manage your own products through the catalog management system, which is integrated into the Admin Panel. Once you’re familiar with how the system works, you can begin making API requests to visualize your own products and spaces.


5. Applying Products to a Room via API

The Wizart Visualizer API allows you to apply products such as wallpapers, floorings, and other materials to specific room surfaces. If you’re unsure which material types are applicable for different surfaces (e.g., wall, floor, or ceiling), please refer to our article on Supported Product Types for Wall, Floor, and Ceiling Applications.


Step 1: Retrieve Room Data

Start by selecting the room you want to modify. Every room in Wizart has a unique identifier (UUID), which can be obtained through either the API or the Wizart PIM interface. With the room UUID, you can request detailed data about the room.

API Endpoint:

GET /api/v1/rooms/{room_uuid}

{ 
  "uuid": "88cc386a-0897-48ea-93ed-a8aee0609253", 
  "title": "Wizart GO-1551 3", 
  "image_path": "interiors/reserved/images/4b0a7a56-2f6f-4c22-9135-8f28ea004106.jpg", 
  "room_type_title": "Bathroom", 
  "room_type_id": 9, 
  "width": 2560, 
  "height": 1706, 
  "surfaces": ["wall", "floor"], 
  "created_at": "24.01.2022", 
  "mask_name": "mask.png", 
  "ceiling": null, 
  "floor": { 
    "x": 52.25457191467285, 
    "y": 88.72437382079792 
  }, 
  "walls": [ 
    { 
      "x": 3, 
      "y": 20, 
      "wall_id": 0 
    }, { 
      "x": 35, 
      "y": 20, 
      "wall_id": 1 
    }, { 
      "x": 87, 
      "y": 20, 
      "wall_id": 2 
    } 
  ] 
}

This response provides detailed room information, including surfaces (walls, floor, etc.), dimensions, and unique wall identifiers. You’ll use this data to apply materials in the next step.


Step 2: Prepare the Request Body with Material Data

To apply materials, you need to fill in the room’s surfaces with the appropriate product information. For each surface (floor, wall, ceiling), you can specify a material to apply.

If you want to apply a material to a surface, include the material object for that surface. If no material is passed for a surface, no changes will be made to it.

Material Object Properties:

  • material_uuid: Product UUID from PIM or retrieved through the API.

  • code: Layout code. Some products may have multiple layouts, allowing you to choose which to apply.

  • custom_rotation_angle: For flooring materials and tiles on walls, you can specify a rotation angle to apply the material in different orientations.

Example Request Body:

{ 
  "room_data": { 
    "room": { 
      "id": "example-room-uuid", 
      "floor": { 
        "material": { 
          "material_uuid": "example-floor-material-uuid", 
          "custom_rotation_angle": 0, 
          "code": "no_pattern" 
        } 
      }, 
      "ceiling": { 
        "material": { 
          "material_uuid": "example-ceiling-material-uuid", 
          "code": "no_pattern" 
        } 
      }, 
      "walls": [ 
        { 
          "wall_id": 0, 
          "is_active": true, 
          "material": { 
            "material_uuid": "example-floor-material-uuid", 
            "code": "no_pattern" 
          } 
        }, { 
          "wall_id": 1, 
          "is_active": true, 
          "custom_rotation_angle": 0, 
          "material": { 
            "material_uuid": "example-wall-material-uuid", 
            "code": "no_pattern" 
          } 
        } 
      ] 
    } 
  } 
}

Step 3: Apply Materials to the Room

Once the request body is prepared with the room and material data, send the request to apply the materials to the room's surfaces.

API Endpoint:

POST /api/v1/rooms/{room_uuid}/apply-materials

Use the room_data structure as the request body, and the API will return the room with the specified materials applied to the surfaces.

6. Uploading Your Own Products to PIM

Now that you're comfortable applying textures and visualizing predefined rooms, you can upload your own products to Wizart PIM.

How PIM Integrates with the Visualizer API:

  • Product Data Management: The PIM system allows you to upload product images, organize collections, and maintain metadata.

  • Syncing with API: Once your products are in PIM, they’ll automatically be accessible through the API. This makes it seamless to visualize your products in custom rooms or applications.

Learn more in the Getting Started with Wizart PIM article.

  • No labels