Messages

A message represents a change or an action performed on a resource (like an Order or a Product). Messages can be seen as a subset of the change history for a resource inside a project. It is a subset because not all changes on resources result in messages. Messages can be pulled via a REST API, or they can be pushed into a Message Queue by defining a Subscription. Pulling through the REST API needs to be activated manually.

Enable feature

To optimize the performance of your project, the messages are not persisted on the REST API per default. The REST API feature needs to be explicitly enabled in the Developers > Danger Zone of the ↗ Admin Center EU and the ↗ Admin Center US .

Representations

Message

The following fields and their meanings are common to all messages:

The message contains further fields which describe change information (for example the fields of LineItemStateTransition when transitionLineItemState update action is performed on an Order).

Message fields that can be used in query predicates: createdAt, lastModifiedAt, id, version, sequenceNumber, resource, resourceVersion, type.

Messages Configuration

This object is used to to configure the parameters of the Messages feature for the project. It is stored in the Project’s messages field.

Get Message by ID

Endpoint: /{projectKey}/messages/{id}
Method: GET
OAuth2 Scopes: view_orders:{projectKey}
Response Representation: Message

Query Messages

Endpoint: /{projectKey}/messages
Method: GET
OAuth2 Scopes: view_orders:{projectKey}
Response Representation: PagedQueryResult with the results array of Message
Query Parameters:

Order Messages

These messages represent a change or an action performed on an Order.

LineItemStateTransition Message

This message is the result of the transitionLineItemState update action. In addition to the common Message fields, LineItemStateTransition message contains the following fields:

CustomLineItemStateTransition Message

This message is the result of the transitionCustomLineItemState update action. In addition to the common Message fields, CustomLineItemStateTransition message contains the following fields:

DeliveryAdded Message

This message is the result of the addDelivery update action. In addition to the common Message fields, DeliveryAdded message contains the following fields:

The Delivery will not contain Parcels if those were part of the initial addDelivery command. In that case an additional ParcelAddedToDelivery message will be emitted containing the Parcels.

ParcelAddedToDelivery Message

This message is the result of the addParcelToDelivery update action. In addition to the common Message fields, ParcelAddedToDelivery message contains the following fields:

ReturnInfoAdded Message

This message is the result of the addReturnInfo update action. In addition to the common Message fields, ReturnInfoAdded message contains the following fields:

OrderCreated Message

This message is created when a cart is ordered. In addition to the common Message fields, OrderCreated message contains the following fields:

OrderImported Message

This message is created when an order is imported. In addition to the common Message fields, OrderImported message contains the following fields:

OrderStateChanged Message

This message is created when the OrderState is changed. In addition to the common Message fields, OrderStateChanged message contains the following fields:

OrderStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, OrderStateTransition message contains the following fields:

OrderCustomerEmailSet Message

This message is created when the customer email of an existing order is modified. In addition to the common Message fields, OrderCustomerEmailSet message contains the following fields:

OrderShippingAddressSet Message

This message is created when the shipping address of an existing order is changed. In addition to the common Message fields, OrderShippingAddressSet message contains the following fields:

OrderBillingAddressSet Message

This message is created when the billing address of an existing order is modified. In addition to the common Message fields, OrderBillingAddressSet message contains the following fields:

OrderPaymentStateChanged Message

This message is the result of the changePaymentState update action. In addition to the common Message fields, OrderPaymentStateChanged message contains the following fields:

Product Messages

These messages represent a change or an action performed on a Product.

ProductCreated Message

This message is the result of the create product request. In addition to the common Message fields, ProductCreated message contains the following fields:

ProductPublished Message

This message is the result of the publish update action. In addition to the common Message fields, ProductPublished message contains the following fields:

ProductUnpublished Message

This message is the result of the unpublish update action. In addition to the common Message fields, ProductUnpublished message contains the following field:

ProductStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, ProductStateTransition message contains the following fields:

ProductSlugChanged Message

This message is the result of the changeSlug update action. In addition to the common Message fields, ProductSlugChanged message contains the following fields:

ProductImageAdded Message

This message is the result of the addExternalImage update action and the upload of an image. In addition to the common Message fields, ProductImageAdded message contains the following fields:

ProductRevertedStagedChanges Message

This message is the result of the revertStagedChanges update action. In addition to the common Message fields, ProductRevertedStagedChanges message contains the following fields:

ProductVariantDeleted Message

This message is the result of the removeProductvariant update action. In addition to the common Message fields, ProductVariantDeleted message contains the following fields:

ProductDeleted Message

This message is the result of the delete Product command. In addition to the common Message fields, ProductDeleted message contains the following fields:

Category Messages

These messages represent a change or an action performed on a Category.

CategoryCreated Message

This message is the result of the create category request. In addition to the common Message fields, CategoryCreated message contains the following fields:

CategorySlugChanged Message

This message is the result of the changeSlug update action. In addition to the common Message fields, CategorySlugChanged message contains the following fields:

Payment Messages

These messages represent a change or an action performed on a Payment.

PaymentCreated Message

This message is the result of a create action. In addition to the common Message fields, PaymentCreated message contains the following fields:

PaymentInteractionAdded Message

This message is the result of the addInterfaceInteraction update action. In addition to the common Message fields, PaymentInteractionAdded message contains the following field:

PaymentTransactionAdded Message

This message is the result of the addTransaction update action. In addition to the common Message fields, PaymentTransactionAdded message contains the following fields:

PaymentTransactionStateChanged Message

This message is the result of the changeTransactionState update action. In addition to the common Message fields, PaymentTransactionStateChanged message contains the following fields:

PaymentStatusStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, PaymentStatusStateTransition message contains the following fields:

PaymentStatusInterfaceCodeSet Message

This message is the result of the setStatusInterfaceCode update action. In addition to the common Message fields, PaymentStatusInterfaceCodeSet message contains the following fields:

Customer Messages

These messages represent a change or an action performed on a Customer.

CustomerCreated Message

This message is the result of the create customer request. In addition to the common Message fields, CustomerCreated message contains the following fields:

Review Messages

These messages represent a change or an action performed on a Review.

ReviewCreated Message

This message is the result of the create review request. In addition to the common Message fields, ReviewCreated message contains the following fields:

ReviewStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, ReviewStateTransition message contains the following fields:

ReviewRatingSet Message

This message is the result of the setRating update action. In addition to the common Message fields, ReviewRatingSet message contains the following fields:

InventoryEntry Messages

These messages represent a change or an action performed on an InventoryEntry.

InventoryEntryDeleted Message

This message is the result of the delete InventoryEntry request. In addition to the common Message fields, InventoryEntryDeleted message contains the following fields: