Skip to main content

Event-Stream Webhooks (v0)

Download OpenAPI specification:Download

Sends Newstore events to subscribed webhooks or S3 buckets

Incoming call from NewStore that contains an event. The event is described in the request.

Managing duplicate events: You can receive data from Newstore via Event stream webhooks, as Newstore supports emitting data at least once to your integration point. However, Event stream webhooks sometimes deliver events more than once. To protect your integration point from duplicate events, we advise you to make your event processing idempotent. You can detect duplicate events by comparing your event's idempotency key with the idempotency keys of previous events. For each event, you will see an idempotency key in your webhook description. For more information, see Stripe's blog on idempotency or the NewStore guide.

NOTE: Currently the idempotency key is only unique per event. Add the event name to the idempotency key to get a unique key across all events.

Order of events: You will not receive events in a specific order. You may receive an order.cancelled event before the corresponding order.created event.

Event delivery: We take at most 15 minutes to send an event to your integration endpoint according to the service-level agreement (SLA) between a retailer and NewStore. However, usually, it takes seconds to complete this operation.

Response code: The response code you send back decides whether the whole stream should be interrupted or maintained. See the Responses section below for more information.

Deprecation note: The order.shipped event has been deprecated. Use the order.completed event for data related to orders that are closed in the NewStore platform.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
tenant
required
string

The tenant name.

name
required
string
Enum: "fulfillment_request.assigned" "fulfillment_request.items_completed" "fulfillment_request.items_failed" "fulfillment_request.items_ready_for_handover" "order.created" "order.opened" "order.shipped" "order.completed" "order.cancelled" "order.items_swapped" "order.items_cancelled" "order.items_on_hold" "order.serial_numbers_added" "invoice.created" "return.processed" "refund_request.issued" "payment_account.amount_authorized" "payment_account.amount_captured" "payment_account.amount_refunded" "payment_account.amount_voided" "inventory_transaction.items_received" "inventory_transaction.items_ready_for_handover" "inventory_transaction.asn_created" "inventory_transaction.asn_closed" "inventory_transaction.adjustment_created" "inventory_transaction.transfer_order_created" "inventory_transaction.transfer_order_closed" "inventory_count.items_counted" "customer.created" "customer.updated" "customer.address_created" "customer.address_updated" "customer.address_deleted" "employee.created" "employee.updated" "cash_drawer.activity_recorded" "cash_drawer.count_submitted" "cash_drawer.drawer_created" "cash_drawer.drawer_updated" "cash_drawer.float_defined" "cash_drawer.transaction_completed" "gift_card.deactivated"

The name of the external event.

published_at
required
string <date-time>

UTC timestamp indicating when this event was generated.

required
object or object or order.completed (object) or order.cancelled (object) or order.items_cancelled (object) or order.items_on_hold (object) or order.serial_numbers_added (object) or order.items_swapped (object) or invoice.created (object) or return.processed (object) or fulfillment_request.assigned (object) or fulfillment_request.items_completed (object) or fulfillment_request.items_failed (object) or fulfillment_request.items_ready_for_handover (object) or refund_request.issued (object) or Generic payment account event payload. (object) or Generic payment account event payload. (object) or Generic payment account event payload. (object) or Generic payment account event payload. (object) or inventory_transaction.items_received (object) or inventory_transaction.items_ready_for_handover (object) or inventory_transaction.asn_created (object) or inventory_transaction.asn_closed (object) or inventory_transaction.adjustment_created (object) or inventory_transaction.transfer_order_created (object) or inventory_transaction.transfer_order_closed (object) or inventory_count.items_counted (object) or customer.created (object) or customer.updated (object) or customer.address_created (object) or customer.address_updated (object) or customer.address_deleted (object) or employee.created (object) or employee.updated (object) or cash_drawer.transaction_completed (object) or cash_drawer.drawer_created (object) or cash_drawer.drawer_updated (object) or cash_drawer.count_submitted (object) or cash_drawer.float_defined (object) or cash_drawer.activity_recorded (object) or gift_card.deactivated (object)

Content of the event defined by the 'name' property.

Responses

Request samples

Content type
application/json
Example

The order has been successfully created in the NewStore Omnichannel Cloud.

If the payment authorization fails, this event is not emitted but you might be able to see this order in NewStore Omnichannel Manager, depending on your configuration.

This event is sent at the beginning of the grace period.

See the order lifecycle for more information about the possible next events to expect.

Idempotency key: id

{
  • "tenant": "businessname",
  • "name": "order.created",
  • "published_at": "2010-01-01T12:00:00.000Z",
  • "payload": {
    }
}