Delivery Files
curl --request GET \
--url https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files', 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://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"company_id": 1,
"file": "part-00001-cefc489b-7d3b-4409-8632-19122002bbd3-c000.json",
"size": 8022466827,
"subscription_id": "31ebdb17-6799-4447-a99c-6e3aa8da3237",
"transaction_batch_id": "f6eeafa3-d599-4469-825c-bf0da93f68af",
"timestamp": "2022-04-20T23:37:39Z"
},
{
"company_id": 1,
"file": "part-00002-cefc489b-7d3b-4409-8632-19122002bbd3-c000.json",
"size": 8022349030,
"subscription_id": "31ebdb17-6799-4447-a99c-6e3aa8da3237",
"transaction_batch_id": "f6eeafa3-d599-4469-825c-bf0da93f68af",
"timestamp": "2022-04-20T23:36:52Z"
}
]App API
Delivery Files
Lists delivery files for a particular delivery command.
GET
/
v1
/
app
/
commands
/
delivery
/
{delivery_id}
/
files
Delivery Files
curl --request GET \
--url https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files', 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://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/v1/app/commands/delivery/{delivery_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"company_id": 1,
"file": "part-00001-cefc489b-7d3b-4409-8632-19122002bbd3-c000.json",
"size": 8022466827,
"subscription_id": "31ebdb17-6799-4447-a99c-6e3aa8da3237",
"transaction_batch_id": "f6eeafa3-d599-4469-825c-bf0da93f68af",
"timestamp": "2022-04-20T23:37:39Z"
},
{
"company_id": 1,
"file": "part-00002-cefc489b-7d3b-4409-8632-19122002bbd3-c000.json",
"size": 8022349030,
"subscription_id": "31ebdb17-6799-4447-a99c-6e3aa8da3237",
"transaction_batch_id": "f6eeafa3-d599-4469-825c-bf0da93f68af",
"timestamp": "2022-04-20T23:36:52Z"
}
]Path Parameters
Unique identifier for an delivery record.
Response
200 - application/json
OK
Example:
[ { "company_id": 1, "file": "part-00001-cefc489b-7d3b-4409-8632-19122002bbd3-c000.json", "size": 8022466827, "subscription_id": "31ebdb17-6799-4447-a99c-6e3aa8da3237", "transaction_batch_id": "f6eeafa3-d599-4469-825c-bf0da93f68af", "timestamp": "2022-04-20T23:37:39Z" }, { "company_id": 1, "file": "part-00002-cefc489b-7d3b-4409-8632-19122002bbd3-c000.json", "size": 8022349030, "subscription_id": "31ebdb17-6799-4447-a99c-6e3aa8da3237", "transaction_batch_id": "f6eeafa3-d599-4469-825c-bf0da93f68af", "timestamp": "2022-04-20T23:36:52Z" } ]
Was this page helpful?
⌘I

