cURL
curl "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/events/b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/events/b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08', {
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
const data = await response.json();
console.log(data);{
"eventId": "b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08",
"type": "order.shipped",
"content": "Order 1188 for ticket 4821 is shipped with UPS.",
"attributes": {
"orderId": "1188",
"carrier": "UPS",
"trackingNumber": "1Z999AA10123456784"
},
"delivery": "queue",
"modelContext": {}
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Not Found",
"error": "Not Found"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}{
"statusCode": 503,
"message": "Event file unavailable",
"error": "Service Unavailable"
}Events
Get an Event
Retrieves the full stored payload of an Event submitted to this Room through the Factory API.
GET
/
v1
/
rooms
/
{roomId}
/
events
/
{eventId}
cURL
curl "https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/events/b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08" \
-H "Authorization: Bearer $WORKLAYER_API_KEY"const response = await fetch('https://api.myworklayer.com/v1/rooms/cmhx3q7v20004l808sd5k2r1m/events/b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08', {
headers: {
Authorization: `Bearer ${process.env.WORKLAYER_API_KEY}`,
},
});
const data = await response.json();
console.log(data);{
"eventId": "b7e4c1d2-8a3f-4f6e-9d20-5c1a7e9b3f08",
"type": "order.shipped",
"content": "Order 1188 for ticket 4821 is shipped with UPS.",
"attributes": {
"orderId": "1188",
"carrier": "UPS",
"trackingNumber": "1Z999AA10123456784"
},
"delivery": "queue",
"modelContext": {}
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "Not Found",
"error": "Not Found"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}{
"statusCode": 503,
"message": "Event file unavailable",
"error": "Service Unavailable"
}Authorizations
Your factory's Worklayer API key (wrk-...). See Get an API key and Authentication. Requests sent from the playground execute live against your factory.
Path Parameters
Response
The Event.
Controls when the factory processes the Event. queue (default): after its current work, or immediately if idle. steer: mid-flight before the next step, or immediately if idle. context: stored silently without waking the factory and delivered on the next queue or steer Event. See Events.
Available options:
context, queue, steer