curl --request POST \
--url https://api.vori.com/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"quantity": "199.99",
"retail_price": "199.99",
"store_product_id": "<string>",
"total": "199.99",
"discount_total": "-199.99",
"item_modifiers": [
{
"amount": "199.99",
"item_modifier_id": "<string>"
}
],
"promo_savings": "-199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"weight": "199.99"
}
],
"payments": [
{
"amount": "199.99",
"external_transaction_id": "<string>",
"account_number_last4": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"gift_card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"store_id": "<string>",
"tax_total": "199.99",
"total": "199.99",
"employee_id": "<string>",
"external_id": "<string>",
"gift_card_sales": [
{
"amount": "199.99",
"physical_barcode": "<string>",
"recipient_phone_number": "<string>"
}
],
"lane_id": "<string>",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"shopper_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.vori.com/v1/transactions"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"quantity": "199.99",
"retail_price": "199.99",
"store_product_id": "<string>",
"total": "199.99",
"discount_total": "-199.99",
"item_modifiers": [
{
"amount": "199.99",
"item_modifier_id": "<string>"
}
],
"promo_savings": "-199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"weight": "199.99"
}
],
"payments": [
{
"amount": "199.99",
"external_transaction_id": "<string>",
"account_number_last4": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"gift_card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"store_id": "<string>",
"tax_total": "199.99",
"total": "199.99",
"employee_id": "<string>",
"external_id": "<string>",
"gift_card_sales": [
{
"amount": "199.99",
"physical_barcode": "<string>",
"recipient_phone_number": "<string>"
}
],
"lane_id": "<string>",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"shopper_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
completed_at: '2023-11-07T05:31:56Z',
line_items: [
{
quantity: '199.99',
retail_price: '199.99',
store_product_id: '<string>',
total: '199.99',
discount_total: '-199.99',
item_modifiers: [{amount: '199.99', item_modifier_id: '<string>'}],
promo_savings: '-199.99',
tax_total: '199.99',
taxable_amount: '199.99',
weight: '199.99'
}
],
payments: [
{
amount: '199.99',
external_transaction_id: '<string>',
account_number_last4: '<string>',
completed_at: '2023-11-07T05:31:56Z',
gift_card_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
store_id: '<string>',
tax_total: '199.99',
total: '199.99',
employee_id: '<string>',
external_id: '<string>',
gift_card_sales: [
{
amount: '199.99',
physical_barcode: '<string>',
recipient_phone_number: '<string>'
}
],
lane_id: '<string>',
metadata: {order_source: 'shopify', fulfillment_id: '88213'},
shopper_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.vori.com/v1/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_URL => "https://api.vori.com/v1/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([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'completed_at' => '2023-11-07T05:31:56Z',
'line_items' => [
[
'quantity' => '199.99',
'retail_price' => '199.99',
'store_product_id' => '<string>',
'total' => '199.99',
'discount_total' => '-199.99',
'item_modifiers' => [
[
'amount' => '199.99',
'item_modifier_id' => '<string>'
]
],
'promo_savings' => '-199.99',
'tax_total' => '199.99',
'taxable_amount' => '199.99',
'weight' => '199.99'
]
],
'payments' => [
[
'amount' => '199.99',
'external_transaction_id' => '<string>',
'account_number_last4' => '<string>',
'completed_at' => '2023-11-07T05:31:56Z',
'gift_card_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'store_id' => '<string>',
'tax_total' => '199.99',
'total' => '199.99',
'employee_id' => '<string>',
'external_id' => '<string>',
'gift_card_sales' => [
[
'amount' => '199.99',
'physical_barcode' => '<string>',
'recipient_phone_number' => '<string>'
]
],
'lane_id' => '<string>',
'metadata' => [
'order_source' => 'shopify',
'fulfillment_id' => '88213'
],
'shopper_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://api.vori.com/v1/transactions"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"line_items\": [\n {\n \"quantity\": \"199.99\",\n \"retail_price\": \"199.99\",\n \"store_product_id\": \"<string>\",\n \"total\": \"199.99\",\n \"discount_total\": \"-199.99\",\n \"item_modifiers\": [\n {\n \"amount\": \"199.99\",\n \"item_modifier_id\": \"<string>\"\n }\n ],\n \"promo_savings\": \"-199.99\",\n \"tax_total\": \"199.99\",\n \"taxable_amount\": \"199.99\",\n \"weight\": \"199.99\"\n }\n ],\n \"payments\": [\n {\n \"amount\": \"199.99\",\n \"external_transaction_id\": \"<string>\",\n \"account_number_last4\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"gift_card_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"store_id\": \"<string>\",\n \"tax_total\": \"199.99\",\n \"total\": \"199.99\",\n \"employee_id\": \"<string>\",\n \"external_id\": \"<string>\",\n \"gift_card_sales\": [\n {\n \"amount\": \"199.99\",\n \"physical_barcode\": \"<string>\",\n \"recipient_phone_number\": \"<string>\"\n }\n ],\n \"lane_id\": \"<string>\",\n \"metadata\": {\n \"order_source\": \"shopify\",\n \"fulfillment_id\": \"88213\"\n },\n \"shopper_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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://api.vori.com/v1/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"line_items\": [\n {\n \"quantity\": \"199.99\",\n \"retail_price\": \"199.99\",\n \"store_product_id\": \"<string>\",\n \"total\": \"199.99\",\n \"discount_total\": \"-199.99\",\n \"item_modifiers\": [\n {\n \"amount\": \"199.99\",\n \"item_modifier_id\": \"<string>\"\n }\n ],\n \"promo_savings\": \"-199.99\",\n \"tax_total\": \"199.99\",\n \"taxable_amount\": \"199.99\",\n \"weight\": \"199.99\"\n }\n ],\n \"payments\": [\n {\n \"amount\": \"199.99\",\n \"external_transaction_id\": \"<string>\",\n \"account_number_last4\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"gift_card_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"store_id\": \"<string>\",\n \"tax_total\": \"199.99\",\n \"total\": \"199.99\",\n \"employee_id\": \"<string>\",\n \"external_id\": \"<string>\",\n \"gift_card_sales\": [\n {\n \"amount\": \"199.99\",\n \"physical_barcode\": \"<string>\",\n \"recipient_phone_number\": \"<string>\"\n }\n ],\n \"lane_id\": \"<string>\",\n \"metadata\": {\n \"order_source\": \"shopify\",\n \"fulfillment_id\": \"88213\"\n },\n \"shopper_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vori.com/v1/transactions")
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 \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"line_items\": [\n {\n \"quantity\": \"199.99\",\n \"retail_price\": \"199.99\",\n \"store_product_id\": \"<string>\",\n \"total\": \"199.99\",\n \"discount_total\": \"-199.99\",\n \"item_modifiers\": [\n {\n \"amount\": \"199.99\",\n \"item_modifier_id\": \"<string>\"\n }\n ],\n \"promo_savings\": \"-199.99\",\n \"tax_total\": \"199.99\",\n \"taxable_amount\": \"199.99\",\n \"weight\": \"199.99\"\n }\n ],\n \"payments\": [\n {\n \"amount\": \"199.99\",\n \"external_transaction_id\": \"<string>\",\n \"account_number_last4\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"gift_card_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"store_id\": \"<string>\",\n \"tax_total\": \"199.99\",\n \"total\": \"199.99\",\n \"employee_id\": \"<string>\",\n \"external_id\": \"<string>\",\n \"gift_card_sales\": [\n {\n \"amount\": \"199.99\",\n \"physical_barcode\": \"<string>\",\n \"recipient_phone_number\": \"<string>\"\n }\n ],\n \"lane_id\": \"<string>\",\n \"metadata\": {\n \"order_source\": \"shopify\",\n \"fulfillment_id\": \"88213\"\n },\n \"shopper_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"cashback_amount": "199.99",
"completed_at": "2023-11-07T05:31:56Z",
"coupon_total": "199.99",
"discount_total": "199.99",
"employee_id": "<string>",
"external_id": "<string>",
"gift_card_sales": [
{
"id": "<string>",
"amount": "199.99",
"gift_card_id": "<string>",
"gift_card_transaction_id": "<string>"
}
],
"gift_card_sales_total": "199.99",
"issued_coupons": [
{
"id": "<string>",
"coupon_code": "<string>",
"coupon_id": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"offer_benefit_value": "199.99",
"snap_incentive_program_id": "<string>",
"started_at": "2023-11-07T05:31:56Z"
}
],
"item_modifier_total": "199.99",
"lane_id": "<string>",
"line_items": [
{
"id": "<string>",
"coupon_total": "199.99",
"coupons": [
{
"id": "<string>",
"applied_amount": "199.99",
"coupon_code": "<string>",
"coupon_id": "<string>",
"offer_display_text": "<string>",
"offer_id": "<string>"
}
],
"department_id": "<string>",
"discount_total": "199.99",
"discounts": [
{
"id": "<string>",
"applied_amount": "199.99",
"discount_id": "<string>",
"discount_name": "<string>",
"discount_type": "amount_off",
"discount_value": "199.99"
}
],
"ebt_tax_waived_total": "199.99",
"free_quantity": "199.99",
"item_modifier_total": "199.99",
"item_modifiers": [
{
"id": "<string>",
"amount": "199.99",
"item_modifier_id": "<string>",
"quantity": "199.99",
"tax_amount": "199.99",
"taxes": [
{
"id": "<string>",
"amount": "199.99",
"tax_rate": {
"id": "<string>",
"category": "other",
"name": "<string>",
"value": "8.25",
"value_type": "amount"
}
}
]
}
],
"loyalty_rewards": [
{
"id": "<string>",
"applied_amount": "199.99",
"loyalty_reward_id": "<string>",
"loyalty_reward_name": "<string>",
"offer_id": "<string>",
"order_loyalty_reward_id": "<string>"
}
],
"loyalty_rewards_total": "199.99",
"product": {
"id": "<string>",
"barcode": "<string>",
"brand": "<string>",
"ebt_enabled": true,
"name": "<string>",
"sold_by_weight": true,
"unit_of_measure": "<string>",
"unit_of_measure_amount": "199.99",
"wic_enabled": true
},
"promo_savings": "199.99",
"promotions": [
{
"id": "<string>",
"amount": "199.99",
"display_text": "<string>",
"offer_id": "<string>",
"promotion_id": "<string>",
"savings": "199.99"
}
],
"quantity": "199.99",
"refunded_order_line_item_id": "<string>",
"retail_price": "199.99",
"retail_total": "199.99",
"subtotal": "199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"taxes": [
{
"id": "<string>",
"amount": "199.99",
"tax_rate": {
"id": "<string>",
"category": "other",
"name": "<string>",
"value": "8.25",
"value_type": "amount"
}
}
],
"total": "199.99",
"transaction_type": "refund",
"type": "refund",
"variable_weights": [
{
"id": "<string>",
"variable_weight": {
"id": "<string>",
"name": "<string>",
"unit": "LBS",
"value": "199.99"
}
}
],
"wic_adjusted_price": "199.99"
}
],
"loyalty_rewards_total": "199.99",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"payments": [
{
"id": "<string>",
"authorized_amount": "199.99",
"card_brand": "american_express",
"card_last4": "<string>",
"cash_received": "199.99",
"cashback_amount": "199.99",
"change_returned": "199.99",
"completed_at": "2023-11-07T05:31:56Z",
"payment_type": "cash",
"requested_amount": "199.99",
"reversals": [
{
"id": "<string>",
"authorized_amount": "199.99",
"card_brand": "american_express",
"card_last4": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"payment_type": "cash",
"requested_amount": "199.99"
}
],
"terminal_was_online": true,
"till_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tip_amount": "199.99"
}
],
"points_earned": "199.99",
"promo_savings": "199.99",
"promo_total": "199.99",
"receipt_type": "email",
"refund_total": "199.99",
"refunds": [
{
"id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"employee_id": "<string>",
"lane_id": "<string>",
"shopper_facing_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"store_id": "<string>",
"subtotal": "199.99",
"tax_total": "199.99",
"total": "199.99"
}
],
"retail_total": "199.99",
"shopper_facing_id": "<string>",
"shopper_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "api",
"started_at": "2023-11-07T05:31:56Z",
"status": "completed",
"store_id": "<string>",
"subtotal": "199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"tip_amount": "199.99",
"total": "199.99",
"total_collected": "199.99",
"type": "refund"
}{
"error_code": "invalid_store"
}{
"error_code": "insufficient_permissions",
"error_details": {
"action": "*",
"resource": "*"
}
}{
"error_code": "transaction_already_exists",
"error_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Create a transaction
Records a transaction your own system processed, such as an order taken on your website. Send a UUIDv7 as id; sending the same transaction again under that ID returns the transaction already recorded rather than creating a second, and sending different values under it is rejected. Only store_id is needed to attribute the transaction: Vori maintains a lane and an employee for this purpose and records it against them.
curl --request POST \
--url https://api.vori.com/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"quantity": "199.99",
"retail_price": "199.99",
"store_product_id": "<string>",
"total": "199.99",
"discount_total": "-199.99",
"item_modifiers": [
{
"amount": "199.99",
"item_modifier_id": "<string>"
}
],
"promo_savings": "-199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"weight": "199.99"
}
],
"payments": [
{
"amount": "199.99",
"external_transaction_id": "<string>",
"account_number_last4": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"gift_card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"store_id": "<string>",
"tax_total": "199.99",
"total": "199.99",
"employee_id": "<string>",
"external_id": "<string>",
"gift_card_sales": [
{
"amount": "199.99",
"physical_barcode": "<string>",
"recipient_phone_number": "<string>"
}
],
"lane_id": "<string>",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"shopper_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.vori.com/v1/transactions"
payload = {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"quantity": "199.99",
"retail_price": "199.99",
"store_product_id": "<string>",
"total": "199.99",
"discount_total": "-199.99",
"item_modifiers": [
{
"amount": "199.99",
"item_modifier_id": "<string>"
}
],
"promo_savings": "-199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"weight": "199.99"
}
],
"payments": [
{
"amount": "199.99",
"external_transaction_id": "<string>",
"account_number_last4": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"gift_card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"store_id": "<string>",
"tax_total": "199.99",
"total": "199.99",
"employee_id": "<string>",
"external_id": "<string>",
"gift_card_sales": [
{
"amount": "199.99",
"physical_barcode": "<string>",
"recipient_phone_number": "<string>"
}
],
"lane_id": "<string>",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"shopper_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
completed_at: '2023-11-07T05:31:56Z',
line_items: [
{
quantity: '199.99',
retail_price: '199.99',
store_product_id: '<string>',
total: '199.99',
discount_total: '-199.99',
item_modifiers: [{amount: '199.99', item_modifier_id: '<string>'}],
promo_savings: '-199.99',
tax_total: '199.99',
taxable_amount: '199.99',
weight: '199.99'
}
],
payments: [
{
amount: '199.99',
external_transaction_id: '<string>',
account_number_last4: '<string>',
completed_at: '2023-11-07T05:31:56Z',
gift_card_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
store_id: '<string>',
tax_total: '199.99',
total: '199.99',
employee_id: '<string>',
external_id: '<string>',
gift_card_sales: [
{
amount: '199.99',
physical_barcode: '<string>',
recipient_phone_number: '<string>'
}
],
lane_id: '<string>',
metadata: {order_source: 'shopify', fulfillment_id: '88213'},
shopper_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.vori.com/v1/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_URL => "https://api.vori.com/v1/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([
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'completed_at' => '2023-11-07T05:31:56Z',
'line_items' => [
[
'quantity' => '199.99',
'retail_price' => '199.99',
'store_product_id' => '<string>',
'total' => '199.99',
'discount_total' => '-199.99',
'item_modifiers' => [
[
'amount' => '199.99',
'item_modifier_id' => '<string>'
]
],
'promo_savings' => '-199.99',
'tax_total' => '199.99',
'taxable_amount' => '199.99',
'weight' => '199.99'
]
],
'payments' => [
[
'amount' => '199.99',
'external_transaction_id' => '<string>',
'account_number_last4' => '<string>',
'completed_at' => '2023-11-07T05:31:56Z',
'gift_card_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'store_id' => '<string>',
'tax_total' => '199.99',
'total' => '199.99',
'employee_id' => '<string>',
'external_id' => '<string>',
'gift_card_sales' => [
[
'amount' => '199.99',
'physical_barcode' => '<string>',
'recipient_phone_number' => '<string>'
]
],
'lane_id' => '<string>',
'metadata' => [
'order_source' => 'shopify',
'fulfillment_id' => '88213'
],
'shopper_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://api.vori.com/v1/transactions"
payload := strings.NewReader("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"line_items\": [\n {\n \"quantity\": \"199.99\",\n \"retail_price\": \"199.99\",\n \"store_product_id\": \"<string>\",\n \"total\": \"199.99\",\n \"discount_total\": \"-199.99\",\n \"item_modifiers\": [\n {\n \"amount\": \"199.99\",\n \"item_modifier_id\": \"<string>\"\n }\n ],\n \"promo_savings\": \"-199.99\",\n \"tax_total\": \"199.99\",\n \"taxable_amount\": \"199.99\",\n \"weight\": \"199.99\"\n }\n ],\n \"payments\": [\n {\n \"amount\": \"199.99\",\n \"external_transaction_id\": \"<string>\",\n \"account_number_last4\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"gift_card_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"store_id\": \"<string>\",\n \"tax_total\": \"199.99\",\n \"total\": \"199.99\",\n \"employee_id\": \"<string>\",\n \"external_id\": \"<string>\",\n \"gift_card_sales\": [\n {\n \"amount\": \"199.99\",\n \"physical_barcode\": \"<string>\",\n \"recipient_phone_number\": \"<string>\"\n }\n ],\n \"lane_id\": \"<string>\",\n \"metadata\": {\n \"order_source\": \"shopify\",\n \"fulfillment_id\": \"88213\"\n },\n \"shopper_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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://api.vori.com/v1/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"line_items\": [\n {\n \"quantity\": \"199.99\",\n \"retail_price\": \"199.99\",\n \"store_product_id\": \"<string>\",\n \"total\": \"199.99\",\n \"discount_total\": \"-199.99\",\n \"item_modifiers\": [\n {\n \"amount\": \"199.99\",\n \"item_modifier_id\": \"<string>\"\n }\n ],\n \"promo_savings\": \"-199.99\",\n \"tax_total\": \"199.99\",\n \"taxable_amount\": \"199.99\",\n \"weight\": \"199.99\"\n }\n ],\n \"payments\": [\n {\n \"amount\": \"199.99\",\n \"external_transaction_id\": \"<string>\",\n \"account_number_last4\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"gift_card_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"store_id\": \"<string>\",\n \"tax_total\": \"199.99\",\n \"total\": \"199.99\",\n \"employee_id\": \"<string>\",\n \"external_id\": \"<string>\",\n \"gift_card_sales\": [\n {\n \"amount\": \"199.99\",\n \"physical_barcode\": \"<string>\",\n \"recipient_phone_number\": \"<string>\"\n }\n ],\n \"lane_id\": \"<string>\",\n \"metadata\": {\n \"order_source\": \"shopify\",\n \"fulfillment_id\": \"88213\"\n },\n \"shopper_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vori.com/v1/transactions")
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 \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"line_items\": [\n {\n \"quantity\": \"199.99\",\n \"retail_price\": \"199.99\",\n \"store_product_id\": \"<string>\",\n \"total\": \"199.99\",\n \"discount_total\": \"-199.99\",\n \"item_modifiers\": [\n {\n \"amount\": \"199.99\",\n \"item_modifier_id\": \"<string>\"\n }\n ],\n \"promo_savings\": \"-199.99\",\n \"tax_total\": \"199.99\",\n \"taxable_amount\": \"199.99\",\n \"weight\": \"199.99\"\n }\n ],\n \"payments\": [\n {\n \"amount\": \"199.99\",\n \"external_transaction_id\": \"<string>\",\n \"account_number_last4\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"gift_card_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"store_id\": \"<string>\",\n \"tax_total\": \"199.99\",\n \"total\": \"199.99\",\n \"employee_id\": \"<string>\",\n \"external_id\": \"<string>\",\n \"gift_card_sales\": [\n {\n \"amount\": \"199.99\",\n \"physical_barcode\": \"<string>\",\n \"recipient_phone_number\": \"<string>\"\n }\n ],\n \"lane_id\": \"<string>\",\n \"metadata\": {\n \"order_source\": \"shopify\",\n \"fulfillment_id\": \"88213\"\n },\n \"shopper_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"cashback_amount": "199.99",
"completed_at": "2023-11-07T05:31:56Z",
"coupon_total": "199.99",
"discount_total": "199.99",
"employee_id": "<string>",
"external_id": "<string>",
"gift_card_sales": [
{
"id": "<string>",
"amount": "199.99",
"gift_card_id": "<string>",
"gift_card_transaction_id": "<string>"
}
],
"gift_card_sales_total": "199.99",
"issued_coupons": [
{
"id": "<string>",
"coupon_code": "<string>",
"coupon_id": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"offer_benefit_value": "199.99",
"snap_incentive_program_id": "<string>",
"started_at": "2023-11-07T05:31:56Z"
}
],
"item_modifier_total": "199.99",
"lane_id": "<string>",
"line_items": [
{
"id": "<string>",
"coupon_total": "199.99",
"coupons": [
{
"id": "<string>",
"applied_amount": "199.99",
"coupon_code": "<string>",
"coupon_id": "<string>",
"offer_display_text": "<string>",
"offer_id": "<string>"
}
],
"department_id": "<string>",
"discount_total": "199.99",
"discounts": [
{
"id": "<string>",
"applied_amount": "199.99",
"discount_id": "<string>",
"discount_name": "<string>",
"discount_type": "amount_off",
"discount_value": "199.99"
}
],
"ebt_tax_waived_total": "199.99",
"free_quantity": "199.99",
"item_modifier_total": "199.99",
"item_modifiers": [
{
"id": "<string>",
"amount": "199.99",
"item_modifier_id": "<string>",
"quantity": "199.99",
"tax_amount": "199.99",
"taxes": [
{
"id": "<string>",
"amount": "199.99",
"tax_rate": {
"id": "<string>",
"category": "other",
"name": "<string>",
"value": "8.25",
"value_type": "amount"
}
}
]
}
],
"loyalty_rewards": [
{
"id": "<string>",
"applied_amount": "199.99",
"loyalty_reward_id": "<string>",
"loyalty_reward_name": "<string>",
"offer_id": "<string>",
"order_loyalty_reward_id": "<string>"
}
],
"loyalty_rewards_total": "199.99",
"product": {
"id": "<string>",
"barcode": "<string>",
"brand": "<string>",
"ebt_enabled": true,
"name": "<string>",
"sold_by_weight": true,
"unit_of_measure": "<string>",
"unit_of_measure_amount": "199.99",
"wic_enabled": true
},
"promo_savings": "199.99",
"promotions": [
{
"id": "<string>",
"amount": "199.99",
"display_text": "<string>",
"offer_id": "<string>",
"promotion_id": "<string>",
"savings": "199.99"
}
],
"quantity": "199.99",
"refunded_order_line_item_id": "<string>",
"retail_price": "199.99",
"retail_total": "199.99",
"subtotal": "199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"taxes": [
{
"id": "<string>",
"amount": "199.99",
"tax_rate": {
"id": "<string>",
"category": "other",
"name": "<string>",
"value": "8.25",
"value_type": "amount"
}
}
],
"total": "199.99",
"transaction_type": "refund",
"type": "refund",
"variable_weights": [
{
"id": "<string>",
"variable_weight": {
"id": "<string>",
"name": "<string>",
"unit": "LBS",
"value": "199.99"
}
}
],
"wic_adjusted_price": "199.99"
}
],
"loyalty_rewards_total": "199.99",
"metadata": {
"order_source": "shopify",
"fulfillment_id": "88213"
},
"payments": [
{
"id": "<string>",
"authorized_amount": "199.99",
"card_brand": "american_express",
"card_last4": "<string>",
"cash_received": "199.99",
"cashback_amount": "199.99",
"change_returned": "199.99",
"completed_at": "2023-11-07T05:31:56Z",
"payment_type": "cash",
"requested_amount": "199.99",
"reversals": [
{
"id": "<string>",
"authorized_amount": "199.99",
"card_brand": "american_express",
"card_last4": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"payment_type": "cash",
"requested_amount": "199.99"
}
],
"terminal_was_online": true,
"till_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tip_amount": "199.99"
}
],
"points_earned": "199.99",
"promo_savings": "199.99",
"promo_total": "199.99",
"receipt_type": "email",
"refund_total": "199.99",
"refunds": [
{
"id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"employee_id": "<string>",
"lane_id": "<string>",
"shopper_facing_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"store_id": "<string>",
"subtotal": "199.99",
"tax_total": "199.99",
"total": "199.99"
}
],
"retail_total": "199.99",
"shopper_facing_id": "<string>",
"shopper_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "api",
"started_at": "2023-11-07T05:31:56Z",
"status": "completed",
"store_id": "<string>",
"subtotal": "199.99",
"tax_total": "199.99",
"taxable_amount": "199.99",
"tip_amount": "199.99",
"total": "199.99",
"total_collected": "199.99",
"type": "refund"
}{
"error_code": "invalid_store"
}{
"error_code": "insufficient_permissions",
"error_details": {
"action": "*",
"resource": "*"
}
}{
"error_code": "transaction_already_exists",
"error_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
A completed checkout to record against a store, with its products, payments, and totals.
Unique transaction ID generated by your system (UUIDv7). It serves as the idempotency key for the request: sending the same transaction twice with the same ID returns the transaction already recorded rather than creating a duplicate. Generate it before your first attempt and reuse it on every retry. Sending different values under an ID already used is rejected.
When the transaction was completed in your system.
Products on the transaction. May be empty for a gift-card-only transaction.
2500Show child attributes
Show child attributes
Payments applied to the transaction.
1 - 50 elementsShow child attributes
Show child attributes
ID of the store where the transaction took place.
^[0-9]+$Total sales tax charged on the transaction. Must equal the sum of the line-item tax totals.
^[0-9]+(\.[0-9]+)?$"199.99"
Final transaction total including tax. Must equal the sum of the line totals plus the gift card sale amounts, and the payments must add up to this amount.
^[0-9]+(\.[0-9]+)?$"199.99"
ID of the employee to record this transaction under. Defaults to the employee Vori maintains for transactions submitted through this API.
^[0-9]+$Your own identifier for this transaction, such as an order number from your e-commerce platform. Stored exactly as provided and never interpreted, and you can filter transactions by it. Vori does not require it to be unique.
255Gift cards sold on the transaction.
100Show child attributes
Show child attributes
ID of the lane to record this transaction under. Defaults to the lane Vori maintains for transactions submitted through this API.
^[0-9]+$Your own key/value pairs, stored with the transaction and returned unchanged. Vori never interprets them. Up to 50 keys; key names up to 40 characters of letters, numbers, underscores, and hyphens; values up to 500 characters. Keys beginning with "vori" are reserved. Do not put personal or sensitive information here — these values flow into reporting and data exports.
Show child attributes
Show child attributes
{
"order_source": "shopify",
"fulfillment_id": "88213"
}
ID of the loyalty shopper who placed the transaction, if known. Links the transaction to their loyalty account.
Response
A completed checkout at a store, covering the lane, cashier, and shopper, the products sold, the savings applied, the payments collected, and any refunds against it.
Unique identifier for the record.
Cash back requested by the shopper.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Date and time when the transaction was finalized.
Total savings from coupons.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Total savings from manual or employee discounts.
^-?[0-9]+(\.[0-9]+)?$"199.99"
ID of the employee who processed the transaction.
^[0-9]+$Your own identifier for the transaction, as supplied when it was recorded.
Gift cards purchased in the transaction.
Show child attributes
Show child attributes
Total face value of gift cards purchased in the transaction.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Coupons issued to the shopper by the transaction.
Show child attributes
Show child attributes
Total value of item modifiers.
^-?[0-9]+(\.[0-9]+)?$"199.99"
ID of the checkout lane that processed the transaction.
^[0-9]+$Product line items included in the transaction.
Show child attributes
Show child attributes
Total savings from loyalty reward redemptions.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Your own key/value pairs, exactly as supplied when the transaction was recorded.
Show child attributes
Show child attributes
{
"order_source": "shopify",
"fulfillment_id": "88213"
}
Payments collected for the transaction.
Show child attributes
Show child attributes
Loyalty points the shopper earned on this transaction, computed from the products sold and the store banner loyalty program. Zero when the transaction names no shopper or the banner has no active loyalty program. Negative on a refund, which reverses the points the original sale earned.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Total savings from promotions.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Sum of line-item totals after promotions are applied.
^-?[0-9]+(\.[0-9]+)?$"199.99"
How the shopper took their receipt, or null when they took none.
email, print, sms Total value refunded against this transaction.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Refunds of the transaction. Retrieve one with GET /v1/transactions/{id} for the products returned and how the money went back.
Show child attributes
Show child attributes
Sum of line-item retail totals after promotions and before discounts and tax.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Human-readable transaction identifier shown to the shopper.
ID of the loyalty shopper associated with the transaction, or null for an anonymous transaction.
Where the transaction came from.
api, migration, pos Date and time when the cashier started the transaction.
Current lifecycle status of the transaction.
completed, expired, suspended, voided ID of the store where the transaction was placed.
^[0-9]+$Sum of line-item subtotals before promotions, discounts, and tax.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Total tax charged on the transaction.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Portion of the transaction subject to tax.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Tip added by the shopper.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Final transaction amount including tax. Sales are positive and refunds are negative.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Total collected from the shopper, including the transaction total, tip, and cash back.
^-?[0-9]+(\.[0-9]+)?$"199.99"
Financial transaction type represented by the transaction.
refund, sale, void Was this page helpful?