Customer Success Portal
            Knowledge Base Truvi Commerce Resources API

            Example API Calls and Responses

            Orders For A Specific Day
            The best way to manage this would be to make a daily call to the Order List API to grab all the orders for that day using the date range parameters. You can then filter based on the order status and payment status you want to capture. If you want to exclude declines, you can filter based off the results using the response payment_status or you can optionally add the payment_status in the API call to return any of the status you want to capture.


            API Call: Order List API
            Parameters: Date range for the day using from_date and to_date in the format of YYYY-MM-DD

            Optional filter using payment_status to grab only Authorized, Settled, Cash, Partially Refunded. The other attributes that can be used is Declined, Voided, Expired and Refunded.

            API Response: The API response will include the following fields
            Order_id
            shipping_method
            billing_address
            order_type
            order_status
            payment_status
            customer_id
            shipment_type
            pos_nick
            order_total
            purchase_date
            shipment_address_id
            shipment_type_id
            items
            sku_code
            product_type
            quantity
            amount
            retail_price
            id
            username
            email
            create_at
            lastvisit_at
            firstname
            lastname
            billing address
            address_id
            nickname
            first_name
            last_name
            dob
            street1
            street2
            company
            city
            zip
            state_name
            phone
            email
            shipping_address
            address_id
            nickname
            first_name
            last_name
            dob
            street1
            street2
            company
            city
            zip
            state_name
            phone
            email

            API Response Example:
            {"order_id":"20591","shipping_method":"Ground","billing_address_id":"1100","order_type":"Club","order_status":"Payment Received","payment_status":"Authorized","customer_id":"1103","shipment_type":"delivery","pos_nick":"","order_total":"2302.375","purcahse_date":"04\/11\/2016","shipment_address_id":"1100","shipping_type_id":"1","items":[{"sku_code":"wi1234","product_type":"W","quantity":"2","amount":"120","retail_price":"150.00"},{"sku_code":"R12","product_type":"W","quantity":"3","amount":"35","retail_price":"35.00"},{"sku_code":"wi1645","product_type":"W","quantity":"6","amount":"30","retail_price":"30.00"},{"sku_code":"wi1644","product_type":"W","quantity":"6","amount":"260","retail_price":"260.00"}],"customer":{"id":"1103","username":"moreuser1250","email":"moreuser1250@simplycms.com","create_at":"2015-10-29 22:19:16","lastvisit_at":"0000-00-00 00:00:00","firstname":"More1250","lastname":"User1250"},"billing_address":{"address_id":"1100","nickname":"More1250","first_name":"More1250","last_name":"User1250","dob":"1955-08-16","street1":"123 Main Street","street2":"","company":"","city":"Napa","zip":"94558","state_name":"CA","phone":"111-222-1313","email":"moreuser1250@simplycms.com"},"shipping_address":{"address_id":"1100","nickname":"More1250","first_name":"More1250","last_name":"User1250","dob":"1955-08-16","street1":"123 Main Street","street2":"","company":"","city":"Napa","zip":"94558","state_name":"CA","phone":"111-222-1313","email":"moreuser1250@simplycms.com"}},
            Updated: 26 Aug 2019 03:39 AM
            Helpful?  
            Help us to make this article better
            0 0