curl --request POST \
--url https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_template": "<string>",
"day_of_week": 3,
"day_of_month": 16,
"week_of_month": 3,
"auto_send": true,
"attach_xls": false,
"include_credit_memos": true,
"include_disputed_items": false,
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"cc_secondary_contacts": false,
"external_roles_to_cc": [],
"internal_roles_to_cc": []
}
'import requests
url = "https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule"
payload = {
"email_template": "<string>",
"day_of_week": 3,
"day_of_month": 16,
"week_of_month": 3,
"auto_send": True,
"attach_xls": False,
"include_credit_memos": True,
"include_disputed_items": False,
"cc": ["<string>"],
"bcc": ["<string>"],
"cc_secondary_contacts": False,
"external_roles_to_cc": [],
"internal_roles_to_cc": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_template: '<string>',
day_of_week: 3,
day_of_month: 16,
week_of_month: 3,
auto_send: true,
attach_xls: false,
include_credit_memos: true,
include_disputed_items: false,
cc: ['<string>'],
bcc: ['<string>'],
cc_secondary_contacts: false,
external_roles_to_cc: [],
internal_roles_to_cc: []
})
};
fetch('https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email_template' => '<string>',
'day_of_week' => 3,
'day_of_month' => 16,
'week_of_month' => 3,
'auto_send' => true,
'attach_xls' => false,
'include_credit_memos' => true,
'include_disputed_items' => false,
'cc' => [
'<string>'
],
'bcc' => [
'<string>'
],
'cc_secondary_contacts' => false,
'external_roles_to_cc' => [
],
'internal_roles_to_cc' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule"
payload := strings.NewReader("{\n \"email_template\": \"<string>\",\n \"day_of_week\": 3,\n \"day_of_month\": 16,\n \"week_of_month\": 3,\n \"auto_send\": true,\n \"attach_xls\": false,\n \"include_credit_memos\": true,\n \"include_disputed_items\": false,\n \"cc\": [\n \"<string>\"\n ],\n \"bcc\": [\n \"<string>\"\n ],\n \"cc_secondary_contacts\": false,\n \"external_roles_to_cc\": [],\n \"internal_roles_to_cc\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_template\": \"<string>\",\n \"day_of_week\": 3,\n \"day_of_month\": 16,\n \"week_of_month\": 3,\n \"auto_send\": true,\n \"attach_xls\": false,\n \"include_credit_memos\": true,\n \"include_disputed_items\": false,\n \"cc\": [\n \"<string>\"\n ],\n \"bcc\": [\n \"<string>\"\n ],\n \"cc_secondary_contacts\": false,\n \"external_roles_to_cc\": [],\n \"internal_roles_to_cc\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_template\": \"<string>\",\n \"day_of_week\": 3,\n \"day_of_month\": 16,\n \"week_of_month\": 3,\n \"auto_send\": true,\n \"attach_xls\": false,\n \"include_credit_memos\": true,\n \"include_disputed_items\": false,\n \"cc\": [\n \"<string>\"\n ],\n \"bcc\": [\n \"<string>\"\n ],\n \"cc_secondary_contacts\": false,\n \"external_roles_to_cc\": [],\n \"internal_roles_to_cc\": []\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"is_active": true,
"frequency": "weekly",
"day_of_week": 123,
"day_of_month": 123,
"week_of_month": 123,
"biweekly_anchor_date": "2023-12-25",
"include_credit_memos": true,
"include_disputed_items": true,
"auto_send": true,
"attach_xls": true,
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"cc_secondary_contacts": true,
"external_roles_to_cc": [
"<string>"
],
"internal_roles_to_cc": [
"<string>"
],
"email_template": {
"id": "<string>",
"name": "<string>"
},
"object": "<string>"
}{
"type": "request-validation",
"status": 422,
"title": "<string>",
"errors": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"detail": "<string>"
}Create a statement schedule for a workflow
The schedule controls when recurring account statements are sent for partners on the workflow.
curl --request POST \
--url https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_template": "<string>",
"day_of_week": 3,
"day_of_month": 16,
"week_of_month": 3,
"auto_send": true,
"attach_xls": false,
"include_credit_memos": true,
"include_disputed_items": false,
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"cc_secondary_contacts": false,
"external_roles_to_cc": [],
"internal_roles_to_cc": []
}
'import requests
url = "https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule"
payload = {
"email_template": "<string>",
"day_of_week": 3,
"day_of_month": 16,
"week_of_month": 3,
"auto_send": True,
"attach_xls": False,
"include_credit_memos": True,
"include_disputed_items": False,
"cc": ["<string>"],
"bcc": ["<string>"],
"cc_secondary_contacts": False,
"external_roles_to_cc": [],
"internal_roles_to_cc": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_template: '<string>',
day_of_week: 3,
day_of_month: 16,
week_of_month: 3,
auto_send: true,
attach_xls: false,
include_credit_memos: true,
include_disputed_items: false,
cc: ['<string>'],
bcc: ['<string>'],
cc_secondary_contacts: false,
external_roles_to_cc: [],
internal_roles_to_cc: []
})
};
fetch('https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email_template' => '<string>',
'day_of_week' => 3,
'day_of_month' => 16,
'week_of_month' => 3,
'auto_send' => true,
'attach_xls' => false,
'include_credit_memos' => true,
'include_disputed_items' => false,
'cc' => [
'<string>'
],
'bcc' => [
'<string>'
],
'cc_secondary_contacts' => false,
'external_roles_to_cc' => [
],
'internal_roles_to_cc' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule"
payload := strings.NewReader("{\n \"email_template\": \"<string>\",\n \"day_of_week\": 3,\n \"day_of_month\": 16,\n \"week_of_month\": 3,\n \"auto_send\": true,\n \"attach_xls\": false,\n \"include_credit_memos\": true,\n \"include_disputed_items\": false,\n \"cc\": [\n \"<string>\"\n ],\n \"bcc\": [\n \"<string>\"\n ],\n \"cc_secondary_contacts\": false,\n \"external_roles_to_cc\": [],\n \"internal_roles_to_cc\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_template\": \"<string>\",\n \"day_of_week\": 3,\n \"day_of_month\": 16,\n \"week_of_month\": 3,\n \"auto_send\": true,\n \"attach_xls\": false,\n \"include_credit_memos\": true,\n \"include_disputed_items\": false,\n \"cc\": [\n \"<string>\"\n ],\n \"bcc\": [\n \"<string>\"\n ],\n \"cc_secondary_contacts\": false,\n \"external_roles_to_cc\": [],\n \"internal_roles_to_cc\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/outreach-workflows/{workflow_id}/statement-schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_template\": \"<string>\",\n \"day_of_week\": 3,\n \"day_of_month\": 16,\n \"week_of_month\": 3,\n \"auto_send\": true,\n \"attach_xls\": false,\n \"include_credit_memos\": true,\n \"include_disputed_items\": false,\n \"cc\": [\n \"<string>\"\n ],\n \"bcc\": [\n \"<string>\"\n ],\n \"cc_secondary_contacts\": false,\n \"external_roles_to_cc\": [],\n \"internal_roles_to_cc\": []\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"is_active": true,
"frequency": "weekly",
"day_of_week": 123,
"day_of_month": 123,
"week_of_month": 123,
"biweekly_anchor_date": "2023-12-25",
"include_credit_memos": true,
"include_disputed_items": true,
"auto_send": true,
"attach_xls": true,
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"cc_secondary_contacts": true,
"external_roles_to_cc": [
"<string>"
],
"internal_roles_to_cc": [
"<string>"
],
"email_template": {
"id": "<string>",
"name": "<string>"
},
"object": "<string>"
}{
"type": "request-validation",
"status": 422,
"title": "<string>",
"errors": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
],
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
weekly, biweekly, monthly Email template ID
0 <= x <= 61 <= x <= 311 <= x <= 5billing_contact, executive, economic_user account_manager, account_executive, csm, lead, co_lead, practice_lead Response
Successful Response
How often to send the statement
weekly, biweekly, monthly Day of week (0=Monday, 6=Sunday). Required for WEEKLY/BIWEEKLY.
Day of month (1-31). Required for MONTHLY day-of-month mode. Falls back to last day if month is shorter.
Week occurrence (1-5, where 5=last). Used with day_of_week for monthly day-of-week mode.
Anchor date for biweekly cadence calculation. Required for BIWEEKLY.
If True, always attach an XLS to the scheduled statement, ignoring partner.is_xls_attachments_enabled.
Show child attributes
Show child attributes
String representing the object's type. Objects of the same type share the same value.
