Destinations API - Components

Destinations API Components

This section details the available components and options available for use in the destinations API.

For the overview visit this article.

--Possible Transport + Format Destinations--

box_transport

  • Formats: pdf_format, word_format, xml_format, json_format, images_format

 

device_magic_transport

  • Formats: spreadsheet_format

 

dispatch_transport

  • Formats: xml_format

 

dropbox_transport

  • Formats: pdf_format, word_format, xml_format, json_format, images_format

 

email_transport

  • Formats: text_format, pdf_format, word_format, xml_format, json_format, images_format

 

evernote_transport

  • Formats: text_format, pdf_format, word_format, xml_format, json_format, images_format

 

 

google_drive_transport

  • Formats: spreadsheet_format, pdf_format, word_format, xml_format, json_format, images_format

 

google_spreadsheet_transport

  • Formats: spreadsheet_format

 

http_transport

  • Formats: xml_format, json_format, word_format, pdf_format

 

onedrive_transport

  • Formats: pdf_format, word_format, xml_format, json_format, images_format

 

 

s3_transport

  • Formats: pdf_format, word_format, xml_format, json_format, images_format

 

slack_transport

  • Formats: text_format, pdf_format, word_format, xml_format, json_format, images_format

  

sms_transport

  • Formats: text_format

 

zapier_transport

  • Formats: xml_format, json_format (preferred)

 

 

--Possible Format + Binary Transport Destinations--

All formats except spreadsheet_format

  • Binary Transports: binary_none, binary_box_transport, binary_dropbox_transport, binary_google_drive_transport, binary_s3_transport

 

spreadsheet_format

  • Binary Transports: binary_device_magic_file_transport, binary_box_transport, binary_dropbox_transport, binary_google_drive_transport, binary_s3_transport

 

--Parameters--

Note: To send a file you need filename, file_data and content_type parameters.

e.g.

{
  "pdf_format": {
    "template_docx": {
      "filename": "test_file.docx",
      "content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "file_data": ...base 64 econded file data...
    }
  }  
}

 


Formats:

text_format

include_images   boolean
custom_text_content   boolean
template   text
render_template_as_html   boolean
location_in_coordinate_format   boolean
include_answer_attributes   boolean

 

pdf_format

file_name_template   string
use_new_template_method   boolean
template_docx   file

 

word_format

file_name_template   string
use_new_template_method   boolean
template_docx   file

  

spreadsheet_format

include_submission_meta_data   boolean
timezone_for_submission_metadata_timestamps   boolean

 

xml_format

file_name_template   string

 

json_format

file_name_template   string

 

 

images_format

No settings

 


Transports:

email_transport

to_addresses required if no other address method used string  
to_address_form_field   string  
to_address_device_attribute   string  
allow_no_email   boolean  
       
via_custom_smtp   boolean this must be true to use custom settings
smtp_address   string  
smtp_port   string  
from_domain   string  
username   string  
password   string  
encryption   integer 0 - no_encryption, 1 - tls, 2 - start_tls
auth_scheme   string 'plain', 'login' or 'cram_md5'
from_address   string  
from_name   string  
       
custom_email_content   boolean must be true to use templates
subject_template   text  
body_template   text Only used for non text formats

 

device_magic_transport

No settings

 

http_transport

uri required string
custom_header_keys   object
custom_header_values   object

Note: Custom header keys and values are hashes paired by their keys in the hashes.

e.g.

{ 
  "http_transport": {
    "uri":"http://testurl.com",
    "custom_header_keys":{
      "1":"key1","2":"key2"
    },
    "custom_header_values":{
      "1":"value1","2":"value2"
    }
  }
}

 

sms_transport

to_numbers required if no other to number method is used string
to_number_form_field   string
to_number_device_attribute   string

 

zapier_transport

zapier_webhook_url required string

 

s3_transport

access_key_id required string  
secret_access_key required string  
bucket_name required string  
region required string e.g. us-east-1, sa-east-1, etc
folder_path_template   string  
files_available_publicly   boolean  
filename_is_certain_to_be_unique   boolean  

 

dispatch_transport

dispatch_form_id required integer
dispatch_form_name   string
dispatch_form_description   string
device_ids required array[integer]
form_field_templates required object

NOTE: form_field_templates is an object hash containing the fields you want to pre-populate mapped to their values.

e.g.

{
  "dispatch_form_id": 8,
  "device_ids": ["iPhone_123-124-1234-xzc-35"],
  "dispatch_transport": {
    "form_field_templates": {
      "Free_Text_Question": "Test",
      "Decimal_Question": 25
    }
  }
}

 

Account Transports

The following transports need accounts to have been authorized / created in Device Magic. So first create a destination using the account you want to use for the API and then use the email in the component.

google_drive_transport

google_account_email required string
folder_path_templates   string

 

google_spreadsheet_transport

google_account_email required string
spreadsheet_name_template required string
folder_path   string

 

box_transport

box_account_email required string
folder_path_template   string

 

dropbox_transport

dropbox_account_email required string
folder_path_template   string
generate_share_path   boolean

   


Binary Transports:

binary_s3_transport

access_key_id required string  
secret_access_key required string  
bucket_name required string  
region required string e.g. us-east-1, sa-east-1, etc
folder_path_template   string  
files_available_publicly   boolean  
filename_is_certain_to_be_unique   boolean  

 

 

Binary Account Transports

The following transports need accounts to have been authorized / created in Device Magic. So first create a destination using the account you want to use for the API and then use the email in the component.

binary_google_drive_transport

google_account_email required string
folder_path_templates   string

 

binary_box_transport

box_account_email required string
folder_path_template   string

 

binary_dropbox_transport

dropbox_account_email required string
folder_path_template   string
generate_share_path   boolean

 

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk