POST
/
orders
/
search
curl --request POST \
  --url https://sandbox-api.violet.io/v1/orders/search \
  --header 'Content-Type: application/json' \
  --header 'X-Violet-App-Id: <x-violet-app-id>' \
  --header 'X-Violet-App-Secret: <x-violet-app-secret>' \
  --header 'X-Violet-Token: <x-violet-token>' \
  --data '{
  "user_id": 123,
  "order_id": 123,
  "referral_id": "<string>",
  "bag_id": 123,
  "bag_status": "IN_PROGRESS",
  "merchant_id": 123,
  "before_date": "2023-11-07T05:31:56Z",
  "after_date": "2023-11-07T05:31:56Z",
  "app_order_id": "<string>",
  "customer_name": "<string>",
  "customer_email": "<string>",
  "sku_name": "<string>",
  "total": 123,
  "status": "IN_PROGRESS",
  "sort_by": "<string>",
  "sort_direction": "<string>",
  "date_last_modified:min": "2023-11-07T05:31:56Z",
  "date_last_modified:max": "2023-11-07T05:31:56Z",
  "date_created:min": "2023-11-07T05:31:56Z",
  "date_created:max": "2023-11-07T05:31:56Z",
  "date_submitted:min": "2023-11-07T05:31:56Z",
  "date_submitted:max": "2023-11-07T05:31:56Z"
}'
{
  "content": [
    {
      "id": 123,
      "token": "<string>",
      "errors": [
        {
          "id": 123,
          "order_id": 123,
          "bag_id": 123,
          "entity_id": "<string>",
          "entity_type": "ORDER",
          "type": "EXTERNAL_CREATE_CART",
          "message": "<string>",
          "date_created": "2023-11-07T05:31:56Z",
          "platform": "OTHER"
        }
      ],
      "user_id": 123,
      "app_id": 123,
      "developer_id": 123,
      "customer": {
        "first_name": "<string>",
        "last_name": "<string>",
        "email": "<string>",
        "shipping_address": {
          "name": "<string>",
          "city": "<string>",
          "state": "<string>",
          "country": "<string>",
          "postal_code": "<string>",
          "phone": "<string>",
          "type": "SHIPPING",
          "email": "<string>",
          "address_1": "<string>",
          "address_2": "<string>",
          "last_name": "<string>",
          "first_name": "<string>"
        },
        "billing_address": {
          "name": "<string>",
          "city": "<string>",
          "state": "<string>",
          "country": "<string>",
          "postal_code": "<string>",
          "phone": "<string>",
          "type": "SHIPPING",
          "email": "<string>",
          "address_1": "<string>",
          "address_2": "<string>",
          "last_name": "<string>",
          "first_name": "<string>"
        },
        "same_address": false,
        "name": "<string>"
      },
      "bags": [
        {
          "id": 123,
          "order_id": 123,
          "merchant_id": 123,
          "app_id": 123,
          "external_id": "<string>",
          "external_reference_id": "<string>",
          "status": "IN_PROGRESS",
          "fulfillment_status": "PROCESSING",
          "financial_status": "UNPAID",
          "dispute_status": "UNDISPUTED",
          "skus": [
            {
              "id": 123,
              "offer_id": 123,
              "merchant_id": 123,
              "app_id": 123,
              "product_id": "<string>",
              "sku_id": 123,
              "external_id": "<string>",
              "name": "<string>",
              "brand": "<string>",
              "thumbnail": "<string>",
              "quantity": 123,
              "price": 123,
              "weight": 123,
              "height": 123,
              "width": 123,
              "length": 123,
              "available": true,
              "status": "IN_PROGRESS",
              "product_type": "PHYSICAL",
              "custom": true,
              "custom_properties": [
                {
                  "name": "engraving",
                  "value": "Happy Birthday!"
                }
              ],
              "quantity_fulfilled": 123,
              "rates": [
                {
                  "order_sku_id": 123,
                  "amount": 123,
                  "rate": 123,
                  "type": "TAX",
                  "name": "<string>",
                  "decimal_rate": 123,
                  "dollar_amount": 123
                }
              ],
              "line_price": 123
            }
          ],
          "shipping_method": {
            "type": "CALCULATED",
            "Carrier": "OTHER",
            "label": "<string>",
            "price": 123,
            "custom": true,
            "min_subtotal": 123,
            "max_subtotal": 123,
            "min_weight": 123,
            "max_weight": 123,
            "external_id": "<string>",
            "id": 123,
            "shipping_method_id": "<string>",
            "bag_id": 123,
            "merchant_id": 123,
            "tracking_number": "<string>"
          },
          "taxes": [
            {
              "order_id": 123,
              "merchant_id": 123,
              "skus": [
                "<string>"
              ],
              "state": "<string>",
              "postal_code": "<string>",
              "rate": 123,
              "amount": 123,
              "description": "<string>"
            }
          ],
          "sub_total": 123,
          "shipping_total": 123,
          "tax_total": 123,
          "discount_total": 123,
          "total": 123,
          "taxes_included": false,
          "external_checkout": true,
          "commission_rate": 123,
          "date_created": "2023-11-07T05:31:56Z",
          "date_last_modified": "2023-11-07T05:31:56Z",
          "date_last_consolidated": "2023-11-07T05:31:56Z",
          "date_submitted": "2023-11-07T05:31:56Z",
          "remorse_period_ends": "2023-11-07T05:31:56Z",
          "currency": "<string>",
          "external_currency": "<string>",
          "currency_exchange_rate": 123,
          "channel": "APP",
          "app_order_id": "<string>",
          "platform": "OTHER",
          "fulfillments": [
            {
              "id": 123,
              "bag_id": 123,
              "external_id": "<string>",
              "carrier": "OTHER",
              "raw_carrier": "<string>",
              "status": "PENDING",
              "carrier_status": "PENDING",
              "tracking_number": "<string>",
              "tracking_url": "<string>",
              "skus": [
                {
                  "id": 123,
                  "fulfillment_id": 123,
                  "order_sku_id": 123,
                  "quantity_fulfilled": 123
                }
              ]
            }
          ],
          "discounts": [
            {
              "id": 123,
              "bag_id": 123,
              "status": "PENDING",
              "type": "CODE",
              "value_type": "AMOUNT",
              "target_type": "ORDER",
              "code": "<string>",
              "external_id": "<string>",
              "amount": 123,
              "percentage": 123,
              "amount_total": 123,
              "date_created": "2023-11-07T05:31:56Z",
              "date_last_modified": "2023-11-07T05:31:56Z",
              "email": "<string>"
            }
          ],
          "wallet_based_checkout": false,
          "app_name": "<string>",
          "bag_id": 123,
          "bag_status": "IN_PROGRESS",
          "merchant_name": "<string>"
        }
      ],
      "shipping_address": {
        "name": "<string>",
        "city": "<string>",
        "state": "<string>",
        "country": "<string>",
        "postal_code": "<string>",
        "phone": "<string>",
        "type": "SHIPPING",
        "email": "<string>",
        "address_1": "<string>",
        "address_2": "<string>",
        "last_name": "<string>",
        "first_name": "<string>"
      },
      "billing_address": {
        "name": "<string>",
        "city": "<string>",
        "state": "<string>",
        "country": "<string>",
        "postal_code": "<string>",
        "phone": "<string>",
        "type": "SHIPPING",
        "email": "<string>",
        "address_1": "<string>",
        "address_2": "<string>",
        "last_name": "<string>",
        "first_name": "<string>"
      },
      "payment_method": {
        "brand": "<string>",
        "last_four": "<string>",
        "exp_month": 123,
        "exp_year": 123,
        "cardholder_name": "<string>",
        "payment_method_id": 123,
        "default": true
      },
      "sub_total": 0,
      "shipping_total": 0,
      "tax_total": 0,
      "discount_total": 0,
      "total": 0,
      "app_customer_id": "<string>",
      "app_order_id": "<string>",
      "status": "IN_PROGRESS",
      "is_guest": true,
      "date_created": "2023-11-07T05:31:56Z",
      "date_last_modified": "2023-11-07T05:31:56Z",
      "date_submitted": "2023-11-07T05:31:56Z",
      "priced": false,
      "wallet_based_checkout": false,
      "currency": "USD",
      "referral_id": "<string>",
      "currency_symbol": "<string>",
      "app_name": "<string>",
      "stripe_key": "<string>",
      "payment_intent_client_secret": "<string>",
      "payment_transactions": [
        {
          "id": 123,
          "order_id": 123,
          "payment_provider": "<string>",
          "payment_provider_transaction_id": "<string>",
          "payment_method_id": 123,
          "payment_provider_payment_method_id": "<string>",
          "payment_intent_client_secret": "<string>",
          "amount": 123,
          "currency": "<string>",
          "capture_status": "PROCESSING",
          "capture_method": "AUTOMATIC",
          "transfer_status": "SENT",
          "transfer_method": "AUTOMATIC",
          "metadata": {},
          "related_bags": [
            "<string>"
          ],
          "related_refunds": [
            "<string>"
          ],
          "errors": [
            {
              "id": 123,
              "error_code": 123,
              "error_message": "<string>",
              "resolved": true,
              "date_resolved": "2023-11-07T05:31:56Z",
              "date_created": "2023-11-07T05:31:56Z",
              "payment_transaction_id": 123
            }
          ],
          "date_created": "2023-11-07T05:31:56Z",
          "date_last_modified": "2023-11-07T05:31:56Z",
          "status": "PROCESSING"
        }
      ],
      "order_id": 123,
      "guest": true,
      "order_status": "IN_PROGRESS",
      "intent_based_checkout": true
    }
  ],
  "last": true,
  "total_pages": 123,
  "total_elements": 123,
  "first": true,
  "number_of_elements": 123,
  "size": 123,
  "number": 123,
  "empty": true,
  "next_page_cursor": "<string>",
  "pageable": {
    "page_number": 123,
    "page_size": 123,
    "sort": {
      "unsorted": true,
      "sorted": true,
      "empty": true
    },
    "offset": 123,
    "paged": true,
    "unpaged": true
  },
  "sort": {
    "unsorted": true,
    "sorted": true,
    "empty": true
  }
}

Search for all Orders placed through your application given certain filter critera.

This endpoint will only return completed orders by default (no carts). However it is possible to use this endpoint as a “Search Carts” endpoint by combining two parameters. If you wish to include IN_PROGRESS orders AKA carts you can set the exclude_in_progress query param to false.

If you want to use order search to only search for IN_PROGRESS orders, that is to say, searching for carts, you can include the the following query in your search body: {"bag_status": "IN_PROGRESS"}. You must still set exclude_in_progress to false in this case.

Headers

X-Violet-Token
string
required
X-Violet-App-Secret
string
required
X-Violet-App-Id
integer
required

Query Parameters

page
integer
default:1
size
integer
default:20
extended
boolean
default:false
exclude_in_progress
boolean
default:true
include
string

Body

application/json

Order Search Request

Response

default - application/json

default response

The response is of type object.