Skip to content

PWA Client API Documentation

Last Updated

2026-03-31

Overview

This documentation describes the API endpoints and integration flow for the PWA Editor client application. The PWA Editor enables users to create and customize photobook products through an interactive web-based interface.

General Flow

The typical integration follows this sequence:

  1. Fetch Markets - Retrieve available markets based on user location
  2. Load Products - Get photobook products for the selected market
  3. Create Project - Generate a project and receive a webview URL
  4. Handle Callbacks - Process channel messages during editing and checkout
  5. Process Payment - Handle payment on your platform
  6. Complete Job - Trigger rendering and printing after payment
  7. Order History - Display past orders to the user

Another example of an integration could be:

  1. Import Events as Campaigns - Pass existing event data and assets, PWA Backend generates the projects
  2. Handle Callbacks - Process channel messages during editing and checkout
  3. Process Payment - Handle payment on your platform
  4. Complete Job - Trigger rendering and printing after payment

Environments

The API has different endpoint structures depending on the API type:

eCommerce API

Used for: Markets, Products, Order History

Endpoint Format: https://{ecomm}.photobook.ai/api/v2/...

Replace {ecomm} with your assigned client identifier.

Environment Selection: Specified in request body

json
{
  "key": "your-ecomm-key",
  "env": "dev",  // or "prod"
  // ... other parameters
}

Examples:

  • Markets: https://{ecomm}.photobook.ai/api/v2/misc/get-market.php
  • Products: https://{ecomm}.photobook.ai/api/v2/products/list-product.php

PWA Backend API

Used for: Projects, Print/Complete Job, Project Management

Endpoint Format:

  • Development: https://pwa-api-dev.photobook.ai/v2/...
  • Production: https://pwa-api.photobook.ai/v2/...

Authentication: Via X-Albumstory header (see Authentication)

Examples:

  • Generate Project: https://pwa-api-dev.photobook.ai/v2/generate
  • Print Job: https://pwa-api-dev.photobook.ai/v2/print
  • List Projects: https://pwa-api-dev.photobook.ai/v2/project/list

Getting Started

To integrate with the PWA Editor API, you'll need:

  • Programmatic access keys (contact your account manager)
  • Your unique client name for eCommerce API endpoints
  • A webview/iframe implementation for displaying the editor

TIP

Start with the Authentication guide to understand how to secure your API requests.

photobook.ai Developer Documentation