Skip to Content
DocumentationLayer One APIGraphQL APIOverview

GraphQL API

The Layer One GraphQL API provides a powerful interface for managing orders, assets, and webhooks within the platform. With GraphQL, you can request exactly the data you need in a single request, making your applications more efficient and responsive.

Currently Supported Output

Important: The GraphQL API currently supports processing for only one output type:

  • Areaplan (also known as BIMIT Plan) - Automated 2D floor plan generation from point cloud data

When initializing orders through GraphQL mutations, specify "areaplan" as the product parameter. Additional output types will be supported in future releases.

Key Features

  • Single Endpoint - All operations through one URL
  • Order Management - Complete order workflow from initialization to completion
  • Asset Upload/Download - Secure file handling via pre-signed URLs
  • Real-time Notifications - Webhook subscriptions for order status updates
  • Type Safety - Strongly typed schema with validation

GraphQL Endpoint

https://api.integrated-projects.com/v1/graphql

Authentication

All GraphQL requests require authentication using Bearer tokens:

curl -X POST \ https://api.integrated-projects.com/v1/graphql \ -H "Authorization: Bearer your-api-token" \ -H "Content-Type: application/json" \ -d '{"query": "query { webhooks { webhook_id webhook_url } }"}'

Available Operations

Order Management

  • Initialize Order - Create draft orders for processing
  • Upload Assets - Handle file uploads via pre-signed URLs
  • Finalize Order - Submit orders for processing
  • Query Order Status - Track order progress

Asset Operations

  • Upload Assets - Get pre-signed URLs for secure file uploads
  • Download Results - Retrieve processed files securely

Webhook Management

  • Create Webhooks - Set up real-time notifications
  • Manage Webhooks - Update and delete webhook configurations

Common Query Examples

Get Webhooks

query { webhooks { webhook_id created webhook_url webhook_events } }

Get Order Status

query GetOrder($id: ID!) { order(order_id: $id) { order_id order_name order_status created product assets { asset_id asset_type } } }

Get Orders with Filtering

query GetOrders($filter: OrderFilter, $pagination: PaginationInput) { orders(filter: $filter, pagination: $pagination) { edges { node { order_id order_name order_status created product } } totalCount } }

Common Mutation Examples

Initialize Order

mutation InitializeOrder( $order_name: String! $model_units: String! ) { initializeOrder( order_name: $order_name product: "areaplan" model_units: $model_units ) { order_id order_name order_status created } }

Upload Asset

mutation { initializeUpload( order_id: "order-id" asset_type: "xyz" upload_type: "single" ) { asset_id upload_url expires_in } }

Create Webhook

mutation CreateWebhook($webhook_url: String!) { createWebhook(webhook_url: $webhook_url) { webhook_id webhook_url webhook_events created } }

Subscription Examples

Order Status Updates

subscription OrderStatusUpdates($orderId: ID!) { orderStatusChanged(orderId: $orderId) { order_id order_status previousStatus changedAt } }

Upload Progress

subscription UploadProgress($assetId: ID!) { uploadProgressUpdated(assetId: $assetId) { asset_id upload_status progress { percentage } } }

Error Handling

GraphQL errors are returned in a standardized format:

{ "data": null, "errors": [ { "message": "Order not found", "extensions": { "code": "ORDER_NOT_FOUND", "orderId": "invalid-order-id" } } ] }

Complete Workflow Example

Here’s a typical order processing workflow:

// 1. Initialize Order const orderMutation = ` mutation InitializeOrder($order_name: String!, $product: String!, $model_units: String!) { initializeOrder(order_name: $order_name, product: $product, model_units: $model_units) { order_id order_status } } `; const orderResponse = await graphqlClient.request(orderMutation, { order_name: "Building Scan Project", product: "areaplan", model_units: "Metric" }); const orderId = orderResponse.initializeOrder.order_id; // 2. Upload Assets const uploadMutation = ` mutation { initializeUpload(order_id: "${orderId}", asset_type: "xyz", upload_type: "single") { asset_id upload_url expires_in } } `; const uploadResponse = await graphqlClient.request(uploadMutation); // 3. Upload file to pre-signed URL await fetch(uploadResponse.initializeUpload.upload_url, { method: 'PUT', body: file }); // 4. Finalize Upload const finalizeUploadMutation = ` mutation FinalizeUpload($asset_id: ID!, $upload_id: String, $parts: String) { finalizeUpload(asset_id: $asset_id, upload_id: $upload_id, parts: $parts) { upload_status } } `; // 5. Finalize Order const finalizeOrderMutation = ` mutation FinalizeOrder($id: ID!) { finalizeOrder(id: $id) { order_status } } `; await graphqlClient.request(finalizeOrderMutation, { id: orderId }); // 6. Monitor via webhook or polling const statusQuery = ` query GetOrder($id: ID!) { order(order_id: $id) { order_status assets { asset_id asset_type } } } `;

Supported Products

  • areaplan - Automated 2D floor plan generation (see BIMIT Plan for complete specifications)

Supported File Formats

  • E57 - Industry standard 3D point clouds
  • XYZ - ASCII point cloud format

Next Steps

Explore the specific API sections:

  • Services - Complete order management workflow
  • Assets - File upload and download operations
  • Webhooks - Real-time order status notifications
Last updated on