Lets you query log of webhook events based on the filter criteria.
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/webhook/event/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"limit": 10,
"offset": 0,
"sortBy": "updatedAt",
"sortDirection": "desc",
"filters": {
"retail": {
"locationNum": 12
},
"orderSubTotal": {
"gte": 1300,
"lt": 1400
},
"orderNumber": "order-*Z",
"statusCode": [
"ORDER_CREATED"
],
"createdAt": {
"lt": "2022-09-11T23:12:00.123Z"
},
"shipInfo": {
"shipToId": [
"23434",
"23436"
]
}
}
}'
{
"count": 100,
"limit": 10,
"offset": 1,
"webhookEventLogs": [
"{\n \"eventRequestId\": \"81bb-3bs09-ae-5f791-06a22bf2dcd3\",\n \"channel\": \"12\",\n \"tenantId\": \"5f689caa4216e7000750d1ef\",\n \"event\": \"ORDER_CANCELLED_RETRY\",\n \"payload\": {\n \"orderId\": \"63bd0e187bf29a11d1773191\"\n },\n \"firstEventTriggeredAt\": \"2023-01-17T06:33:45.083+00:00\",\n \"lastEventTriggeredAt\": \"2023-01-17T06:33:48.758+00:00\",\n \"status\": \"FAILED\",\n \"retryCount\": 0,\n \"automaticRetryEnabled\": true,\n \"logs\": [\n {\n \"webhookId\": \"63c1661635431d2150956e8e\",\n \"status\": \"SUCCESS\",\n \"responseInfo\": [\n {\n \"statusCode\": 204,\n \"triggeredStatus\": \"SUCCESS\",\n \"triggeredAt\": \"2023-01-17T06:33:48.752+00:00\",\n \"messageId\": \"36b9c53c-a12b-4091-8d71-e2b64ce69163\",\n \"errorMessage\": null\n }\n ]\n },\n {\n \"webhookId\": \"63c525b935431d2150956f1c\",\n \"status\": \"FAILED\",\n \"responseInfo\": [\n {\n \"statusCode\": 404,\n \"triggeredStatus\": \"FAILED\",\n \"triggeredAt\": \"2023-01-17T06:33:49.029+00:00\",\n \"messageId\": \"bd0a7597-9daa-4d9c-ac02-2d611f96c08e\",\n \"errorMessage\": \"{\\\"success\\\":false,\\\"error\\\":{\\\"id\\\":null,\\\"message\\\":\\\"HTTP error 404\\\"}}\"\n }\n ]\n }\n ]\n }"
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
LibQuery Model
OK
LibQueryResponse Model
Was this page helpful?
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/webhook/event/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"limit": 10,
"offset": 0,
"sortBy": "updatedAt",
"sortDirection": "desc",
"filters": {
"retail": {
"locationNum": 12
},
"orderSubTotal": {
"gte": 1300,
"lt": 1400
},
"orderNumber": "order-*Z",
"statusCode": [
"ORDER_CREATED"
],
"createdAt": {
"lt": "2022-09-11T23:12:00.123Z"
},
"shipInfo": {
"shipToId": [
"23434",
"23436"
]
}
}
}'
{
"count": 100,
"limit": 10,
"offset": 1,
"webhookEventLogs": [
"{\n \"eventRequestId\": \"81bb-3bs09-ae-5f791-06a22bf2dcd3\",\n \"channel\": \"12\",\n \"tenantId\": \"5f689caa4216e7000750d1ef\",\n \"event\": \"ORDER_CANCELLED_RETRY\",\n \"payload\": {\n \"orderId\": \"63bd0e187bf29a11d1773191\"\n },\n \"firstEventTriggeredAt\": \"2023-01-17T06:33:45.083+00:00\",\n \"lastEventTriggeredAt\": \"2023-01-17T06:33:48.758+00:00\",\n \"status\": \"FAILED\",\n \"retryCount\": 0,\n \"automaticRetryEnabled\": true,\n \"logs\": [\n {\n \"webhookId\": \"63c1661635431d2150956e8e\",\n \"status\": \"SUCCESS\",\n \"responseInfo\": [\n {\n \"statusCode\": 204,\n \"triggeredStatus\": \"SUCCESS\",\n \"triggeredAt\": \"2023-01-17T06:33:48.752+00:00\",\n \"messageId\": \"36b9c53c-a12b-4091-8d71-e2b64ce69163\",\n \"errorMessage\": null\n }\n ]\n },\n {\n \"webhookId\": \"63c525b935431d2150956f1c\",\n \"status\": \"FAILED\",\n \"responseInfo\": [\n {\n \"statusCode\": 404,\n \"triggeredStatus\": \"FAILED\",\n \"triggeredAt\": \"2023-01-17T06:33:49.029+00:00\",\n \"messageId\": \"bd0a7597-9daa-4d9c-ac02-2d611f96c08e\",\n \"errorMessage\": \"{\\\"success\\\":false,\\\"error\\\":{\\\"id\\\":null,\\\"message\\\":\\\"HTTP error 404\\\"}}\"\n }\n ]\n }\n ]\n }"
]
}
Lets you query log of webhook events based on the filter criteria.
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/webhook/event/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"limit": 10,
"offset": 0,
"sortBy": "updatedAt",
"sortDirection": "desc",
"filters": {
"retail": {
"locationNum": 12
},
"orderSubTotal": {
"gte": 1300,
"lt": 1400
},
"orderNumber": "order-*Z",
"statusCode": [
"ORDER_CREATED"
],
"createdAt": {
"lt": "2022-09-11T23:12:00.123Z"
},
"shipInfo": {
"shipToId": [
"23434",
"23436"
]
}
}
}'
{
"count": 100,
"limit": 10,
"offset": 1,
"webhookEventLogs": [
"{\n \"eventRequestId\": \"81bb-3bs09-ae-5f791-06a22bf2dcd3\",\n \"channel\": \"12\",\n \"tenantId\": \"5f689caa4216e7000750d1ef\",\n \"event\": \"ORDER_CANCELLED_RETRY\",\n \"payload\": {\n \"orderId\": \"63bd0e187bf29a11d1773191\"\n },\n \"firstEventTriggeredAt\": \"2023-01-17T06:33:45.083+00:00\",\n \"lastEventTriggeredAt\": \"2023-01-17T06:33:48.758+00:00\",\n \"status\": \"FAILED\",\n \"retryCount\": 0,\n \"automaticRetryEnabled\": true,\n \"logs\": [\n {\n \"webhookId\": \"63c1661635431d2150956e8e\",\n \"status\": \"SUCCESS\",\n \"responseInfo\": [\n {\n \"statusCode\": 204,\n \"triggeredStatus\": \"SUCCESS\",\n \"triggeredAt\": \"2023-01-17T06:33:48.752+00:00\",\n \"messageId\": \"36b9c53c-a12b-4091-8d71-e2b64ce69163\",\n \"errorMessage\": null\n }\n ]\n },\n {\n \"webhookId\": \"63c525b935431d2150956f1c\",\n \"status\": \"FAILED\",\n \"responseInfo\": [\n {\n \"statusCode\": 404,\n \"triggeredStatus\": \"FAILED\",\n \"triggeredAt\": \"2023-01-17T06:33:49.029+00:00\",\n \"messageId\": \"bd0a7597-9daa-4d9c-ac02-2d611f96c08e\",\n \"errorMessage\": \"{\\\"success\\\":false,\\\"error\\\":{\\\"id\\\":null,\\\"message\\\":\\\"HTTP error 404\\\"}}\"\n }\n ]\n }\n ]\n }"
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
LibQuery Model
OK
LibQueryResponse Model
Was this page helpful?
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/webhook/event/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"limit": 10,
"offset": 0,
"sortBy": "updatedAt",
"sortDirection": "desc",
"filters": {
"retail": {
"locationNum": 12
},
"orderSubTotal": {
"gte": 1300,
"lt": 1400
},
"orderNumber": "order-*Z",
"statusCode": [
"ORDER_CREATED"
],
"createdAt": {
"lt": "2022-09-11T23:12:00.123Z"
},
"shipInfo": {
"shipToId": [
"23434",
"23436"
]
}
}
}'
{
"count": 100,
"limit": 10,
"offset": 1,
"webhookEventLogs": [
"{\n \"eventRequestId\": \"81bb-3bs09-ae-5f791-06a22bf2dcd3\",\n \"channel\": \"12\",\n \"tenantId\": \"5f689caa4216e7000750d1ef\",\n \"event\": \"ORDER_CANCELLED_RETRY\",\n \"payload\": {\n \"orderId\": \"63bd0e187bf29a11d1773191\"\n },\n \"firstEventTriggeredAt\": \"2023-01-17T06:33:45.083+00:00\",\n \"lastEventTriggeredAt\": \"2023-01-17T06:33:48.758+00:00\",\n \"status\": \"FAILED\",\n \"retryCount\": 0,\n \"automaticRetryEnabled\": true,\n \"logs\": [\n {\n \"webhookId\": \"63c1661635431d2150956e8e\",\n \"status\": \"SUCCESS\",\n \"responseInfo\": [\n {\n \"statusCode\": 204,\n \"triggeredStatus\": \"SUCCESS\",\n \"triggeredAt\": \"2023-01-17T06:33:48.752+00:00\",\n \"messageId\": \"36b9c53c-a12b-4091-8d71-e2b64ce69163\",\n \"errorMessage\": null\n }\n ]\n },\n {\n \"webhookId\": \"63c525b935431d2150956f1c\",\n \"status\": \"FAILED\",\n \"responseInfo\": [\n {\n \"statusCode\": 404,\n \"triggeredStatus\": \"FAILED\",\n \"triggeredAt\": \"2023-01-17T06:33:49.029+00:00\",\n \"messageId\": \"bd0a7597-9daa-4d9c-ac02-2d611f96c08e\",\n \"errorMessage\": \"{\\\"success\\\":false,\\\"error\\\":{\\\"id\\\":null,\\\"message\\\":\\\"HTTP error 404\\\"}}\"\n }\n ]\n }\n ]\n }"
]
}