Search Project Type Campaign Endpoints
Endpoint
POST /project-type/search
Request Structure
Body Parameters
RequestInfo: Object containing RequestInfo.
CampaignDetails: Object containing the search criteria for campaigns.
tenantId: Tenant identifier.
ids: Array of campaign IDs to search for.
startDate: The start date for the search.
endDate: End date for the search.
projectType: Type of the project.
campaignName: Name of the campaign.
status: Status of the campaign.
createdBy: Creator of the campaign.
campaignNumber: Number of the campaign.
campaignsIncludeDates: Flag to include campaigns based on dates.
pagination: Object containing pagination settings.
limit: Maximum number of results to return.
offset: Offset for paginated results.
sortOrder: Sort order for results (asc/desc).
sortBy: Field to sort results by.
Response Structure
Success Response
ResponseInfo: Object containing ResponseInfo details.
CampaignDetails: Array containing details of matching campaigns.
totalCount: Total number of matching campaigns.
Flow
Client Initiates Request
The client sends a searchCampaign request to the Project Factory Service.
Validate Request
The Project Factory Service validates the request schema and search criteria.
Search Campaigns
The Project Factory Service constructs a search query based on the provided criteria.
It checks if there are specific search fields like start date, end date, campaign name, etc.
Depending on the
campaignsIncludeDatesflag, the service adjusts the search conditions accordingly.If
campaignsIncludeDatesis true:It shows only those campaigns whose start date is on or before the provided start date and whose end date is on or after the provided end date.
If
campaignsIncludeDatesis false:It shows only those campaigns whose start date is on or after the provided start date and whose end date is on or before the provided end date.
The service executes the constructed query to retrieve matching campaign details from the database.
Response
The Project Factory Service sends the response back to the client.
The response contains the matching campaign details along with the total count, if applicable.
Flow Diagram
Was this helpful?