Skip to content
Francesca Sadikin edited this page Sep 25, 2019 · 12 revisions

GET /api/users/:user_uuid/clients

Retrieves partial client data for all clients belonging to a user

Response

{
    "data": [
        {
            "contacts": [
                {
                    "best_time_to_contact": "Morning",
                    "email": "mark@gmail.com",
                    "first_name": "Mark",
                    "label": "Groom",
                    "last_name": "Blue",
                    "phone_number": null,
                    "uuid": "dbdbcd2c-3373-4034-bd8e-85427e54af3c"
                },
                {
                    "best_time_to_contact": "Evening",
                    "email": "sarah@gmail.com",
                    "first_name": "Sarah",
                    "label": "Bride",
                    "last_name": "Green",
                    "phone_number": "123-456-7890",
                    "uuid": "53283fb9-79ee-4267-93a2-9b26d9e1e820"
                }
            ],
            "private_notes": "Met at university and looking to do a destination wedding and reception in Bali",
            "user_uuid": "2c2b4bc2-f31d-48b7-9e12-e0930c94130f",
            "uuid": "1a7bc09a-884d-4688-b07b-eed5e8909de5"
        },
    ]
}

GET /api/clients/:client_uuid/data

Retrieves a single client with all related data

Response

{
    "data": {
        "contacts": [
            {
                "best_time_to_contact": "Morning",
                "email": "mark@gmail.com",
                "first_name": "Mark",
                "label": "Groom",
                "last_name": "Blue",
                "phone_number": null,
                "uuid": "dbdbcd2c-3373-4034-bd8e-85427e54af3c"
            },
            {
                "best_time_to_contact": "Evening",
                "email": "sarah@gmail.com",
                "first_name": "Sarah",
                "label": "Bride",
                "last_name": "Green",
                "phone_number": "123-456-7890",
                "uuid": "53283fb9-79ee-4267-93a2-9b26d9e1e820"
            }
        ],
        "current_stage": {
            "category": "Engagement",
            "client_uuid": "1a7bc09a-884d-4688-b07b-eed5e8909de5",
            "event_uuid": null,
            "is_completed": false,
            "step": "Share Gallery Link",
            "uuid": "43f7ce04-7afd-4bd2-a2d3-7f74a7a98ddd"
        },
        "package": {
            "balance_received": false,
            "balance_remaining": 420000,
            "client_uuid": "1a7bc09a-884d-4688-b07b-eed5e8909de5",
            "discount_offered": 0,
            "engagement_included": true,
            "package_contents": "Up To Ten Hours of Photographic Coverage\n\n
Two Photographers\n\n
Handcrafted 10x10 Thirty Sided Artisan Album \n\nComplimentary Engagement Session\n\n
Private Online Gallery of All Images for Friends and Family \n\nSeven Hundred+ Digital Negatives on a Custom USB Drive ",
            "package_events": [
                {
                    "blog_link": null,
                    "client_uuid": "1a7bc09a-884d-4688-b07b-eed5e8909de5",
                    "coordinator_name": null,
                    "edit_image_deadline": null,
                    "event_name": "Engagement",
                    "gallery_link": null,
                    "notes": "Regarding clients question about location, send following email:\n\nHi Sarah & Mark,\nWe can choose a location that you love or that has some sort of meaning, or it can simply be somewhere that offers great spots for photos. It’s a time and opportunity for me to get to know you as a couple and for you to see how I work. \n\nThere is no pressure at all and it’s a great way to get comfortable in front of the camera, especially if you’re a little camera shy. It’s also a wonderful opportunity to get some natural and relaxed photos that reflect the two of you. If you have children you can bring them along and make it a family experience.",
                    "package_uuid": "dbea4bb1-c6a6-434f-ba79-ea6a4d06ad8c",
                    "reception_location": null,
                    "shoot_date": "2019-11-15T08:00:00Z",
                    "shoot_location": "Los Angeles Poppy Fields",
                    "shoot_time": "8AM - 11PM",
                    "uuid": "02522342-8657-4675-a851-6d5668fa7dbd",
                    "wedding_location": null
                },
            ],
            "package_name": "Wedding Premier",
            "package_price": 520000,
            "proposal_signed": true,
            "retainer_paid": true,
            "retainer_paid_amount": 100000,
            "retainer_price": 100000,
            "upcoming_shoot_date": "2019-11-15T08:00:00Z",
            "uuid": "dbea4bb1-c6a6-434f-ba79-ea6a4d06ad8c",
            "wedding_included": true
        },
        "private_notes": "Met at university and looking to do a destination wedding and reception in Bali",
        "user_uuid": "2c2b4bc2-f31d-48b7-9e12-e0930c94130f",
        "uuid": "1a7bc09a-884d-4688-b07b-eed5e8909de5",
        "workflows": [
            {
                "completed_tasks": 2,
                "incomplete_tasks": 0,
                "order": 0,
                "tasks": [
                    {
                        "category": "New Client Inquiry",
                        "client_uuid": "1a7bc09a-884d-4688-b07b-eed5e8909de5",
                        "event_uuid": null,
                        "is_completed": true,
                        "step": "Request More Information",
                        "uuid": "ebd71905-1a94-40a1-a862-e89d0ada1273"
                    },
                    {
                        "category": "New Client Inquiry",
                        "client_uuid": "1a7bc09a-884d-4688-b07b-eed5e8909de5",
                        "event_uuid": null,
                        "is_completed": true,
                        "step": "Save Client Information",
                        "uuid": "13abbcf7-9055-4070-953e-0586868545c9"
                    }
                ],
                "uuid": "96ba8683-1d0c-4160-ba84-94bc52588c14",
                "workflow_name": "New Client Inquiry"
            },
        ]
    }
}

POST /api/clients

Creates new client

Request Body

{
   "contacts":[
      {
         "first_name":"Tammy",
         "last_name":"",
         "email":"",
         "phone_number":"",
         "private_notes":"",
         "label":"Client",
         "best_time_to_contact":""
      }
   ],
   "private_notes":""
}

Response:

{
   "data":{
      "contacts":[
         {
            "best_time_to_contact":null,
            "email":null,
            "first_name":"Tammy",
            "label":"Client",
            "last_name":null,
            "phone_number":null,
            "uuid":"90e49431-ea90-4432-88e2-d0e286b21fbe"
         }
      ],
      "private_notes":null,
      "user_uuid":"2c2b4bc2-f31d-48b7-9e12-e0930c94130f",
      "uuid":"9356119b-89f8-4843-b844-b7b8e6e75c7b"
   }
}

Clone this wiki locally