/
Transaction API

Transaction API

How to list existing transactions

  • GET /api/v1/txns

  • GET /api/v1/txns/<transaction_id>

GET /api/v1/txns

  • limit - limit of number of results to return (default: 100)

  • offset - offset (default: 0)

  • order_by - field name to order by (for example:  "txn_opened_on")

  • order_type -  “desc” or “asc”

This resource returns a list of Transaction records sorted according to passed arguments.

Returned fields:

  • cashier -  Information on clerk who opened the transaction

  • closing_cashier - Same as cashier field but for clerk who closed the transaction

  • customer - Customer (buyer) information fields (name, address, phone, email)

  • location - Store location information (name, address, phone, email)

  • payments - List of payments accepted in that transaction (including voided ones)

  • products - List of product descriptions in that transaction

  • txnlines - List of transaction lines (quantity, amount including tax, discount)

  • transaction_id  -  Transaction ID

  • txn_loc_entity_id -  Location where this transaction took place.

  • txn_entity_id -  For a Sale, this is the customer.

  • txn_opened_by_user_entity_id  -  Clerk who opened the transaction.

  • txn_closed_by_user_entity_id  - Clerk who closed the transaction.

  • txn_type_number -  Separate identifier that is unique to each transaction type.

  • txn_type -  Transaction type.

  • txn_status -  Transaction status (Opened, Closed).

  • txn_notes -  Commentary about this transaction.

  • txn_opened_on -  The timestamp this transaction was opened.

  • txn_closed_on -  The timestamp this transaction was closed.

  • txn_subtotal -  The items subtotal rounded at txnline level (trigger updated)

  • txn_discount_total  -  The items discount subtotal rounded at txnline level (trigger updated)

  • txn_tax_total-  The items taxes subtotal rounded at txnline level (trigger updated)

  • txn_freight_total -  The txn freight total

  • txn_other_total -  The txn other total

  • txn_is_mfd -  MFD Flag: true is deleted/not available

  • txn_opened_device_id -  The device id used to open the transaction

  • txn_closed_device_id -  The device id used to close the transaction

  • txn_ent_name -  The customer name

  • txn_loc_receipt_name -  The location name used in the receipt

  • txn_addr_address_1 -  The customer address

  • txn_addr_address_2 -  The customer address

  • txn_addr_city -  The customer address city

  • txn_addr_postal_code -  The customer adddress postal code

  • txn_prgn_iso_code -  The customer address postal region

  • txn_prgn_full_name -  The customer address postal region name

  • txn_cnum_number -  The customer telephone

  • txn_eml_email -  The customer email

  • txn_expiration_date -  The expiration date for a quote, hold or layaway

  • txn_disclaimer_text -  Transaction and products receipt disclaimer

  • txn_reason -  The transaction type reason

  • txn_options -  Runtime selected options for the transaction that can be reloaded when the transaction opened again

  • txn_timezone -  Transaction Timezone (trigger updated)

  • txn_is_open -  Flag to indicate the transation is opened (calculated and materialized)

  • txn_tray_session_id -  Tray Session ID FK of the session editing the transaction

  • txn_session_id -  Session ID FK of the session editing the transaction

  • txn_fee_total -  The total paid in payment type fees, aggregated by triggers from txnpay_fee_amount

GET /api/v1/txns
GET /api/v1/txns {'limit': '2', 'order_by': 'txn_opened_on'}
Response

{ "count": 2, "objects": [ { "cashier": { "ent_first_name": "Admin", "ent_last_name": "User,1", "ent_name": "Admin User,1", "ent_roles": [ { "entity_role_id": 5, "erole_role_id": -9, "role_name": "Admin" } ], "ent_user": { "user_display_name": "Admin User 1", "user_is_active": false, "user_notes": null, "user_number": "123456", "user_username": "Admin User 1" }, "entity_id": 5 }, "closing_cashier": { "ent_first_name": "Admin", "ent_last_name": "User,1", "ent_name": "Admin User,1", "ent_roles": [ { "entity_role_id": 5, "erole_role_id": -9, "role_name": "Admin" } ], "ent_user": { "user_display_name": "Admin User 1", "user_is_active": false, "user_notes": null, "user_number": "123456", "user_username": "Admin User 1" }, "entity_id": 5 }, "customer": null, "invoice_id": 2, "location": { "contact_number_types_and_numbers": [ { "cnum_number": "888-555-7381", "numt_contact_number_type": "Office" } ], "email_info": [ { "eml_email": "info@example.com", "emlt_email_type": "Office" } ], "ent_name": "Pinogy Store", "ent_notes": "", "ent_roles": [ -2 ], "entity_address_info": [ { "addr_address_1": "123 Main Street", "addr_address_2": "", "addr_address_type_id": -1, "addr_city": "Herndon", "addr_country_id": 231, "addr_postal_code": "20170", "addr_region_id": 4677, "address_id": 1, "adrt_type": "Home", "ctry_full_name": "United States", "prgn_full_name": "Virginia", "prgn_iso_code": "VA", "prgn_local_region_name_id": "State" } ], "loc_entity_id": 4, "loc_is_enabled": true, "loc_receipt_name": "Pinogy Store", "loc_report_code": "PS", "loc_show_regional": true, "loc_website_url": "www.example.com" }, "parent_customer_recurring_sale_id": null, "payments": [ { "transaction_payment_id": 1, "txnpay_addr_address_1": null, "txnpay_addr_address_2": null, "txnpay_addr_city": null, "txnpay_addr_postal_code": null, "txnpay_amount": 10.12, "txnpay_attrs": {}, "txnpay_auth_code": "", "txnpay_cnum_number": null, "txnpay_eml_email": null, "txnpay_ent_name": null, "txnpay_fee_amount": 0.0, "txnpay_fee_percent": 0.0, "txnpay_is_mfd": false, "txnpay_notes": null, "txnpay_paid_on": "2016-07-18T22:01:49.118822-04:00", "txnpay_parent_transaction_payment_id": null, "txnpay_payment_gateway_customer_token_id": null, "txnpay_payment_method_id": -1, "txnpay_prgn_full_name": null, "txnpay_prgn_iso_code": null, "txnpay_signature_image": null, "txnpay_transaction_id": 2, "txnpay_tray_session_id": 6, "txnpay_type": "Payment", "txnpay_user_entity_id": 5, "txnpay_voided": false, "txnpay_voided_by_user_entity_id": null, "txnpay_voided_on": null } ], "products": [], "returns": [], "rewards": [ { "commission_rate": "2.00", "prdpr_commission_pct": null, "reward_amount": null, "reward_employees": null, "reward_entry_id": null, "reward_user_entity_ids": [ null ], "reward_user_percentages": [ 100.0 ], "rwrde_amounts": null, "transaction_id": 2, "transaction_line_id": 2, "txn_loc_entity_id": 4, "txnline_amount": 10.00895, "txnline_parent_transaction_line_id": null, "txnline_product_description": "nylon leash", "txnline_product_id": 10001, "txnline_qty": 1.0 } ], "transaction_delivery_ids": null, "transaction_id": 2, "txn_addr_address_1": null, "txn_addr_address_2": null, "txn_addr_city": null, "txn_addr_postal_code": null, "txn_closed_by_user_entity_id": 5, "txn_closed_device_id": 4, "txn_closed_on": "2016-07-18T22:02:10.967469-04:00", "txn_cnum_number": null, "txn_disclaimer_text": null, "txn_discount_total": 0.44, "txn_eml_email": null, "txn_ent_name": null, "txn_entity_id": null, "txn_expiration_date": null, "txn_freight_total": 0.0, "txn_grand_total": 10.12, "txn_id": 2, "txn_is_mfd": false, "txn_is_open": false, "txn_loc_entity_id": 4, "txn_loc_receipt_name": null, "txn_notes": "", "txn_opened_by_user_entity_id": 5, "txn_opened_device_id": 4, "txn_opened_on": "2016-07-18T22:01:02.239868-04:00", "txn_options": {}, "txn_other_total": 0.0, "txn_prgn_full_name": null, "txn_prgn_iso_code": null, "txn_reason": null, "txn_receiving_batch": null, "txn_status": "Closed", "txn_subtotal": 10.01, "txn_tax_total": 0.55, "txn_timezone": "US/Eastern", "txn_totals": { "discount": "0.44", "fee": "0.00", "subtotal": "10.01", "tax": "0.55", "total": "10.12" }, "txn_type": "Sale", "txn_type_number": 2, "txnlines": [ { "transaction_line_id": 2, "txnline_amount": 10.00895, "txnline_amount_override_user_entity_id": null, "txnline_bundle_info": null, "txnline_customer_entity_id_req": false, "txnline_device_id": 4, "txnline_discount": 0.44, "txnline_discount_info": { "manual": { "amt": 0.44, "pct": 0.0 } }, "txnline_discount_override_user_entity_id": null, "txnline_discount_percent": 0.0, "txnline_expected_cost": 0.0, "txnline_extended_action_id": null, "txnline_is_closed": false, "txnline_is_mfd": false, "txnline_note_info": null, "txnline_options": null, "txnline_parent_transaction_line_id": null, "txnline_posted_on": "2016-07-18T22:01:00.551353-04:00", "txnline_processed_qty": 0.0, "txnline_prod_type": "Regular", "txnline_product_description": "nylon leash", "txnline_product_id": 10001, "txnline_product_serial_id": null, "txnline_qty": 1.0, "txnline_receiving_batch": null, "txnline_required_by_parent": false, "txnline_sale_cost": 10.0, "txnline_tax": 0.5549991, "txnline_tax_info": [ { "pct": 5.8, "tax": "Sales Tax", "vals": "[0,)" } ], "txnline_totals": { "discount": { "is_percentage": false, "value": "0.44" }, "extended_price": "9.57", "quantity": { "amount": "1", "unit_price": "9.56895" }, "unit_price": "10.00895" }, "txnline_transaction_id": 2, "txnline_transaction_payment_id": null, "txnline_txn_type": "Sale", "txnline_user_entity_id": 5, "txnline_vertical_app_id": null, "txnline_vertical_product_id": null, "txnline_visit_box_id": null } ] }, { "cashier": { "ent_first_name": "Admin", "ent_last_name": "User,1", "ent_name": "Admin User,1", "ent_roles": [ { "entity_role_id": 5, "erole_role_id": -9, "role_name": "Admin" } ], "ent_user": { "user_display_name": "Admin User 1", "user_is_active": false, "user_notes": null, "user_number": "123456", "user_username": "Admin User 1" }, "entity_id": 5 }, "closing_cashier": { "ent_first_name": "Admin", "ent_last_name": "User,1", "ent_name": "Admin User,1", "ent_roles": [ { "entity_role_id": 5, "erole_role_id": -9, "role_name": "Admin" } ], "ent_user": { "user_display_name": "Admin User 1", "user_is_active": false, "user_notes": null, "user_number": "123456", "user_username": "Admin User 1" }, "entity_id": 5 }, "customer": null, "invoice_id": 3, "location": { "contact_number_types_and_numbers": [ { "cnum_number": "888-555-7381", "numt_contact_number_type": "Office" } ], "email_info": [ { "eml_email": "info@example.com", "emlt_email_type": "Office" } ], "ent_name": "Pinogy Store", "ent_notes": "", "ent_roles": [ -2 ], "entity_address_info": [ { "addr_address_1": "123 Main Street", "addr_address_2": "", "addr_address_type_id": -1, "addr_city": "Herndon", "addr_country_id": 231, "addr_postal_code": "20170", "addr_region_id": 4677, "address_id": 1, "adrt_type": "Home", "ctry_full_name": "United States", "prgn_full_name": "Virginia", "prgn_iso_code": "VA", "prgn_local_region_name_id": "State" } ], "loc_entity_id": 4, "loc_is_enabled": true, "loc_receipt_name": "Pinogy Store", "loc_report_code": "PS", "loc_show_regional": true, "loc_website_url": "www.example.com" }, "parent_customer_recurring_sale_id": null, "payments": [ { "transaction_payment_id": 2, "txnpay_addr_address_1": null, "txnpay_addr_address_2": null, "txnpay_addr_city": null, "txnpay_addr_postal_code": null, "txnpay_amount": 10.12, "txnpay_attrs": { "EMVSale": "%7B%0D%0A%20%20%0D%0A%20%20%7D%0D%0A%7D" }, "txnpay_auth_code": "05105A", "txnpay_cnum_number": null, "txnpay_eml_email": null, "txnpay_ent_name": null, "txnpay_fee_amount": 0.0, "txnpay_fee_percent": 0.0, "txnpay_is_mfd": false, "txnpay_notes": null, "txnpay_paid_on": "2016-07-18T22:12:14.252271-04:00", "txnpay_parent_transaction_payment_id": null, "txnpay_payment_gateway_customer_token_id": null, "txnpay_payment_method_id": -10, "txnpay_prgn_full_name": null, "txnpay_prgn_iso_code": null, "txnpay_signature_image": null, "txnpay_transaction_id": 3, "txnpay_tray_session_id": 6, "txnpay_type": "Payment", "txnpay_user_entity_id": 5, "txnpay_voided": false, "txnpay_voided_by_user_entity_id": null, "txnpay_voided_on": null } ], "products": [], "returns": [], "rewards": [ { "commission_rate": "2.00", "prdpr_commission_pct": null, "reward_amount": null, "reward_employees": null, "reward_entry_id": null, "reward_user_entity_ids": [ null ], "reward_user_percentages": [ 100.0 ], "rwrde_amounts": null, "transaction_id": 3, "transaction_line_id": 3, "txn_loc_entity_id": 4, "txnline_amount": 10.01594, "txnline_parent_transaction_line_id": null, "txnline_product_description": "nylon leash", "txnline_product_id": 10001, "txnline_qty": 1.0 } ], "transaction_delivery_ids": null, "transaction_id": 3, "txn_addr_address_1": null, "txn_addr_address_2": null, "txn_addr_city": null, "txn_addr_postal_code": null, "txn_closed_by_user_entity_id": 5, "txn_closed_device_id": 4, "txn_closed_on": "2016-07-18T22:12:27.579271-04:00", "txn_cnum_number": null, "txn_disclaimer_text": null, "txn_discount_total": 0.45, "txn_eml_email": null, "txn_ent_name": null, "txn_entity_id": null, "txn_expiration_date": null, "txn_freight_total": 0.0, "txn_grand_total": 10.12, "txn_id": 3, "txn_is_mfd": false, "txn_is_open": false, "txn_loc_entity_id": 4, "txn_loc_receipt_name": null, "txn_notes": "", "txn_opened_by_user_entity_id": 5, "txn_opened_device_id": 4, "txn_opened_on": "2016-07-18T22:02:16.455793-04:00", "txn_options": {}, "txn_other_total": 0.0, "txn_prgn_full_name": null, "txn_prgn_iso_code": null, "txn_reason": null, "txn_receiving_batch": null, "txn_status": "Closed", "txn_subtotal": 10.02, "txn_tax_total": 0.55, "txn_timezone": "US/Eastern", "txn_totals": { "discount": "0.45", "fee": "0.00", "subtotal": "10.02", "tax": "0.55", "total": "10.12" }, "txn_type": "Sale", "txn_type_number": 3, "txnlines": [ { "transaction_line_id": 3, "txnline_amount": 10.01594, "txnline_amount_override_user_entity_id": null, "txnline_bundle_info": null, "txnline_customer_entity_id_req": false, "txnline_device_id": 4, "txnline_discount": 0.45, "txnline_discount_info": { "manual": { "amt": 0.45, "pct": 0.0 } }, "txnline_discount_override_user_entity_id": null, "txnline_discount_percent": 0.0, "txnline_expected_cost": 0.0, "txnline_extended_action_id": null, "txnline_is_closed": false, "txnline_is_mfd": false, "txnline_note_info": null, "txnline_options": null, "txnline_parent_transaction_line_id": null, "txnline_posted_on": "2016-07-18T22:02:14.779599-04:00", "txnline_processed_qty": 0.0, "txnline_prod_type": "Regular", "txnline_product_description": "nylon leash", "txnline_product_id": 10001, "txnline_product_serial_id": null, "txnline_qty": 1.0, "txnline_receiving_batch": null, "txnline_required_by_parent": false, "txnline_sale_cost": 10.0, "txnline_tax": 0.55482452, "txnline_tax_info": [ { "pct": 5.8, "tax": "Sales Tax", "vals": "[0,)" } ], "txnline_totals": { "discount": { "is_percentage": false, "value": "0.45" }, "extended_price": "9.57", "quantity": { "amount": "1", "unit_price": "9.56594" }, "unit_price": "10.01594" }, "txnline_transaction_id": 3, "txnline_transaction_payment_id": null, "txnline_txn_type": "Sale", "txnline_user_entity_id": 5, "txnline_vertical_app_id": null, "txnline_vertical_product_id": null, "txnline_visit_box_id": null } ] } ], "offset": 0, "total": 4068 }

How to obtain specific transaction information

GET /api/v1/txns/<transaction_id>
GET /api/v1/txns/3
Response

{ "cashier": { "ent_first_name": "Admin", "ent_last_name": "User,1", "ent_name": "Admin User,1", "ent_roles": [ { "entity_role_id": 5, "erole_role_id": -9, "role_name": "Admin" } ], "ent_user": { "user_display_name": "Admin User 1", "user_is_active": false, "user_notes": null, "user_number": "123456", "user_username": "Admin User 1" }, "entity_id": 5 }, "closing_cashier": { "ent_first_name": "Admin", "ent_last_name": "User,1", "ent_name": "Admin User,1", "ent_roles": [ { "entity_role_id": 5, "erole_role_id": -9, "role_name": "Admin" } ], "ent_user": { "user_display_name": "Admin User 1", "user_is_active": false, "user_notes": null, "user_number": "123456", "user_username": "Admin User 1" }, "entity_id": 5 }, "customer": null, "invoice_id": 3, "location": { "contact_number_types_and_numbers": [ { "cnum_number": "877-360-7381", "numt_contact_number_type": "Office" } ], "email_info": [ { "eml_email": "info@pinogy.com", "emlt_email_type": "Office" } ], "ent_name": "Pinogy Store", "ent_notes": "", "ent_roles": [ -2 ], "entity_address_info": [ { "addr_address_1": "590 Grove Street", "addr_address_2": "", "addr_address_type_id": -1, "addr_city": "Herndon", "addr_country_id": 231, "addr_postal_code": "20170", "addr_region_id": 4677, "address_id": 1, "adrt_type": "Home", "ctry_full_name": "United States", "prgn_full_name": "Virginia", "prgn_iso_code": "VA", "prgn_local_region_name_id": "State" } ], "loc_entity_id": 4, "loc_is_enabled": true, "loc_receipt_name": "Pinogy Store", "loc_report_code": "PS", "loc_show_regional": true, "loc_website_url": "www.pinogy.com" }, "parent_customer_recurring_sale_id": null, "payments": [ { "transaction_payment_id": 2, "txnpay_addr_address_1": null, "txnpay_addr_address_2": null, "txnpay_addr_city": null, "txnpay_addr_postal_code": null, "txnpay_amount": 10.12, "txnpay_attrs": { "EMVSale": "%7B%0D%0A%20%20%222%0D%0A%20%20%7D%0D%0A%7D" }, "txnpay_auth_code": "05105A", "txnpay_cnum_number": null, "txnpay_eml_email": null, "txnpay_ent_name": null, "txnpay_fee_amount": 0.0, "txnpay_fee_percent": 0.0, "txnpay_is_mfd": false, "txnpay_notes": null, "txnpay_paid_on": "2016-07-18T22:12:14.252271-04:00", "txnpay_parent_transaction_payment_id": null, "txnpay_payment_gateway_customer_token_id": null, "txnpay_payment_method_id": -10, "txnpay_prgn_full_name": null, "txnpay_prgn_iso_code": null, "txnpay_signature_image": null, "txnpay_transaction_id": 3, "txnpay_tray_session_id": 6, "txnpay_type": "Payment", "txnpay_user_entity_id": 5, "txnpay_voided": false, "txnpay_voided_by_user_entity_id": null, "txnpay_voided_on": null } ], "products": [], "returns": [], "rewards": [ { "commission_rate": "2.00", "prdpr_commission_pct": null, "reward_amount": null, "reward_employees": null, "reward_entry_id": null, "reward_user_entity_ids": [ null ], "reward_user_percentages": [ 100.0 ], "rwrde_amounts": null, "transaction_id": 3, "transaction_line_id": 3, "txn_loc_entity_id": 4, "txnline_amount": 10.01594, "txnline_parent_transaction_line_id": null, "txnline_product_description": "nylon leash", "txnline_product_id": 10001, "txnline_qty": 1.0 } ], "transaction_delivery_ids": null, "transaction_id": 3, "txn_addr_address_1": null, "txn_addr_address_2": null, "txn_addr_city": null, "txn_addr_postal_code": null, "txn_closed_by_user_entity_id": 5, "txn_closed_device_id": 4, "txn_closed_on": "2016-07-18T22:12:27.579271-04:00", "txn_cnum_number": null, "txn_disclaimer_text": null, "txn_discount_total": 0.45, "txn_eml_email": null, "txn_ent_name": null, "txn_entity_id": null, "txn_expiration_date": null, "txn_freight_total": 0.0, "txn_grand_total": 10.12, "txn_id": 3, "txn_is_mfd": false, "txn_is_open": false, "txn_loc_entity_id": 4, "txn_loc_receipt_name": null, "txn_notes": "", "txn_opened_by_user_entity_id": 5, "txn_opened_device_id": 4, "txn_opened_on": "2016-07-18T22:02:16.455793-04:00", "txn_options": {}, "txn_other_total": 0.0, "txn_prgn_full_name": null, "txn_prgn_iso_code": null, "txn_reason": null, "txn_receiving_batch": null, "txn_status": "Closed", "txn_subtotal": 10.02, "txn_tax_total": 0.55, "txn_timezone": "US/Eastern", "txn_totals": { "discount": "0.45", "fee": "0.00", "subtotal": "10.02", "tax": "0.55", "total": "10.12" }, "txn_type": "Sale", "txn_type_number": 3, "txnlines": [ { "transaction_line_id": 3, "txnline_amount": 10.01594, "txnline_amount_override_user_entity_id": null, "txnline_bundle_info": null, "txnline_customer_entity_id_req": false, "txnline_device_id": 4, "txnline_discount": 0.45, "txnline_discount_info": { "manual": { "amt": 0.45, "pct": 0.0 } }, "txnline_discount_override_user_entity_id": null, "txnline_discount_percent": 0.0, "txnline_expected_cost": 0.0, "txnline_extended_action_id": null, "txnline_is_closed": false, "txnline_is_mfd": false, "txnline_note_info": null, "txnline_options": null, "txnline_parent_transaction_line_id": null, "txnline_posted_on": "2016-07-18T22:02:14.779599-04:00", "txnline_processed_qty": 0.0, "txnline_prod_type": "Regular", "txnline_product_description": "nylon leash", "txnline_product_id": 10001, "txnline_product_serial_id": null, "txnline_qty": 1.0, "txnline_receiving_batch": null, "txnline_required_by_parent": false, "txnline_sale_cost": 10.0, "txnline_tax": 0.55482452, "txnline_tax_info": [ { "pct": 5.8, "tax": "Sales Tax", "vals": "[0,)" } ], "txnline_totals": { "discount": { "is_percentage": false, "value": "0.45" }, "extended_price": "9.57", "quantity": { "amount": "1", "unit_price": "9.56594" }, "unit_price": "10.01594" }, "txnline_transaction_id": 3, "txnline_transaction_payment_id": null, "txnline_txn_type": "Sale", "txnline_user_entity_id": 5, "txnline_vertical_app_id": null, "txnline_vertical_product_id": null, "txnline_visit_box_id": null } ] }

Related content

Location API
Location API
More like this
Product API
Product API
More like this
Pet API
Pet API
Read with this
Purchase Orders API
Purchase Orders API
More like this
Developer API Resources
Developer API Resources
Read with this
Customer API
Customer API
More like this