Create Asset Move Type
curl --request POST \
--url https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"metadata": {}
}
'import requests
url = "https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move"
payload = {
"code": "<string>",
"metadata": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', metadata: {}})
};
fetch('https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move', 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.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move",
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([
'code' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"metadata": {}
}Classification Types
Create Asset Move Type
POST
/
v1
/
ledger
/
{ledger_key}
/
type
/
asset-move
Create Asset Move Type
curl --request POST \
--url https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"metadata": {}
}
'import requests
url = "https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move"
payload = {
"code": "<string>",
"metadata": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', metadata: {}})
};
fetch('https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move', 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.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move",
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([
'code' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/type/asset-move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"metadata": {}
}Headers
The Basic Authentication header. Format: "Basic {base64(orgID:apiKey)}"
Path Parameters
The key of the ledger. Examples:
- "123e4567-e89b-12d3-a456-426614174000"
- "id:123e4567-e89b-12d3-a456-426614174000"
- "ref:ledger:customer_a"
Body
application/json
The code of the type. This code will be unique across the ledger and will be used to reference the type. For account types this could be something like 'checking' or 'savings', for asset move types this could be 'remittance' or 'withdrawal'. And for asset move decline types this could be 'invalid_destination'
Minimum string length:
1Additional, optional, metadata for the type
Show child attributes
Show child attributes