Trace Connect APIs
- Introduction
- Authentication using JWT
- OAuth 2.0
- Basic APIs
- Advanced APIs
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 '{
"id": "<string>",
"transaction_payments": [
{
"id": "<string>",
"premium_details": {
"id": "<string>",
"options": [
{
"id": "<string>",
"name": "<string>",
"amount": 123,
"is_active": true,
"creator": "<string>",
"updater": "<string>"
}
],
"category": "PAYOUT",
"name": "<string>",
"type": "PER_TRANSACTION",
"amount": 123,
"included": true,
"dependant_on_card": true,
"applicable_activity": "BUY",
"calculation_type": "NORMAL",
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"currency_details": {
"id": "<string>",
"name": "<string>",
"code": "<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,
"method": "CARD",
"payment_type": "TRANSACTION",
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"amount": "<string>",
"currency": "<string>",
"submissions": [
{
"id": "<string>",
"form_details": {
"id": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"id": "<string>",
"label": "<string>",
"key": "<string>",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"form_type": "TRANSACTION",
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"values": [
{
"id": "<string>",
"field_details": {
"id": "<string>",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"field": "<string>",
"value": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"creator": "<string>",
"updater": "<string>",
"form": "<string>",
"product": "<string>"
}
],
"card_details": {
"id": "<string>",
"card_id": "<string>",
"display_id": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"currency_details": {
"id": "<string>",
"name": "<string>",
"code": "<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,
"method": "CARD",
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"product": "<string>",
"parents": [
"<string>"
]
}'
{
"id": "<string>",
"transaction_payments": [
{
"id": "<string>",
"premium_details": {
"id": "<string>",
"options": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"name": "<string>",
"amount": 123,
"is_active": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"category": "PAYOUT",
"name": "<string>",
"type": "PER_TRANSACTION",
"amount": 123,
"included": true,
"dependant_on_card": true,
"applicable_activity": "BUY",
"calculation_type": "NORMAL",
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"currency_details": {
"id": "<string>",
"name": "<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,
"method": "CARD",
"payment_type": "TRANSACTION",
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"amount": "<string>",
"currency": "<string>",
"type": "<string>",
"source_quantity": "<string>",
"current_quantity": "<string>",
"submissions": [
{
"id": "<string>",
"form_details": {
"id": "<string>",
"products": [
{
"id": "<string>",
"premiums": "<string>",
"is_active": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"fields": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"key": "<string>",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"form_type": "TRANSACTION",
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"values": [
{
"id": "<string>",
"field_details": {
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"field": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"value": "<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>",
"product": "<string>"
}
],
"card_details": {
"id": "<string>",
"card_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": {
"id": "<string>",
"name": "<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,
"method": "CARD",
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"product": "<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.
1 - 100
1 - 25
PAYOUT
, TRANSACTION
PER_TRANSACTION
, PER_KG
, PER_UNIT_CURRENCY
, PER_FARMER
BUY
, SELL
NORMAL
, MANUAL
, OPTIONS
1
10
100
CARD
, INVOICE
, NONE
TRANSACTION
, PREMIUM
, TRANSACTION_PREMIUM
100
The currency used in the transaction.
1
Array of submissions associated with the product transaction.
1
1 - 100
1 - 100
TEXT
, INTEGER
, FLOAT
, RADIO
, MULTI_SELECT
, EMAIL
, PHONE
, DATE
, BOOLEAN
, DROPDOWN
100
100
100
100
100
100
100
1 - 100
TEXT
, INTEGER
, FLOAT
, RADIO
, MULTI_SELECT
, EMAIL
, PHONE
, DATE
, BOOLEAN
, DROPDOWN
100
100
100
100
100
100
100
1 - 100
1 - 100
TRANSACTION
, FARMER
, PAYMENT
, PRODUCT
The number associated with the transaction.
10
Date and time when the transaction was created.
The date of the transaction.
The invoice number associated with the transaction.
100
The 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.
1 - 100
1 - 25
PAYOUT
, TRANSACTION
PER_TRANSACTION
, PER_KG
, PER_UNIT_CURRENCY
, PER_FARMER
BUY
, SELL
NORMAL
, MANUAL
, OPTIONS
1
10
100
CARD
, INVOICE
, NONE
TRANSACTION
, PREMIUM
, TRANSACTION_PREMIUM
100
The currency used in the transaction.
1
The 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.
1
1 - 100
1 - 100
TEXT
, INTEGER
, FLOAT
, RADIO
, MULTI_SELECT
, EMAIL
, PHONE
, DATE
, BOOLEAN
, DROPDOWN
100
100
100
100
100
100
100
1 - 100
TEXT
, INTEGER
, FLOAT
, RADIO
, MULTI_SELECT
, EMAIL
, PHONE
, DATE
, BOOLEAN
, DROPDOWN
100
100
100
100
100
100
100
Name of the product.
1 - 500
Unique identifier for the product.
Premiums associated with the product.
Indicates whether the product is currently active.
Date and time when the product information was last updated.
Date and time when the product was created.
Description of the product.
500
URL to the image or photo of the product.
Identifier of the user who created the product.
Identifier of the user who last updated the product.
1 - 100
1 - 100
TRANSACTION
, FARMER
, PAYMENT
, PRODUCT
Details of the card used in the transaction.
Date and time when the transaction was last updated.
The number associated with the transaction.
10
Date 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.
100
The 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.
curl --request POST \
--url http://localhost:3000/connect/v1/transactions/product-transactions/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"id": "<string>",
"transaction_payments": [
{
"id": "<string>",
"premium_details": {
"id": "<string>",
"options": [
{
"id": "<string>",
"name": "<string>",
"amount": 123,
"is_active": true,
"creator": "<string>",
"updater": "<string>"
}
],
"category": "PAYOUT",
"name": "<string>",
"type": "PER_TRANSACTION",
"amount": 123,
"included": true,
"dependant_on_card": true,
"applicable_activity": "BUY",
"calculation_type": "NORMAL",
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"currency_details": {
"id": "<string>",
"name": "<string>",
"code": "<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,
"method": "CARD",
"payment_type": "TRANSACTION",
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"amount": "<string>",
"currency": "<string>",
"submissions": [
{
"id": "<string>",
"form_details": {
"id": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"id": "<string>",
"label": "<string>",
"key": "<string>",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"form_type": "TRANSACTION",
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"values": [
{
"id": "<string>",
"field_details": {
"id": "<string>",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"field": "<string>",
"value": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"creator": "<string>",
"updater": "<string>",
"form": "<string>",
"product": "<string>"
}
],
"card_details": {
"id": "<string>",
"card_id": "<string>",
"display_id": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"currency_details": {
"id": "<string>",
"name": "<string>",
"code": "<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,
"method": "CARD",
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"product": "<string>",
"parents": [
"<string>"
]
}'
{
"id": "<string>",
"transaction_payments": [
{
"id": "<string>",
"premium_details": {
"id": "<string>",
"options": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"name": "<string>",
"amount": 123,
"is_active": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"category": "PAYOUT",
"name": "<string>",
"type": "PER_TRANSACTION",
"amount": 123,
"included": true,
"dependant_on_card": true,
"applicable_activity": "BUY",
"calculation_type": "NORMAL",
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"currency_details": {
"id": "<string>",
"name": "<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,
"method": "CARD",
"payment_type": "TRANSACTION",
"amount": 123,
"selected_option": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"premium": "<string>",
"transaction": "<string>",
"submissions": [
"<string>"
]
}
],
"amount": "<string>",
"currency": "<string>",
"type": "<string>",
"source_quantity": "<string>",
"current_quantity": "<string>",
"submissions": [
{
"id": "<string>",
"form_details": {
"id": "<string>",
"products": [
{
"id": "<string>",
"premiums": "<string>",
"is_active": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"fields": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"key": "<string>",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"form_type": "TRANSACTION",
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"values": [
{
"id": "<string>",
"field_details": {
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"field": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"value": "<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>",
"product": "<string>"
}
],
"card_details": {
"id": "<string>",
"card_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": {
"id": "<string>",
"name": "<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,
"method": "CARD",
"quality_correction": 123,
"quantity": "<string>",
"creator": "<string>",
"updater": "<string>",
"source": "<string>",
"destination": "<string>",
"card": "<string>",
"product": "<string>",
"parents": [
"<string>"
]
}