Send a notification
POST
/notifications/send
const url = 'https://acme.mykreezalid.com/api/v1/notifications/send';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"type":"new_order_customer","object_id":185423}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://acme.mykreezalid.com/api/v1/notifications/send \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "type": "new_order_customer", "object_id": 185423 }'Sends one of the marketplace’s e-mails about an order: new_order_customer (order confirmation to the customer), new_order_supplier (new order to the vendor), order_accepted_customer, order_canceled_customer, order_rejected_customer, order_shipping_fulfilment (shipment to the customer) and order_customer_confirmed (reception confirmed, to the vendor). object_id is the order’s identifier.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
type
required
The notification to send
string
object_id
required
Identifier of the order
integer
Example
{ "type": "new_order_customer", "object_id": 185423}Responses
Section titled “Responses”The notification has been sent
Media typeapplication/json
object
success
boolean
data
object
id
Identifier of the e-mail sent
integer
object_id
integer
content
object
subject
string
body
Body of the e-mail
string
created
YYYY-MM-DD HH:MM:SS
string
recipient
string
transport
string
type
Kind of e-mail sent
string
Example
{ "success": true, "data": { "id": 234432, "object_id": 185423, "content": { "subject": "You have a new order" }, "created": "2023-01-18 23:42:27", "recipient": "jane@example.com", "transport": "email" }}type or object_id is missing, the type is unknown or not available, or the notification could not be sent: error says why.
Media typeapplication/json
object
success
boolean
error
string
Example
{ "success": false, "error": "Bad Request - Missing type parameter"}No order has this identifier.
Media typeapplication/json
object
success
boolean
error
string
Example
{ "success": false, "error": "Bad Request - Missing type parameter"}