Listen to user and emit notifications
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/notification/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'tenant-key: <tenant-key>' \
--data '
{
"id": "<string>",
"notificationType": "<string>",
"documentType": "<string>",
"overrideContactInfo": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
}
}
]
}
'import requests
url = "https://prod01.oms.fabric.inc/api/v2/notification/send"
payload = {
"id": "<string>",
"notificationType": "<string>",
"documentType": "<string>",
"overrideContactInfo": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
}
}
]
}
headers = {
"tenant-key": "<tenant-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'tenant-key': '<tenant-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '<string>',
notificationType: '<string>',
documentType: '<string>',
overrideContactInfo: [
{
name: {first: 'John', middle: 'Middle', last: 'Doe'},
email: 'test@fabric.inc',
phone: {number: '55555555555', type: 'MOBILE'}
}
]
})
};
fetch('https://prod01.oms.fabric.inc/api/v2/notification/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod01.oms.fabric.inc/api/v2/notification/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'notificationType' => '<string>',
'documentType' => '<string>',
'overrideContactInfo' => [
[
'name' => [
'first' => 'John',
'middle' => 'Middle',
'last' => 'Doe'
],
'email' => 'test@fabric.inc',
'phone' => [
'number' => '55555555555',
'type' => 'MOBILE'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"tenant-key: <tenant-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod01.oms.fabric.inc/api/v2/notification/send"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"notificationType\": \"<string>\",\n \"documentType\": \"<string>\",\n \"overrideContactInfo\": [\n {\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Middle\",\n \"last\": \"Doe\"\n },\n \"email\": \"test@fabric.inc\",\n \"phone\": {\n \"number\": \"55555555555\",\n \"type\": \"MOBILE\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("tenant-key", "<tenant-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod01.oms.fabric.inc/api/v2/notification/send")
.header("tenant-key", "<tenant-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"notificationType\": \"<string>\",\n \"documentType\": \"<string>\",\n \"overrideContactInfo\": [\n {\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Middle\",\n \"last\": \"Doe\"\n },\n \"email\": \"test@fabric.inc\",\n \"phone\": {\n \"number\": \"55555555555\",\n \"type\": \"MOBILE\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01.oms.fabric.inc/api/v2/notification/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["tenant-key"] = '<tenant-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"notificationType\": \"<string>\",\n \"documentType\": \"<string>\",\n \"overrideContactInfo\": [\n {\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Middle\",\n \"last\": \"Doe\"\n },\n \"email\": \"test@fabric.inc\",\n \"phone\": {\n \"number\": \"55555555555\",\n \"type\": \"MOBILE\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "123456789",
"documentType": "ORDER",
"notificationType": "<string>",
"overrideContactInfo": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
}
}
]
}
]"Generic Bad Request Response""Conflict with duplicated entity""Entity with Id xxxxxxx doesn't exist"{
"message": "Internal Server Error"
}Notification
Listen to user and emit notifications
This listener processes the request body and emit notification events to webhook service
POST
/
notification
/
send
Listen to user and emit notifications
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/notification/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'tenant-key: <tenant-key>' \
--data '
{
"id": "<string>",
"notificationType": "<string>",
"documentType": "<string>",
"overrideContactInfo": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
}
}
]
}
'import requests
url = "https://prod01.oms.fabric.inc/api/v2/notification/send"
payload = {
"id": "<string>",
"notificationType": "<string>",
"documentType": "<string>",
"overrideContactInfo": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
}
}
]
}
headers = {
"tenant-key": "<tenant-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'tenant-key': '<tenant-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '<string>',
notificationType: '<string>',
documentType: '<string>',
overrideContactInfo: [
{
name: {first: 'John', middle: 'Middle', last: 'Doe'},
email: 'test@fabric.inc',
phone: {number: '55555555555', type: 'MOBILE'}
}
]
})
};
fetch('https://prod01.oms.fabric.inc/api/v2/notification/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod01.oms.fabric.inc/api/v2/notification/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'notificationType' => '<string>',
'documentType' => '<string>',
'overrideContactInfo' => [
[
'name' => [
'first' => 'John',
'middle' => 'Middle',
'last' => 'Doe'
],
'email' => 'test@fabric.inc',
'phone' => [
'number' => '55555555555',
'type' => 'MOBILE'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"tenant-key: <tenant-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod01.oms.fabric.inc/api/v2/notification/send"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"notificationType\": \"<string>\",\n \"documentType\": \"<string>\",\n \"overrideContactInfo\": [\n {\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Middle\",\n \"last\": \"Doe\"\n },\n \"email\": \"test@fabric.inc\",\n \"phone\": {\n \"number\": \"55555555555\",\n \"type\": \"MOBILE\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("tenant-key", "<tenant-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod01.oms.fabric.inc/api/v2/notification/send")
.header("tenant-key", "<tenant-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"notificationType\": \"<string>\",\n \"documentType\": \"<string>\",\n \"overrideContactInfo\": [\n {\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Middle\",\n \"last\": \"Doe\"\n },\n \"email\": \"test@fabric.inc\",\n \"phone\": {\n \"number\": \"55555555555\",\n \"type\": \"MOBILE\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01.oms.fabric.inc/api/v2/notification/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["tenant-key"] = '<tenant-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"notificationType\": \"<string>\",\n \"documentType\": \"<string>\",\n \"overrideContactInfo\": [\n {\n \"name\": {\n \"first\": \"John\",\n \"middle\": \"Middle\",\n \"last\": \"Doe\"\n },\n \"email\": \"test@fabric.inc\",\n \"phone\": {\n \"number\": \"55555555555\",\n \"type\": \"MOBILE\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "123456789",
"documentType": "ORDER",
"notificationType": "<string>",
"overrideContactInfo": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
}
}
]
}
]"Generic Bad Request Response""Conflict with duplicated entity""Entity with Id xxxxxxx doesn't exist"{
"message": "Internal Server Error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
tenant id
Body
application/json
Was this page helpful?
⌘I
