{
  "info": {
    "name": "Pixora API",
    "description": "API documentation for the Pixora photography platform",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Auth",
      "item": [
        {
          "name": "Register",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"user@example.com\",\n  \"password\": \"securepassword\",\n  \"name\": \"Иван Иванов\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/auth/register",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "register"
              ]
            }
          }
        },
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"user@example.com\",\n  \"password\": \"securepassword\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "login"
              ]
            }
          }
        },
        {
          "name": "Me",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/auth/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "auth",
                "me"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Admin Galleries",
      "item": [
        {
          "name": "Get All Galleries",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries"
              ]
            }
          }
        },
        {
          "name": "Create Gallery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Свадьба Анны и Джона\",\n  \"clientName\": \"Anna & John\",\n  \"date\": \"2024-08-15\",\n  \"location\": \"Париж\",\n  \"status\": \"DRAFT\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Client Galleries",
      "item": [
        {
          "name": "Get Public Gallery",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/client/g/:accessToken",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "g",
                ":accessToken"
              ],
              "variable": [
                {
                  "key": "accessToken",
                  "value": "ACCESS_TOKEN_HERE"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Advanced Admin",
      "item": [
        {
          "name": "Sync Session",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/admin/billing/sync-session",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "billing",
                "sync-session"
              ]
            }
          }
        },
        {
          "name": "Sync Storage",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/admin/billing/sync-storage",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "billing",
                "sync-storage"
              ]
            }
          }
        },
        {
          "name": "Billing Status",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/billing/status",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "billing",
                "status"
              ]
            }
          }
        },
        {
          "name": "Gallery Analytics",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/analytics",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "analytics"
              ]
            }
          }
        },
        {
          "name": "Gallery Download",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/download",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "download"
              ]
            }
          }
        },
        {
          "name": "Photos Batch Delete",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/photos/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "photos",
                "batch"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"photoIds\": [\"uuid-1\", \"uuid-2\"]\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Photos Process",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/photos/process",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "photos",
                "process"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"photoIds\": [\"uuid-1\", \"uuid-2\"]\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Photos Upload URL",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/photos/upload-url",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "photos",
                "upload-url"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"filename\": \"IMG_001.jpg\",\n  \"contentType\": \"image/jpeg\",\n  \"size\": 5242880\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Gallery Sections",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/sections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "sections"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Утро невесты\"\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Gallery Selections",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/selections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "selections"
              ]
            }
          }
        },
        {
          "name": "Delete Selection",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/selections/:selectionId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "selections",
                ":selectionId"
              ]
            }
          }
        },
        {
          "name": "Export Selection",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/galleries/:id/selections/:selectionId/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "galleries",
                ":id",
                "selections",
                ":selectionId",
                "export"
              ]
            }
          }
        },
        {
          "name": "Get Profile",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "profile"
              ]
            }
          }
        },
        {
          "name": "Update Profile",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Иван Иванов\",\n  \"studioName\": \"Ivanov Photography\",\n  \"handle\": \"ivanov\",\n  \"phone\": \"+380501234567\",\n  \"instagram\": \"@ivan_photo\",\n  \"telegram\": \"@ivan_photo\",\n  \"website\": \"https://ivanov.com\",\n  \"customFooter\": \"© 2026 Ivanov Photography\",\n  \"watermarkEnabled\": true\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/admin/profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "profile"
              ]
            }
          }
        },
        {
          "name": "Check Handle Availability",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/profile/check-handle?handle=ivanov",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "profile",
                "check-handle"
              ],
              "query": [
                {
                  "key": "handle",
                  "value": "ivanov"
                }
              ]
            }
          }
        },
        {
          "name": "Upload Brand Asset",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/admin/upload-brand-asset",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "upload-brand-asset"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "type",
                  "value": "avatar",
                  "type": "text"
                },
                {
                  "key": "file",
                  "type": "file",
                  "src": []
                }
              ]
            }
          }
        },
        {
          "name": "Proxy Image for Cropper",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/admin/proxy-image?url=https%3A%2F%2Fexample.com%2Fphoto.jpg",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "admin",
                "proxy-image"
              ],
              "query": [
                {
                  "key": "url",
                  "value": "https%3A%2F%2Fexample.com%2Fphoto.jpg"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Advanced Client",
      "item": [
        {
          "name": "Get Photographer Portfolio (Vanity Handle)",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/client/portfolio/:handle",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "portfolio",
                ":handle"
              ],
              "variable": [
                {
                  "key": "handle",
                  "value": "ivanov"
                }
              ]
            }
          }
        },
        {
          "name": "Get Gallery by Vanity Slug",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/client/galleries/by-slug?handle=ivanov&slug=wedding",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "galleries",
                "by-slug"
              ],
              "query": [
                {
                  "key": "handle",
                  "value": "ivanov"
                },
                {
                  "key": "slug",
                  "value": "wedding"
                }
              ]
            }
          }
        },
        {
          "name": "Client Lock",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/client/g/:accessToken/lock",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "g",
                ":accessToken",
                "lock"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"pin\": \"1234\"\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Client Photo Update",
          "request": {
            "method": "PATCH",
            "url": {
              "raw": "{{baseUrl}}/api/client/g/:accessToken/photos/:photoId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "g",
                ":accessToken",
                "photos",
                ":photoId"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"favorite\": true\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Client Gallery Detail",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/client/galleries/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "galleries",
                ":id"
              ]
            }
          }
        },
        {
          "name": "Client Gallery Download",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/client/galleries/:id/download",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "galleries",
                ":id",
                "download"
              ]
            }
          }
        },
        {
          "name": "Client Download Token",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/client/galleries/:id/download-token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "galleries",
                ":id",
                "download-token"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"anna@example.com\"\n}"
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        {
          "name": "Client Photo Download",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/api/client/galleries/:id/photos/:photoId/download",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "client",
                "galleries",
                ":id",
                "photos",
                ":photoId",
                "download"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "Stripe Webhook",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{baseUrl}}/api/webhooks/stripe",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "webhooks",
                "stripe"
              ]
            }
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://localhost:3000",
      "type": "string"
    }
  ]
}