Skip to main content
POST
/
api
/
v1
/
submission
/
{id}
/
transfer-to-ftp
Transfer Document to FTP
curl --request POST \
  --url https://vision.pingintel.com/api/v1/submission/{id}/transfer-to-ftp \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'X-FTP-Password: <x-ftp-password>' \
  --data '
{
  "ftp": {
    "host": "<string>",
    "username": "<string>",
    "port": 22
  },
  "remote_path": "<string>",
  "file_uri": "<string>",
  "filename": "<string>"
}
'
import requests

url = "https://vision.pingintel.com/api/v1/submission/{id}/transfer-to-ftp"

payload = {
"ftp": {
"host": "<string>",
"username": "<string>",
"port": 22
},
"remote_path": "<string>",
"file_uri": "<string>",
"filename": "<string>"
}
headers = {
"X-FTP-Password": "<x-ftp-password>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'X-FTP-Password': '<x-ftp-password>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ftp: {host: '<string>', username: '<string>', port: 22},
remote_path: '<string>',
file_uri: '<string>',
filename: '<string>'
})
};

fetch('https://vision.pingintel.com/api/v1/submission/{id}/transfer-to-ftp', 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://vision.pingintel.com/api/v1/submission/{id}/transfer-to-ftp",
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([
'ftp' => [
'host' => '<string>',
'username' => '<string>',
'port' => 22
],
'remote_path' => '<string>',
'file_uri' => '<string>',
'filename' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"X-FTP-Password: <x-ftp-password>"
],
]);

$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://vision.pingintel.com/api/v1/submission/{id}/transfer-to-ftp"

payload := strings.NewReader("{\n \"ftp\": {\n \"host\": \"<string>\",\n \"username\": \"<string>\",\n \"port\": 22\n },\n \"remote_path\": \"<string>\",\n \"file_uri\": \"<string>\",\n \"filename\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-FTP-Password", "<x-ftp-password>")
req.Header.Add("Authorization", "<api-key>")
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://vision.pingintel.com/api/v1/submission/{id}/transfer-to-ftp")
.header("X-FTP-Password", "<x-ftp-password>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ftp\": {\n \"host\": \"<string>\",\n \"username\": \"<string>\",\n \"port\": 22\n },\n \"remote_path\": \"<string>\",\n \"file_uri\": \"<string>\",\n \"filename\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://vision.pingintel.com/api/v1/submission/{id}/transfer-to-ftp")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-FTP-Password"] = '<x-ftp-password>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ftp\": {\n \"host\": \"<string>\",\n \"username\": \"<string>\",\n \"port\": 22\n },\n \"remote_path\": \"<string>\",\n \"file_uri\": \"<string>\",\n \"filename\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "message": "<string>",
  "filename": "<string>"
}
{
"message": "<string>"
}
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>"
}
{
"detail": "<string>"
}

Authorizations

Authorization
string
header
required

Supports Token-prefixed API keys and Bearer-prefixed JWT-based authentication.

Headers

X-FTP-Password
string
required

FTP password.

X-FTP-Private-Key
string

Private key content for key-based authentication.

Path Parameters

id
string
required

The pingid of the submission.

Body

ftp
object
required
remote_path
string
required

Desired remote FTP path that Ping will write the document to. Should include the destination filename. If filename and file_uri are not included then the destination filename in this path must match the requested SubmissionDocument filename.

file_uri
string

Full download URI of the document (e.g., '/api/v1/submission/{pingid}/document/document.pdf' or 'https://domain.com/api/v1/submission/{pingid}/document/document.pdf'). Cannot be used together with filename.

filename
string

Name of the document in the submission to transfer (e.g., 'document.pdf'). Cannot be used together with file_uri.

Response

message
string
required
filename
string