reapit / foundations

Foundations platform mono repo
57 stars 22 forks source link

Create documents with associatedType tenancyRenewal always give an error #11104

Open abrahamseni opened 5 months ago

abrahamseni commented 5 months ago

When tests to POST /documents with associatedType = tenancyRenewal, associatedId = tenancyRenewalCheckId it always give an error:

{
    "errors": [
        {
            "field": "OwnerId",
            "message": "The associated 'tenancyRenewal' with identifier: 'SOME_ID' does not exist."
        }
    ],
    "statusCode": 422,
    "dateTime": "2024-05-02T04:49:29.7396954Z",
    "description": "One or more validation failures have occurred. Please refer to Errors list for details"
}

We try to use a different associatedId: renewal.Id, tenancy.Id, and property.Id, but the error persists.

What ID should we use for associatedId?

plittlewood-rpt commented 5 months ago

hi @abrahamseni the associatedId should be the renewal id. Can you provide an example of a call you're making or the id of the renewal you're trying to attach a document to? Thanks

abrahamseni commented 5 months ago

hi @plittlewood-rpt , here is the payload env: SAU

{
  "associatedId": "MKT240004",
  "associatedType": "tenancyRenewal",
  "fileData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMA...",
  "name:" "savills-logo.png",
  "typeId": "REN"
}
abrahamseni commented 5 months ago

@plittlewood-rpt , any news on this issue? Thanks.

plittlewood-rpt commented 5 months ago

HI @abrahamseni apologies I missed your reply a few weeks ago - we'll come back to you as soon as we can.

github-actions[bot] commented 5 months ago

This issue has been updated and moved to our ‘Near Term’ column (typically completed within 0 - 4 months). We have assessed the effort required and outlined a technical specification - please take the time to review this detail. When we're ready to schedule the issue, it will be assigned to the relevant board where you can continue to track its progress to completion. For more information on our processes, please click here

HollyJoyPhillips commented 3 months ago

Internal reference: PBI-5747

AshDeeming commented 1 week ago

HI @abrahamseni It appears this example is using the wrong associatedType. From the info provided you are trying to link a document to a tenancy check looking at the example which would be an associated type of tenancyCheck.

abraham-reapit commented 1 week ago

HI @abrahamseni It appears this example is using the wrong associatedType. From the info provided you are trying to link a document to a tenancy check looking at the example which would be an associated type of tenancyCheck.

Hi @plittlewood-rpt , could you please confirm this? Thanks.

Note: I can't reply with my old account.