Update

Updates an existing Basic Campaign.

Request

PATCH https://ttv.microworkers.com/api/v2/basic-campaigns/{campaignId}

Parameters

Path Parameter

Name

Type

Description

campaignId

string

The ID of Campaign.

Request Body

{
  "autoRateNokTask": boolean,
  "autoRateOkTask": boolean,
  "autoRefillPositions": boolean,
  "qtRequired": boolean,
  "successRate": integer,
  "maximumJobLimit": {
    "enabled": boolean,
    "limitPerDay": integer,
    "distributionType": string,
    "advancedSchedule": {
      "timeZone": string,
      "limitPerHour": integer,
      "events": [
        {
          "type": string,
          "daysOfWeek": [
            integer
          ],
          "startTime": string,
          "endTime": string,
          "startRecur": datetime,
          "endRecur": datetime,
          "limitPerDay": integer,
          "limitPerHour": integer
        },
        {
          "type": string,
          "start": datetime,
          "end": datetime,
          "allDay": boolean,
          "limitPerDay": integer,
          "limitPerHour": integer
        }
      ]
    },
    "standardSchedule": {
      "timeZone": string,
      "limitPerHour": integer,
      "allDay": boolean,
      "allWeekdays": boolean,
      "daysOfWeek": [
        integer
      ],
      "workingHours": [
        string
      ]
    }
  },
  "autoSkipTask": {
    "enabled": boolean,
    "timeLimit": integer
  },
  "ttr": integer,
  "notificationSettings": [
    {
      "url": string,
      "type": string,
      "notificationTypes": [
        string
      ]
    }
  ],
  "speed": integer,
  "timeToWaitAfterSlotExpiration": integer,
  "visibilityDelay": integer
}

BasicCampaignPatchRequest

Property

Type

Description

autoRateNokTask

boolean

Rate position as not Satisfied automatically if calculated score is less than minimum success score. [1] [2]

autoRateOkTask

boolean

Rate position as Satisfied automatically if calculated score is above or equal to minimum success score. [1] [2]

autoRefillPositions

boolean

Auto-add positions to Campaign.

qtRequired

boolean

Workers with passed Microworkers Qualification/Admission test [3] only allowed.

successRate

integer

Minimum success score. Value of this property used when autoRateNokTask or/and autoRateOkTask are turned on. [1] [2]

speed

integer

Value from 1 to 1000. (1 - Slowest, 1000 - Fastest).

maximumJobLimit

MaximumJobLimitRequest

Maximum positions per day settings. [4]

ttr

integer

Allocated time (in days) to rate submitted Task. Value should be in range 130.

notificationSettings

array[AmazonSqsNotificationSettingRequest]

Queue notification settings.

autoSkipTask

AutoSkipTaskRequest

Auto-skip position settings.

timeToWaitAfterSlotExpiration

integer

Number of seconds to keep slot locked after lock expiration.

visibilityDelay

integer

The number of seconds to wait after adding new position/s, before making it available to the Workers. 0 - No Delay. Maximum: 3600.

MaximumJobLimitRequest

Property

Type

Description

enabled

boolean

Flag which controls if maximum positions per day is turned on.

limitPerDay

integer

Maximum number of positions which may be completed on daily basis. Required if maximum positions per day is turned on.

distributionType

string

Distribution type. random or asap. Default: random.

advancedSchedule

AdvancedScheduleRequest

Advanced schedule. Cannot be used together with standardSchedule.

standardSchedule

StandardScheduleRequest

Standard schedule. Cannot be used together with advancedSchedule.

AdvancedScheduleRequest

Property

Type

Description

timeZone

string

Relative Timezone.

limitPerHour

integer

Maximum accepted jobs per hour.

events

array[RecurEventRequest or OneTimeEventRequest]

List of events.

RecurEventRequest

Property

Type

Description

type

string

Fixed value: recur.

daysOfWeek

array[integer]

Day of week, positions are available. 0 - Sunday, 6 - Saturday.

startTime

string

Start time. Format: HH:00.

endTime

string

End time. Format: HH:00.

startRecur

datetime

Start date.

endRecur

datetime

End date.

limitPerDay

integer

Number of positions available per day.

limitPerHour

integer

Number of positions available per hour.

OneTimeEventRequest

Property

Type

Description

type

string

Fixed value: one-time.

start

datetime

Start date/time.

end

datetime

End date/time.

allDay

boolean

Positions are available 24 hours a day in specified date/time range.

limitPerDay

integer

Number of positions available per day.

limitPerHour

integer

Number of positions available per hour.

StandardScheduleRequest

Property

Type

Description

timeZone

string

Relative Timezone.

limitPerDay

integer

Number of positions available per day.

allDay

boolean

Flag which controls whether positions are available 24 hours a day.

allWeekDays

boolean

Flag which controls whether positions are available every day of the week.

daysOfWeek

array[integer]

Day of week, positions are available. 0 - Sunday, 6 - Saturday. Required if allWeekDays is false.

workingHours

array[string]

Hours of the day positions are available. Required if allDay is false.

AmazonSqsNotificationSettingRequest

Property

Type

Description

url

string

Amazon SQS Queue URL

type

string

Notification settings type. Fixed value: sqs.

notificationTypes

array[string]

List of turned on Notification Types.

AutoSkipTaskRequest

Property

Type

Description

enabled

boolean

Flag which controls If auto-skip position is turned on.

timeLimit

integer

If browser didn’t refresh the session within allocated time in seconds – position will be auto-skipped. Required if auto-skip position flag is turned on.

Notification Types

Notification Type

CampaignApproved

CampaignPausedByAdmin

CampaignRunning

SlotNotSatisfied

SlotSubmitted

CampaignBlocked

CampaignPausedBySystem

CampaignSubmitted

SlotReadyForRating

TaskGroupCreated

CampaignCanceled

CampaignRejected

SlotCreated

SlotRemoved

CampaignCreated

CampaignRestartApproved

SlotLocked

SlotRevised

CampaignFinished

CampaignRestartRejected

SlotLockExpired

SlotReviseRequested

CampaignPaused

CampaignRestartRequested

SlotLockReleased

SlotSatisfied

Response

Response HTTP Codes

Http Code

Response Type

Description

204

No Content (OK)

400

Validation Failed

401

Unauthorized

403

Access denied

404

Not found