Flecto
    Flecto
    • Activities
    • Timestamps
    • Flecto AI
      • Flecto AI
      • Hint item categories
        GET
      • Generate item category description
        GET
      • Generate item description
        GET
      • Classify insurance item
        GET
      • Generate product photos
        GET
      • Generate bundle description
        GET
    • Services
      • Get image upload url
        POST
      • Get document upload url
        POST
    • Integrations - Email Validate
      • Validation email
        GET
    • Integrations - Google Calendar
      • Google Calendar Integration
      • Create google calendar id
        POST
      • Delete google calendar
        DELETE
    • Me
      • Gets current logged in user
        GET
      • Update current logged in user attributes
        PUT
    • Me - Addresses
      • Get all user addresses
        GET
      • Create user address
        POST
      • Get user address
        GET
      • Delete user address
        DELETE
      • Update user address
        PATCH
    • Me - Identities
      • Get user identities
        GET
      • Change main identity
        POST
      • send email for recovery password
        POST
      • Get user identities
        GET
      • delete auth0 user
        DELETE
      • Update identity
        PUT
    • Me - Subscription
      • Get user subscription
    • Me - Tax Profiles
      • Get current user tax profile
      • Update current user tax profile
    • Me - Verification
      • Verify phone number
      • Check ongoing phone number verify
    • User - Bookings Settings
      • Gets current owner bookings settings
      • Update user booking settings
    • Business Categories
      • Get business categories
    • SaaS - Bookings
      • Creates a booking
      • Index all bookings
      • Updates booking
      • Show details of one booking
      • Delete booking
      • Update booking document
    • SaaS - Booking Availability
      • Checks item availability for all items within booking
    • SaaS - Booking Customers
      • Shows booking customer
      • Update booking customer
    • SaaS - Booking Documents
      • Shows all booking documents
      • Creates a booking document
      • Shows booking document
      • Destroy booking document
      • Updates a booking document
      • Quote preview
      • Contract preview
      • Proforma preview
      • Generates a PDF for a booking
      • Generates a contract PDF for a booking
      • Generates a PDF for a booking
    • SaaS - Booking Items
      • Booking items
      • Add a new booking item
      • Booking item
      • Remove a booking item
      • Update booking item
    • SaaS - Booking Payments
      • Shows all booking payment
      • Creates a booking payment
      • Shows booking payment
      • Destroy booking payment
      • Updates a booking payment
    • SaaS - Booking Status
      • Negotiate booking
      • Reserve booking
      • Cancel a booking
      • Halts booking negotiation
      • Unreserve booking
      • Halts ongoing negotiation
      • Reverts completed booking
      • Undo cancelled booking
      • Send booking customer email
    • SaaS - Bundles
      • Get items
      • Create bundle
      • Get bundle
      • Delete bundle
      • Update bundle
    • SaaS - Bundles Items
      • Get bundle items
      • Create bundle item
      • Get bundle items
      • Update bundle item
      • Delete bundle item
    • SaaS - Chargebee
      • Posts callback from Chargebee
    • SaaS - Customers
      • Creates a customer
      • List customers
      • Get customer
      • Delete customer
      • Updates customer
    • SaaS - Customer Addresses
      • List customer addresses
      • Creates a customer addresses
      • Delete address
      • Update address
    • SaaS - Inquiry Customers
      • Create customer from inquiry
    • SaaS - Inquiry Status
      • Unreject inquiry
      • Unapprove inquiry
      • Rejects inquiry
      • Approve inquiry
    • SaaS - Items
      • Get item category
      • Get item
      • Delete items
      • Update item
      • Add item
      • Get items
      • Estimate insurance for item
      • Get items
    • SaaS - Item Photos
      • Delete item photo
      • Get item photo
      • Get all item photos
      • Create item photo
    • SaaS - Links
      • Show object details
    • SaaS - Inquiries
      • Show details of one inquiry
      • Shows specific owner inquiry
      • Shows all the owner inquiries
    • SaaS - Insurances
      • Create insurances for booking
      • Cancels bookings insurances
      • List all bookings insurances
      • Cancel insurance
      • Show booking insurance
      • Show booking insurance status
      • Get insurance
      • Update insurance
      • Get Insurance Quote for booking
      • Create insurance
      • List all insurances
    • SaaS - Products
      • Get item
      • Checks item availability for booking
      • Estimate insurance for item
      • Checks availability for all items
    • Store - Inquiries
      • Creates an inquiry
    • Links - Booking Documents
      • Show documents of one booking
      • Show document
      • Update documents of one booking
    • Links - Bookings
      • Show details of one booking
    • SaaS - Store
      • Get store
      • Update store
    • Store
      • Gets store details
    • Me - Item Categories
      • List all item categories
      • Create item category
      • Move item category
      • Get item category
      • Update item category
      • Delete item category
    • Store - Item Categories
      • List item categories
      • Show item category
    • Store - Products
      • Get item
      • Get item category
      • Get all item photos
      • Get all item photos
      • Checks item availability for booking
      • List item
      • Checks availability for all items
    • Me - Onboarding
      • Onboards a new user
    • SaaS - Booking Services
      • Shows all booking services
      • create a booking service
      • Shows booking service
      • Update booking service
    • SaaS - Product Status
      • Enable item
      • Disable item

    Activities

    Activity#

    Activities are form of registering the actions performed during a booking.

    They're divided into 2 main types:
    comment (created by the users)
    actions (triggered by the backend).

    GET /api/saas/me/bookings/{booking_internal_id}/activities#

    Description:#

    Returns a list of all activities associated to the booking, sorted by created_at: :descending, kind: :descending by default.

    Parameters:#

    Authorization
    Location: header
    Type: string
    Required: true
    Description: The authentication token required to access the endpoint.
    Auth0-IdToken
    Location: header
    Type: string
    Required: false
    Description: The auth0 idToken from the user.
    Accept-Language
    Location: header
    Type: number
    Required: false
    Description: Response language, en and pt are supported.
    booking_internal_id
    Location: path
    Type: number
    Required: true
    Description: The internal ID of the booking.

    Request Example:#

    Response Example:#

    {
      "data": [
        {
          "id": "10",
          "type": "activity",
          "attributes": {
            "kind": "booking_item_returned",
            "properties": {
              "attrs": ["returned_quantity"],
              "params": { "new": 1, "old": 0 }
            },
            "created_at": "2024-03-24T15:15:00Z",
            "updated_at": "2024-03-24T15:15:00Z"
          }
        },
        {
          "id": "9",
          "type": "activity",
          "attributes": {
            "kind": "booking_status_changed",
            "properties": {
              "attrs": ["status"],
              "params": { "new": "completed", "old": "ongoing" }
            },
            "created_at": "2024-03-24T15:15:00Z",
            "updated_at": "2024-03-24T15:15:00Z"
          }
        },
        {
          "id": "8",
          "type": "activity",
          "attributes": {
            "kind": "booking_item_picked_up",
            "properties": {
              "attrs": ["picked_up_quantity"],
              "params": { "new": 1, "old": 0 }
            },
            "created_at": "2024-03-23T15:15:00Z",
            "updated_at": "2024-03-23T15:15:00Z"
          }
        },
        {
          "id": "7",
          "type": "activity",
          "attributes": {
            "kind": "booking_status_changed",
            "properties": {
              "attrs": ["status"],
              "params": { "new": "ongoing", "old": "reserved" }
            },
            "created_at": "2024-03-23T15:15:00Z",
            "updated_at": "2024-03-23T15:15:00Z"
          }
        },
        {
          "id": "6",
          "type": "activity",
          "attributes": {
            "kind": "booking_status_changed",
            "properties": {
              "attrs": ["status"],
              "params": { "new": "reserved", "old": "drafting" }
            },
            "created_at": "2024-03-22T15:29:46Z",
            "updated_at": "2024-03-22T15:29:46Z"
          }
        },
        {
          "id": "5",
          "type": "activity",
          "attributes": {
            "kind": "booking_service_created",
            "properties": {
              "attrs": ["created_at"],
              "params": { "service_kind": "insurance" }
            },
            "created_at": "2024-03-22T15:29:46Z",
            "updated_at": "2024-03-22T15:29:46Z"
          }
        },
        {
          "id": "4",
          "type": "activity",
          "attributes": {
            "kind": "booking_item_created",
            "properties": {
              "attrs": ["created_at"],
              "params": { "item_title": "Mediocre Marble Coat" }
            },
            "created_at": "2024-03-22T15:29:46Z",
            "updated_at": "2024-03-22T15:29:46Z"
          }
        },
        {
          "id": "2",
          "type": "activity",
          "attributes": {
            "kind": "booking_customer_set",
            "properties": {
              "attrs": ["customer_id"],
              "params": { "customer_internal_id": 2 }
            },
            "created_at": "2024-03-22T15:29:46Z",
            "updated_at": "2024-03-22T15:29:46Z"
          }
        },
        {
          "id": "3",
          "type": "activity",
          "attributes": {
            "kind": "booking_changed_dates",
            "properties": {
              "attrs": ["start_at", "end_at"],
              "params": {
                "new_end_at": "2024-03-24T15:15:00.000Z",
                "old_end_at": null,
                "new_start_at": "2024-03-23T15:15:00.000Z",
                "old_start_at": null
              }
            },
            "created_at": "2024-03-22T15:29:46Z",
            "updated_at": "2024-03-22T15:29:46Z"
          }
        },
        {
          "id": "1",
          "type": "activity",
          "attributes": {
            "kind": "booking_created",
            "properties": {
              "attrs": ["created_at"],
              "params": { "booking_id": 1 }
            },
            "created_at": "2024-03-22T15:29:46Z",
            "updated_at": "2024-03-22T15:29:46Z"
          }
        }
      ]
    }
    

    Endpoint#

    POST /api/saas/me/bookings/{booking_internal_id}/activities

    Description:#

    Creates a new comment activity.

    Parameters:#

    Authorization
    Location: header
    Type: string
    Required: true
    Description: The authentication token required to access the endpoint.
    Auth0-IdToken
    Location: header
    Type: string
    Required: false
    Description: The auth0 idToken from the user.
    Accept-Language
    Location: header
    Type: number
    Required: false
    Description: Response language, en and pt are supported.
    booking_internal_id
    Location: path
    Type: number
    Required: true
    Description: The internal ID of the booking.
    activity
    Location: body
    Required: true
    Description: The content of the activity to be processed.

    Activity Attributes:#

    comment
    Type: string
    Description: The comment message.
    Limit: 4000 characters.
    attachment_id
    Type: string
    Description: The signed id for document attachment.
    Size Limit: 10 MB

    Request Example:#

    curl -X POST http://rnters-staging.herokuapp.com/api/saas/me/bookings/{booking_internal_id}/activities \
    -H 'Authorization: Bearer your_token' \
    -H 'Auth0-IdToken: your_id_token' \
    -H 'Accept-Language: en' \
    -H 'Content-Type: application/json' \
    -d '{
      "data": {
        "type": "activity",
        "attributes": {
          "properties": {
            "comment": "sample comment"
          },
          "attachment_id": "sample-signed-id"
        }
      }
    }'

    Response Example:#

    {
      "data": {
        "id": "8",
        "type": "activity",
        "attributes": {
          "kind": "comment",
          "properties": { "comment": "sample comment" },
          "created_at": "2024-03-23T13:54:01Z",
          "updated_at": "2024-03-23T13:54:01Z",
          "attachment_url": "FILE_URL",
          "attachment_preview": "PREVIEW_URL",
          "attachment_filename": "dummy.pdf",
          "attachment_content_type": "application/pdf",
          "attachment_metadata": {}
        }
      }
    }
    

    Endpoint#

    PUT /api/saas/me/bookings/{booking_internal_id}/activities/{id}

    Description:#

    Updates a comment activity.

    Parameters:#

    Authorization
    Location: header
    Type: string
    Required: true
    Description: The authentication token required to access the endpoint.
    Auth0-IdToken
    Location: header
    Type: string
    Required: false
    Description: The auth0 idToken from the user.
    Accept-Language
    Location: header
    Type: number
    Required: false
    Description: Response language, en and pt are supported.
    booking_internal_id
    Location: path
    Type: number
    Required: true
    Description: The internal ID of the booking.
    id
    Location: path
    Type: number
    Required: true
    Description: The id of the activity.
    activity
    Location: body
    Required: true
    Description: The content of the activity to be processed.

    Activity Attributes:#

    comment
    Type: string
    Description: The comment message.
    Limit: 4000 characters.
    attachment_id
    Type: string
    Description: The signed id for document attachment.
    Size Limit: 10 MB

    Request Example:#

    Response Example:#

    {
      "data": {
        "id": "456",
        "type": "activity",
        "attributes": {
          "comment": "Updated comment",
          "created_at": "2024-03-22T15:29:46Z",
          "updated_at": "2024-03-24T15:15:00Z"
        }
      }
    }

    Endpoint#

    DELETE /api/saas/me/bookings/{booking_internal_id}/activities/{id}

    Description:#

    Deletes a comment activity.

    Parameters:#

    Authorization
    Location: header
    Type: string
    Required: true
    Description: The authentication token required to access the endpoint.
    Auth0-IdToken
    Location: header
    Type: string
    Required: false
    Description: The auth0 idToken from the user.
    Accept-Language
    Location: header
    Type: number
    Required: false
    Description: Response language, en and pt are supported.
    booking_internal_id
    Location: path
    Type: number
    Required: true
    Description: The internal ID of the booking.
    id
    Location: path
    Type: number
    Required: true
    Description: The id of the activity.

    Request Example:#

    Modified at 2024-03-23 14:29:43
    Next
    Timestamps
    Built with