Campaign

Campaign Service APIs

Facilitates campaign management - create, update, search or schedule campaigns.

Create a campaign.

post

Create's a campaign. On successful campaign creation, Ok response is returned.

Body

The request object, containing all necessary information for creating an campaign and the request body metadata

Responses
200
Campaign created successfully.
application/json
post
POST /campaigns/v1/_create HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 1098

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaign": {
    "tenantId": "tenantA",
    "name": "LLIN 2022",
    "type": "LLIN",
    "beneficiaryType": "HOUSEHOLD",
    "eligibilityCriteria": "INSTRUCTIONS",
    "isRegistrationAndDeliveryCombined": true,
    "startDate": 1663218161,
    "endDate": 1663218161,
    "deliveryStrategy": "FIXED",
    "deliveryProcedure": "INSTRUCTIONS",
    "additionalFields": {},
    "status": "CREATED",
    "campaignSchedules": [
      {
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "noOfRounds": 4,
        "durationBetweenRounds": 30,
        "isRecurring": true,
        "recurringFrequency": 4,
        "durationAndFrequencyUnit": "DAYS",
        "additionalFields": {},
        "tenantId": "tenantA"
      }
    ],
    "campaignRounds": [
      {
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "desiredTargets": {
          "desiredTeamTarget": 100,
          "desiredCoverageTarget": 0.8,
          "desiredPopulationTarget": 1000
        },
        "achievedTargets": {
          "achievedTeamTarget": 100,
          "achievedCoverageTarget": 0.8,
          "achievedPopulationTarget": 1000
        },
        "status": "INPROGRESS",
        "boundaryId": "ID",
        "additionalFields": {},
        "tenantId": "tenantA"
      }
    ],
    "disease": "MALARIA"
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "campaign": {
    "id": "CAMPAIGN-ID-1",
    "tenantId": "tenantA",
    "name": "LLIN 2022",
    "type": "LLIN",
    "beneficiaryType": "HOUSEHOLD",
    "eligibilityCriteria": "INSTRUCTIONS",
    "isRegistrationAndDeliveryCombined": true,
    "startDate": 1663218161,
    "endDate": 1663218161,
    "deliveryStrategy": "FIXED",
    "deliveryProcedure": "INSTRUCTIONS",
    "additionalFields": {},
    "status": "CREATED",
    "campaignSchedules": [
      {
        "campaignScheduleId": "CAMPAIGN-SCHEDULE-ID-1",
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "noOfRounds": 4,
        "durationBetweenRounds": 30,
        "isRecurring": true,
        "recurringFrequency": 4,
        "durationAndFrequencyUnit": "DAYS",
        "additionalFields": {},
        "tenantId": "tenantA",
        "auditDetails": {
          "createdBy": "text",
          "lastModifiedBy": "text",
          "createdTime": 1,
          "lastModifiedTime": 1
        }
      }
    ],
    "campaignRounds": [
      {
        "campaignRoundId": "CAMPAIGN-ROUND-ID-1",
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "desiredTargets": {
          "desiredTeamTarget": 100,
          "desiredCoverageTarget": 0.8,
          "desiredPopulationTarget": 1000
        },
        "achievedTargets": {
          "achievedTeamTarget": 100,
          "achievedCoverageTarget": 0.8,
          "achievedPopulationTarget": 1000
        },
        "status": "INPROGRESS",
        "boundaryId": "ID",
        "additionalFields": {},
        "tenantId": "tenantA",
        "auditDetails": {
          "createdBy": "text",
          "lastModifiedBy": "text",
          "createdTime": 1,
          "lastModifiedTime": 1
        }
      }
    ],
    "disease": "MALARIA",
    "auditDetails": {
      "createdBy": "text",
      "lastModifiedBy": "text",
      "createdTime": 1,
      "lastModifiedTime": 1
    }
  }
}

Update A Campaign.

post

Update A Campaign, Ok response is returned.

Body

The request object, containing all necessary information for updating an campaign and the request body metadata

campaignall ofRequired
and
Responses
200
Updated campaign successfully.
application/json
post
POST /campaigns/v1/_update HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 1117

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaign": {
    "id": "CAMPAIGN-ID",
    "tenantId": "tenantA",
    "name": "LLIN 2022",
    "type": "LLIN",
    "beneficiaryType": "HOUSEHOLD",
    "eligibilityCriteria": "INSTRUCTIONS",
    "isRegistrationAndDeliveryCombined": true,
    "startDate": 1663218161,
    "endDate": 1663218161,
    "deliveryStrategy": "FIXED",
    "deliveryProcedure": "INSTRUCTIONS",
    "additionalFields": {},
    "status": "CREATED",
    "campaignSchedules": [
      {
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "noOfRounds": 4,
        "durationBetweenRounds": 30,
        "isRecurring": true,
        "recurringFrequency": 4,
        "durationAndFrequencyUnit": "DAYS",
        "additionalFields": {},
        "tenantId": "tenantA"
      }
    ],
    "campaignRounds": [
      {
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "desiredTargets": {
          "desiredTeamTarget": 100,
          "desiredCoverageTarget": 0.8,
          "desiredPopulationTarget": 1000
        },
        "achievedTargets": {
          "achievedTeamTarget": 100,
          "achievedCoverageTarget": 0.8,
          "achievedPopulationTarget": 1000
        },
        "status": "INPROGRESS",
        "boundaryId": "ID",
        "additionalFields": {},
        "tenantId": "tenantA"
      }
    ],
    "disease": "MALARIA"
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "campaign": {
    "id": "CAMPAIGN-ID-1",
    "tenantId": "tenantA",
    "name": "LLIN 2022",
    "type": "LLIN",
    "beneficiaryType": "HOUSEHOLD",
    "eligibilityCriteria": "INSTRUCTIONS",
    "isRegistrationAndDeliveryCombined": true,
    "startDate": 1663218161,
    "endDate": 1663218161,
    "deliveryStrategy": "FIXED",
    "deliveryProcedure": "INSTRUCTIONS",
    "additionalFields": {},
    "status": "CREATED",
    "campaignSchedules": [
      {
        "campaignScheduleId": "CAMPAIGN-SCHEDULE-ID-1",
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "noOfRounds": 4,
        "durationBetweenRounds": 30,
        "isRecurring": true,
        "recurringFrequency": 4,
        "durationAndFrequencyUnit": "DAYS",
        "additionalFields": {},
        "tenantId": "tenantA",
        "auditDetails": {
          "createdBy": "text",
          "lastModifiedBy": "text",
          "createdTime": 1,
          "lastModifiedTime": 1
        }
      }
    ],
    "campaignRounds": [
      {
        "campaignRoundId": "CAMPAIGN-ROUND-ID-1",
        "campaignId": "1",
        "startDate": "EPOCH",
        "endDate": "EPOCH",
        "desiredTargets": {
          "desiredTeamTarget": 100,
          "desiredCoverageTarget": 0.8,
          "desiredPopulationTarget": 1000
        },
        "achievedTargets": {
          "achievedTeamTarget": 100,
          "achievedCoverageTarget": 0.8,
          "achievedPopulationTarget": 1000
        },
        "status": "INPROGRESS",
        "boundaryId": "ID",
        "additionalFields": {},
        "tenantId": "tenantA",
        "auditDetails": {
          "createdBy": "text",
          "lastModifiedBy": "text",
          "createdTime": 1,
          "lastModifiedTime": 1
        }
      }
    ],
    "disease": "MALARIA",
    "auditDetails": {
      "createdBy": "text",
      "lastModifiedBy": "text",
      "createdTime": 1,
      "lastModifiedTime": 1
    }
  }
}

Search Campaigns.

post

Search Campaigns Ok response is returned.

Body

The request object, containing all necessary information for updating an campaign and the request body metadata

Responses
200
Fetched Search Campaigns.
application/json
post
POST /campaigns/v1/_search HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 268

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaignSearchCriteria": {
    "id": "CAMPAIGN-ID",
    "name": "LLIN 2022",
    "type": "LLIN",
    "status": "CREATED",
    "limit": 0,
    "offset": 0
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "totalCount": 1,
  "campaigns": [
    {
      "id": "CAMPAIGN-ID-1",
      "tenantId": "tenantA",
      "name": "LLIN 2022",
      "type": "LLIN",
      "beneficiaryType": "HOUSEHOLD",
      "eligibilityCriteria": "INSTRUCTIONS",
      "isRegistrationAndDeliveryCombined": true,
      "startDate": 1663218161,
      "endDate": 1663218161,
      "deliveryStrategy": "FIXED",
      "deliveryProcedure": "INSTRUCTIONS",
      "additionalFields": {},
      "status": "CREATED",
      "campaignSchedules": [
        {
          "campaignScheduleId": "CAMPAIGN-SCHEDULE-ID-1",
          "campaignId": "1",
          "startDate": "EPOCH",
          "endDate": "EPOCH",
          "noOfRounds": 4,
          "durationBetweenRounds": 30,
          "isRecurring": true,
          "recurringFrequency": 4,
          "durationAndFrequencyUnit": "DAYS",
          "additionalFields": {},
          "tenantId": "tenantA",
          "auditDetails": {
            "createdBy": "text",
            "lastModifiedBy": "text",
            "createdTime": 1,
            "lastModifiedTime": 1
          }
        }
      ],
      "campaignRounds": [
        {
          "campaignRoundId": "CAMPAIGN-ROUND-ID-1",
          "campaignId": "1",
          "startDate": "EPOCH",
          "endDate": "EPOCH",
          "desiredTargets": {
            "desiredTeamTarget": 100,
            "desiredCoverageTarget": 0.8,
            "desiredPopulationTarget": 1000
          },
          "achievedTargets": {
            "achievedTeamTarget": 100,
            "achievedCoverageTarget": 0.8,
            "achievedPopulationTarget": 1000
          },
          "status": "INPROGRESS",
          "boundaryId": "ID",
          "additionalFields": {},
          "tenantId": "tenantA",
          "auditDetails": {
            "createdBy": "text",
            "lastModifiedBy": "text",
            "createdTime": 1,
            "lastModifiedTime": 1
          }
        }
      ],
      "disease": "MALARIA",
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}

Create a campaign schedule.

post

Create's a campaign schedule. On successful campaign schedule creation, Ok response is returned.

Body

The request object, containing all necessary information for creating an campaign round and the request body metadata

Responses
200
Campaign schedule created successfully.
application/json
post
POST /campaigns/schedule/v1/_create HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 386

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaignSchedule": {
    "campaignId": "1",
    "startDate": "EPOCH",
    "endDate": "EPOCH",
    "noOfRounds": 4,
    "durationBetweenRounds": 30,
    "isRecurring": true,
    "recurringFrequency": 4,
    "durationAndFrequencyUnit": "DAYS",
    "additionalFields": {},
    "tenantId": "tenantA"
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "campaignRound": {
    "campaignScheduleId": "CAMPAIGN-SCHEDULE-ID-1"
  }
}

Update A Campaign schedule.

post

Update A Campaign, schedule Ok response is returned.

Body

The request object, containing all necessary information for creating an campaign round and the request body metadata

campaignScheduleall ofRequired
Responses
200
Updated campaign schedule successfully.
application/json
post
POST /campaigns/schedule/v1/_update HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 432

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaignSchedule": {
    "campaignScheduleId": "CAMPAIGN-SCHEDULE-ID-1",
    "campaignId": "1",
    "startDate": "EPOCH",
    "endDate": "EPOCH",
    "noOfRounds": 4,
    "durationBetweenRounds": 30,
    "isRecurring": true,
    "recurringFrequency": 4,
    "durationAndFrequencyUnit": "DAYS",
    "additionalFields": {},
    "tenantId": "tenantA"
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "campaignRound": {
    "campaignScheduleId": "CAMPAIGN-SCHEDULE-ID-1"
  }
}

Search Campaigns.

post

Search Campaigns schedule Ok response is returned.

Body

The request object, containing all necessary information for updating an campaign and the request body metadata

Responses
200
Fetched Search Campaign schedule.
application/json
post
POST /campaigns/schedule/v1/_search HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 305

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaignScheduleSearchCriteria": {
    "campaignId": "CAMPAIGN-ID",
    "campaignScheduleId": "schedule-id",
    "startDate": "EPOCH",
    "endDate": "EPOCH",
    "limit": 0,
    "offset": 0
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "totalCount": 1,
  "campaignRounds": [
    {
      "campaignScheduleId": "CAMPAIGN-SCHEDULE-ID-1"
    }
  ]
}

Create a campaign rounds.

post

Create's a campaign round. On successful campaign round creation, Ok response is returned.

Body

The request object, containing all necessary information for creating an campaign round and the request body metadata

Responses
200
Campaign round created successfully.
application/json
post
POST /campaigns/rounds/v1/_create HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 513

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaignRound": {
    "campaignId": "1",
    "startDate": "EPOCH",
    "endDate": "EPOCH",
    "desiredTargets": {
      "desiredTeamTarget": 100,
      "desiredCoverageTarget": 0.8,
      "desiredPopulationTarget": 1000
    },
    "achievedTargets": {
      "achievedTeamTarget": 100,
      "achievedCoverageTarget": 0.8,
      "achievedPopulationTarget": 1000
    },
    "status": "INPROGRESS",
    "boundaryId": "ID",
    "additionalFields": {},
    "tenantId": "tenantA"
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "campaignRound": {
    "campaignRoundId": "CAMPAIGN-ROUND-ID-1"
  }
}

Update A Campaign rounds.

post

Update A Campaign round Ok response is returned.

Body

The request object, containing all necessary information for creating an campaign round and the request body metadata

campaignRoundall ofRequired
Responses
200
Updated campaign round successfully.
application/json
post
POST /campaigns/rounds/v1/_update HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 553

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaignRound": {
    "campaignRoundId": "CAMPAIGN-ROUND-ID-1",
    "campaignId": "1",
    "startDate": "EPOCH",
    "endDate": "EPOCH",
    "desiredTargets": {
      "desiredTeamTarget": 100,
      "desiredCoverageTarget": 0.8,
      "desiredPopulationTarget": 1000
    },
    "achievedTargets": {
      "achievedTeamTarget": 100,
      "achievedCoverageTarget": 0.8,
      "achievedPopulationTarget": 1000
    },
    "status": "INPROGRESS",
    "boundaryId": "ID",
    "additionalFields": {},
    "tenantId": "tenantA"
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "campaignRound": {
    "campaignRoundId": "CAMPAIGN-ROUND-ID-1"
  }
}

Search Campaign rounds.

post

Search Campaign rounds schedule Ok response is returned.

Body

The request object, containing all necessary information for updating an campaign and the request body metadata

Responses
200
Fetched Search Campaign rounds.
application/json
post
POST /campaigns/rounds/v1/_search HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 340

{
  "requestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "campaignSearchCriteria": {
    "campaignId": "CAMPAIGN-ID",
    "campaignRoundId": "round-id",
    "startDate": "EPOCH",
    "endDate": "EPOCH",
    "status": "INPROGRESS",
    "boundaryId": "boundary-id",
    "limit": 0,
    "offset": 0
  }
}
{
  "responseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "totalCount": 1,
  "campaignRounds": [
    {
      "campaignRoundId": "CAMPAIGN-ROUND-ID-1",
      "campaignId": "1",
      "startDate": "EPOCH",
      "endDate": "EPOCH",
      "desiredTargets": {
        "desiredTeamTarget": 100,
        "desiredCoverageTarget": 0.8,
        "desiredPopulationTarget": 1000
      },
      "achievedTargets": {
        "achievedTeamTarget": 100,
        "achievedCoverageTarget": 0.8,
        "achievedPopulationTarget": 1000
      },
      "status": "INPROGRESS",
      "boundaryId": "ID",
      "additionalFields": {},
      "tenantId": "tenantA",
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}

Last updated

Was this helpful?