Skip to main content
POST
/
_api
/
offerings
/
{offeringId}
/
orders
Create order
curl --request POST \
  --url https://dev.go.simplytokenized.com/_api/offerings/{offeringId}/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "units": "<string>"
}
'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', units: '<string>'})
};

fetch('https://dev.go.simplytokenized.com/_api/offerings/{offeringId}/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://dev.go.simplytokenized.com/_api/offerings/{offeringId}/orders"

payload = {
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"units": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.go.simplytokenized.com/_api/offerings/{offeringId}/orders",
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([
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'units' => '<string>'
]),
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;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://dev.go.simplytokenized.com/_api/offerings/{offeringId}/orders"

payload := strings.NewReader("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"units\": \"<string>\"\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))

}
HttpResponse<String> response = Unirest.post("https://dev.go.simplytokenized.com/_api/offerings/{offeringId}/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"units\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dev.go.simplytokenized.com/_api/offerings/{offeringId}/orders")

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 \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"units\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "offering": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "symbol": "<string>",
    "blockchain": "<string>",
    "tokenization_platform": "<string>",
    "decimals": 123,
    "type": "<string>",
    "price_per_token": "<string>"
  },
  "units": "<string>",
  "total_amount": 123,
  "payment_provider": "bank_transfer",
  "paid_at": "<string>",
  "paid_amount": 123,
  "currency": "<string>",
  "status": "<string>",
  "bank_account": {
    "account_holder": "<string>",
    "bank": "<string>",
    "bic": "<string>",
    "iban": "<string>",
    "currency": "<string>"
  },
  "created_at": "<string>",
  "updated_at": "<string>"
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}
{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>",
"errors": [
"<unknown>"
]
}
}

Authorizations

Authorization
string
header
required

Bearer access token from POST /_api/auth

Path Parameters

offeringId
string<uuid>
required

offeringId identifier

Body

application/json
account_id
string<uuid>
required
units
string
required

Token amount in the smallest unit (integer string). Example with decimals 8 — 10 tokens = "10000000000".

Response

Created

id
string<uuid>
required
offering
object
required
units
string
required
total_amount
number
required
payment_provider
enum<string>
required
Available options:
bank_transfer
paid_at
string | null
required
paid_amount
number
required
currency
string | null
required
status
string
required
bank_account
object
required
created_at
string | null
required
updated_at
string | null
required