dezrez / DezrezCoreAPI

Resources relating to the Dezrez Core API
7 stars 3 forks source link

Lettings Contract Length #23

Closed ewanmceachran closed 7 years ago

ewanmceachran commented 8 years ago

I can't find a letting on the web application with a value for 'contract length'. I'm assuming that this is given by the field 'term' on the appropriate role, since I can't find an instance where that is not null. Is this an unused field? If not, what would the type of a 'term' be - something with an id/name/systemname, or something different?

Thanks

marc-harry commented 8 years ago

Hi @ewanmceachran,

A lettings property should have the term populated and it is an enum of type 'TermType' so you can get the available values from the enum endpoint and yes it would be id/name/systemname. A lettings property would be a role which its roletype is 'InstructionToLet' or 'Let'. If these are coming back with null Term set it might be a bug we need to investigate. Is this the case? And if so could you send us an example so that we can quickly resolve this issue for you.

Cheers, Marc

ewanmceachran commented 7 years ago

How about this one?

https://core-api-uat.dezrez.com/api/role/4698965?agencyID=125

{
    "Deposit": null,
    "Term": null,
    "ServiceLevel": {
        "Id": 190243,
        "Name": "Fully Managed",
        "SystemName": "FullyManaged"
    },
    "AvailableDate": "2014-10-15T15:12:50Z",
    "TenantRoleId": 0,
    "LandlordInfo": [

    ],
    "Utilities": [

    ],
    "OfferAcceptedPriceDataContract": null,
    "GroupId": 2399017,
    "DefaultPicture": {
        "Url": "https://core-docs-uat.dezrez.com/125/dezrezcoreuat/public/1939531.jpg",
        "RequiresAuthentication": false,
        "ExpiryDate": null,
        "Tags": [

        ],
        "DocumentType": {
            "Id": 190368,
            "Name": "Image",
            "SystemName": "Image"
        },
        "DocumentSubType": {
            "Id": 190345,
            "Name": "Photo",
            "SystemName": "Photo"
        },
        "FileName": "Picture_3430316_5",
        "ContentType": null,
        "FileExtension": ".jpg",
        "Description": "",
        "CreatedDate": "2016-07-04T08:44:06Z",
        "CreatedBy": {
            "Initials": null,
            "ContactName": "System Account",
            "Gender": null,
            "Title": null,
            "FirstName": "System Account",
            "LastName": null,
            "PrimaryTelephone": null,
            "PrimaryEmail": null,
            "JobTitle": null,
            "Id": 2653104
        },
        "Id": 1939531
    },
    "PropertyId": 374209,
    "AgencyType": {
        "Id": 190289,
        "Name": "Sole",
        "SystemName": "Sole"
    },
    "AgencyPeriod": {
        "Id": 190268,
        "Name": "None",
        "SystemName": "None"
    },
    "Flags": [

    ],
    "Price": {
        "PriceValue": 1250.0,
        "CurrencyCode": null,
        "PriceText": null,
        "PriceType": {
            "Id": 190657,
            "Name": "Monthly",
            "SystemName": "Monthly"
        },
        "PriceQualifierType": null,
        "Id": 447862
    },
    "Fees": [
        {
            "Name": "Let Management Fee",
            "FeeValueType": {
                "Id": 190454,
                "Name": "Percentage",
                "SystemName": "Percentage"
            },
            "FeeCategoryType": {
                "Id": 190450,
                "Name": "Commission",
                "SystemName": "Commission"
            },
            "FeeChargeType": {
                "Id": 190452,
                "Name": "Applicable",
                "SystemName": "Applicable"
            },
            "FeeLiabilityType": {
                "Id": 190447,
                "Name": "Vendor",
                "SystemName": "Vendor"
            },
            "FeeFrequency": null,
            "ApplyTax": false,
            "VatValue": 0.0,
            "DefaultValue": 10.0,
            "ScaleableFees": [

            ],
            "Notes": null,
            "TransactionType": {
                "Id": 190166,
                "Name": "Letting",
                "SystemName": "Letting"
            },
            "IsDefault": false,
            "CalculatedValue": 0.0,
            "CreatedDate": "2014-10-15T15:15:51Z",
            "CreatedBy": {
                "Initials": null,
                "ContactName": "System Account",
                "Gender": null,
                "Title": null,
                "FirstName": "System Account",
                "LastName": null,
                "PrimaryTelephone": null,
                "PrimaryEmail": null,
                "JobTitle": null,
                "Id": 2653104
            },
            "Id": 275415
        }
    ],
    "OwningTeam": null,
    "Branch": {
        "Name": "Lichfield Office",
        "Id": 2336007
    },
    "ValidEpcInPlace": false,
    "ProofOfIdReceived": false,
    "ProofOfOwnershipReceived": false,
    "Name": "Looking to let (Drift Barn, Whitacre Lane, WS14 0BZ)",
    "RoleType": {
        "Id": 190704,
        "Name": "Letting",
        "SystemName": "Letting"
    },
    "RoleStatus": {
        "Id": 190175,
        "Name": "Instruction to Let",
        "SystemName": "InstructionToLet"
    },
    "CustomFields": [

    ],
    "CreatedDate": "2014-07-18T08:32:29Z",
    "CreatedBy": {
        "Initials": null,
        "ContactName": "System Account",
        "Gender": null,
        "Title": null,
        "FirstName": "System Account",
        "LastName": null,
        "PrimaryTelephone": null,
        "PrimaryEmail": null,
        "JobTitle": null,
        "Id": 2653104
    },
    "Id": 4698965
}
marc-harry commented 7 years ago

Hi @ewanmceachran, It appears that out data migration to bring across the term for lettings properties had a bug that was fixed just after this agency was migrated. So that is why the lettings don't have term set. I have manually set the term for the example you have sent me. Is this sufficient for you to be able continue the work you have your end or do you require most lettings properties with the term set? Cheers, Marc