Create Order
Direct order submission allows channels to submit fully composed orders, including their own tax and shipping calculations, in a single request to the merchant through Violet. This feature overrides the platform's built-in pricing engine, ensuring accuracy in the merchant's system of record and customer communications.
Learn more about Direct Order Submission in this guide.
Submission Date
At the time of order submission a date_submitted
property on the Order and Bag objects will be populated with ISO 8601 datetime values that reflect the submission time. On the Order object this value will capture the last time the Order was submitted to Violet. Each Bag object within the Order object will reflect the last time an attempt was made to submit the Bag to the external commerce platform.
successful operation
bad request
unauthorized
not found
internal server error
POST /v1/orders HTTP/1.1
Host: sandbox-api.violet.io
X-Violet-Token: text
X-Violet-App-Secret: text
X-Violet-App-Id: 1
Content-Type: application/json
Accept: */*
Content-Length: 646
{
"payment_method": {
"type": "SINGLE_USE_CARD_TOKEN",
"payment_provider": "STRIPE",
"token": "tok_i1s2h8a9nyg1ukrju12h31kj212kh"
},
"order": {
"app_order_id": "mario-test-1",
"customer": {
"first_name": "Ultra",
"last_name": "Violet",
"email": "[email protected]"
},
"bags": [
{
"skus": [
{
"sku_id": 80455,
"price": 100000
}
],
"shipping_method": {
"label": "Teleportation",
"price": 10000
},
"tax_total": 10000
}
],
"shipping_address": {
"address_1": "2815 Elliott Ave",
"address_2": "Unit 100",
"city": "Seattle",
"state": "WA",
"country": "US",
"postal_code": "98121"
},
"billing_address": {
"address_1": "200 West Street",
"city": "New York",
"state": "NY",
"country": "US",
"postal_code": "10282"
},
"currency": "USD"
}
}
id: 54609
token: f9bd116404dc4441838a94f31a942d5f
errors: []
app_id: 10193
developer_id: 10122
customer:
first_name: Ultra
last_name: Violet
email: [email protected]
name: Ultra Violet
bags:
- id: 64579
order_id: 54609
merchant_id: 10064
captureStatus: ACCEPTED
fulfillment_status: PROCESSING
financial_status: PAID
skus:
- id: 60509
merchant_id: 10064
app_id: 10193
product_id: 815b064726de41d9a21de4bfc029416f
sku_id: 80445
external_id: 42519630413999
name: Lunar Lemonade - 10 oz.
brand: Space Drinks
thumbnail: https://cdn.shopify.com/s/files/1/0621/1849/4383/files/wealthy_lunar_lemonade_4a9c0731-8758-4847-91e1-d6d37d6ace22.png
quantity: 1
price: 100000
weight: 3
available: true
captureStatus: PROCESSING
product_type: PHYSICAL
line_price: 100000
shipping_method:
type: FLAT_RATE_PRICE
carrier: OTHER
label: Teleportation
price: 10000
custom: false
id: 21839
merchant_id: 10064
taxes:
- order_id: 54609
merchant_id: 10064
state: WA
rate: 10
amount: 10000
discounts:
- id: 33333
bag_id: 64579
sku_id: 80445
status: APPLIED
type: CODE
value_type: PERCENTAGE
code: CHELSEADABEST
target_type: SKU
percentage: 10.0
amount_total: 10000
date_created: '2024-06-28T01:01:01+0000'
date_last_modified: '2024-06-28T01:01:01+0000'
sub_total: 100000
shipping_total: 10000
tax_total: 10000
discount_total: 10000
total: 110000
taxes_included: false
transactions: []
external_checkout: false
commission_rate: 0
date_created: '2024-06-28T20:31:56+0000'
date_last_modified: '2024-06-28T20:31:56.000+00:00'
remorse_period_ends: '2024-07-28T20:31:56+0000'
currency: USD
external_currency: USD
channel: MARKETPLACE
app_order_id: ishan-test-1
platform: SHOPIFY
fulfillments: []
wallet_based_checkout: false
bag_id: 64579
bag_status: ACCEPTED
merchant_name: Space Drinks
shipping_address:
name: Ultra Violet
city: Seattle
state: WA
country: US
postal_code: 98121
type: BILLING
address_1: 2815 Elliott Ave
address_2: Unit 100
first_name: Ultra
last_name: Violet
billing_address:
name: Ultra Violet
city: New York
state: NY
country: US
postal_code: 10282
type: BILLING
address_1: 200 West Street
first_name: Ultra
last_name: Violet
payment_transactions:
- id: 31464
order_id: 54627
payment_provider: STRIPE
payment_provider_transaction_id: pi_3PXoWvK29KDiBVld1n7ym4B0
payment_method_id: 10630
payment_provider_payment_method_id: pm_1PXoWvK29KDiBVldLNqe04Oi
payment_intent_client_secret: pi_3PXoWvK29KDiBVld1n7ym4B0_secret_tB77zb3BoTCKigUe5R38hrCKS
amount: 110000
metadata:
payment_intent_client_secret: pi_3PXoWvK29KDiBVld1n7ym4B0_secret_tB77zb3BoTCKigUe5R38hrCKS
payment_intent_id: pi_3PXoWvK29KDiBVld1n7ym4B0
currency: USD
captureStatus: CAPTURED
errors: []
date_created: '2024-07-01T18:00:45+0000'
date_last_modified: '2024-07-01T18:00:48+0000'
sub_total: 100000
shipping_total: 10000
tax_total: 10000
discount_total: 10000
total: 110000
app_order_id: mario-test-1
captureStatus: COMPLETED
is_guest: true
date_created: 2024-06-28T20:31:56+0000
date_last_modified: 2024-06-28T20:31:56+0000
priced: true
wallet_based_checkout: false
currency: USD
channel: MARKETPLACE
currency_symbol: '$'
intent_based_checkout: true
order_status: COMPLETED
order_id: 54609
guest: true
Last updated
Was this helpful?