Delivery Commands
curl --request GET \
--url https://api-dev.narrative.io/v1/app/commands/delivery \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/v1/app/commands/delivery"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/v1/app/commands/delivery")
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{
"records": [
{
"metadata": {
"revision": 42,
"timestamp": "2021-11-23T20:37:32.452Z"
},
"payload_type": "PerformDelivery",
"payload": {
"subscriptionId": "0889d6d0-d31b-4196-b2fd-66e219f2e5e4",
"transactionBatchId": "4202d94d-41eb-4e45-9468-fd75d47804ac",
"profileId": "d13867f7-a6c0-4f83-b129-f6c6f2de7c15",
"quickSettings": {
"bucketprefix": "/mydelivery"
}
}
}
]
}App API
Delivery Commands
Lists delivery commands this app has access to.
GET
/
v1
/
app
/
commands
/
delivery
Delivery Commands
curl --request GET \
--url https://api-dev.narrative.io/v1/app/commands/delivery \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/v1/app/commands/delivery"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/v1/app/commands/delivery")
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{
"records": [
{
"metadata": {
"revision": 42,
"timestamp": "2021-11-23T20:37:32.452Z"
},
"payload_type": "PerformDelivery",
"payload": {
"subscriptionId": "0889d6d0-d31b-4196-b2fd-66e219f2e5e4",
"transactionBatchId": "4202d94d-41eb-4e45-9468-fd75d47804ac",
"profileId": "d13867f7-a6c0-4f83-b129-f6c6f2de7c15",
"quickSettings": {
"bucketprefix": "/mydelivery"
}
}
}
]
}Response
200 - application/json
OK
Show child attributes
Show child attributes
Was this page helpful?
⌘I

