Skip to main content

fax_campaigns

Creates, updates, deletes, gets or lists a fax_campaigns resource.

Overview​

Namefax_campaigns
TypeResource
Idovh.telephony.fax_campaigns

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerThe id of the fax campaign
namestringThe name of the fax campaign
count_failedintegerThe count of failed faxes in the campaign (wire: countFailed)
count_successintegerThe count of success faxes in the campaign (wire: countSuccess)
count_totalintegerThe total count of faxes in the campaign (wire: countTotal)
date_endstring (date-time)The end date of the fax campaign (wire: dateEnd)
date_startstring (date-time)The start date of the fax campaign (wire: dateStart)
referencestringThe reference of the fax campaign
statusstringThe status of the fax campaign

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, id, service_nameGet a campaign. Returns the campaign: name, reference, status, dates, and the number of faxes sent, successful and failed.
listselectbilling_account, service_namex_pagination_modeList campaigns. Returns the identifiers of the fax campaigns of the service. Get a campaign for its status, dates and counters.
createinsertbilling_account, service_name, document_id, name, recipients_type, send_typeCreate a campaign. Creates a campaign that sends a PDF document to a list of numbers or to the numbers of a document. The campaign is sent manually, automatically or at a scheduled date.
deletedeletebilling_account, id, service_nameDelete a campaign. Deletes the fax campaign from the fax service. The campaign no longer appears in the list of campaigns.
startexecbillingAccount, id, serviceNameStart a campaign. Starts sending the campaign to its recipients. Follow the progress with the success and failure counters of the campaign.
stopexecbillingAccount, id, serviceNameStop a campaign. Stops sending the campaign to its recipients. The success and failure counters of the campaign show the faxes sent before the stop.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
billingAccountstringThe name of your billingAccount
billing_accountstringThe name of your billingAccount (wire: billingAccount)
idintegerId of the object
serviceNamestring
service_namestring (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a campaign. Returns the campaign: name, reference, status, dates, and the number of faxes sent, successful and failed.

SELECT
id,
name,
count_failed,
count_success,
count_total,
date_end,
date_start,
reference,
status
FROM ovh.telephony.fax_campaigns
WHERE billing_account = '{{ billing_account }}' -- required
AND id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a campaign. Creates a campaign that sends a PDF document to a list of numbers or to the numbers of a document. The campaign is sent manually, automatically or at a scheduled date.

INSERT INTO ovh.telephony.fax_campaigns (
document_id,
fax_quality,
name,
recipients_doc_id,
recipients_list,
recipients_type,
send_date,
send_type,
billing_account,
service_name
)
SELECT
'{{ document_id }}' /* required */,
'{{ fax_quality }}',
'{{ name }}' /* required */,
'{{ recipients_doc_id }}',
'{{ recipients_list }}',
'{{ recipients_type }}' /* required */,
'{{ send_date }}',
'{{ send_type }}' /* required */,
'{{ billing_account }}',
'{{ service_name }}'
RETURNING
id,
name,
count_failed,
count_success,
count_total,
date_end,
date_start,
reference,
status
;

DELETE examples​

Delete a campaign. Deletes the fax campaign from the fax service. The campaign no longer appears in the list of campaigns.

DELETE FROM ovh.telephony.fax_campaigns
WHERE billing_account = '{{ billing_account }}' --required
AND id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Start a campaign. Starts sending the campaign to its recipients. Follow the progress with the success and failure counters of the campaign.

EXEC ovh.telephony.fax_campaigns.start
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
;