Data Models: Order, LineItem, and Transaction
The following is an overview of the relevant data models provided by the Shop.
Order Model
{
"paymentStatus": "paid",
"customerName": "John Doe",
"customerEmail": "dev@1o.io",
"customerPhone": "+123456789",
"billingName": "John Doe",
"billingEmail": "dev@1o.io",
"billingPhone": "+123456789",
"billingAddressLine1": "Example address 132",
"billingAddressLine2": "Apt. 4",
"billingAddressCity": "Los Angeles",
"billingAddressState": "CA",
"billingAddressZip": "90002",
"billingAddressCountry": "United States",
"merchantOrganizationId": "3e90434d-9338-4356-8676-e7d99623a3ae",
"shippingName": "John Doe",
"shippingEmail": "dev@1o.io",
"shippingPhone": "+123456789",
"shippingAddressLine1": "Example address 132",
"shippingAddressLine2": "Apt. 4",
"shippingAddressCity": "Los Angeles",
"shippingAddressZip": "90002",
"shippingAddressCountry": "United States",
"storefrontId": "af59a33d-e5c2-47fd-98a7-2151f6dda571",
"fulfillmentStatus": "waiting",
"totalPrice": 1200,
"totalTax": 114,
"totalShipping": 500,
"total": 1814,
"currency": "USD",
"lineItems": [
{
"productId": "b6a3faa7-14a1-4629-b97e-9d7b62be8532",
"variantId": "b06676ee-f10b-4d23-8462-f2dd0c8c6f41",
"productMerchantData": "{\"RevOffersOrderMeta\":\"abcd-1234-efgh\"}",
"variantMerchantData": "{}",
"sku": "123456",
"name": "Fashion Police Pink S",
"imageUrl": "https://i.imgur.com/f6yn2DE.jpg",
"details": "Fuchsia Pink • S",
"quantity": 1,
"price": 1200,
"tax": 114,
"total": 1314,
"currency": "USD"
}
],
"transactions": [
{
"name": "Stripe charge",
"total": 1814,
"currency": "USD",
"gatewayData": "{\"id\":\"pi_3JpvQHIj7KMjryuv2N0jTGuR\"}",
"succeeded": true
}
]
}
Variable | Value | Description |
---|---|---|
storefrontId | String | Katalys internal ID of shop where order occurred |
merchantOrganizationId | String | Katalys internal ID of merchants organization |
paymentStatus | String(paid, pending, refunded or rejected) | Status of the payment for the order. |
customerName | String | Full name of the customer |
customerEmail | String | Email of the customer |
customerPhone | String | (Optional)Phone number of the customer |
billingName | String | Billing persons Full Name |
billingEmail | String | Billing persons Email |
billingPhone | String | (Optional)Billing persons Phone |
billingAddressLine1 | String | Billing persons Address Line 1 |
billingAddressLine2 | String | (Optional)Billing persons Address Line 2 |
billingAddressCity | String | Billing persons City |
billingAddressState | String | Billing persons State |
billingAddressZip | String | Billing persons Postal Code |
billingAddressCountry | String | Billing persons Country |
shippingName | String | Shipment recipient: Full Name |
shippingEmail | String | Shipment recipient: Email |
shippingPhone | String | (Optional)Shipment recipient: Phone |
shippingAddressLine1 | String | Shipping addres: Address Line 1 |
shippingAddressLine2 | String | (Optional)Shipping addres: Address Line 2 |
shippingAddressCity | String | Shipping addres: City |
shippingAddressState | String | Shipping addres: State |
shippingAddressZip | String | Shipping addres: Postal Code |
shippingAddressCountry | String | Shipping addres: Country |
fulfillmentStatus | String(fulfilled, waiting or cancelled) | Status of the fulfillment |
totalPrice | Integer | Total price of the products(quantity * products price) in cents |
totalShipping | Integer | Total shipping cost of the order in cents |
totalTax | Integer | Total charged tax in cents |
total | Integer | Total amount charged |
currency | String(ISO 4217) | Currency of the order |
lineItems | LineItem | Information about ordered goods |
transactions | Transaction | Information about all connected transactions |
LineItem Model
{
"productId": "b6a3faa7-14a1-4629-b97e-9d7b62be8532",
"variantId": "b06676ee-f10b-4d23-8462-f2dd0c8c6f41",
"productMerchantData": "{\"RevOffersOrderMeta\":\"abcd-1234-efgh\"}",
"variantMerchantData": "{}",
"sku": "123456",
"name": "Fashion Police Pink S",
"imageUrl": "https://i.imgur.com/f6yn2DE.jpg",
"details": "Fuchsia Pink • S",
"quantity": 1,
"price": 1200,
"tax": 114,
"total": 1314,
"currency": "USD"
}
Variable | Value | Description |
---|---|---|
productId | String | Katalys internal ID of shop where order occurred |
variantId | String | Katalys internal ID of merchants organization |
productMerchantData | String | (Enabled upon request) (Optional) Stringified JSON. Data added on product import provided by merchant - intended for their unique data(eg. attribution system) |
variantMerchantData | String | (Enabled upon request) (Optional) Stringified JSON. Data added on variant import provided by merchant - intended for their unique data(eg. attribution system) |
sku | String | (Optional) SKU of the item |
name | String | Name of the variant |
imageUrl | String | URL to the main image of the item |
details | String | Information about selected option |
quantity | Integer | Amount of specific item ordered |
price | Integer | Price of the item in cents |
tax | Integer | Tax for the item in cents |
total | Integer | Total cost of the item in cents |
currency | String(ISO 4217) | Currency of prices |
Transaction Model
{
"name": "Stripe charge",
"total": 1814,
"currency": "USD",
"gatewayData": "{\"id\":\"pi_3JpvQHIj7KMjryuv2N0jTGuR\"}",
"succeeded": true
}
Variable | Value | Description |
---|---|---|
name | String | Name of transaction and it's processor |
total | Integer | Amount processed in transaction in cents |
currency | String | Currency of the transaction |
gatewayData | String | Stringified JSON with additional data. Will always posses id of the transaction inside the platform |
succeeded | Boolean | True if transaction successfully completed |