Notification Mechanism


Overview

Notifications are used to inform about:

  • stock updates: products
  • status updates: products, orders and packages

Endpoint:https://<YOUR-WEBHOOK-URL>
Method: POST
Headers:

  • Accept: application/json
  • Content-Type: application/json

Payload fields:

  • received_at: When Olist service detected the change.
  • resource: Where the resource can be locate in the API.
  • sent_at: When Olist service sent the notification.
  • topic: Type of message.
  • seller_id: Id of seller associated with resource.

Expected response codes:

  • 201: Notification received
  • 400: Some error on payload
  • 401: Not authorized

Example of request payload:

{
	"received_at": "2017-09-27T17:31:15.365Z",
	"resource": "/seller-products/PRDK6YKGUHQ0IVOY/",
	"sent_at": "2017-09-27T17:31:15.779907",
	"topic": "products",
	"seller_id": "fd5d9f6f-6b95-4e1b-8bb8-6c1a7bca80f3"
}

Fields and respective meanings:

  • received_at: Instant when Olist service detected the change.
  • resource: Where the resource can be locate in the API.
  • sent_at: Instant when Olist service sent the notification.
  • topic: Type of message.
  • seller_id: Id of seller associated with the resource