Skip to content

Get New Events

Request

Polls events for any orders from merchants associated with the authenticated user.
Each event received from this endpoint must be properly acknowledged, otherwise it will continue to be returned on further requests.

Important: The software service must first call the Merchant Onboarding endpoint to register the store before calling this endpoint, otherwise the polling endpoint will not be able to obtain the events.



HOST: Keeta

DIRECTION:

Security
OAuth2(Required scopes: od.all) and Sig
Query
eventTypeArray of strings, <= 13 items

Desired event types. All other events not selected by group will be automatically acknowledged and omitted from the response. Must either be omitted or non-empty.

Event Types definitions:

CREATED : Order created.
CONFIRMED : Order confirmed.
READY_FOR_PICKUP: Order ready for pickup by the customer or delivery person.
DISPATCHED : Order went out for delivery.
PICKED_UP : Order has been picked up by customer. Since there is currently no self-pickup scenario, the PICKED_UP event will not be received.
DELIVERED : Order has been delivered to customer.
CONCLUDED : Order completed.
CANCELLATION_REQUESTED : Sent by the Software Service to Keeta.
CANCELLED : When the order is actually cancelled.
USER_REFUND_REQUEST : Sent by Keeta to the Software Service.
REFUNDED : Sent by Keeta to the Software Service.
REFUND_FAILED : Sent by Keeta to the Software Service.
RECOMMENDED_PREPARATION_START : Sent by Keeta to notify the merchant to begin kitchen preparation immediately.

Headers
x-polling-merchantsArray of strings, <= 100 items

Subset of merchants to fetch events from. Must either be omitted or non-empty.

curl -i -X GET \
'https://open.mykeeta.com/api/open/opendelivery/v1/events:polling?eventType=CREATED,CANCELLED,CONCLUDED' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'X-App-Signature: YOUR_API_KEY_HERE' \
-H 'x-polling-merchants: 22815773000169-dbc7e35a-c936-4665-9e13-eb55eb8b6824'

Responses

Successful returns list of polled events .

Bodyapplication/json
Array [
eventIdstringrequired

A unique identifier of the event.

eventTypestringrequired

The event type. Click here for definitions of each type.

Enum:"CREATED""CONFIRMED""DISPATCHED""READY_FOR_PICKUP""PICKUP_ONGOING""PICKED_UP""DELIVERED""CONCLUDED""CANCELLATION_REQUESTED""CANCELLED"
Discriminator
orderIdstringrequired

The unique identifier of the order. The order ID is generated by Keeta.

orderURLstring, (uri)required

The URL to get the order details

createdAtstring, (date-time)required

Order creation date and time.

(UTC date-time in ISO timestamp format. See Guidelines for more info).

sourceAppIdstring

This field must be filled in with the AppId of Keeta that originated the order. This field is to help the applications that will work as a Hub, intermediating the requests from Keeta with the Software Service.

virtualBrandstring

This field can be used as an alternative id for the merchant, in cases where the same merchant has different identifications or brands (such as dark kitchens). It is important to note that Keeta or Software Hub must know this Id beforehand.

]
Response
[ { "eventId": "string", "eventType": "CREATED", "orderId": "string", "orderURL": "http://example.com", "createdAt": "2019-08-24T14:15:22Z", "sourceAppId": "string", "virtualBrand": "string" } ]