Advice and answers from the Device Magic Team

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

pdf_format

word_format

spreadsheet_format

xml_format

json_format

images_format

No settings

Transports:

email_transport

device_magic_transport

No settings

http_transport

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

zapier_transport

s3_transport

dispatch_transport

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_spreadsheet_transport

box_transport

dropbox_transport

Binary Transports:

binary_s3_transport

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

binary_box_transport

binary_dropbox_transport

Did this answer your question?