POST
/
orders
/
search
curl --request POST \
  --url https://sandbox-api.violet.io/v1/orders/search \
  --header 'Content-Type: application/json' \
  --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>"
}'
{
  "content": [
    {
      "id": 123,
      "token": "<string>",
      "errors": [
        {
          "id": 123,
          "order_id": 123,
          "bag_id": 123,
          "entity_id": "<string>",
          "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": {
        "user_id": 123,
        "first_name": "<string>",
        "last_name": "<string>",
        "email": "<string>",
        "external_id": "<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>",
          "first_name": "<string>",
          "last_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>",
          "first_name": "<string>",
          "last_name": "<string>"
        },
        "same_address": true,
        "name": "<string>"
      },
      "bags": [
        {
          "id": 123,
          "order_id": 123,
          "merchant_id": 123,
          "app_id": 123,
          "external_id": "<string>",
          "status": "IN_PROGRESS",
          "fulfillment_status": "PROCESSING",
          "financial_status": "UNPAID",
          "skus": [
            {
              "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,
              "CustomProperties": [
                {
                  "name": "engraving",
                  "value": "Happy Birthday!"
                }
              ],
              "quantity_fulfilled": 123,
              "order_sku_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": true,
          "transactions": [
            {
              "id": 123,
              "merchant_id": 123,
              "app_id": 123,
              "order_id": 123,
              "bag_id": 123,
              "payment_method_id": 123,
              "gateway_transaction_id": "<string>",
              "gateway": "<string>",
              "amount": 123,
              "currency": "<string>",
              "type": "AUTHORIZATION",
              "error_code": "<string>",
              "status": "PROCESSING",
              "test": true,
              "date_created": "2023-11-07T05:31:56Z",
              "date_last_modified": "2023-11-07T05:31:56Z",
              "order_payment_method": {
                "brand": "<string>",
                "last_four": "<string>",
                "exp_month": 123,
                "exp_year": 123,
                "cardholder_name": "<string>",
                "payment_method_id": 123,
                "default": true
              }
            }
          ],
          "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",
          "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"
            }
          ],
          "wallet_based_checkout": true,
          "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>",
        "first_name": "<string>",
        "last_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>",
        "first_name": "<string>",
        "last_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": 123,
      "shipping_total": 123,
      "tax_total": 123,
      "discount_total": 123,
      "total": 123,
      "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",
      "priced": true,
      "wallet_based_checkout": true,
      "currency": "<string>",
      "referral_id": "<string>",
      "currency_symbol": "<string>",
      "app_name": "<string>",
      "stripe_key": "<string>",
      "payment_intent_client_secret": "<string>",
      "guest": true,
      "order_status": "IN_PROGRESS",
      "intent_based_checkout": true,
      "order_id": 123
    }
  ],
  "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
X-Violet-App-Secret
string
X-Violet-App-Id
integer

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
user_id
integer

User ID

order_id
integer

Order ID

referral_id
string

Referral ID

bag_id
integer

Bag ID

bag_status
enum<string>

Bag Status

Available options:
IN_PROGRESS,
SUBMITTED,
ACCEPTED,
COMPLETED,
PARTIALLY_REFUNDED,
REFUNDED,
REJECTED,
CANCELED,
BACKORDERED
merchant_id
integer

Merchant ID

before_date
string

Before date

after_date
string

After date

app_order_id
string

Order ID in the Channels System

Response

default - application/json
content
object[]

The actual content of the response; A list of the result objects

last
boolean

Boolean indicating if this is the last page

total_pages
integer

The total count of pages available

total_elements
integer

The total count of objects available

first
boolean

Boolean indicating if this is the first page of the response

number_of_elements
integer

The total number of objects in this specific response

size
integer

The page size selected at request time

number
integer

The page number selected at request time

empty
boolean

Boolean indicating if the response content is empty

next_page_cursor
string

Contains the cursor for the next page. This property will only be used for situations where the API does not support the page number/page size paradigm and it will mutually exclusive with the size/number fields in the response. If this property is returned it must be passed when requesting the next page from the API. Does not apply to endpoints that do not have a next_page_cursor query param documented.

pageable
object

Violet wrapper for springframework pageable

sort
object

Violet Wrapper for springframework sort