Trigger orchestration
curl --request POST \
--url https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate \
--header 'Authorization: Bearer <token>'import requests
url = "https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate', 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://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate"
req, _ := http.NewRequest("POST", 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.post("https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"triggered": true,
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orchestrationAddressId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalAmount": "150.000000",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"depositIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"offrampTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Orchestration Addresses
Trigger orchestration
Manually trigger settlement for an orchestration address.
POST
/
v3
/
users
/
{userId}
/
orchestration-addresses
/
{orchestrationAddressId}
/
orchestrate
Trigger orchestration
curl --request POST \
--url https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate \
--header 'Authorization: Bearer <token>'import requests
url = "https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate', 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://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate"
req, _ := http.NewRequest("POST", 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.post("https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/orchestration-addresses/{orchestrationAddressId}/orchestrate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"triggered": true,
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orchestrationAddressId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalAmount": "150.000000",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"depositIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"offrampTransactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the user.
Pattern:
^user_[A-Za-z0-9]+$ID of the orchestration address.
Response
Result of POST /orchestrate. Either a freshly-created batch
(triggered: true, with batch populated) or an idempotent no-op
(triggered: false, with reason indicating why).
- Option 1
- Option 2
Result of a manual POST /orchestrate call. Either a freshly-created batch
(triggered: true) or an idempotent no-op (triggered: false).
⌘I