curl --request POST \
--url http://localhost:3000/connect/v1/transactions/product-transactions/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"source": "<string>",
"destination": "<string>",
"product": "<string>",
"id": "<string>",
"transaction_payments": [
{
"source": "<string>",
"destination": "<string>",
"id": "<string>",
"currency": "<string>",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"currency": "<string>",
"submissions": [
{
"values": [
{
"field": "<string>",
"value": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"form": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>",
"product": "<string>"
}
],
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"parents": [
"<string>"
]
}
'import requests
url = "http://localhost:3000/connect/v1/transactions/product-transactions/"
payload = {
"amount": "<string>",
"source": "<string>",
"destination": "<string>",
"product": "<string>",
"id": "<string>",
"transaction_payments": [
{
"source": "<string>",
"destination": "<string>",
"id": "<string>",
"currency": "<string>",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": ["<string>"]
}
],
"currency": "<string>",
"submissions": [
{
"values": [
{
"field": "<string>",
"value": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"form": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>",
"product": "<string>"
}
],
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"parents": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
source: '<string>',
destination: '<string>',
product: '<string>',
id: '<string>',
transaction_payments: [
{
source: '<string>',
destination: '<string>',
id: '<string>',
currency: '<string>',
number: '<string>',
created_on: '2023-11-07T05:31:56Z',
date: '2023-11-07T05:31:56Z',
invoice_number: '<string>',
verification_latitude: 123,
verification_longitude: 123,
amount: 123,
selected_option: '<string>',
creator: '<string>',
updater: '<string>',
card: '<string>',
premium: '<string>',
transaction: '<string>',
submissions: ['<string>']
}
],
currency: '<string>',
submissions: [
{
values: [
{
field: '<string>',
value: '<string>',
id: '<string>',
creator: '<string>',
updater: '<string>'
}
],
form: '<string>',
id: '<string>',
creator: '<string>',
updater: '<string>',
product: '<string>'
}
],
number: '<string>',
created_on: '2023-11-07T05:31:56Z',
date: '2023-11-07T05:31:56Z',
invoice_number: '<string>',
verification_latitude: 123,
verification_longitude: 123,
quality_correction: 123,
quantity: '<string>',
creator: '<string>',
updater: '<string>',
card: '<string>',
parents: ['<string>']
})
};
fetch('http://localhost:3000/connect/v1/transactions/product-transactions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/connect/v1/transactions/product-transactions/",
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([
'amount' => '<string>',
'source' => '<string>',
'destination' => '<string>',
'product' => '<string>',
'id' => '<string>',
'transaction_payments' => [
[
'source' => '<string>',
'destination' => '<string>',
'id' => '<string>',
'currency' => '<string>',
'number' => '<string>',
'created_on' => '2023-11-07T05:31:56Z',
'date' => '2023-11-07T05:31:56Z',
'invoice_number' => '<string>',
'verification_latitude' => 123,
'verification_longitude' => 123,
'amount' => 123,
'selected_option' => '<string>',
'creator' => '<string>',
'updater' => '<string>',
'card' => '<string>',
'premium' => '<string>',
'transaction' => '<string>',
'submissions' => [
'<string>'
]
]
],
'currency' => '<string>',
'submissions' => [
[
'values' => [
[
'field' => '<string>',
'value' => '<string>',
'id' => '<string>',
'creator' => '<string>',
'updater' => '<string>'
]
],
'form' => '<string>',
'id' => '<string>',
'creator' => '<string>',
'updater' => '<string>',
'product' => '<string>'
]
],
'number' => '<string>',
'created_on' => '2023-11-07T05:31:56Z',
'date' => '2023-11-07T05:31:56Z',
'invoice_number' => '<string>',
'verification_latitude' => 123,
'verification_longitude' => 123,
'quality_correction' => 123,
'quantity' => '<string>',
'creator' => '<string>',
'updater' => '<string>',
'card' => '<string>',
'parents' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "http://localhost:3000/connect/v1/transactions/product-transactions/"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"product\": \"<string>\",\n \"id\": \"<string>\",\n \"transaction_payments\": [\n {\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"amount\": 123,\n \"selected_option\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"premium\": \"<string>\",\n \"transaction\": \"<string>\",\n \"submissions\": [\n \"<string>\"\n ]\n }\n ],\n \"currency\": \"<string>\",\n \"submissions\": [\n {\n \"values\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\"\n }\n ],\n \"form\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"product\": \"<string>\"\n }\n ],\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"quality_correction\": 123,\n \"quantity\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"parents\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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("http://localhost:3000/connect/v1/transactions/product-transactions/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"product\": \"<string>\",\n \"id\": \"<string>\",\n \"transaction_payments\": [\n {\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"amount\": 123,\n \"selected_option\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"premium\": \"<string>\",\n \"transaction\": \"<string>\",\n \"submissions\": [\n \"<string>\"\n ]\n }\n ],\n \"currency\": \"<string>\",\n \"submissions\": [\n {\n \"values\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\"\n }\n ],\n \"form\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"product\": \"<string>\"\n }\n ],\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"quality_correction\": 123,\n \"quantity\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"parents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/connect/v1/transactions/product-transactions/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"product\": \"<string>\",\n \"id\": \"<string>\",\n \"transaction_payments\": [\n {\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"amount\": 123,\n \"selected_option\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"premium\": \"<string>\",\n \"transaction\": \"<string>\",\n \"submissions\": [\n \"<string>\"\n ]\n }\n ],\n \"currency\": \"<string>\",\n \"submissions\": [\n {\n \"values\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\"\n }\n ],\n \"form\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"product\": \"<string>\"\n }\n ],\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"quality_correction\": 123,\n \"quantity\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"parents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "<string>",
"source": "<string>",
"destination": "<string>",
"product": "<string>",
"id": "<string>",
"transaction_payments": [
{
"source": "<string>",
"destination": "<string>",
"id": "<string>",
"premium_details": {
"name": "<string>",
"id": "<string>",
"options": [
{
"name": "<string>",
"amount": 123,
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"is_active": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"amount": 123,
"included": true,
"dependant_on_card": true,
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"currency_details": {
"name": "<string>",
"id": "<string>",
"code": "<string>"
},
"type": "<string>",
"currency": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice": "<string>",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"currency": "<string>",
"type": "<string>",
"source_quantity": "<string>",
"current_quantity": "<string>",
"submissions": [
{
"values": [
{
"field": "<string>",
"value": "<string>",
"id": "<string>",
"field_details": {
"label": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>"
}
],
"form": "<string>",
"id": "<string>",
"form_details": {
"fields": [
{
"label": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"owner": "<string>",
"id": "<string>",
"products": [
{
"name": "<string>",
"id": "<string>",
"premiums": "<string>",
"is_active": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"description": "<string>",
"image": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"label": "<string>",
"key": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>",
"product": "<string>"
}
],
"card_details": {
"card_id": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"display_id": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"currency_details": {
"name": "<string>",
"id": "<string>",
"code": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice": "<string>",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"parents": [
"<string>"
]
}Create Product Transaction Endpoint
This API endpoint allows you to create a product transaction within the supply chain system. By sending a POST request to the specified endpoint, you can initiate a product transaction, including transaction payments and submission details.
curl --request POST \
--url http://localhost:3000/connect/v1/transactions/product-transactions/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"source": "<string>",
"destination": "<string>",
"product": "<string>",
"id": "<string>",
"transaction_payments": [
{
"source": "<string>",
"destination": "<string>",
"id": "<string>",
"currency": "<string>",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"currency": "<string>",
"submissions": [
{
"values": [
{
"field": "<string>",
"value": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"form": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>",
"product": "<string>"
}
],
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"parents": [
"<string>"
]
}
'import requests
url = "http://localhost:3000/connect/v1/transactions/product-transactions/"
payload = {
"amount": "<string>",
"source": "<string>",
"destination": "<string>",
"product": "<string>",
"id": "<string>",
"transaction_payments": [
{
"source": "<string>",
"destination": "<string>",
"id": "<string>",
"currency": "<string>",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": ["<string>"]
}
],
"currency": "<string>",
"submissions": [
{
"values": [
{
"field": "<string>",
"value": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"form": "<string>",
"id": "<string>",
"creator": "<string>",
"updater": "<string>",
"product": "<string>"
}
],
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"parents": ["<string>"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
source: '<string>',
destination: '<string>',
product: '<string>',
id: '<string>',
transaction_payments: [
{
source: '<string>',
destination: '<string>',
id: '<string>',
currency: '<string>',
number: '<string>',
created_on: '2023-11-07T05:31:56Z',
date: '2023-11-07T05:31:56Z',
invoice_number: '<string>',
verification_latitude: 123,
verification_longitude: 123,
amount: 123,
selected_option: '<string>',
creator: '<string>',
updater: '<string>',
card: '<string>',
premium: '<string>',
transaction: '<string>',
submissions: ['<string>']
}
],
currency: '<string>',
submissions: [
{
values: [
{
field: '<string>',
value: '<string>',
id: '<string>',
creator: '<string>',
updater: '<string>'
}
],
form: '<string>',
id: '<string>',
creator: '<string>',
updater: '<string>',
product: '<string>'
}
],
number: '<string>',
created_on: '2023-11-07T05:31:56Z',
date: '2023-11-07T05:31:56Z',
invoice_number: '<string>',
verification_latitude: 123,
verification_longitude: 123,
quality_correction: 123,
quantity: '<string>',
creator: '<string>',
updater: '<string>',
card: '<string>',
parents: ['<string>']
})
};
fetch('http://localhost:3000/connect/v1/transactions/product-transactions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/connect/v1/transactions/product-transactions/",
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([
'amount' => '<string>',
'source' => '<string>',
'destination' => '<string>',
'product' => '<string>',
'id' => '<string>',
'transaction_payments' => [
[
'source' => '<string>',
'destination' => '<string>',
'id' => '<string>',
'currency' => '<string>',
'number' => '<string>',
'created_on' => '2023-11-07T05:31:56Z',
'date' => '2023-11-07T05:31:56Z',
'invoice_number' => '<string>',
'verification_latitude' => 123,
'verification_longitude' => 123,
'amount' => 123,
'selected_option' => '<string>',
'creator' => '<string>',
'updater' => '<string>',
'card' => '<string>',
'premium' => '<string>',
'transaction' => '<string>',
'submissions' => [
'<string>'
]
]
],
'currency' => '<string>',
'submissions' => [
[
'values' => [
[
'field' => '<string>',
'value' => '<string>',
'id' => '<string>',
'creator' => '<string>',
'updater' => '<string>'
]
],
'form' => '<string>',
'id' => '<string>',
'creator' => '<string>',
'updater' => '<string>',
'product' => '<string>'
]
],
'number' => '<string>',
'created_on' => '2023-11-07T05:31:56Z',
'date' => '2023-11-07T05:31:56Z',
'invoice_number' => '<string>',
'verification_latitude' => 123,
'verification_longitude' => 123,
'quality_correction' => 123,
'quantity' => '<string>',
'creator' => '<string>',
'updater' => '<string>',
'card' => '<string>',
'parents' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "http://localhost:3000/connect/v1/transactions/product-transactions/"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"product\": \"<string>\",\n \"id\": \"<string>\",\n \"transaction_payments\": [\n {\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"amount\": 123,\n \"selected_option\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"premium\": \"<string>\",\n \"transaction\": \"<string>\",\n \"submissions\": [\n \"<string>\"\n ]\n }\n ],\n \"currency\": \"<string>\",\n \"submissions\": [\n {\n \"values\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\"\n }\n ],\n \"form\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"product\": \"<string>\"\n }\n ],\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"quality_correction\": 123,\n \"quantity\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"parents\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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("http://localhost:3000/connect/v1/transactions/product-transactions/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"product\": \"<string>\",\n \"id\": \"<string>\",\n \"transaction_payments\": [\n {\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"amount\": 123,\n \"selected_option\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"premium\": \"<string>\",\n \"transaction\": \"<string>\",\n \"submissions\": [\n \"<string>\"\n ]\n }\n ],\n \"currency\": \"<string>\",\n \"submissions\": [\n {\n \"values\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\"\n }\n ],\n \"form\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"product\": \"<string>\"\n }\n ],\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"quality_correction\": 123,\n \"quantity\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"parents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/connect/v1/transactions/product-transactions/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"product\": \"<string>\",\n \"id\": \"<string>\",\n \"transaction_payments\": [\n {\n \"source\": \"<string>\",\n \"destination\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"amount\": 123,\n \"selected_option\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"premium\": \"<string>\",\n \"transaction\": \"<string>\",\n \"submissions\": [\n \"<string>\"\n ]\n }\n ],\n \"currency\": \"<string>\",\n \"submissions\": [\n {\n \"values\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\"\n }\n ],\n \"form\": \"<string>\",\n \"id\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"product\": \"<string>\"\n }\n ],\n \"number\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"invoice_number\": \"<string>\",\n \"verification_latitude\": 123,\n \"verification_longitude\": 123,\n \"quality_correction\": 123,\n \"quantity\": \"<string>\",\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"card\": \"<string>\",\n \"parents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "<string>",
"source": "<string>",
"destination": "<string>",
"product": "<string>",
"id": "<string>",
"transaction_payments": [
{
"source": "<string>",
"destination": "<string>",
"id": "<string>",
"premium_details": {
"name": "<string>",
"id": "<string>",
"options": [
{
"name": "<string>",
"amount": 123,
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"is_active": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"amount": 123,
"included": true,
"dependant_on_card": true,
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"currency_details": {
"name": "<string>",
"id": "<string>",
"code": "<string>"
},
"type": "<string>",
"currency": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice": "<string>",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"currency": "<string>",
"type": "<string>",
"source_quantity": "<string>",
"current_quantity": "<string>",
"submissions": [
{
"values": [
{
"field": "<string>",
"value": "<string>",
"id": "<string>",
"field_details": {
"label": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>"
}
],
"form": "<string>",
"id": "<string>",
"form_details": {
"fields": [
{
"label": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"owner": "<string>",
"id": "<string>",
"products": [
{
"name": "<string>",
"id": "<string>",
"premiums": "<string>",
"is_active": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"description": "<string>",
"image": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"label": "<string>",
"key": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>",
"product": "<string>"
}
],
"card_details": {
"card_id": "<string>",
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"display_id": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"currency_details": {
"name": "<string>",
"id": "<string>",
"code": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"number": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"date": "2023-11-07T05:31:56Z",
"invoice": "<string>",
"invoice_number": "<string>",
"verification_latitude": 123,
"verification_longitude": 123,
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"card": "<string>",
"parents": [
"<string>"
]
}Authorizations
Body
The amount of the transaction.
The source of the transaction.
The destination of the transaction.
The product associated with the transaction.
Unique identifier for the transaction.
Array of payment transactions associated with the product transaction.
Show child attributes
Show child attributes
The currency used in the transaction.
1Array of submissions associated with the product transaction.
Show child attributes
Show child attributes
Details of the card used in the transaction.
Show child attributes
Show child attributes
Details of the currency used in the transaction.
Show child attributes
Show child attributes
The number associated with the transaction.
10Date and time when the transaction was created.
The date of the transaction.
The invoice number associated with the transaction.
100The latitude of verification in the transaction.
The longitude of verification in the transaction.
The method used in the transaction.
CARD, INVOICE, NONE The quality correction value in the transaction.
The quantity associated with the transaction.
Identifier of the user who created the transaction.
Identifier of the user who last updated the transaction.
The card used in the transaction.
Array of parent transactions associated with the product transaction.
Response
The amount of the transaction.
The source of the transaction.
The destination of the transaction.
The product associated with the transaction.
Unique identifier for the transaction.
Array of payment transactions associated with the product transaction.
Show child attributes
Show child attributes
The currency used in the transaction.
1The type of the transaction.
The quantity from the source in the transaction.
The current quantity in the transaction.
Array of submissions associated with the product transaction.
Show child attributes
Show child attributes
Details of the card used in the transaction.
Show child attributes
Show child attributes
Details of the currency used in the transaction.
Show child attributes
Show child attributes
Date and time when the transaction was last updated.
The number associated with the transaction.
10Date and time when the transaction was created.
The date of the transaction.
The invoice associated with the transaction.
The invoice number associated with the transaction.
100The latitude of verification in the transaction.
The longitude of verification in the transaction.
The method used in the transaction.
CARD, INVOICE, NONE The quality correction value in the transaction.
The quantity associated with the transaction.
Identifier of the user who created the transaction.
Identifier of the user who last updated the transaction.
The card used in the transaction.
Array of parent transactions associated with the product transaction.
