Skip to content

Send a notification

POST
/notifications/send
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.

Media typeapplication/json
object
type
required

The notification to send

string
Allowed values: new_order_customer new_order_supplier order_accepted_customer order_canceled_customer order_shipping_fulfilment order_rejected_customer order_customer_confirmed
object_id
required

Identifier of the order

integer

Example

{
"type": "new_order_customer",
"object_id": 185423
}

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"
}