customer group checked out
Authorization
bearerAuth In: header
Request Body
application/json
A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, usesession.sessionId
Customer information
AiFi store id
Retailer store id
ISO formatted creation time of the event, that caused this webhook to be sent
date-timeISO formatted time, in which this webhook was sent
date-timeAiFi internal order id
"reviewed" | "draft" | "completed"A calculated total for the order
A calculated total for the order
floatTotal tax for the order
floatSubtotal price(totalPrice - totalTax = subtotalPrice) for the order
floatResponse Body
application/json
curl -X POST "https://oasis-api.public.sandbox.oasis.aifi.com/api/push/checkout" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780", "session": { "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "id": 0, "customerId": 0, "code": "c69bb289-1190-4156-b9f6-bfb7f61e85db", "codeFirstSuccesfullyScannedAt": "2019-08-24T14:15:22Z", "codeLastSuccesfullyScannedAt": "2019-08-24T14:15:22Z", "customerFirstEnteredAt": "2019-08-24T14:15:22Z", "customerLastEnteredAt": "2019-08-24T14:15:22Z", "customerFirstExitedAt": "2019-08-24T14:15:22Z", "customerLastExitedAt": "2019-08-24T14:15:22Z", "customerPaymentInstrumentId": 0, "customerSatisfaction": 95, "customerSatisfactionSubmitted": false, "groupSize": 0, "visitors": 0, "locationId": "string", "priority": 0, "sessionToken": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780", "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780", "referencedSessionId": null, "status": "active", "storeId": 0, "storeIdScannableAt": 0, "suspectedFraud": false, "metadata": { "events": [ { "eventId": "6bdbfb2d-65b2-491c-bc97-c0ac73338476", "metadata": { "key": "value" } } ], "exampleKey": "exampleValue" }, "expiresAt": "2019-08-24T14:15:22Z" }, "customer": { "externalId": "string", "metadata": { "arbitraryKey": "arbitraryValue" }, "id": "string", "role": "customer" }, "storeId": 0, "store": { "oasisApiStoreId": 0, "aifiUniqueStoreId": "string" }, "storeExternalId": "string", "timeOfOrigin": "2019-08-24T14:15:22Z", "timeOfIssue": "2019-08-24T14:15:22Z", "orderId": 0, "status": "reviewed", "cart": [ { "id": "string", "name": "string", "barcode": "string", "category": "string", "sku": "string", "thumbnail": "string", "externalId": "string", "price": 0, "productId": 0, "quantity": 0, "productSnapshot": { "name": "string", "price": "string", "barcode": "string", "category": "string", "thumbnail": "string", "weight": 0, "sku": "string", "externalId": "string", "taxCode": "string", "id": 0, "productId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "taxLines": [ { "taxId": "string", "title": "string", "rate": "string", "amount": "string" } ] } ], "amount": 10.99, "totalPrice": "10.99", "totalTax": "0.99", "subtotalPrice": "10.00", "payment": { "paymentProvider": "NONE", "paymentInstrument": { "type": "card", "cardBin": "string", "cardLast4": "string", "cardExpMonth": 0, "cardExpYear": 0, "cardBrand": "string" }, "paymentStatus": "success", "paymentTransactionIds": [ "string" ] } }'{
"externalId": "string",
"payment": {
"paymentStatus": "success",
"paymentTransactionIds": [
"string"
]
}
}How is this guide?
request to third party with cart mutation POST
AiFi system shall call this webhook when a customer checked out in a store and an order is being placed in AiFi system. The webhook is also called when an order's contest is reviewed. Important notes about calling webhook during a contest: * it can happen even a few days later after the actual shopping journey. Retailer should use timeOfOrigin (time of the original shopping journey) * items that were previously added by the webhook during the checkout will not be sent again during review! * calling webhook during review can be distinguished by status field. * by default reviewedTotalPrice takes precedence over cart mutator totalPrice. Cart Mutator implementation should respect and properly handle adjusted reviewedTotalPrice. The webhook expects that the third party system is going to mutate cart items and adjust order prices according to the cart mutation. Possible use cases include: extending items with taxLines adding deposit items adjusting prices and removing or adding new cart items. Some communication details: * when response couldn't be received or crucial fields are missing Aifi system **fails silently** (mutator webhook is omitted) * when only some particular cart item in response is incorrect Aifi system ignores that item (for example when neither id nor externalId of cart item couldn't be resolved to AiFi object) **Note**: as an integrator the URL you specify for this webhook is going to be exactly the URL that will be called. For example if you specify "http://example-retailer-api.com/webhook" then exactly "http://example-retailer-api.com/webhook" will be called.
customer entered a checkout zone POST
AiFi system shall call this webhook when a customer entered a checkout zone in a given store. This webhook is intended to be only visual: no response is parsed and no action is taken regardless of the response. **Note**: as an integrator the URL you specify for checkout zone webhooks will be re-used for all checkout zone actions. For example if you specify "http://example-retailer-api.com/webhook" then "http://example-retailer-api.com/webhook/entered" will be called in this case.