Webhook management
This public API includes webhook for the following cases: 1.Incoming orders(type="ORDER"), is the webhook where our service will send new orders.
2.Get Menu(type="Menu"), is the webhook where our service will get POS menu.
The URLs that will receive the requests must be configured with the following endpoint.
Set up webhook
POST https://integrations.mipos.shop/api/v1/integration/webhook/create
Headers
Authorization
string
Bearer {access_token}
Content-Type
string
application/json
Request Body
type
string
Webhook type, by default is "ORDER"
url
string
Webhook URL
{
    "message": "Webhook successfully created",
    "data": null
}"Unauthorized."{
    "message": [
        "User not authenticated.",
        "User not found.",
        "This webhook already exists",
        "Unable to set up the webhook URL."
    ],
    "data": null
}{
    "url": [
        "The url field is required."
    ]
}Update webhook
POST https://integrations.mipos.shop/api/v1/integration/webhook/update
Headers
Authorization
string
Bearer {access_token}
Content-Type
string
application/jsonc
Request Body
current_url
string
Current webhook URL
new_url
string
New webhook URL
{
    "message": "Webhook successfully updated",
    "data": null
}"Unauthorized."{
    "message": [
        "User not authenticated.",
        "User not found.",
        "This webhook does not exist",
        "This new webhook already exists",
        "Unable to update the webhook URL."
    ],
    "data": null
}{
    "current_url": [
        "The current url field is required."
    ],
    "new_url": [
        "The new url field is required."
    ]
}Delete webhook
POST https://integrations.mipos.shop/api/v1/integration/webhook/delete
Headers
Authorization
string
Bearer {access_token}
Content-Type
string
application/json
Request Body
url
string
Webhook URL
{
    "message": "Webhook successfully removed",
    "data": null
}"Unauthorized."{
    "message": [
        "User not authenticated.",
        "User not found.",
        "This webhook does not exist",
        "Unable to remove the webhook URL."
    ],
    "data": null
}{
    "url": [
        "The url field is required."
    ]
}Get user webhooks
GET https://integrations.mipos.shop/api/v1/integration/webhooks
Headers
Authorization
string
Bearer {token}
[
    {
        "url": "https://urlwebhook1.test"
    },
    {
        "url": "https://urlwebhook2.test"
    },
    {
        "url": "https://urlwebhook3.test"
    }
]"Unauthorized."{
    "message": [
        "User not authenticated.",
        "User not found."
    ],
    "data": null
}Last updated
Was this helpful?
