Unlocked Features
- Order cancellation workflow: Enables you to automate actions when an order is cancelled.
- Contact segmentation: Enables targeted communication by categorizing contacts based on specific criteria.
Supported Endpoints
| Endpoint | eventVersion | origin |
|---|---|---|
/v5/events (Events API) | v2 | api |
Example event
Below is an example event provided for testing. You can send this through the available endpoints to evaluate automation, segmentation, or any other custom functionalities.
Events API:
POST /v5/events
Host: api.omnisend.com
Content-Type: application/json
{
"eventName": "order canceled",
"origin": "api",
"eventID": "f3f61bc6-07b8-4645-92d8-189d882dbcb1",
"eventVersion": "v2",
"eventTime": "2021-07-01T00:00:00Z",
"contact": {
"email": "[email protected]"
},
"properties": {
"billingAddress": {
"address1": "123 Main Street",
"address2": "123 A Main Street",
"city": "AnyTown",
"company": "SuperCompany",
"country": "USA",
"firstName": "John",
"lastName": "Smith",
"phone": "+443031237300",
"state": "California",
"stateCode": "CA",
"zip": "90210"
},
"cancelReason": "Not needed",
"createdAt": "2023-11-10T07:00:00",
"currency": "EUR",
"discounts": [
{
"amount": "-",
"code": "SUMMER20",
"type": "-"
}
],
"fulfillmentStatus": "unfulfilled",
"lineItems": [
{
"productCategories": [
{
"id": "123",
"title": "Shoes"
}
],
"productDescription": "The best product with many various features",
"productDiscount": 10.19,
"productID": "1",
"productImageURL": "https://example.com/product/232423-image.jpg",
"productPrice": 19.99,
"productQuantity": 2,
"productSKU": 200,
"productTags": [
"new",
"sale"
],
"productTitle": "The best product",
"productURL": "https://example.com/product/232423",
"productVariantID": "123",
"productVariantImageURL": "https://example.com/product/232423-variant-image.jpg",
"productVariantTitle": "Full product title - Green",
"productVendor": "BestCompany",
"productWeight": 20.4
}
],
"note": "Please send it ASAP",
"orderID": "4122111",
"orderNumber": "4122111",
"orderStatusURL": "https://example.com/orders",
"paymentMethod": "card",
"paymentStatus": "awaitingPayment",
"shippingAddress": {
"address1": "123 Main Street",
"address2": "123 A Main Street",
"city": "AnyTown",
"company": "SuperCompany",
"country": "USA",
"firstName": "John",
"lastName": "Smith",
"phone": "+443031237300",
"state": "California",
"stateCode": "CA",
"zip": "90210"
},
"shippingMethod": "Example Courier",
"shippingPrice": 2.5,
"subTotalPrice": 19.99,
"subTotalTaxIncluded": false,
"tags": [
"not-paid"
],
"totalDiscount": 10.19,
"totalPrice": 15.99,
"totalTax": 5.99,
"tracking": {
"courierTitle": "Example Courier",
"courierURL": "https://courier-example.com/track-order"
}
}
}
Property explanation & expected types
| Value Path | Description | Example | Type |
|---|---|---|---|
| billingAddress | Billing Address | - | object |
| billingAddress.address1 | Address 1 | 123 Main Street | string |
| billingAddress.address2 | Address 2 | 123 A Main Street | string |
| billingAddress.city | City | AnyTown | string |
| billingAddress.company | Company | SuperCompany | string |
| billingAddress.country | Country | USA | string |
| billingAddress.firstName | First Name | John | string |
| billingAddress.lastName | Last Name | Smith | string |
| billingAddress.phone | Phone | +443031237300 | string |
| billingAddress.state | State | California | string |
| billingAddress.stateCode | State Code | CA | string |
| billingAddress.zip | Zip | 90210 | string |
| cancelReason | Free text reason why order was cancelled | Not needed | string |
| createdAt | Created At | 2023-11-10T07:00:00 | date string |
| currency | Currency code in ISO 4217 format | EUR | string |
| discounts[] | Discounts | - | array of objects |
| discounts[].amount | Amount | - | number |
| discounts[].code | Discount code that user has used | SUMMER20 | string |
| discounts[].type | Type | - | string |
| fulfillmentStatus | Fulfillment status that is recommended to be one of the followings: (unfulfilled, inProgress, fulfilled, delivered, restocked) | unfulfilled | string |
| lineItems[] | Order line items | - | array of objects |
| lineItems[].productCategories | Product Categories | - | array of objects |
| lineItems[].productCategories.id | Id | 123 | string |
| lineItems[].productCategories.title | Title | Shoes | string |
| lineItems[].productDescription | Product Description | The best product with many various features | string |
| lineItems[].productDiscount | Absolute value of product discount. I.e if current price is 20 and old price is 30, then discount should be 10. | 10.19 | number |
| lineItems[].productID | Product ID | 1 | string |
| lineItems[].productImageURL | Direct link to product image | https://example.com/product/232423-image.jpg | string |
| lineItems[].productPrice | Current product price | 19.99 | number |
| lineItems[].productQuantity | Total added quantity | 2 | number |
| lineItems[].productSKU | Current stock units | 200 | string |
| lineItems[].productStrikeThroughPrice | !! This field was removed !! | - | number |
| lineItems[].productTags | Product Tags | new,sale | array of strings |
| lineItems[].productTitle | Full product title | The best product | string |
| lineItems[].productURL | URL to product page | https://example.com/product/232423 | string |
| lineItems[].productVariantID | Product Variant ID | 123 | string |
| lineItems[].productVariantImageURL | Direct link to a product variant image | https://example.com/product/232423-variant-image.jpg | string |
| lineItems[].productVariantTitle | Product Variant Title | Full product title - Green | string |
| lineItems[].productVendor | Product Vendor | BestCompany | string |
| lineItems[].productWeight | Product Weight | 20.4 | number |
| note | Additional note left by customer or shop admin | Please send it ASAP | string |
| orderID | Order ID | 4122111 | string |
| orderNumber | Order Number | 4122111 | number |
| orderStatusURL | Direct link where customer can check their order status | https://example.com/orders | string |
| paymentMethod | Payment method used by customer | card | string |
| paymentStatus | Payment status that is recommended to be one of the followings: (awaitingPayment, partiallyPaid, paid, partiallyRefunded, refunded, voided) | awaitingPayment | string |
| shippingAddress | Shipping Address | - | object |
| shippingAddress.address1 | Address 1 | 123 Main Street | string |
| shippingAddress.address2 | Address 2 | 123 A Main Street | string |
| shippingAddress.city | City | AnyTown | string |
| shippingAddress.company | Company | SuperCompany | string |
| shippingAddress.country | Country | USA | string |
| shippingAddress.firstName | First Name | John | string |
| shippingAddress.lastName | Last Name | Smith | string |
| shippingAddress.phone | Phone | +443031237300 | string |
| shippingAddress.state | State | California | string |
| shippingAddress.stateCode | State Code | CA | string |
| shippingAddress.zip | Zip | 90210 | string |
| shippingMethod | Shipping Method | Example Courier | string |
| shippingPrice | Shipping Price | 2.5 | number |
| subTotalPrice | Sub Total Price | 19.99 | number |
| subTotalTaxIncluded | Sub Total Tax Included | - | boolean |
| tags | Order tags that were added by your shop | not-paid | array of strings |
| totalDiscount | Total Discount | 10.19 | number |
| totalPrice | Total Price | 15.99 | number |
| totalTax | Total Tax | 5.99 | number |
| tracking | Tracking | - | object |
| tracking.courierTitle | Courier Title | Example Courier | string |
| tracking.courierURL | Tracking url where user check check current order status. | https://courier-example.com/track-order | string |
| tracking.status | Status | - | string |