POST

/v1/checkout/cart

X-Violet-Token
X-Violet-App-Secret
X-Violet-App-Id
curl --request POST \
  --url https://sandbox-api.violet.io/v1/checkout/cart \
  --header 'Content-Type: application/json'
{
  "app_customer_id": "string",
  "app_id": "integer",
  "app_name": "string",
  "app_order_id": "string",
  "bags": [
    {
      "app_id": "integer",
      "app_name": "string",
      "app_order_id": "string",
      "bag_id": "integer",
      "bag_status": "IN_PROGRESS",
      "channel": "APP",
      "commission_rate": "number",
      "currency": "string",
      "currency_exchange_rate": "number",
      "date_created": "string",
      "discount_total": "integer",
      "discounts": [
        {
          "amount": "integer",
          "amount_total": "integer",
          "bag_id": "integer",
          "code": "string",
          "date_created": "string",
          "date_last_modified": "string",
          "external_id": "string",
          "id": "integer",
          "percentage": "number",
          "status": "PENDING",
          "type": "CODE",
          "value_type": "AMOUNT"
        }
      ],
      "external_checkout": "boolean",
      "external_currency": "string",
      "external_id": "string",
      "financial_status": "UNPAID",
      "fulfillment_status": "PROCESSING",
      "fulfillments": [
        {
          "bag_id": "integer",
          "carrier": "OTHER",
          "carrier_status": "PENDING",
          "external_id": "string",
          "id": "integer",
          "raw_carrier": "string",
          "skus": [
            {
              "fulfillment_id": "integer",
              "id": "integer",
              "order_sku_id": "integer",
              "quantity_fulfilled": "integer"
            }
          ],
          "status": "PENDING",
          "tracking_number": "string",
          "tracking_url": "string"
        }
      ],
      "id": "integer",
      "merchant_id": "integer",
      "merchant_name": "string",
      "order_id": "integer",
      "platform": "OTHER",
      "remorse_period_ends": "string",
      "shipping_method": {
        "Carrier": "ups",
        "bag_id": "integer",
        "external_id": "string",
        "id": "integer",
        "label": "string",
        "max_subtotal": "integer",
        "max_weight": "number",
        "merchant_id": "integer",
        "min_subtotal": "integer",
        "min_weight": "number",
        "price": "integer",
        "shipping_method_id": "string",
        "tracking_number": "string",
        "type": "variable"
      },
      "shipping_total": "integer",
      "skus": [
        {
          "app_id": "integer",
          "available": "boolean",
          "brand": "string",
          "external_id": "string",
          "height": "number",
          "id": "integer",
          "length": "number",
          "line_price": "integer",
          "merchant_id": "integer",
          "name": "string",
          "order_sku_rates": [
            {
              "amount": "integer",
              "decimal_rate": "number",
              "dollar_amount": "number",
              "name": "string",
              "order_sku_id": "integer",
              "rate": "number",
              "type": "TAX"
            }
          ],
          "price": "integer",
          "product_id": "string",
          "product_type": "PHYSICAL",
          "quantity": "integer",
          "quantity_fulfilled": "integer",
          "sku_id": "integer",
          "status": "IN_PROGRESS",
          "thumbnail": "string",
          "transient_external_product_id": "string",
          "weight": "number",
          "width": "number"
        }
      ],
      "status": "IN_PROGRESS",
      "sub_total": "integer",
      "tax_total": "integer",
      "taxes": [
        {
          "amount": "integer",
          "description": "string",
          "merchant_id": "integer",
          "order_id": "integer",
          "postal_code": "string",
          "rate": "number",
          "skus": [
            "string"
          ],
          "state": "string"
        }
      ],
      "taxes_included": "boolean",
      "total": "integer",
      "transactions": [
        {
          "amount": "integer",
          "app_id": "integer",
          "bag_id": "integer",
          "currency": "string",
          "date_created": "string",
          "date_last_modified": "string",
          "error_code": "string",
          "gateway": "string",
          "gateway_transaction_id": "string",
          "id": "integer",
          "merchant_id": "integer",
          "order_id": "integer",
          "order_payment_method": {
            "brand": "string",
            "cardholder_name": "string",
            "default": "boolean",
            "exp_month": "integer",
            "exp_year": "integer",
            "last_four": "string",
            "payment_method_id": "integer"
          },
          "payment_method_id": "integer",
          "status": "PROCESSING",
          "test": "boolean",
          "type": "AUTHORIZATION"
        }
      ],
      "wallet_based_checkout": "boolean"
    }
  ],
  "billing_address": {
    "address_1": "string",
    "address_2": "string",
    "city": "string",
    "country": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "name": "string",
    "phone": "string",
    "postal_code": "string",
    "state": "string",
    "type": "shipping"
  },
  "currency": "string",
  "currency_symbol": "string",
  "customer": {
    "billing_address": {
      "address_1": "string",
      "address_2": "string",
      "city": "string",
      "country": "string",
      "email": "string",
      "first_name": "string",
      "last_name": "string",
      "name": "string",
      "phone": "string",
      "postal_code": "string",
      "state": "string",
      "type": "shipping"
    },
    "email": "string",
    "external_id": "string",
    "first_name": "string",
    "last_name": "string",
    "name": "string",
    "same_address": "boolean",
    "shipping_address": {
      "address_1": "string",
      "address_2": "string",
      "city": "string",
      "country": "string",
      "email": "string",
      "first_name": "string",
      "last_name": "string",
      "name": "string",
      "phone": "string",
      "postal_code": "string",
      "state": "string",
      "type": "shipping"
    },
    "user_id": "integer"
  },
  "date_created": "string",
  "date_last_modified": "string",
  "developer_id": "integer",
  "discount_total": "integer",
  "errors": [
    {
      "bag_id": "integer",
      "date_created": "string",
      "entity_id": "string",
      "id": "integer",
      "message": "string",
      "order_id": "integer",
      "platform": "OTHER",
      "type": "EXTERNAL_CREATE_CART"
    }
  ],
  "guest": "boolean",
  "id": "integer",
  "intent_based_checkout": "boolean",
  "is_guest": "boolean",
  "order_id": "integer",
  "order_status": "IN_PROGRESS",
  "payment_intent_client_secret": "string",
  "payment_method": {
    "brand": "string",
    "cardholder_name": "string",
    "default": "boolean",
    "exp_month": "integer",
    "exp_year": "integer",
    "last_four": "string",
    "payment_method_id": "integer"
  },
  "priced": "boolean",
  "referral_id": "string",
  "shipping_address": {
    "address_1": "string",
    "address_2": "string",
    "city": "string",
    "country": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string",
    "name": "string",
    "phone": "string",
    "postal_code": "string",
    "state": "string",
    "type": "shipping"
  },
  "shipping_total": "integer",
  "status": "in_progress",
  "stripe_key": "string",
  "sub_total": "integer",
  "tax_total": "integer",
  "token": "string",
  "total": "integer",
  "user_id": "integer",
  "wallet_based_checkout": "boolean"
}

Create a Cart in Violet. Violet will create carts in any underlying E-Commerce platforms in parallel.

Carts are dynamic in Violet. Not all fields my be populated at any given point in time. If there are any issues during the Checkout process, errors will be present in the errors field on the Cart.

Headers

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

Query Parameters

apply_current_user
Default: false
boolean
default_payment
Default: false
boolean
app_order_id
string
base_currency
string
referral_id
string
channel
enum<string>
Available options:
APP,
MARKETPLACE,
FACEBOOK,
INSTAGRAM,
WALMART,
GOOGLE,
TIKTOK,
SNAPCHAT,
PINTEREST
async
Default: true
boolean

Body

application/json
app_order_id
string

Map the order in Violet to an order record within your system

base_currency
string

Base currency of cart

customer
object

The Customer Placing the Order

discounts
object[]

Optional collection of Discounts

referral_id
string

Associate the order with a user or affiliate in your system

skus
object[]

Optional collection of SKUs

wallet_based_checkout
boolean

Boolean denoting whether or not this order will be placed through a wallet based payment mechanism such as apple pay

Response

200 - application/json
app_customer_id
string

App Customer ID

app_id
integer

ID of the App creating the order

app_name
string

Name of app that originated the order.

app_order_id
string

App Order ID

bags
object[]

Bags in the Order

billing_address
object

The shipping or billing address of a user placing an order

currency
string

Base currency of cart

currency_symbol
string

Symbol representing the desired currency

customer
object

The Customer Placing the Order

date_created
string

Date of order creation

date_last_modified
string

Date of last order update

developer_id
integer

ID of the Developer who placed

discount_total
integer

Discount Total of the Order

errors
object[]

Errors on the Order

guest
boolean
id
integer
intent_based_checkout
boolean
is_guest
boolean

Order is Guest

order_id
integer
order_status
enum<string>
Available options:
IN_PROGRESS,
PROCESSING,
COMPLETED,
CANCELED,
PARTIALLY_REFUNDED,
REFUNDED,
REQUIRES_ACTION
payment_intent_client_secret
string

Payment intent client secret

payment_method
object

Payment Method belonging to an Order

priced
boolean

Is the cart priced

referral_id
string

Optional value used to represent an identifier in your system.

shipping_address
object

The shipping or billing address of a user placing an order

shipping_total
integer

Shipping Total of the Order

statusrequired
enum<string>

Status of the Order

Available options:
in_progress,
processing,
completed,
canceled,
partially_refunded,
refunded,
requires_action
stripe_key
string

Stripe publishable key. Use for tokenizing payment methods.

sub_total
integer

Subtotal of the Order

tax_total
integer

Tax Total of the Order

token
string
total
integer

Total of the Order

user_id
integer

ID of the User placing the order

wallet_based_checkout
boolean

Is this cart going to be placed through wallet-based checkout