https://api.salespoints.co/campaign/categorizedtask |
appId: xxxxxxxxxxxxxxxxxxxxxxxxxx data: { "categories": ["example"], "baseData": { "bodyHtml": "Example", "bodyPlain": null, "templateSlug": null, "templateData": [], "from": "[email protected]", "fromTitle": null, "subject": "example", "replyTo": null, "replyToTitle": null, "utmSource": null, "utmCampaign": null }, "recipients": [{ "to": "[email protected]", "replacements": {} },{ "to": "[email protected]", "replacements": {} }] } |
appId: xxxxxxxxxxxxxxxxxxxxxxxxxx data: { "categories": ["example"], "baseData": { "bodyHtml": null, "bodyPlain": null, "templateSlug": "template-xxxxxxxxxxx", "templateData": [], "from": "[email protected]", "fromTitle": null, "subject": "example", "replyTo": null, "replyToTitle": null, "utmSource": null, "utmCampaign": null }, "recipients": [{ "to": "[email protected]", "replacements": {} },{ "to": "[email protected]", "replacements": {} }] } |
appId: xxxxxxxxxxxxxxxxxxxxxxxxxx data: { "categories": ["example"], "baseData": { "bodyHtml": "Example replacement %R#replacement#R%", "bodyPlain": null, "templateSlug": null, "templateData": [], "from": "[email protected]", "fromTitle": null, "subject": "example", "replyTo": null, "replyToTitle": null, "utmSource": null, "utmCampaign": null }, "recipients": [{ "to": "[email protected], "replacements": {"replacement":"example1"}, "metadata": {"metadata1":"value1", "metadata2":"value2"} },{ "to": "[email protected]", "replacements": {"replacement":"example2"}, "metadata": {"metadata1":"value1", "metadata2":"value2"} }] } |
appId: xxxxxxxxxxxxxxxxxxxxxxxxxx data: { "categories": ["example"], "baseData": { "bodyHtml": "Example", "bodyPlain": null, "templateSlug": null, "templateData": [], "from": [ "[email protected]", "[email protected]", "[email protected]" ], "fromTitle": [ "John", "Julie" ], "subject": [ "Example 1", "Example 2", "Example 3" ], "replyTo": null, "replyToTitle": null, "utmSource": null, "utmCampaign": null }, "recipients": [{ "to": "[email protected]", "replacements": {} },{ "to": "[email protected]", "replacements": {} }] } |
Method | Description | |
---|---|---|
setBodyHtml | Required | Html text of campaign |
setFrom | Required | Email address from which is sent * If an array of values is provided, then for each recipient only one random value will be used. |
setSubject | Required | Subject of campaign * If an array of values is provided, then for each recipient only one random value will be used. |
addRecipients | Required | Recipient model that contains parameters setTo(email) , addReplacement($field, $data)($field is replacement name, $data is a replacement value) and addMetadata ($field, $data)($field is key value, $data metadata value) |
setCategories | Required | Array of strings with task categories |
setBodyPlain | Optional | Plain text of campaign |
setFromTitle | Optional | Name of email address from which is sent * If an array of values is provided, then for each recipient only one random value will be used. |
setReplyTo | Optional | Email address where to replay |
setReplyToTitle | Optional | Name of email address where to replay |
attachments | Optional | Attachment of campaign |
metadata | Optional | Additional data for recipient |
setTemplateSlug() | Optional | Identificator of template |