Homepage
Dynamic Sale Text
Homepage providers can use our APIs to fetch the complete Sale’s text that was prepared by the brokers using Dynamic Sale Text in our system.
Check if Dynamic Sale Text is used on the case:
Not all our customers are using Dynamic Sale Text (yet) and those who do might not have it enabled for all cases. To get the information if Dynamic Sale Text is used for the case that you are interested in, you can use:
GET /flow/api/DynamicSaleText/Cases/{caseId:int}/UseDynamicSaleText
Where {caseId:int}
is the id of the sale or project.
Response
TypeResult
Fetch the sale’s text:
You can fetch the sale’s text once you know that Dynamic Sale Text is used on the case. We provide it in a structured format (JSON) and can be fetched using:
Fetch all headers
GET /flow/api/DynamicSaleText/Cases/{caseId:int}/DynamicSaleTextItems
Where {caseId:int}
is is again the sale or project id that you want to get the sale’s text for.
Response
List<DynamicSaleTextMergedItem>
Fetch a specific header
Fetch a specific header by its id:
GET /flow/api/DynamicSaleText/Cases/{caseId:int}/DynamicSaleTextItem/{headerId:int}
Where {caseId:int}
is the sale or project id and {headerId:int}
is the id of the header that you want to get.
Response DynamicSaleTextMergedItem
While updating the header do not compare the DynamicSaleTextMergedItem “UpdatedAt” field with the last “UpdatedAt” of the header. Reason is that if the case specific header is reverted to default header (definition header content) then the “UpdatedAt” field will be definition item’s updated datetime.
Definitions
DynamicSaleTextMergedItem
{
"Id": 26, // The dynamic sale text header id
"ParentId": 5, // The parent dynamic sale text header id
"Header": "Some Title", // Title of the header
"Text": "<p><span>Some text</span></p><br/>", // The content of this header in HTML
"Level": 2, // Level of this header: 1 - H1, 2 -H2, ...
"ShouldNotBePublished": false, // True if the content of this header should not be published
"HasError": false, // True if there are some errors in the template (can be ignored by homepage providers)
"UpdatedAt": "2024-05-06T11:05:46.3641898+02:00"// The date and time when the header was last updated
}
TypeResult
{
"Value": true // The result value
}