import Switchyard from "@switchyard/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.draftOrder.convertToOrder("order_123")
.then(({ order }) => {
console.log(order)
}){
"order": {
"payment_collections": [
{
"id": "<string>",
"currency_code": "<string>",
"amount": 123,
"status": "canceled",
"payment_providers": [
{
"id": "<string>",
"is_enabled": true
}
],
"authorized_amount": 123,
"captured_amount": 123,
"refunded_amount": 123,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"payment_sessions": [
{
"id": "<string>",
"amount": 123,
"currency_code": "usd",
"provider_id": "<string>",
"data": {},
"status": "authorized",
"context": {
"customer": {
"id": "cus_123"
}
},
"authorized_at": "2023-11-07T05:31:56Z",
"payment_collection": {},
"payment": {
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {}
}
}
],
"payments": [
{
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {}
},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {
"id": "<string>",
"amount": 123,
"currency_code": "usd",
"provider_id": "<string>",
"data": {},
"status": "authorized",
"context": {
"customer": {
"id": "cus_123"
}
},
"authorized_at": "2023-11-07T05:31:56Z",
"payment_collection": {},
"payment": {
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {}
}
}
}
]
}
],
"id": "<string>",
"version": 123,
"region_id": "<string>",
"customer_id": "<string>",
"sales_channel_id": "<string>",
"email": "jsmith@example.com",
"currency_code": "<string>",
"items": [
{
"id": "<string>",
"title": "<string>",
"subtitle": "<string>",
"thumbnail": "<string>",
"variant_id": "<string>",
"product_id": "<string>",
"product_title": "<string>",
"product_description": "<string>",
"product_subtitle": "<string>",
"product_type": "<string>",
"product_collection": "<string>",
"product_handle": "<string>",
"variant_sku": "<string>",
"variant_barcode": "<string>",
"variant_title": "<string>",
"variant_option_values": {
"Color": "Blue"
},
"requires_shipping": true,
"is_discountable": true,
"is_tax_inclusive": true,
"unit_price": 123,
"quantity": 123,
"detail": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"original_total": 123,
"original_subtotal": 123,
"original_tax_total": 123,
"item_total": 123,
"item_subtotal": 123,
"item_tax_total": 123,
"total": 123,
"subtotal": 123,
"tax_total": 123,
"discount_total": 123,
"discount_tax_total": 123,
"refundable_total": 123,
"refundable_total_per_unit": 123,
"product_type_id": "<string>",
"variant": {
"prices": [
{
"id": "<string>",
"title": "<string>",
"currency_code": "usd",
"amount": 123,
"raw_amount": {},
"min_quantity": 123,
"max_quantity": 123,
"price_set_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"title": "<string>",
"sku": "<string>",
"barcode": "<string>",
"ean": "<string>",
"upc": "<string>",
"allow_backorder": true,
"manage_inventory": true,
"hs_code": "<string>",
"origin_country": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"options": [
{
"id": "<string>",
"value": "<string>",
"option": {
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"thumbnail": "<string>",
"inventory_quantity": 123,
"variant_rank": 123,
"product": {},
"product_id": "<string>",
"calculated_price": {
"id": "<string>",
"calculated_amount": 123,
"original_amount": 123,
"currency_code": "usd",
"original_amount_with_tax": 123,
"original_amount_without_tax": 123,
"is_calculated_price_price_list": true,
"is_calculated_price_tax_inclusive": true,
"calculated_amount_with_tax": 123,
"calculated_amount_without_tax": 123,
"is_original_price_price_list": true,
"is_original_price_tax_inclusive": true,
"calculated_price": {},
"original_price": {}
},
"metadata": {},
"inventory_items": [
{
"id": "<string>",
"variant_id": "<string>",
"inventory_item_id": "<string>",
"variant": {},
"inventory": {
"id": "<string>",
"requires_shipping": true,
"sku": "<string>",
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"title": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"metadata": {},
"location_levels": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"inventory_item_id": "<string>",
"location_id": "<string>",
"stocked_quantity": 123,
"reserved_quantity": 123,
"incoming_quantity": 123,
"metadata": {},
"available_quantity": 123,
"inventory_item": {}
}
]
},
"required_quantity": 123
}
]
},
"product": {
"variants": [
{
"prices": [
{
"id": "<string>",
"title": "<string>",
"currency_code": "usd",
"amount": 123,
"raw_amount": {},
"min_quantity": 123,
"max_quantity": 123,
"price_set_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"title": "<string>",
"sku": "<string>",
"barcode": "<string>",
"ean": "<string>",
"upc": "<string>",
"allow_backorder": true,
"manage_inventory": true,
"hs_code": "<string>",
"origin_country": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"options": [
{
"id": "<string>",
"value": "<string>",
"option": {
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"thumbnail": "<string>",
"inventory_quantity": 123,
"variant_rank": 123,
"product": {},
"product_id": "<string>",
"calculated_price": {
"id": "<string>",
"calculated_amount": 123,
"original_amount": 123,
"currency_code": "usd",
"original_amount_with_tax": 123,
"original_amount_without_tax": 123,
"is_calculated_price_price_list": true,
"is_calculated_price_tax_inclusive": true,
"calculated_amount_with_tax": 123,
"calculated_amount_without_tax": 123,
"is_original_price_price_list": true,
"is_original_price_tax_inclusive": true,
"calculated_price": {},
"original_price": {}
},
"metadata": {},
"inventory_items": [
{
"id": "<string>",
"variant_id": "<string>",
"inventory_item_id": "<string>",
"variant": {},
"inventory": {
"id": "<string>",
"requires_shipping": true,
"sku": "<string>",
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"title": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"metadata": {},
"location_levels": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"inventory_item_id": "<string>",
"location_id": "<string>",
"stocked_quantity": 123,
"reserved_quantity": 123,
"incoming_quantity": 123,
"metadata": {},
"available_quantity": 123,
"inventory_item": {}
}
]
},
"required_quantity": 123
}
]
}
],
"type": {
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
},
"length": 123,
"title": "<string>",
"status": "draft",
"options": [
{
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"subtitle": "<string>",
"is_giftcard": true,
"thumbnail": "<string>",
"width": 123,
"weight": 123,
"height": 123,
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"collection_id": "<string>",
"type_id": "<string>",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"product": {},
"variants": [
{}
]
}
],
"discountable": true,
"external_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"collection": {
"id": "<string>",
"title": "<string>",
"handle": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"products": [
{
"variants": [
{}
],
"length": 123,
"title": "<string>",
"status": "draft",
"options": [
{
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{
"id": "<string>",
"value": "<string>",
"option": {},
"option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"subtitle": "<string>",
"is_giftcard": true,
"thumbnail": "<string>",
"width": 123,
"weight": 123,
"height": 123,
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"collection_id": "<string>",
"type_id": "<string>",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"discountable": true,
"external_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"collection": {
"id": "<string>",
"title": "<string>",
"handle": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"products": [
{}
]
},
"categories": [
{
"category_children": [
{
"category_children": [
{}
],
"parent_category": {},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
}
],
"parent_category": {
"category_children": [
{}
],
"parent_category": {},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
}
],
"type": {
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
},
"tags": [
{
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"metadata": {}
}
]
},
"categories": [
{
"category_children": [
{}
],
"parent_category": {},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
}
],
"sales_channels": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"is_disabled": true,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"tags": [
{
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"metadata": {},
"shipping_profile": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
},
"compare_at_unit_price": 123,
"tax_lines": [
{
"item": {},
"item_id": "<string>",
"total": 123,
"subtotal": 123,
"id": "<string>",
"code": "<string>",
"rate": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tax_rate_id": "<string>",
"provider_id": "<string>"
}
],
"adjustments": [
{
"item": {},
"item_id": "<string>",
"id": "<string>",
"amount": 123,
"order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"promotion_id": "<string>",
"provider_id": "<string>"
}
]
}
],
"shipping_methods": [
{
"id": "<string>",
"order_id": "<string>",
"name": "<string>",
"amount": 123,
"is_tax_inclusive": true,
"shipping_option_id": "<string>",
"data": {},
"metadata": {},
"original_total": 123,
"original_subtotal": 123,
"original_tax_total": 123,
"total": 123,
"subtotal": 123,
"tax_total": 123,
"discount_total": 123,
"discount_tax_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tax_lines": [
{
"shipping_method": {},
"shipping_method_id": "<string>",
"total": 123,
"subtotal": 123,
"id": "<string>",
"code": "<string>",
"rate": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tax_rate_id": "<string>",
"provider_id": "<string>"
}
],
"adjustments": [
{
"shipping_method": {},
"shipping_method_id": "<string>",
"id": "<string>",
"amount": 123,
"order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"promotion_id": "<string>",
"provider_id": "<string>"
}
],
"detail": {
"id": "<string>",
"shipping_method_id": "<string>",
"shipping_method": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"claim_id": "<string>",
"exchange_id": "<string>",
"return_id": "<string>"
}
}
],
"payment_status": "canceled",
"fulfillment_status": "canceled",
"summary": {
"paid_total": 123,
"refunded_total": 123,
"pending_difference": 123,
"current_order_total": 123,
"original_order_total": 123,
"transaction_total": 123,
"accounting_total": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"original_item_total": 123,
"original_item_subtotal": 123,
"original_item_tax_total": 123,
"item_total": 123,
"item_subtotal": 123,
"item_tax_total": 123,
"original_total": 123,
"original_subtotal": 123,
"original_tax_total": 123,
"total": 123,
"subtotal": 123,
"tax_total": 123,
"discount_total": 123,
"discount_tax_total": 123,
"gift_card_total": 123,
"gift_card_tax_total": 123,
"shipping_total": 123,
"shipping_subtotal": 123,
"shipping_tax_total": 123,
"original_shipping_total": 123,
"original_shipping_subtotal": 123,
"original_shipping_tax_total": 123,
"status": "<string>",
"credit_line_total": 123,
"item_discount_total": 123,
"shipping_discount_total": 123,
"fulfillments": [
{
"id": "<string>",
"location_id": "<string>",
"packed_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"data": {},
"provider_id": "<string>",
"shipping_option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"requires_shipping": true
}
],
"sales_channel": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"is_disabled": true,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"customer": {
"id": "<string>",
"has_account": true,
"email": "jsmith@example.com",
"default_billing_address_id": "<string>",
"default_shipping_address_id": "<string>",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"addresses": [
{
"id": "<string>",
"address_name": "<string>",
"is_default_shipping": true,
"is_default_billing": true,
"customer_id": "<string>",
"company": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"province": "us-ca",
"postal_code": "<string>",
"phone": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"groups": [
{
"id": "<string>",
"name": "<string>",
"customers": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"phone": "<string>",
"metadata": {},
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"shipping_address": {
"id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"company": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"country": {
"id": "<string>",
"iso_2": "us",
"iso_3": "usa",
"num_code": 840,
"name": "<string>",
"display_name": "<string>"
},
"province": "us-ca",
"postal_code": "<string>"
},
"billing_address": {
"id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"company": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"country": {
"id": "<string>",
"iso_2": "us",
"iso_3": "usa",
"num_code": 840,
"name": "<string>",
"display_name": "<string>"
},
"province": "us-ca",
"postal_code": "<string>"
},
"display_id": 123,
"transactions": [
{
"id": "<string>",
"order_id": "<string>",
"amount": 123,
"currency_code": "usd",
"reference": "capture",
"reference_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"region": {
"id": "<string>",
"name": "<string>",
"currency_code": "usd",
"automatic_taxes": true,
"countries": [
{
"id": "<string>",
"iso_2": "us",
"iso_3": "usa",
"num_code": 840,
"name": "<string>",
"display_name": "<string>"
}
],
"payment_providers": [
{
"id": "<string>",
"is_enabled": true
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"credit_lines": [
{
"id": "<string>",
"order_id": "<string>",
"order": {},
"reference": "<string>",
"reference_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"amount": 123
}
],
"custom_display_id": "<string>"
}
}Convert a draft order to an order. This will finalize the draft order and create a new order with the same details.
import Switchyard from "@switchyard/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.draftOrder.convertToOrder("order_123")
.then(({ order }) => {
console.log(order)
}){
"order": {
"payment_collections": [
{
"id": "<string>",
"currency_code": "<string>",
"amount": 123,
"status": "canceled",
"payment_providers": [
{
"id": "<string>",
"is_enabled": true
}
],
"authorized_amount": 123,
"captured_amount": 123,
"refunded_amount": 123,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"payment_sessions": [
{
"id": "<string>",
"amount": 123,
"currency_code": "usd",
"provider_id": "<string>",
"data": {},
"status": "authorized",
"context": {
"customer": {
"id": "cus_123"
}
},
"authorized_at": "2023-11-07T05:31:56Z",
"payment_collection": {},
"payment": {
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {}
}
}
],
"payments": [
{
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {}
},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {
"id": "<string>",
"amount": 123,
"currency_code": "usd",
"provider_id": "<string>",
"data": {},
"status": "authorized",
"context": {
"customer": {
"id": "cus_123"
}
},
"authorized_at": "2023-11-07T05:31:56Z",
"payment_collection": {},
"payment": {
"id": "<string>",
"amount": 123,
"currency_code": "<string>",
"provider_id": "<string>",
"authorized_amount": 123,
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"captured_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"captured_amount": 123,
"refunded_amount": 123,
"captures": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"created_by": "<string>"
}
],
"refunds": [
{
"id": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"payment": {},
"refund_reason_id": "<string>",
"note": "<string>",
"created_by": "<string>",
"refund_reason": {
"id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"metadata": {}
}
}
],
"payment_collection": {},
"payment_session": {}
}
}
}
]
}
],
"id": "<string>",
"version": 123,
"region_id": "<string>",
"customer_id": "<string>",
"sales_channel_id": "<string>",
"email": "jsmith@example.com",
"currency_code": "<string>",
"items": [
{
"id": "<string>",
"title": "<string>",
"subtitle": "<string>",
"thumbnail": "<string>",
"variant_id": "<string>",
"product_id": "<string>",
"product_title": "<string>",
"product_description": "<string>",
"product_subtitle": "<string>",
"product_type": "<string>",
"product_collection": "<string>",
"product_handle": "<string>",
"variant_sku": "<string>",
"variant_barcode": "<string>",
"variant_title": "<string>",
"variant_option_values": {
"Color": "Blue"
},
"requires_shipping": true,
"is_discountable": true,
"is_tax_inclusive": true,
"unit_price": 123,
"quantity": 123,
"detail": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"original_total": 123,
"original_subtotal": 123,
"original_tax_total": 123,
"item_total": 123,
"item_subtotal": 123,
"item_tax_total": 123,
"total": 123,
"subtotal": 123,
"tax_total": 123,
"discount_total": 123,
"discount_tax_total": 123,
"refundable_total": 123,
"refundable_total_per_unit": 123,
"product_type_id": "<string>",
"variant": {
"prices": [
{
"id": "<string>",
"title": "<string>",
"currency_code": "usd",
"amount": 123,
"raw_amount": {},
"min_quantity": 123,
"max_quantity": 123,
"price_set_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"title": "<string>",
"sku": "<string>",
"barcode": "<string>",
"ean": "<string>",
"upc": "<string>",
"allow_backorder": true,
"manage_inventory": true,
"hs_code": "<string>",
"origin_country": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"options": [
{
"id": "<string>",
"value": "<string>",
"option": {
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"thumbnail": "<string>",
"inventory_quantity": 123,
"variant_rank": 123,
"product": {},
"product_id": "<string>",
"calculated_price": {
"id": "<string>",
"calculated_amount": 123,
"original_amount": 123,
"currency_code": "usd",
"original_amount_with_tax": 123,
"original_amount_without_tax": 123,
"is_calculated_price_price_list": true,
"is_calculated_price_tax_inclusive": true,
"calculated_amount_with_tax": 123,
"calculated_amount_without_tax": 123,
"is_original_price_price_list": true,
"is_original_price_tax_inclusive": true,
"calculated_price": {},
"original_price": {}
},
"metadata": {},
"inventory_items": [
{
"id": "<string>",
"variant_id": "<string>",
"inventory_item_id": "<string>",
"variant": {},
"inventory": {
"id": "<string>",
"requires_shipping": true,
"sku": "<string>",
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"title": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"metadata": {},
"location_levels": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"inventory_item_id": "<string>",
"location_id": "<string>",
"stocked_quantity": 123,
"reserved_quantity": 123,
"incoming_quantity": 123,
"metadata": {},
"available_quantity": 123,
"inventory_item": {}
}
]
},
"required_quantity": 123
}
]
},
"product": {
"variants": [
{
"prices": [
{
"id": "<string>",
"title": "<string>",
"currency_code": "usd",
"amount": 123,
"raw_amount": {},
"min_quantity": 123,
"max_quantity": 123,
"price_set_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"id": "<string>",
"title": "<string>",
"sku": "<string>",
"barcode": "<string>",
"ean": "<string>",
"upc": "<string>",
"allow_backorder": true,
"manage_inventory": true,
"hs_code": "<string>",
"origin_country": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"options": [
{
"id": "<string>",
"value": "<string>",
"option": {
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"thumbnail": "<string>",
"inventory_quantity": 123,
"variant_rank": 123,
"product": {},
"product_id": "<string>",
"calculated_price": {
"id": "<string>",
"calculated_amount": 123,
"original_amount": 123,
"currency_code": "usd",
"original_amount_with_tax": 123,
"original_amount_without_tax": 123,
"is_calculated_price_price_list": true,
"is_calculated_price_tax_inclusive": true,
"calculated_amount_with_tax": 123,
"calculated_amount_without_tax": 123,
"is_original_price_price_list": true,
"is_original_price_tax_inclusive": true,
"calculated_price": {},
"original_price": {}
},
"metadata": {},
"inventory_items": [
{
"id": "<string>",
"variant_id": "<string>",
"inventory_item_id": "<string>",
"variant": {},
"inventory": {
"id": "<string>",
"requires_shipping": true,
"sku": "<string>",
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"weight": 123,
"length": 123,
"height": 123,
"width": 123,
"title": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"metadata": {},
"location_levels": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"inventory_item_id": "<string>",
"location_id": "<string>",
"stocked_quantity": 123,
"reserved_quantity": 123,
"incoming_quantity": 123,
"metadata": {},
"available_quantity": 123,
"inventory_item": {}
}
]
},
"required_quantity": 123
}
]
}
],
"type": {
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
},
"length": 123,
"title": "<string>",
"status": "draft",
"options": [
{
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"subtitle": "<string>",
"is_giftcard": true,
"thumbnail": "<string>",
"width": 123,
"weight": 123,
"height": 123,
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"collection_id": "<string>",
"type_id": "<string>",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"product": {},
"variants": [
{}
]
}
],
"discountable": true,
"external_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"collection": {
"id": "<string>",
"title": "<string>",
"handle": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"products": [
{
"variants": [
{}
],
"length": 123,
"title": "<string>",
"status": "draft",
"options": [
{
"id": "<string>",
"title": "<string>",
"product": {},
"product_id": "<string>",
"values": [
{
"id": "<string>",
"value": "<string>",
"option": {},
"option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"subtitle": "<string>",
"is_giftcard": true,
"thumbnail": "<string>",
"width": 123,
"weight": 123,
"height": 123,
"origin_country": "<string>",
"hs_code": "<string>",
"mid_code": "<string>",
"material": "<string>",
"collection_id": "<string>",
"type_id": "<string>",
"images": [
{
"id": "<string>",
"url": "<string>",
"rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"discountable": true,
"external_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"collection": {
"id": "<string>",
"title": "<string>",
"handle": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"products": [
{}
]
},
"categories": [
{
"category_children": [
{
"category_children": [
{}
],
"parent_category": {},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
}
],
"parent_category": {
"category_children": [
{}
],
"parent_category": {},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
}
],
"type": {
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
},
"tags": [
{
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"metadata": {}
}
]
},
"categories": [
{
"category_children": [
{}
],
"parent_category": {},
"name": "<string>",
"description": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"handle": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"is_active": true,
"is_internal": true,
"rank": 123,
"parent_category_id": "<string>",
"products": [
{}
],
"metadata": {}
}
],
"sales_channels": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"is_disabled": true,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"tags": [
{
"id": "<string>",
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"metadata": {},
"shipping_profile": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
},
"compare_at_unit_price": 123,
"tax_lines": [
{
"item": {},
"item_id": "<string>",
"total": 123,
"subtotal": 123,
"id": "<string>",
"code": "<string>",
"rate": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tax_rate_id": "<string>",
"provider_id": "<string>"
}
],
"adjustments": [
{
"item": {},
"item_id": "<string>",
"id": "<string>",
"amount": 123,
"order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"promotion_id": "<string>",
"provider_id": "<string>"
}
]
}
],
"shipping_methods": [
{
"id": "<string>",
"order_id": "<string>",
"name": "<string>",
"amount": 123,
"is_tax_inclusive": true,
"shipping_option_id": "<string>",
"data": {},
"metadata": {},
"original_total": 123,
"original_subtotal": 123,
"original_tax_total": 123,
"total": 123,
"subtotal": 123,
"tax_total": 123,
"discount_total": 123,
"discount_tax_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tax_lines": [
{
"shipping_method": {},
"shipping_method_id": "<string>",
"total": 123,
"subtotal": 123,
"id": "<string>",
"code": "<string>",
"rate": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"tax_rate_id": "<string>",
"provider_id": "<string>"
}
],
"adjustments": [
{
"shipping_method": {},
"shipping_method_id": "<string>",
"id": "<string>",
"amount": 123,
"order_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"promotion_id": "<string>",
"provider_id": "<string>"
}
],
"detail": {
"id": "<string>",
"shipping_method_id": "<string>",
"shipping_method": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"claim_id": "<string>",
"exchange_id": "<string>",
"return_id": "<string>"
}
}
],
"payment_status": "canceled",
"fulfillment_status": "canceled",
"summary": {
"paid_total": 123,
"refunded_total": 123,
"pending_difference": 123,
"current_order_total": 123,
"original_order_total": 123,
"transaction_total": 123,
"accounting_total": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"original_item_total": 123,
"original_item_subtotal": 123,
"original_item_tax_total": 123,
"item_total": 123,
"item_subtotal": 123,
"item_tax_total": 123,
"original_total": 123,
"original_subtotal": 123,
"original_tax_total": 123,
"total": 123,
"subtotal": 123,
"tax_total": 123,
"discount_total": 123,
"discount_tax_total": 123,
"gift_card_total": 123,
"gift_card_tax_total": 123,
"shipping_total": 123,
"shipping_subtotal": 123,
"shipping_tax_total": 123,
"original_shipping_total": 123,
"original_shipping_subtotal": 123,
"original_shipping_tax_total": 123,
"status": "<string>",
"credit_line_total": 123,
"item_discount_total": 123,
"shipping_discount_total": 123,
"fulfillments": [
{
"id": "<string>",
"location_id": "<string>",
"packed_at": "2023-11-07T05:31:56Z",
"shipped_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"data": {},
"provider_id": "<string>",
"shipping_option_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"requires_shipping": true
}
],
"sales_channel": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"is_disabled": true,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"customer": {
"id": "<string>",
"has_account": true,
"email": "jsmith@example.com",
"default_billing_address_id": "<string>",
"default_shipping_address_id": "<string>",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"addresses": [
{
"id": "<string>",
"address_name": "<string>",
"is_default_shipping": true,
"is_default_billing": true,
"customer_id": "<string>",
"company": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"province": "us-ca",
"postal_code": "<string>",
"phone": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"groups": [
{
"id": "<string>",
"name": "<string>",
"customers": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"phone": "<string>",
"metadata": {},
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"shipping_address": {
"id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"company": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"country": {
"id": "<string>",
"iso_2": "us",
"iso_3": "usa",
"num_code": 840,
"name": "<string>",
"display_name": "<string>"
},
"province": "us-ca",
"postal_code": "<string>"
},
"billing_address": {
"id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"company": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"country": {
"id": "<string>",
"iso_2": "us",
"iso_3": "usa",
"num_code": 840,
"name": "<string>",
"display_name": "<string>"
},
"province": "us-ca",
"postal_code": "<string>"
},
"display_id": 123,
"transactions": [
{
"id": "<string>",
"order_id": "<string>",
"amount": 123,
"currency_code": "usd",
"reference": "capture",
"reference_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"metadata": {},
"region": {
"id": "<string>",
"name": "<string>",
"currency_code": "usd",
"automatic_taxes": true,
"countries": [
{
"id": "<string>",
"iso_2": "us",
"iso_3": "usa",
"num_code": 840,
"name": "<string>",
"display_name": "<string>"
}
],
"payment_providers": [
{
"id": "<string>",
"is_enabled": true
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"credit_lines": [
{
"id": "<string>",
"order_id": "<string>",
"order": {},
"reference": "<string>",
"reference_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"amount": 123
}
],
"custom_display_id": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The draft order's ID.
The parameters for retrieving draft orders.
Comma-separated fields that should be included in the returned data. if a field is prefixed with + it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.
OK
An order's details.
The order's details.
Show child attributes
The order's payment collections.
Show child attributes
The payment collection's ID.
The payment collection's currency code.
The total amount to be paid.
The payment collection's status.
canceled, not_paid, awaiting, authorized, partially_authorized The total authorized amount of the collection's payments.
The total captured amount of the collection's payments.
The total refunded amount of the collection's payments.
The date the payment collection was completed.
The date the payment collection was created.
The date the payment collection was updated.
The payment collection's metadata, can hold custom key-value pairs.
The payment collection's payment sessions.
Show child attributes
The payment session's ID.
The payment session's amount.
The payment session's currency code.
"usd"
The ID of the payment provider processing this session.
The payment session's data, useful for the payment provider processing the payment.
The payment session's status.
authorized, captured, canceled, pending, requires_more, error The context around the payment, such as the customer's details.
{ "customer": { "id": "cus_123" } }The date the payment session was authorized.
The payment's details.
Show child attributes
The payment's ID.
The payment's amount.
The payment's currency code.
The ID of the payment provider used to process this payment.
The amount authorized of the payment.
The payment's data, useful for processing by the payment provider.
The date the payment was created.
The date the payment was updated.
The date the payment was captured.
The date the payment was canceled.
The captured amount of the payment.
The refunded amount of the payment.
The details of payment captures.
Show child attributes
The payment capture's ID.
The captured amount.
The date the capture was created.
The ID of the user that captured the payment.
The details of payment refunds.
Show child attributes
The refund's ID.
The refund's amount.
The date the refund was created.
The ID of the refund reason.
More details about the refund.
The ID of the user that created the refund.
The refund reason's details.
Show child attributes
The refund reason's ID.
The refund reason's label.
The date the refund reason was created.
The date the refund reason was updated.
The refund reason's code.
The refund reason's description.
The refund reason's metadata, can hold custom key-value pairs.
The payment collection's payments.
Show child attributes
The payment's ID.
The payment's amount.
The payment's currency code.
The ID of the payment provider used to process this payment.
The amount authorized of the payment.
The payment's data, useful for processing by the payment provider.
The date the payment was created.
The date the payment was updated.
The date the payment was captured.
The date the payment was canceled.
The captured amount of the payment.
The refunded amount of the payment.
The details of payment captures.
Show child attributes
The payment capture's ID.
The captured amount.
The date the capture was created.
The ID of the user that captured the payment.
The details of payment refunds.
Show child attributes
The refund's ID.
The refund's amount.
The date the refund was created.
The payment's details.
Show child attributes
The payment's ID.
The payment's amount.
The payment's currency code.
The ID of the payment provider used to process this payment.
The amount authorized of the payment.
The payment's data, useful for processing by the payment provider.
The date the payment was created.
The date the payment was updated.
The date the payment was captured.
The date the payment was canceled.
The captured amount of the payment.
The refunded amount of the payment.
The details of payment captures.
Show child attributes
The payment capture's ID.
The captured amount.
The date the capture was created.
The ID of the user that captured the payment.
The details of payment refunds.
Show child attributes
The refund's ID.
The refund's amount.
The date the refund was created.
The ID of the refund reason.
More details about the refund.
The ID of the user that created the refund.
The refund reason's details.
Show child attributes
The refund reason's ID.
The refund reason's label.
The date the refund reason was created.
The date the refund reason was updated.
The refund reason's code.
The refund reason's description.
The refund reason's metadata, can hold custom key-value pairs.
The ID of the refund reason.
More details about the refund.
The ID of the user that created the refund.
The refund reason's details.
Show child attributes
The refund reason's ID.
The refund reason's label.
The date the refund reason was created.
The date the refund reason was updated.
The refund reason's code.
The refund reason's description.
The refund reason's metadata, can hold custom key-value pairs.
The payment session's details.
Show child attributes
The payment session's ID.
The payment session's amount.
The payment session's currency code.
"usd"
The ID of the payment provider processing this session.
The payment session's data, useful for the payment provider processing the payment.
The payment session's status.
authorized, captured, canceled, pending, requires_more, error The context around the payment, such as the customer's details.
{ "customer": { "id": "cus_123" } }The date the payment session was authorized.
The payment's details.
Show child attributes
The payment's ID.
The payment's amount.
The payment's currency code.
The ID of the payment provider used to process this payment.
The amount authorized of the payment.
The payment's data, useful for processing by the payment provider.
The date the payment was created.
The date the payment was updated.
The date the payment was captured.
The date the payment was canceled.
The captured amount of the payment.
The refunded amount of the payment.
The details of payment captures.
Show child attributes
The payment capture's ID.
The captured amount.
The date the capture was created.
The ID of the user that captured the payment.
The details of payment refunds.
Show child attributes
The refund's ID.
The refund's amount.
The date the refund was created.
The ID of the refund reason.
More details about the refund.
The ID of the user that created the refund.
The refund reason's details.
Show child attributes
The refund reason's ID.
The refund reason's label.
The date the refund reason was created.
The date the refund reason was updated.
The refund reason's code.
The refund reason's description.
The refund reason's metadata, can hold custom key-value pairs.
The order's ID.
The order's version.
The ID of the region associated with the order.
The ID of the customer that placed the order.
The ID of the sales channel the order is placed in.
The email of the customer that placed the order.
The order's currency code.
The order's items.
Show child attributes
The item's ID.
The item's title.
The item's subtitle.
The URL of the item's thumbnail.
The ID of the associated variant.
The ID of the associated product.
The item's product title.
The item's product description.
The item's product subtitle.
The item's product type.
The ID of the collection the item's product belongs to.
The item's product handle.
The item's variant SKU.
The item's variant barcode.
The item's variant title.
The values of the item variant's options.
{ "Color": "Blue" }Whether the item requires shipping.
Whether the item is discountable.
Whether the item is tax inclusive.
The item's unit price.
The item's quantity.
The date the item was created.
The date the item was updated.
The item's metadata, can hold custom key-value pairs.
The item's total including taxes, excluding promotions.
The item's total excluding taxes, including promotions.
The total taxes of the item, excluding promotions.
The total taxes of the item, including promotions.
The item's total excluding taxes, including promotions.
The total taxes of the item, including promotions.
The item's total, including taxes and promotions.
The item's subtotal excluding taxes, including promotions.
The tax total of the item including promotions.
The total discount amount of the item.
The total taxes applied on the discounted amount.
The total refundable amount of the item's total.
The total refundable amount of the item's total for a single quantity.
The ID of the associated product's type.
The product variant's details.
Show child attributes
The variant's prices.
Show child attributes
The price's ID.
The price's title.
The price's currency code.
"usd"
The price's amount.
The price's raw amount.
The minimum quantity that must be available in the cart for the price to be applied.
The maximum quantity allowed to be available in the cart for the price to be applied.
The ID of the associated price set.
The date the price was created.
The date the price was updated.
The date the price was deleted.
The variant's ID.
The variant's title.
The variant's SKU.
The variant's barcode.
The variant's EAN code.
The variant's UPC.
Whether the variant can be ordered even if it's out of stock.
Whether the Medusa application manages the variant's inventory quantity and availablility. If disabled, the variant is always considered in stock.
The variant's HS code.
The variant's origin country.
The variant's MID code.
The variant's material.
The variant's weight.
The variant's length.
The variant's height.
The variant's width.
The variant's option values.
Show child attributes
The value's ID.
The value.
The product option's details.
Show child attributes
The product option's ID.
The product option's title.
The ID of the product this option belongs to.
The product option's values.
The product option's metadata, can hold custom key-value pairs.
The date the product option was created.
The date the product option was updated.
The date the product option was deleted.
The ID of the option this value belongs to.
The value's metadata, can hold custom key-value pairs.
The date the value was created.
The date the value was updated.
The date the value was deleted.
The date the variant was created.
The date the variant was updated.
The date the variant was deleted.
The variant's images.
Show child attributes
The image's ID.
The image's URL.
The image's rank among its sibling images.
The date the image was created.
The date the image was updated.
The date the image was deleted.
The image's metadata, can hold custom key-value pairs.
The variant's thumbnail.
The variant's inventory quantity. This is only included if you pass in the fields query parameter a +variants.inventory_quantity parameter.
The variant's rank among its sibling variants.
The ID of the product that the variant belongs to.
The calculated price's details.
Show child attributes
The calculated price's ID.
The amount of the calculated price, or null if there isn't a calculated price. This is the amount shown to the customer.
The amount of the original price, or null if there isn't an original price. This amount is useful to compare with the calculated_amount, such as to check for discounted value.
The calculated price's currency code.
"usd"
The amount of the original price with taxes applied.
The amount of the original price without taxes.
Whether the calculated price belongs to a price list.
Whether the calculated price is tax inclusive.
The calculated price's amount with taxes applied.
The calculated price's amount without taxes applied.
Whether the original price belongs to a price list.
Whether the original price is tax inclusive.
The calculated price's details.
The original price's details.
The variant's metadata, can hold custom key-value pairs.
The variant's inventory items.
Show child attributes
The ID of the association.
The associated product variant's ID.
The associated inventory item's ID.
The inventory item's details.
Show child attributes
The inventory item's ID.
Whether the inventory item requires shipping.
The inventory item's sku.
The inventory item's origin country.
The inventory item's HS code.
The inventory item's MID code.
The inventory item's material.
The inventory item's weight.
The inventory item's length.
The inventory item's height.
The inventory item's width.
The inventory item's title.
The inventory item's description.
The thumbnail URL of the inventory item.
Custom key-value pairs, used to store additional information about the inventory item.
The inventory item's location levels.
Show child attributes
The location level's ID.
The location level's created at.
The location level's updated at.
The location level's deleted at.
The location level's inventory item id.
The location level's location id.
The location level's stocked quantity.
The location level's reserved quantity.
The location level's incoming quantity.
The location level's metadata.
The location level's available quantity.
The inventory item's required quantity.
The product's details.
Show child attributes
The product's variants.
Show child attributes
The variant's prices.
Show child attributes
The price's ID.
The price's title.
The price's currency code.
"usd"
The price's amount.
The price's raw amount.
The minimum quantity that must be available in the cart for the price to be applied.
The maximum quantity allowed to be available in the cart for the price to be applied.
The ID of the associated price set.
The date the price was created.
The date the price was updated.
The date the price was deleted.
The variant's ID.
The variant's title.
The variant's SKU.
The variant's barcode.
The variant's EAN code.
The variant's UPC.
Whether the variant can be ordered even if it's out of stock.
Whether the Medusa application manages the variant's inventory quantity and availablility. If disabled, the variant is always considered in stock.
The variant's HS code.
The variant's origin country.
The variant's MID code.
The variant's material.
The variant's weight.
The variant's length.
The variant's height.
The variant's width.
The variant's option values.
Show child attributes
The value's ID.
The value.
The product option's details.
Show child attributes
The product option's ID.
The product option's title.
The ID of the product this option belongs to.
The product option's values.
The product option's metadata, can hold custom key-value pairs.
The date the product option was created.
The date the product option was updated.
The date the product option was deleted.
The ID of the option this value belongs to.
The value's metadata, can hold custom key-value pairs.
The date the value was created.
The date the value was updated.
The date the value was deleted.
The date the variant was created.
The date the variant was updated.
The date the variant was deleted.
The variant's images.
Show child attributes
The image's ID.
The image's URL.
The image's rank among its sibling images.
The date the image was created.
The date the image was updated.
The date the image was deleted.
The image's metadata, can hold custom key-value pairs.
The variant's thumbnail.
The variant's inventory quantity. This is only included if you pass in the fields query parameter a +variants.inventory_quantity parameter.
The variant's rank among its sibling variants.
The ID of the product that the variant belongs to.
The calculated price's details.
Show child attributes
The calculated price's ID.
The amount of the calculated price, or null if there isn't a calculated price. This is the amount shown to the customer.
The amount of the original price, or null if there isn't an original price. This amount is useful to compare with the calculated_amount, such as to check for discounted value.
The calculated price's currency code.
"usd"
The amount of the original price with taxes applied.
The amount of the original price without taxes.
Whether the calculated price belongs to a price list.
Whether the calculated price is tax inclusive.
The calculated price's amount with taxes applied.
The calculated price's amount without taxes applied.
Whether the original price belongs to a price list.
Whether the original price is tax inclusive.
The calculated price's details.
The original price's details.
The variant's metadata, can hold custom key-value pairs.
The variant's inventory items.
Show child attributes
The ID of the association.
The associated product variant's ID.
The associated inventory item's ID.
The inventory item's details.
Show child attributes
The inventory item's ID.
Whether the inventory item requires shipping.
The inventory item's sku.
The inventory item's origin country.
The inventory item's HS code.
The inventory item's MID code.
The inventory item's material.
The inventory item's weight.
The inventory item's length.
The inventory item's height.
The inventory item's width.
The inventory item's title.
The inventory item's description.
The thumbnail URL of the inventory item.
Custom key-value pairs, used to store additional information about the inventory item.
The inventory item's location levels.
Show child attributes
The location level's ID.
The location level's created at.
The location level's updated at.
The location level's deleted at.
The location level's inventory item id.
The location level's location id.
The location level's stocked quantity.
The location level's reserved quantity.
The location level's incoming quantity.
The location level's metadata.
The location level's available quantity.
The inventory item's required quantity.
The product type's details.
Show child attributes
The type's ID.
The type's value.
The date the type was created.
The date the type was updated.
The date the type was deleted.
The type's metadata, can hold custom key-value pairs.
The product's length.
The product's title.
The product's status.
draft, proposed, published, rejected The product's options.
Show child attributes
The product option's ID.
The product option's title.
The ID of the product this option belongs to.
The product option's values.
The product option's metadata, can hold custom key-value pairs.
The date the product option was created.
The date the product option was updated.
The date the product option was deleted.
The product's description.
The product's ID.
The date the product was created.
The date the product was updated.
The product's unique handle.
The product's subtitle.
Whether the product is a gift card.
The product's thumbnail.
The product's width.
The product's weight.
The product's height.
The product's origin country.
The product's HS code.
The product's MID code.
The product's material.
The ID of the collection that the product belongs to.
The ID of the product's type.
The product's images.
Show child attributes
The image's ID.
The image's URL.
The image's rank among sibling images.
The date the image was created.
The date the image was updated.
The date the image was deleted.
The image's metadata, can hold custom key-value pairs.
The variants associated with the image.
Whether discounts can be applied on the product.
The ID of a product in an external system, such as an ERP or CMS.
The date the product was deleted.
The product collection's details.
Show child attributes
The collection's ID.
The collection's title.
The collection's handle.
The collection's creation date.
The collection's update date.
The collection's deletion date.
The collection's metadata, used to store custom key-value pairs.
The collection's products.
Show child attributes
The product's variants.
The product's length.
The product's title.
The product's status.
draft, proposed, published, rejected The product's options.
Show child attributes
The product option's ID.
The product option's title.
The ID of the product this option belongs to.
The product option's values.
Show child attributes
The value's ID.
The value.
The ID of the option this value belongs to.
The value's metadata, can hold custom key-value pairs.
The date the value was created.
The date the value was updated.
The date the value was deleted.
The product option's metadata, can hold custom key-value pairs.
The date the product option was created.
The date the product option was updated.
The date the product option was deleted.
The product's description.
The product's ID.
The date the product was created.
The date the product was updated.
The product's unique handle.
The product's subtitle.
Whether the product is a gift card.
The product's thumbnail.
The product's width.
The product's weight.
The product's height.
The product's origin country.
The product's HS code.
The product's MID code.
The product's material.
The ID of the collection that the product belongs to.
The ID of the product's type.
The product's images.
Show child attributes
The image's ID.
The image's URL.
The image's rank among its sibling images.
The date the image was created.
The date the image was updated.
The date the image was deleted.
The image's metadata, can hold custom key-value pairs.
Whether discounts can be applied on the product.
The ID of a product in an external system, such as an ERP or CMS.
The date the product was deleted.
The product collection's details.
Show child attributes
The collection's ID.
The collection's title.
The collection's handle.
The collection's creation date.
The collection's update date.
The collection's deletion date.
The collection's metadata, used to store custom key-value pairs.
The collection's products.
The product's categories.
Show child attributes
The category's children.
Show child attributes
The category's children.
The category's name.
The category's description.
The category's ID.
The date the category was created.
The date the category was updated.
The category's unique handle.
The date the category was deleted.
Whether the category is active. If disabled, the category isn't shown in the storefront.
Whether the category is internal. If enabled, the category is only seen by admin users.
The category's rank among sibling categories.
The ID of the category's parent.
The category's products.
The category's metadata, can hold custom key-value pairs.
The product category's details.
Show child attributes
The category's children.
The category's name.
The category's description.
The category's ID.
The date the category was created.
The date the category was updated.
The category's unique handle.
The date the category was deleted.
Whether the category is active. If disabled, the category isn't shown in the storefront.
Whether the category is internal. If enabled, the category is only seen by admin users.
The category's rank among sibling categories.
The ID of the category's parent.
The category's products.
The category's metadata, can hold custom key-value pairs.
The category's name.
The category's description.
The category's ID.
The date the category was created.
The date the category was updated.
The category's unique handle.
The date the category was deleted.
Whether the category is active. If disabled, the category isn't shown in the storefront.
Whether the category is internal. If enabled, the category is only seen by admin users.
The category's rank among sibling categories.
The ID of the category's parent.
The category's products.
The category's metadata, can hold custom key-value pairs.
The product type's details.
Show child attributes
The type's ID.
The type's value.
The date the type was created.
The date the type was updated.
The date the type was deleted.
The type's metadata, can hold custom key-value pairs.
The product's tags.
Show child attributes
The tag's ID.
The tag's value.
The date the tag was created.
The date the tag was updated.
The date the tag was deleted.
The tag's metadata, can hold custom key-value pairs.
The product's metadata, can hold custom key-value pairs.
The product's categories.
Show child attributes
The category's children.
The category's name.
The category's description.
The category's ID.
The date the category was created.
The date the category was updated.
The category's unique handle.
The date the category was deleted.
Whether the category is active. If disabled, the category isn't shown in the storefront.
Whether the category is internal. If enabled, the category is only seen by admin users.
The category's rank among sibling categories.
The ID of the category's parent.
The category's products.
The category's metadata, can hold custom key-value pairs.
The sales channels that the product is available in.
Show child attributes
The sales channel's ID.
The sales channel's name.
The sales channel's description.
Whether the sales channel is disabled.
The sales channel's metadata, can hold custom key-value pairs.
The date the sales channel was created.
The date the sales channel was updated.
The date the sales channel was deleted.
The product's tags.
Show child attributes
The tag's ID.
The tag's value.
The date the tag was created.
The date the tag was updated.
The date the tag was deleted.
The tag's metadata, can hold custom key-value pairs.
The product's metadata, can hold custom key-value pairs.
The shipping profile's details..
Show child attributes
The shipping profile's ID.
The shipping profile's name.
The shipping profile's type.
The shipping profile's metadata, holds custom key-value pairs.
The date the shipping profile was created.
The date the shipping profile was updated.
The date the shipping profile was deleted.
The original price of the item before a promotion or sale.
The item's tax lines.
Show child attributes
The ID of the associated line item.
The tax line's total including promotions.
The tax line's subtotal excluding promotions.
The tax line's ID.
The code that the tax rate is identified by.
The rate to charge.
The date the tax line was created.
The date the tax line was updated.
The tax line's description.
The ID of the applied tax rate.
The ID of the tax provider used to calculate the tax line.
The item's adjustments.
Show child attributes
The ID of the item this adjustment applies to.
The adjustment's ID.
The adjustment's amount.
The ID of the associated order.
The date the adjustment was created.
The date the adjustment was updated.
The adjustment's code.
The adjustment's description.
The ID of the promotion that this applies on the order's item.
The adjustment's provider ID.
The order's shipping methods.
Show child attributes
The shipping method's ID.
The ID of the order the shipping method belongs to.
The shipping method's name.
The shipping method's amount.
Whether the shipping method's amount includes applied taxes.
The ID of the shipping option this method was created from.
The shipping method's data, useful for fulfillment provider handling its fulfillment.
The shipping method's metadata, can hold custom key-value pairs.
The shipping method's total including taxes, excluding promotions.
The shipping method's total excluding taxes, including promotions.
The shipping method's total taxes excluding promotions.
The shipping method's total including taxes and promotions.
The shipping method's total excluding taxes, including promotions.
The shipping method's tax total including promotions.
The total discounts applied on the shipping method.
The taxes applied on the discount amount.
The date the shipping method was created.
The date the shipping method was updated.
The shipping method's description.
The shipping method's tax lines.
Show child attributes
The ID of the shipping method this tax line belongs to.
The shipping method's total including taxes and promotions.
The shipping method's total excluding taxes, including promotions.
The tax line's ID.
The code that the tax rate is identified by.
The rate to charge.
The date the tax line was created.
The date the tax line was updated.
The tax line's description.
The ID of the applied tax rate.
The ID of the tax provider handling the tax calculation.
The shipping method's adjustments.
Show child attributes
The ID of the shipping method this adjustment applies on.
The adjustment's ID.
The adjustment's amount.
The ID of the associated order.
The date the adjustment was created.
The date the adjustment was updated.
The adjustment's code.
The adjustment's description.
The ID of the promotion applied by this adjustment.
The adjustment's provider ID.
Details of changes to a shipping method.
Show child attributes
The ID of the new changes to the shipping method.
The ID of the shipping method.
The date the shipping method change was created.
The date the shipping method change was updated.
The ID of the associated claim.
The ID of the associated exchange.
The ID of the associated return.
The order's payment status.
canceled, not_paid, awaiting, authorized, partially_authorized, captured, partially_captured, partially_refunded, refunded, requires_action The order's fulfillment status.
canceled, not_fulfilled, partially_fulfilled, fulfilled, partially_shipped, shipped, partially_delivered, delivered The order's summary details.
Show child attributes
The total amount paid.
The total amount refunded.
The difference pending to be processed. If negative, the customer needs a refund. Otherwise, additional payment is required from the customer.
The order's current total, could be the total after a change in the order.
The order's original total.
The total of the transactions made on the order.
The order's total without the credit-line total.
The date the order was created.
The date the order was updated.
The total of the order's items including taxes, excluding promotions.
The total of the order's items excluding taxes, including promotions.
The tax total of the order's items excluding promotions.
The total of the order's items including taxes and promotions.
The total of the order's items excluding taxes, including promotions.
The tax total of the order's items including promotions.
The order's total excluding promotions, including taxes.
The order's total excluding taxes, including promotions.
The order's tax total, excluding promotions.
The order's total including taxes and promotions.
The order's total excluding taxes, including promotions.
The order's tax total including promotions.
The order's discount or promotions total.
The tax total of order's discount or promotion.
The order's gift card total.
The tax total of the order's gift card.
The order's shipping total including taxes and promotions.
The order's shipping total excluding taxes, including promotions.
The tax total of the order's shipping.
The order's shipping total including taxes, excluding promotions.
The order's shipping total excluding taxes, including promotions.
The tax total of the order's shipping excluding promotions.
The order's status.
The order's credit line total.
The total discount amount applied on the order's items.
The total discount amount applied on the order's shipping.
The order's fulfillments.
Show child attributes
The fulfillment's ID.
The ID of the location the items are fulfilled from.
The date the items were packed.
The date the items were shipped.
The date the items were delivered.
The date the items were canceled.
Data useful for the fulfillment provider handling it. This is taken from the associated shipping option.
The ID of the fulfillment provider used to handle the fulfillment.
The ID of the associated shipping option.
The fulfillment's metadata, can hold custom key-value pairs.
The date the fulfillment was created.
The date the fulfillment was updated.
Whether the fulfillment requires shipping.
The sales channel's details.
Show child attributes
The sales channel's ID.
The sales channel's name.
The sales channel's description.
Whether the sales channel is disabled.
The sales channel's metadata, can hold custom key-value pairs.
The date the sales channel was created.
The date the sales channel was updated.
The date the sales channel was deleted.
The customer's details.
Show child attributes
The customer's ID.
Whether the customer is registered.
The customer's email.
The ID of the address used as the default billing address.
The ID of the address used as the default shipping address.
The customer's company name.
The customer's first name.
The customer's last name.
The customer's addresses.
Show child attributes
The address's ID.
The address's name.
Whether the address is the default shipping address.
Whether the address is the default billing address.
The ID of the customer that this address belongs to.
The customer's company.
The customer's first name.
The customer's last name.
The address's first line.
The address's second line.
The address's city.
The address's country code.
"us"
The address's lower-case ISO 3166-2 province code.
"us-ca"
The address's postal code.
The address's phone.
The address's metadata, used to store custom key-value pairs.
The address's creation date.
The address's update date.
The customer's groups.
Show child attributes
The customer group's ID.
The customer group's name.
The customer group's customers.
The customer group's metadata, used to store custom key-value pairs.
The customer group's creation date.
The customer group's update date.
The customer's phone.
The customer's metadata, used to store custom key-value pairs.
The ID of the user that created this customer, if available.
The customer's creation date.
The customer's update date.
The customer's deletion date.
An order address.
Show child attributes
The address's ID.
The address's metadata, can hold custom key-value pairs.
The date the address was created.
The date the address was updated.
The ID of the customer this address belongs to.
The address's first name.
The address's last name.
The address's phone.
The address's company.
The address's first line.
The address's second line.
The address's city.
The address's country code.
"us"
The country's details.
Show child attributes
The country's ID.
The country's iso 2.
"us"
The country's iso 3.
"usa"
The country's num code.
840
The country's name.
The country's display name.
The address's lower-case ISO 3166-2 province code.
"us-ca"
The address's postal code.
An order address.
Show child attributes
The address's ID.
The address's metadata, can hold custom key-value pairs.
The date the address was created.
The date the address was updated.
The ID of the customer this address belongs to.
The address's first name.
The address's last name.
The address's phone.
The address's company.
The address's first line.
The address's second line.
The address's city.
The address's country code.
"us"
The country's details.
Show child attributes
The country's ID.
The country's iso 2.
"us"
The country's iso 3.
"usa"
The country's num code.
840
The country's name.
The country's display name.
The address's lower-case ISO 3166-2 province code.
"us-ca"
The address's postal code.
The order's display ID.
The order's transactions.
Show child attributes
The transaction's ID.
The ID of the order this transaction belongs to.
The transaction's amount.
The transaction's currency code.
"usd"
The name of a table that this transaction references. If this transaction is for captured payment, its value is capture. If this transaction is for refunded payment, its value is refund.
capture, refund The ID of the referenced record in the referenced table.
The transaction's metadata, can hold custom key-value pairs.
The date that the transaction was created.
The date that the transaction was updated.
The order's metadata, can hold custom key-value pairs.
The region's details.
Show child attributes
The region's ID.
The region's name.
The region's currency code.
"usd"
Whether taxes are applied automatically during checkout.
The region's countries.
Show child attributes
The country's ID.
The country's iso 2.
"us"
The country's iso 3.
"usa"
The country's num code.
840
The country's name.
The country's display name.
The region's metadata, can hold custom key-value pairs.
The date the region was created.
The date the region was updated.
The order's credit lines.
Show child attributes
The credit line's ID.
The ID of the associated order.
The table that this credit line references. For example, payment_collection.
The ID of the record in the referenced table. For example, paycol_123.
The credit line's metadata, can hold custom key-value pairs.
The date the credit line was created.
The date the credit line was updated.
The credit line's amount.
The custom display ID of the order.