VisitNeedsToBeBilled
v1.0.0

Event represents when a property has been created in the Legacy Stack (processed and inserted in theDB)

Details

This event is emitted after a VisitDoneEvent has been enriched and is ready to be billed by the Billing Service.

It is consumed by the Billing Service through a POST /property call for invoicing creation.

Consumer / Producer Diagram

Event Example

VisitNeedsToBeBilled Schema (json)
{
  "version": "0",
  "id": "676ddc84-11d2-587b-34a3-bb0d7c1ac7f3",
  "detail-type": "VisitNeedsToBeBilled",
  "source": "flatsy.service.booking",
  "account": "221760190323",
  "time": "2023-04-13T07:37:58Z",
  "region": "eu-west-3",
  "resources": [],
  "detail": {
    "metadata": {
      "application": "System",
      "service": "flatsy.service.booking",
      "actor": "System",
      "actorID": "System",
      "entity": "Visit",
      "correlationID": "3112dbdd-74d1-60c3-be11-d50c6e744df2",
      "entityID": "d8a310f2-76db-4472-b32c-03cda359b067"
    },
    "data": {
      "property": {
        "id": "4da00c1e-981e-4a38-af3e-e08cdf01ae6a",
        "transactionType": "transaction.type.sale",
        "status": "property.status.available",
        "creationMethod": "creation.method.manual",
        "isPremium": true,
        "distanceToNearestEpicenter": 2.5,
        "longitude": "2.37243259999999889",
        "latitude": "48.86869939999999701",
        "externalRef": "949cbd",
        "customerID": "f2bb4633-95ba-4e94-a53a-7986d7150a3d",
        "streetNumber": null,
        "route": null,
        "streetAddress": "132 Avenue Parmentier",
        "postalCode": "75011",
        "countryCode": "FR",
        "locality": "Paris",
        "epicenterID": "f16387e1-813a-46d6-81cc-ffeddb8229a2",
        "zoneCode": "FR-IDF",
        "firstStaffedAt": "2023-04-05T09:54:18.379376Z",
        "createdAt": "2023-04-05T09:49:33.509971Z",
        "updatedAt": "2023-04-07T12:48:23.957877Z"
      },
      "visit": {
        "id": "d8a310f2-76db-4472-b32c-03cda359b067",
        "date": "2023-04-13T07:00:00Z",
        "createdAt": "2023-04-07T12:48:23.419741Z",
        "flatguideId": "2e6dde0c-536e-49b3-8603-175a345efff4",
        "propertyVisits": [
          {
            "propertyId": "4da00c1e-981e-4a38-af3e-e08cdf01ae6a",
            "visitId": "d8a310f2-76db-4472-b32c-03cda359b067",
            "comment": "Visite à blanc ",
            "visitorInterest": 3,
            "reportStatus": "reviewing",
            "reportStatusUpdatedAt": "2023-04-13T07:37:46.127874Z",
            "buyingMotive": "flatguide.report.visitor.buyingmotive.mainresidence"
          }
        ],
        "visitorVisits": [
          {
            "visitId": "d8a310f2-76db-4472-b32c-03cda359b067",
            "askedPropertyId": "4da00c1e-981e-4a38-af3e-e08cdf01ae6a",
            "status": "visit.status.done",
            "initialDate": "2023-04-13T07:00:00Z",
            "visitor": {
              "email": "hello-juliettemonier@flatsy.fr",
              "firstName": "Juliette",
              "lastName": "Monier",
              "phone": "+33652047854",
              "fields": {}
            },
            "statusUpdatedAt": "2023-04-13T07:37:48.347498Z",
            "creator": "ByAgency"
          }
        ],
        "propertySummary": {
          "id": "4da00c1e-981e-4a38-af3e-e08cdf01ae6a",
          "displayAddress": "132 Avenue Parmentier, 75011 Paris",
          "ownerPictureUrl": "https://cdn.filestackcontent.com/o3ZMBnOzQ9yLKhSgiGfj?policy=eyJoYW5kbGUiOiJvM1pNQm5PelE5eUxLaFNnaUdmaiIsImNhbGwiOlsicmVhZCJdLCJleHBpcnkiOjQ2ODgzNjY4Njd9&signature=a3e983e6af0bbc19bb726c7977c63d0063440a0d5f4427877e60afeae3ac396e",
          "latitude": 48.8686994,
          "longitude": 2.372432599999999,
          "externalRef": "949cbd",
          "rentSell": "property.basics.rentsell.sell"
        },
        "durationMinutes": 45,
        "metadata": { "dummy_visit": "true" }
      },
      "customer": {
        "id": "f2bb4633-95ba-4e94-a53a-7986d7150a3d",
        "name": "Hosman",
        "isActive": true,
        "segment": "customer.segment.agency.digital"
      },
      "correlationID": "3112dbdd-74d1-60c3-be11-d50c6e744df2",
      "eventID": "3112dbdd-74d1-60c3-be11-d50c6e744df2"
    }
  }
}
Edit this pageLast updated on 2023/11/3