Initiate loan tape upload
Step 1 of the upload flow. Provide the loan type (e.g. “Auto”, “Personal”). The gateway resolves the asset type ID, creates a new deal (or reuses an existing DRAFT), and returns an upload URL valid for 1 hour. If a DRAFT deal already exists for the same loan type it will be reused and a fresh URL issued.
POST
/
v1
/
api
/
originator
/
loans
Initiate loan tape upload
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'Auto'})
};
fetch('https://api.9squid.com/v1/api/originator/loans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.9squid.com/v1/api/originator/loans"
payload = { "type": "Auto" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.9squid.com/v1/api/originator/loans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "Auto"
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.9squid.com/v1/api/originator/loans"
payload := strings.NewReader("{\n \"type\": \"Auto\"\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.9squid.com/v1/api/originator/loans",
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([
'type' => 'Auto'
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://api.9squid.com/v1/api/originator/loans")
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 \"type\": \"Auto\"\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api.9squid.com/v1/api/originator/loans");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"type\": \"Auto\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
import Foundation
let parameters = ["type": "Auto"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.9squid.com/v1/api/originator/loans")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"type\": \"Auto\"\n}")
val request = Request.Builder()
.url("https://api.9squid.com/v1/api/originator/loans")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"success": true,
"data": {
"deal_id": "deal_abc123",
"upload_url": "https://api.9squid.com/v1/api/originator/loans/upload?u=<token>",
"file_name": "a1b2c3d4.upload",
"expires_in": 3600
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Loan type (e.g. "Auto", "Personal")
Example:
"Auto"
⌘I
Initiate loan tape upload
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'Auto'})
};
fetch('https://api.9squid.com/v1/api/originator/loans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.9squid.com/v1/api/originator/loans"
payload = { "type": "Auto" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.9squid.com/v1/api/originator/loans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "Auto"
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.9squid.com/v1/api/originator/loans"
payload := strings.NewReader("{\n \"type\": \"Auto\"\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.9squid.com/v1/api/originator/loans",
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([
'type' => 'Auto'
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://api.9squid.com/v1/api/originator/loans")
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 \"type\": \"Auto\"\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api.9squid.com/v1/api/originator/loans");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"type\": \"Auto\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
import Foundation
let parameters = ["type": "Auto"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.9squid.com/v1/api/originator/loans")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"type\": \"Auto\"\n}")
val request = Request.Builder()
.url("https://api.9squid.com/v1/api/originator/loans")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"success": true,
"data": {
"deal_id": "deal_abc123",
"upload_url": "https://api.9squid.com/v1/api/originator/loans/upload?u=<token>",
"file_name": "a1b2c3d4.upload",
"expires_in": 3600
}
}