referralCampaigns

partially update many existing referralCampaign

Partially update many existing referralCampaign

patch/api/servicereferral/referralCampaigns

Request

  • Base URL
    https://services.fountain.com
  • URL
    https://services.fountain.com/api/servicereferral/referralCampaigns
  • Auth
    HTTP bearer

Request body

uuidstring uuid
createdAtstring date-time
createdBystring uuid
lastUpdatedAtstring date-time
lastUpdatedBystring uuid
lastUpdatedByAudiencestring
lastUpdatedByAudienceUuidstring uuid
lastUpdatedByImpersonatedBystring uuid
lastUpdatedByCompanyUuidstring uuid
lastUpdatedByEnterpriseUuidstring uuid
versionnumber

schema version number

companyUuidstring uuid required
status'draft' | 'published' | 'archived' required
titlestring required
allowedChannelsstring[] nullable
descriptionstring
segmentUuidsstring[]
syncedSegmentUuidsstring[]

Segments the launch work was queued for. Absent on a campaign saved before the field existed. A published campaign whose set differs from segmentUuids still has launch work pending; saving the campaign again queues it.

segmentSyncTokenstring

Changes on every save that changes segmentUuids or status. The service uses it to record queued launch work only for the latest such save.

defaultboolean
limitAvailabilityboolean
customAttributeUuidstring uuid

Example request

[
  {
    "uuid": "f4428d27-c089-40c4-aa83-ce02e1ee1426",
    "createdAt": "2021-05-05T01:02:03.924Z",
    "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
    "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
    "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
    "lastUpdatedByAudience": "employer",
    "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
    "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
    "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
    "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
    "companyUuid": "7623df0c-84ec-4758-8d05-2a105b273f83",
    "status": "draft",
    "title": "Campaign 1",
    "description": "<h1>Refer Someone Today!</h1>",
    "segmentUuids": [
      "08fad9d8-cb47-4b32-8d87-8ef0b7692073"
    ],
    "syncedSegmentUuids": [
      "08fad9d8-cb47-4b32-8d87-8ef0b7692073"
    ],
    "segmentSyncToken": "08fad9d8-cb47-4b32-8d87-8ef0b7692073",
    "virtualSegments": [
      {
        "uuid": "f4428d27-c089-40c4-aa83-ce02e1ee1426",
        "createdAt": "2021-05-05T01:02:03.924Z",
        "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
        "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
        "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
        "lastUpdatedByAudience": "employer",
        "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
        "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
        "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
        "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
        "name": "Houston workers",
        "description": "Segmentation of all drivers located in Houston",
        "filters": "{\"and\":[{\"displayFullName\":{\"regex\":\"test\",\"options\":\"i\"}},{\"personalEmail.email\":{\"regex\":\"mail.com\",\"options\":\"i\"}}]}",
        "filterValues": "0[id]=displayFullName&0[operator]=regex&0[value]=test&1[id]=personalEmail.email&1[operator]=regex&1[value]=mail.com",
        "pipeline": "{\"$addFields\":{\"33b3a7be-3033-4617-9b92-cb0ef311f418\":[{\"eq\":[\"$location\",\"Houston\"]},true,\"$$REMOVE\"]}}",
        "companyUuid": "88aab78c-65f0-4d86-bd61-1e30a24be5aa",
        "subscriptions": [
          {
            "service": "todo",
            "key": "bind_workflow_219edc8d-1394-4757-9bb0-d33eda69838e"
          }
        ],
        "segmentType": "default",
        "dynamicFilters": {
          "event": "startDate",
          "eventOffsetDirection": "before",
          "offsetDays": 30,
          "finalOffsetDirection": "after"
        },
        "observerRecurrence": {
          "type": "annual"
        },
        "baseObserverSegmentUuids": [
          "ee446039-f06a-4b4b-834e-c51aff5b4fe8"
        ],
        "timezone": "America/Chicago"
      }
    ],
    "messages": {
      "email": {
        "subject": "Refer someone to earn rewards",
        "content": "We think you know someone perfect for this job - click this link: ..."
      },
      "sms": {
        "content": "We think you know someone perfect for this job - click this link: ..."
      }
    },
    "incentives": [
      {
        "rewardType": "worker",
        "currency": "USD",
        "cashValue": 100,
        "payoutCondition": "daysAfterHire"
      }
    ],
    "incentive": {
      "rewardType": "worker",
      "currency": "USD",
      "cashValue": 100,
      "payoutCondition": "daysAfterHire"
    },
    "reminder": {
      "messages": {
        "email": {
          "subject": "Refer someone to earn rewards",
          "content": "We think you know someone perfect for this job - click this link: ..."
        },
        "sms": {
          "content": "We think you know someone perfect for this job - click this link: ..."
        }
      }
    },
    "draft": {
      "title": "Campaign 1",
      "segmentUuids": [
        "08fad9d8-cb47-4b32-8d87-8ef0b7692073"
      ],
      "messages": {
        "email": {
          "subject": "Refer someone to earn rewards",
          "content": "We think you know someone perfect for this job - click this link: ..."
        },
        "sms": {
          "content": "We think you know someone perfect for this job - click this link: ..."
        }
      },
      "reminder": {
        "messages": {
          "email": {
            "subject": "Refer someone to earn rewards",
            "content": "We think you know someone perfect for this job - click this link: ..."
          },
          "sms": {
            "content": "We think you know someone perfect for this job - click this link: ..."
          }
        }
      },
      "incentives": [
        {
          "rewardType": "worker",
          "currency": "USD",
          "cashValue": 100,
          "payoutCondition": "daysAfterHire"
        }
      ],
      "incentive": {
        "rewardType": "worker",
        "currency": "USD",
        "cashValue": 100,
        "payoutCondition": "daysAfterHire"
      }
    },
    "virtualCustomAttribute": {
      "uuid": "8223636c5-47f4-43cc-963a-1d1d4e22b665",
      "createdAt": "2021-05-05T01:02:03.924Z",
      "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
      "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
      "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
      "lastUpdatedByAudience": "employer",
      "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
      "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
      "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
      "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
      "companyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
      "label": "Important Attr",
      "key": "can_u_work",
      "dataType": "string",
      "description": "Important Attr",
      "resource": "ComplianceCheckTemplate",
      "resourceIdentifier": "38e7869d-6c42-406f-93e4-5fa687d7f09a",
      "hireDataKeyId": 1,
      "origin": "wx",
      "attributeSectionUuid": "5f7443f4-6ea2-4a87-b19b-b62926ee6bb0"
    }
  }
]

Response

referralCampaigns updated. Wrapped in a JsonAPI root response.

Example response

{
  "data": [
    {
      "uuid": "f4428d27-c089-40c4-aa83-ce02e1ee1426",
      "createdAt": "2021-05-05T01:02:03.924Z",
      "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
      "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
      "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
      "lastUpdatedByAudience": "employer",
      "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
      "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
      "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
      "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
      "companyUuid": "7623df0c-84ec-4758-8d05-2a105b273f83",
      "status": "draft",
      "title": "Campaign 1",
      "description": "<h1>Refer Someone Today!</h1>",
      "segmentUuids": [
        "08fad9d8-cb47-4b32-8d87-8ef0b7692073"
      ],
      "syncedSegmentUuids": [
        "08fad9d8-cb47-4b32-8d87-8ef0b7692073"
      ],
      "segmentSyncToken": "08fad9d8-cb47-4b32-8d87-8ef0b7692073",
      "virtualSegments": [
        {
          "uuid": "f4428d27-c089-40c4-aa83-ce02e1ee1426",
          "createdAt": "2021-05-05T01:02:03.924Z",
          "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
          "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
          "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
          "lastUpdatedByAudience": "employer",
          "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
          "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
          "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
          "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
          "name": "Houston workers",
          "description": "Segmentation of all drivers located in Houston",
          "filters": "{\"and\":[{\"displayFullName\":{\"regex\":\"test\",\"options\":\"i\"}},{\"personalEmail.email\":{\"regex\":\"mail.com\",\"options\":\"i\"}}]}",
          "filterValues": "0[id]=displayFullName&0[operator]=regex&0[value]=test&1[id]=personalEmail.email&1[operator]=regex&1[value]=mail.com",
          "pipeline": "{\"$addFields\":{\"33b3a7be-3033-4617-9b92-cb0ef311f418\":[{\"eq\":[\"$location\",\"Houston\"]},true,\"$$REMOVE\"]}}",
          "companyUuid": "88aab78c-65f0-4d86-bd61-1e30a24be5aa",
          "subscriptions": [
            {
              "service": "todo",
              "key": "bind_workflow_219edc8d-1394-4757-9bb0-d33eda69838e"
            }
          ],
          "segmentType": "default",
          "dynamicFilters": {
            "event": "startDate",
            "eventOffsetDirection": "before",
            "offsetDays": 30,
            "finalOffsetDirection": "after"
          },
          "observerRecurrence": {
            "type": "annual"
          },
          "baseObserverSegmentUuids": [
            "ee446039-f06a-4b4b-834e-c51aff5b4fe8"
          ],
          "timezone": "America/Chicago"
        }
      ],
      "messages": {
        "email": {
          "subject": "Refer someone to earn rewards",
          "content": "We think you know someone perfect for this job - click this link: ..."
        },
        "sms": {
          "content": "We think you know someone perfect for this job - click this link: ..."
        }
      },
      "incentives": [
        {
          "rewardType": "worker",
          "currency": "USD",
          "cashValue": 100,
          "payoutCondition": "daysAfterHire"
        }
      ],
      "incentive": {
        "rewardType": "worker",
        "currency": "USD",
        "cashValue": 100,
        "payoutCondition": "daysAfterHire"
      },
      "reminder": {
        "messages": {
          "email": {
            "subject": "Refer someone to earn rewards",
            "content": "We think you know someone perfect for this job - click this link: ..."
          },
          "sms": {
            "content": "We think you know someone perfect for this job - click this link: ..."
          }
        }
      },
      "draft": {
        "title": "Campaign 1",
        "segmentUuids": [
          "08fad9d8-cb47-4b32-8d87-8ef0b7692073"
        ],
        "messages": {
          "email": {
            "subject": "Refer someone to earn rewards",
            "content": "We think you know someone perfect for this job - click this link: ..."
          },
          "sms": {
            "content": "We think you know someone perfect for this job - click this link: ..."
          }
        },
        "reminder": {
          "messages": {
            "email": {
              "subject": "Refer someone to earn rewards",
              "content": "We think you know someone perfect for this job - click this link: ..."
            },
            "sms": {
              "content": "We think you know someone perfect for this job - click this link: ..."
            }
          }
        },
        "incentives": [
          {
            "rewardType": "worker",
            "currency": "USD",
            "cashValue": 100,
            "payoutCondition": "daysAfterHire"
          }
        ],
        "incentive": {
          "rewardType": "worker",
          "currency": "USD",
          "cashValue": 100,
          "payoutCondition": "daysAfterHire"
        }
      },
      "virtualCustomAttribute": {
        "uuid": "8223636c5-47f4-43cc-963a-1d1d4e22b665",
        "createdAt": "2021-05-05T01:02:03.924Z",
        "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
        "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
        "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
        "lastUpdatedByAudience": "employer",
        "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
        "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
        "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
        "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
        "companyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
        "label": "Important Attr",
        "key": "can_u_work",
        "dataType": "string",
        "description": "Important Attr",
        "resource": "ComplianceCheckTemplate",
        "resourceIdentifier": "38e7869d-6c42-406f-93e4-5fa687d7f09a",
        "hireDataKeyId": 1,
        "origin": "wx",
        "attributeSectionUuid": "5f7443f4-6ea2-4a87-b19b-b62926ee6bb0"
      }
    }
  ],
  "meta": {
    "timestamp": "2021-05-05T09:47:58.924Z",
    "verb": "GET",
    "path": "/api/structure/resources/5949cf7c-fec6-4b31-947c-3aceabff58c5",
    "jti": "%cQN3RIGp",
    "rid": "$2d2zkHZ5",
    "count": 1,
    "status": "200",
    "duration": 17,
    "size": 1234
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.