List orders
query Parameters
| minCreatedAt | string <date-time> Example: minCreatedAt=2024-09-22T00:00:00.000Z |
| maxCreatedAt | string <date-time> Example: maxCreatedAt=2024-09-29T00:00:00.000Z |
| minUpdatedAt | string <date-time> Example: minUpdatedAt=2024-09-23T00:00:00.000Z |
| maxUpdatedAt | string <date-time> Example: maxUpdatedAt=2024-09-30T00:00:00.000Z |
| page | integer Default: 0 |
| pageSize | integer <= 200 Default: 50 |
| orderBy | string Default: "id" Enum: "id" "storeId" "totalPrice" "draftCreatedAt" |
| direction | string Enum: "asc" "desc" Direction of sorting |
| id | integer |
| status | Array of strings Items Enum: "draft" "paid" "unpaid" "completed_so_far" "paymentProcessing" "contested" "reviewed" |
| externalStatus | Array of strings Items Enum: "ok" "failedObtainingPrice" "failedSendingWebhook" |
| customerRole | Array of strings Items Enum: "customer" "employee" "tester" "untracked" "unknown" |
| sessionId | Array of strings Id of a session, which resulted in an order |
| externalId | Array of strings Client defined order identifiers |
| startTime | string <date-time> |
| endTime | string <date-time> |
| storeId | integer >= 1 |
| customerId | integer |
| paymentTransactionId | string |
| includeContest | boolean Default: false |
| includeProducts | boolean Default: false |
| customerPaymentInstrumentBin | string [ 6 .. 8 ] characters First 6-8 digits of a card number. Exact match. |
| customerPaymentInstrumentLast4 | string^\d{4}$ Example: customerPaymentInstrumentLast4=1111 Card last 4 digits, required when customerPaymentInstrumentExpDate is provided |
| customerPaymentInstrumentExpDate | string Example: customerPaymentInstrumentExpDate=03/28 Card expire date in MM/YY format |
| minTotalPrice | string <float> Example: minTotalPrice=2.50 |
| maxTotalPrice | string <float> Example: maxTotalPrice=2.50 |
| minTotalProductQuantity | integer Example: minTotalProductQuantity=1 |
| maxTotalProductQuantity | integer Example: maxTotalProductQuantity=5 |
| minDraftCreatedAt | string <date-time> Example: minDraftCreatedAt=2024-09-22T00:00:00.000Z |
| maxDraftCreatedAt | string <date-time> Example: maxDraftCreatedAt=2024-09-29T00:00:00.000Z |
Responses
Response Schema: application/json
required | Array of objects (OrderListItemDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object offset based pagination | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "data": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "version": 0,
- "isLatest": 0,
- "customerId": "11",
- "storeId": 1,
- "status": "draft",
- "transactionId": 0,
- "customerShoppingSessionId": 0,
- "externalId": "string",
- "externalStatus": "ok",
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "paidAt": "2019-08-24T14:15:22Z",
- "notificationSentAt": "2019-08-24T14:15:22Z",
- "extraText": "",
- "completedAt": "2019-08-24T14:15:22Z",
- "draftCreatedAt": "2019-08-24T14:15:22Z",
- "contest": {
- "id": 0,
- "orderId": "string",
- "orderVersion": 0,
- "fromOperator": true,
- "status": "contested",
- "contestedTotalPrice": "120.00",
- "originalTotalPrice": "123.45",
- "customerMessage": "string"
}, - "products": [
- {
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "weight": 0,
- "sku": "string",
- "externalId": "string",
- "taxCode": "string",
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "productId": "string",
- "isExternallyAdded": true,
- "orderProductExternalId": "string",
- "orderProductSnapshotId": 0,
- "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35"
}
]
}
], - "pagination": {
- "previous": {
- "offset": 0,
- "count": 0
}, - "next": {
- "offset": 0,
- "count": 0
}
}
}Create an order
Request Body schema: application/jsonrequired
| customerId required | integer | ||||
| transactionId required | integer | ||||
| status required | string Enum: "draft" "paid" "unpaid" "completed_so_far" "paymentProcessing" "contested" "reviewed" | ||||
| storeId required | integer | ||||
required | Array of objects (OrderProductDto) | ||||
Array
| |||||
Responses
Response Schema: application/json
| createdAt required | string <date-time> ISO formatted date representing when the entity was created | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updatedAt required | string <date-time> ISO formatted date representing when the entity was last updated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id required | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version required | integer Default is 1, a newer version of order will be created when an order get contested | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isLatest required | integer Whether it is the latest version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| customerId required | string <integer> AiFi customer id, formatted as string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer The id of the store where the shopping happens | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Enum: "draft" "paid" "unpaid" "completed_so_far" "paymentProcessing" "contested" "reviewed" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transactionId required | number or null Id of transaction for specified shopping session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| externalId required | string or null Id of this order in external system | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| externalStatus required | string Enum: "ok" "failedObtainingPrice" "failedSendingWebhook" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subtotalPrice required | string <float> A decimal representation of the subtotal price of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalPrice required | string <float> A decimal representation of the total price of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalTax required | string <float> A decimal representation of the total tax of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paidAt required | string or null <date-time> ISO formatted date of order payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| notificationSentAt required | string or null <date-time> ISO formatted date of order notification sent to the app | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extraText required | string Deprecated Default: "" Deprecated: Use vendorMetadata with EXTRA_TEXT type instead. Extra text shows on the receipt page. This field will be removed in a future version. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| completedAt required | string or null <date-time> ISO formatted date of order completion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| draftCreatedAt required | string or null <date-time> ISO formatted date of draft order creation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sessionId required | string or null A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Deprecated Deprecated, use paymentTransaction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (PaymentTransactionSummaryDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (LegacyLineItemWithTaxRatesDto) Deprecated Deprecated, use 'lineItems' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (LineItemWithTaxRatesDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| vendorMetadata required | object Vendor metadata containing arbitrary vendor data, organized by vendor name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (SessionShallowDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "customerId": 0,
- "transactionId": 0,
- "status": "draft",
- "storeId": 0,
- "products": [
- {
- "id": 0,
- "quantity": 0
}
]
}Response samples
- 201
- 422
{- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "version": 0,
- "isLatest": 0,
- "customerId": "11",
- "storeId": 1,
- "status": "draft",
- "transactionId": 0,
- "externalId": "string",
- "externalStatus": "ok",
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "paidAt": "2019-08-24T14:15:22Z",
- "notificationSentAt": "2019-08-24T14:15:22Z",
- "extraText": "",
- "completedAt": "2019-08-24T14:15:22Z",
- "draftCreatedAt": "2019-08-24T14:15:22Z",
- "sessionId": "string",
- "transaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentFailed": true
}, - "paymentTransaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentStatus": "success"
}, - "products": [
- {
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "weight": 0,
- "sku": "string",
- "externalId": "string",
- "taxCode": "string",
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "productId": "string",
- "isExternallyAdded": true,
- "orderProductExternalId": "string",
- "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "taxRates": "Tax breakdown for this lineitem"
}
], - "lineItems": [
- {
- "isExternallyAdded": true,
- "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "taxRates": "Tax breakdown for this lineitem",
- "price": "10.00",
- "externalId": "string",
- "status": "ORIGINAL",
- "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"
}
}
], - "vendorMetadata": {
- "PaymentProvider": [
- {
- "type": "DISCOUNT",
- "value": "Applied discount 5%"
}
]
}, - "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"
}
}Get order by id
path Parameters
| orderId required | integer |
query Parameters
| version | integer |
Responses
Response Schema: application/json
| createdAt required | string <date-time> ISO formatted date representing when the entity was created | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updatedAt required | string <date-time> ISO formatted date representing when the entity was last updated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id required | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version required | integer Default is 1, a newer version of order will be created when an order get contested | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isLatest required | integer Whether it is the latest version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| customerId required | string <integer> AiFi customer id, formatted as string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer The id of the store where the shopping happens | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Enum: "draft" "paid" "unpaid" "completed_so_far" "paymentProcessing" "contested" "reviewed" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transactionId required | number or null Id of transaction for specified shopping session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| externalId required | string or null Id of this order in external system | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| externalStatus required | string Enum: "ok" "failedObtainingPrice" "failedSendingWebhook" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subtotalPrice required | string <float> A decimal representation of the subtotal price of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalPrice required | string <float> A decimal representation of the total price of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalTax required | string <float> A decimal representation of the total tax of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paidAt required | string or null <date-time> ISO formatted date of order payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| notificationSentAt required | string or null <date-time> ISO formatted date of order notification sent to the app | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extraText required | string Deprecated Default: "" Deprecated: Use vendorMetadata with EXTRA_TEXT type instead. Extra text shows on the receipt page. This field will be removed in a future version. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| completedAt required | string or null <date-time> ISO formatted date of order completion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| draftCreatedAt required | string or null <date-time> ISO formatted date of draft order creation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sessionId required | string or null A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Deprecated Deprecated, use paymentTransaction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (PaymentTransactionSummaryDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (LegacyLineItemWithTaxRatesDto) Deprecated Deprecated, use 'lineItems' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (LineItemWithTaxRatesDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| vendorMetadata required | object Vendor metadata containing arbitrary vendor data, organized by vendor name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (SessionShallowDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "version": 0,
- "isLatest": 0,
- "customerId": "11",
- "storeId": 1,
- "status": "draft",
- "transactionId": 0,
- "externalId": "string",
- "externalStatus": "ok",
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "paidAt": "2019-08-24T14:15:22Z",
- "notificationSentAt": "2019-08-24T14:15:22Z",
- "extraText": "",
- "completedAt": "2019-08-24T14:15:22Z",
- "draftCreatedAt": "2019-08-24T14:15:22Z",
- "sessionId": "string",
- "transaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentFailed": true
}, - "paymentTransaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentStatus": "success"
}, - "products": [
- {
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "weight": 0,
- "sku": "string",
- "externalId": "string",
- "taxCode": "string",
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "productId": "string",
- "isExternallyAdded": true,
- "orderProductExternalId": "string",
- "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "taxRates": "Tax breakdown for this lineitem"
}
], - "lineItems": [
- {
- "isExternallyAdded": true,
- "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "taxRates": "Tax breakdown for this lineitem",
- "price": "10.00",
- "externalId": "string",
- "status": "ORIGINAL",
- "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"
}
}
], - "vendorMetadata": {
- "PaymentProvider": [
- {
- "type": "DISCOUNT",
- "value": "Applied discount 5%"
}
]
}, - "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"
}
}Update order by id
Note: The extraText field (if used) is deprecated. Use the vendorMetadata API endpoint instead.
path Parameters
| orderId required | integer |
Request Body schema: application/jsonrequired
| transactionId | integer Id of shopping transaction | ||||
object (UpdateOrderPaymentTransactionDto) | |||||
| |||||
| status | string Enum: "draft" "paid" "unpaid" "completed_so_far" "paymentProcessing" "contested" "reviewed" The order status should be derived from payment status when paymentTransaction.paymentStatus is provided | ||||
Array of objects (OrderProductDto) | |||||
Array
| |||||
| externalStatus | string Enum: "ok" "failedObtainingPrice" "failedSendingWebhook" | ||||
| externalId | string Client defined order identifiers | ||||
Responses
Response Schema: application/json
| createdAt required | string <date-time> ISO formatted date representing when the entity was created | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updatedAt required | string <date-time> ISO formatted date representing when the entity was last updated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id required | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version required | integer Default is 1, a newer version of order will be created when an order get contested | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isLatest required | integer Whether it is the latest version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| customerId required | string <integer> AiFi customer id, formatted as string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer The id of the store where the shopping happens | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Enum: "draft" "paid" "unpaid" "completed_so_far" "paymentProcessing" "contested" "reviewed" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transactionId required | number or null Id of transaction for specified shopping session | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| externalId required | string or null Id of this order in external system | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| externalStatus required | string Enum: "ok" "failedObtainingPrice" "failedSendingWebhook" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subtotalPrice required | string <float> A decimal representation of the subtotal price of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalPrice required | string <float> A decimal representation of the total price of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalTax required | string <float> A decimal representation of the total tax of this order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paidAt required | string or null <date-time> ISO formatted date of order payment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| notificationSentAt required | string or null <date-time> ISO formatted date of order notification sent to the app | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extraText required | string Deprecated Default: "" Deprecated: Use vendorMetadata with EXTRA_TEXT type instead. Extra text shows on the receipt page. This field will be removed in a future version. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| completedAt required | string or null <date-time> ISO formatted date of order completion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| draftCreatedAt required | string or null <date-time> ISO formatted date of draft order creation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sessionId required | string or null A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Deprecated Deprecated, use paymentTransaction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (PaymentTransactionSummaryDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (LegacyLineItemWithTaxRatesDto) Deprecated Deprecated, use 'lineItems' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (LineItemWithTaxRatesDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| vendorMetadata required | object Vendor metadata containing arbitrary vendor data, organized by vendor name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (SessionShallowDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "transactionId": 0,
- "paymentTransaction": {
- "paymentTransactionId": "string",
- "paymentStatus": "success"
}, - "status": "draft",
- "products": [
- {
- "id": 0,
- "quantity": 0
}
], - "externalStatus": "ok",
- "externalId": "string"
}Response samples
- 200
- 422
{- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "version": 0,
- "isLatest": 0,
- "customerId": "11",
- "storeId": 1,
- "status": "draft",
- "transactionId": 0,
- "externalId": "string",
- "externalStatus": "ok",
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "paidAt": "2019-08-24T14:15:22Z",
- "notificationSentAt": "2019-08-24T14:15:22Z",
- "extraText": "",
- "completedAt": "2019-08-24T14:15:22Z",
- "draftCreatedAt": "2019-08-24T14:15:22Z",
- "sessionId": "string",
- "transaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentFailed": true
}, - "paymentTransaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentStatus": "success"
}, - "products": [
- {
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "weight": 0,
- "sku": "string",
- "externalId": "string",
- "taxCode": "string",
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "productId": "string",
- "isExternallyAdded": true,
- "orderProductExternalId": "string",
- "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "taxRates": "Tax breakdown for this lineitem"
}
], - "lineItems": [
- {
- "isExternallyAdded": true,
- "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "taxRates": "Tax breakdown for this lineitem",
- "price": "10.00",
- "externalId": "string",
- "status": "ORIGINAL",
- "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"
}
}
], - "vendorMetadata": {
- "PaymentProvider": [
- {
- "type": "DISCOUNT",
- "value": "Applied discount 5%"
}
]
}, - "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"
}
}Retry order checkout
path Parameters
| orderId required | integer |
Responses
Response Schema: application/json
| storeId required | integer The id of the store where the shopping happens | ||||
| totalPrice required | string <float> A decimal representation of the total price of this order | ||||
| orderId required | integer | ||||
| orderVersion required | integer Default is 1, a newer version of order will be created when an order get contested | ||||
| externalOrderId required | string or null Id of this order in external system | ||||
required | object Store identifiers | ||||
| |||||
| paymentFailed required | boolean Informs whether payment failed, or was successfully collected | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "storeId": 1,
- "totalPrice": "2.15",
- "orderId": 0,
- "orderVersion": 0,
- "externalOrderId": "string",
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "paymentFailed": true
}Add vendor metadata to order
Adds a metadata entry to the specified vendor for the latest order version. This is an append-only operation.
path Parameters
| orderId required | integer Order ID |
| vendorName required | string Vendor name to associate the metadata with |
Request Body schema: application/jsonrequired
| type required | string Type of metadata entry (e.g., DISCOUNT, SURCHARGE, EMV, EXTRA_TEXT, or custom type) |
| value required | string Value of the metadata entry |
Responses
Response Schema: application/json
| orderId required | integer |
| orderVersion required | integer |
| vendorName required | string |
| metadata required | object |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "type": "DISCOUNT",
- "value": "Applied discount 5% total due to using Platinum Credit Card."
}Response samples
- 201
- 422
{- "orderId": 0,
- "orderVersion": 0,
- "vendorName": "string",
- "metadata": { }
}List products snapshots
query Parameters
| pageSize | integer Example: pageSize=10 Page size |
| page | integer Page number |
| time | string <date-time> timestamp |
string or Array of strings Product ID or array of Product IDs | |
| name | string Case insensitive |
Responses
Response Schema: application/json
required | Array of objects (ProductSnapshotListItemDto) | ||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "data": [
- {
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "weight": 0,
- "sku": "string",
- "externalId": "string",
- "taxCode": "string",
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "productId": "string"
}
]
}List product variants
query Parameters
| minCreatedAt | string <date-time> Example: minCreatedAt=2024-09-22T00:00:00.000Z |
| maxCreatedAt | string <date-time> Example: maxCreatedAt=2024-09-29T00:00:00.000Z |
| minUpdatedAt | string <date-time> Example: minUpdatedAt=2024-09-23T00:00:00.000Z |
| maxUpdatedAt | string <date-time> Example: maxUpdatedAt=2024-09-30T00:00:00.000Z |
| offset | integer >= 0 Pagination offset |
| count | integer [ 1 .. 200 ] Default: 50 Number of results |
| productId | Array of integers Filter by productId(s) |
| name | Array of strings Filter by name(s) |
| barcode | Array of strings Filter by barcode(s) |
| externalId | Array of strings Filter by externalId(s) |
| invalidThumbnail | boolean Filter by invalidThumbnail |
| isDefault | boolean Filter by isDefault flag |
Responses
Response Schema: application/json
required | Array of objects (ProductVariantResponseDto) | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
required | object (CursorBasedPaginationDto) | ||||||||||||||||||||||||
| |||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "variants": [
- {
- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}
], - "pagination": {
- "previous": {
- "count": 0,
- "before": "string",
- "direction": "asc"
}, - "next": {
- "count": 0,
- "after": "string",
- "direction": "asc"
}
}
}Get product variant by id
path Parameters
| id required | integer Id of the product variant |
Responses
Response Schema: application/json
| id required | integer | ||||
| name required | string | ||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||
| externalId required | string or null <= 255 characters Client defined product variant identifier | ||||
| weight required | string or null <float> A decimal representation of the product's weight | ||||
required | Array of objects (ProductVariantBarcodeDto) List of barcodes, associated with a variant | ||||
Array
| |||||
| isDefault required | boolean Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times. | ||||
| productId required | integer id of a product in AiFi system | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}Delete product variant
path Parameters
| id required | integer Id of the product variant |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Update product variant
path Parameters
| id required | integer Id of the product variant |
Request Body schema: application/jsonrequired
| name | string | ||||
| weight | number >= 0 | ||||
Array of objects (ProductVariantBarcodeDto) List of barcodes, associated with a variant | |||||
Array
| |||||
| isDefault | boolean Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times. | ||||
| thumbnail | string | ||||
| invalidThumbnail | boolean Marks whether thumbnail is a valid image. Can only be specified if 'thumbnail' was also specified and it's value is not empty. If 'thumbnail' was specified then default value for this field is 'false'. Otherwise there is no default value and this field's value depends on whether thumbnail's url was automatically resolved | ||||
| externalId | string <= 255 characters Client defined product variant identifier | ||||
Responses
Response Schema: application/json
| id required | integer | ||||
| name required | string | ||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||
| externalId required | string or null <= 255 characters Client defined product variant identifier | ||||
| weight required | string or null <float> A decimal representation of the product's weight | ||||
required | Array of objects (ProductVariantBarcodeDto) List of barcodes, associated with a variant | ||||
Array
| |||||
| isDefault required | boolean Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times. | ||||
| productId required | integer id of a product in AiFi system | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "name": "string",
- "weight": 0,
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string"
}Response samples
- 200
- 422
{- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}Get a default variant for product
path Parameters
| productId required | integer Id of the product |
Responses
Response Schema: application/json
| id required | integer | ||||
| name required | string | ||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||
| externalId required | string or null <= 255 characters Client defined product variant identifier | ||||
| weight required | string or null <float> A decimal representation of the product's weight | ||||
required | Array of objects (ProductVariantBarcodeDto) List of barcodes, associated with a variant | ||||
Array
| |||||
| isDefault required | boolean Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times. | ||||
| productId required | integer id of a product in AiFi system | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}Create product variant
path Parameters
| productId required | integer Id of the product |
Request Body schema: application/jsonrequired
| name required | string | ||||
| weight required | number >= 0 | ||||
required | Array of objects (ProductVariantBarcodeDto) List of barcodes, associated with a variant | ||||
Array
| |||||
| isDefault | boolean Default: false Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times. | ||||
| thumbnail required | string URL to thumbnail. If not provided best-effort will be taken to resolve thumbnail url automatically | ||||
| invalidThumbnail | boolean Marks whether thumbnail is a valid image. Can only be specified if 'thumbnail' was also specified and it's value is not empty. If 'thumbnail' was specified then default value for this field is 'false'. Otherwise there is no default value and this field's value depends on whether thumbnail's url was automatically resolved | ||||
| externalId | string <= 255 characters Client defined product variant identifier | ||||
Responses
Response Schema: application/json
| id required | integer | ||||
| name required | string | ||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||
| externalId required | string or null <= 255 characters Client defined product variant identifier | ||||
| weight required | string or null <float> A decimal representation of the product's weight | ||||
required | Array of objects (ProductVariantBarcodeDto) List of barcodes, associated with a variant | ||||
Array
| |||||
| isDefault required | boolean Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times. | ||||
| productId required | integer id of a product in AiFi system | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "name": "string",
- "weight": 0,
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": false,
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string"
}Response samples
- 201
- 422
{- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}Add barcode to variant
path Parameters
| id required | integer Id of the product variant |
Request Body schema: application/jsonrequired
| isDefault required | boolean Informs whether this is a default barcode, for a variant. Every variant must have exactly one default barcode at all times. |
| barcode required | string Barcode value |
Responses
Response Schema: application/json
| id required | integer | ||||
| name required | string | ||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||
| externalId required | string or null <= 255 characters Client defined product variant identifier | ||||
| weight required | string or null <float> A decimal representation of the product's weight | ||||
required | Array of objects (ProductVariantBarcodeDto) List of barcodes, associated with a variant | ||||
Array
| |||||
| isDefault required | boolean Informs whether this is a default variant, for a product. Every product must have exactly one default variant at all times. | ||||
| productId required | integer id of a product in AiFi system | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "isDefault": true,
- "barcode": "string"
}Response samples
- 200
- 422
{- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}Deletes specified barcode from variant
In case deleted barcode was a default barcode for variant, it's oldest barcode becomes a new default.
path Parameters
| id required | integer Id of the product variant |
| barcode required | string |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}List products
query Parameters
| offset | integer >= 0 Pagination offset |
| count | integer [ 1 .. 200 ] Default: 50 Number of results |
| minCreatedAt | string <date-time> Example: minCreatedAt=2024-09-22T00:00:00.000Z |
| maxCreatedAt | string <date-time> Example: maxCreatedAt=2024-09-29T00:00:00.000Z |
| minUpdatedAt | string <date-time> Example: minUpdatedAt=2024-09-23T00:00:00.000Z |
| maxUpdatedAt | string <date-time> Example: maxUpdatedAt=2024-09-30T00:00:00.000Z |
| sort | string Default: "id" Enum: "createdAt" "name" "price" "quantity" "id" Sort key, default to id |
| direction | string Default: "asc" Enum: "asc" "desc" Sort direction, default to asc |
| id | Array of integers Filter by id(s) |
| name | Array of strings Filter by name(s) |
| barcode | Array of strings Filter by barcode(s) |
| externalId | Array of strings Filter by externalId(s) |
| invalidThumbnail | boolean Filter by invalidThumbnail |
| priceMin | number >= 0 Filter by price (NOTE: does not apply to store-specific prices) |
| priceMax | number >= 0 Filter by price (NOTE: does not apply to store-specific prices) |
| quantityMin | integer >= 0 Deprecated Filter by quantity |
| quantityMax | integer >= 0 Deprecated Filter by quantity |
| category | Array of strings Deprecated Filter by category(categories) |
| sku | Array of strings Deprecated Filter by sku(s) |
| location | Array of strings Deprecated Filter by location(s) |
Responses
Response Schema: application/json
required | Array of objects (ProductResponseDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object offset based pagination | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "products": [
- {
- "id": "string",
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "productId": 0,
- "quantity": 0,
- "weight": 0,
- "sku": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "restricted": true,
- "taxCode": "string",
- "storePrices": [
- {
- "storeId": "string",
- "productId": "string",
- "price": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "variants": [
- {
- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}
]
}
], - "pagination": {
- "previous": {
- "offset": 0,
- "count": 0
}, - "next": {
- "offset": 0,
- "count": 0
}
}
}Upsert product by product externalId
This endpoint allows you to upsert (create or update) a product by specifying externalId in the query.
query Parameters
| externalId required | string Client defined product identifier |
Request Body schema: application/jsonrequired
| name required | string | ||||
| price required | number >= 0 The default price, used if a store-specific price is not specified. | ||||
| quantity | integer >= 0 Deprecated Default: 0 | ||||
| category | string Deprecated | ||||
| sku | string Deprecated | ||||
| thumbnail | string URL to thumbnail. If not provided best-effort will be taken to resolve thumbnail url automatically | ||||
| invalidThumbnail | string Marks whether thumbnail is a valid image. Can only be specified if 'thumbnail' was also specified and it's value is not empty. If 'thumbnail' was specified then default value for this field is 'false'. Otherwise there is no default value and this field's value depends on whether thumbnail's url was automatically resolved | ||||
| inventoryItemId | integer Deprecated | ||||
| externalId | string Client defined product identifier | ||||
| taxCode | string or null Avalara tax code, available ig avalara integration is enabled | ||||
| restricted | boolean Whether the product is a restriction item | ||||
Array of objects (CreateStorePriceRequestDto) An optional list to specify prices per store. IMPORTANT - if specified once, you cannot go back to the default price! You will need to update the prices every time going forward. | |||||
Array
| |||||
| barcode required | string Default barcode of default variant for this product | ||||
| weight required | number Weight of a default variant | ||||
Responses
Response Schema: application/json
| id required | string <integer> Id of the product | ||||||||||||||||||||||||
| name required | string | ||||||||||||||||||||||||
| price required | string or null <float> Unit price for single item, depending on configuration it may either contain the tax (suitable e.g. for integrations in EU) or not (suitable e.g. for integrations in the US) | ||||||||||||||||||||||||
| barcode required | string Default barcode of default variant for this product | ||||||||||||||||||||||||
| category required | string or null Deprecated | ||||||||||||||||||||||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||||||||||||||||||||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||||||||||||||||||||||
| productId required | integer or null Deprecated Id of a product in Shopify | ||||||||||||||||||||||||
| quantity required | integer or null Deprecated | ||||||||||||||||||||||||
| weight required | number or null Weight of a default variant | ||||||||||||||||||||||||
| sku required | string or null Deprecated | ||||||||||||||||||||||||
| inventoryItemId required | integer or null Deprecated | ||||||||||||||||||||||||
| externalId required | string or null Client defined product identifier | ||||||||||||||||||||||||
| restricted required | boolean Whether the product is a restriction item | ||||||||||||||||||||||||
| taxCode required | string or null Avalara tax code, available ig avalara integration is enabled | ||||||||||||||||||||||||
required | Array of objects (ProductStorePriceDto) The current (latest) store prices for each store that they were defined for | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
required | Array of objects (ProductVariantResponseDto) List of product variants | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
Response Schema: application/json
| id required | string <integer> Id of the product | ||||||||||||||||||||||||
| name required | string | ||||||||||||||||||||||||
| price required | string or null <float> Unit price for single item, depending on configuration it may either contain the tax (suitable e.g. for integrations in EU) or not (suitable e.g. for integrations in the US) | ||||||||||||||||||||||||
| barcode required | string Default barcode of default variant for this product | ||||||||||||||||||||||||
| category required | string or null Deprecated | ||||||||||||||||||||||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||||||||||||||||||||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||||||||||||||||||||||
| productId required | integer or null Deprecated Id of a product in Shopify | ||||||||||||||||||||||||
| quantity required | integer or null Deprecated | ||||||||||||||||||||||||
| weight required | number or null Weight of a default variant | ||||||||||||||||||||||||
| sku required | string or null Deprecated | ||||||||||||||||||||||||
| inventoryItemId required | integer or null Deprecated | ||||||||||||||||||||||||
| externalId required | string or null Client defined product identifier | ||||||||||||||||||||||||
| restricted required | boolean Whether the product is a restriction item | ||||||||||||||||||||||||
| taxCode required | string or null Avalara tax code, available ig avalara integration is enabled | ||||||||||||||||||||||||
required | Array of objects (ProductStorePriceDto) The current (latest) store prices for each store that they were defined for | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
required | Array of objects (ProductVariantResponseDto) List of product variants | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "name": "string",
- "price": 0,
- "quantity": 0,
- "category": "string",
- "sku": "string",
- "thumbnail": "string",
- "invalidThumbnail": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "taxCode": "string",
- "restricted": true,
- "storePrices": [
- {
- "storeId": 1,
- "price": 0
}
], - "barcode": "string",
- "weight": 0
}Response samples
- 200
- 201
- 422
{- "id": "string",
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "productId": 0,
- "quantity": 0,
- "weight": 0,
- "sku": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "restricted": true,
- "taxCode": "string",
- "storePrices": [
- {
- "storeId": "string",
- "productId": "string",
- "price": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "variants": [
- {
- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}
]
}Create a product
Request Body schema: application/jsonrequired
| name required | string | ||||
| price required | number >= 0 The default price, used if a store-specific price is not specified. | ||||
| quantity | integer >= 0 Deprecated Default: 0 | ||||
| category | string Deprecated | ||||
| sku | string Deprecated | ||||
| thumbnail | string URL to thumbnail. If not provided best-effort will be taken to resolve thumbnail url automatically | ||||
| invalidThumbnail | string Marks whether thumbnail is a valid image. Can only be specified if 'thumbnail' was also specified and it's value is not empty. If 'thumbnail' was specified then default value for this field is 'false'. Otherwise there is no default value and this field's value depends on whether thumbnail's url was automatically resolved | ||||
| inventoryItemId | integer Deprecated | ||||
| externalId | string Client defined product identifier | ||||
| taxCode | string or null Avalara tax code, available ig avalara integration is enabled | ||||
| restricted | boolean Whether the product is a restriction item | ||||
Array of objects (CreateStorePriceRequestDto) An optional list to specify prices per store. IMPORTANT - if specified once, you cannot go back to the default price! You will need to update the prices every time going forward. | |||||
Array
| |||||
| barcode required | string Default barcode of default variant for this product | ||||
| weight required | number Weight of a default variant | ||||
Responses
Response Schema: application/json
| id required | string <integer> Id of the product | ||||||||||||||||||||||||
| name required | string | ||||||||||||||||||||||||
| price required | string or null <float> Unit price for single item, depending on configuration it may either contain the tax (suitable e.g. for integrations in EU) or not (suitable e.g. for integrations in the US) | ||||||||||||||||||||||||
| barcode required | string Default barcode of default variant for this product | ||||||||||||||||||||||||
| category required | string or null Deprecated | ||||||||||||||||||||||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||||||||||||||||||||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||||||||||||||||||||||
| productId required | integer or null Deprecated Id of a product in Shopify | ||||||||||||||||||||||||
| quantity required | integer or null Deprecated | ||||||||||||||||||||||||
| weight required | number or null Weight of a default variant | ||||||||||||||||||||||||
| sku required | string or null Deprecated | ||||||||||||||||||||||||
| inventoryItemId required | integer or null Deprecated | ||||||||||||||||||||||||
| externalId required | string or null Client defined product identifier | ||||||||||||||||||||||||
| restricted required | boolean Whether the product is a restriction item | ||||||||||||||||||||||||
| taxCode required | string or null Avalara tax code, available ig avalara integration is enabled | ||||||||||||||||||||||||
required | Array of objects (ProductStorePriceDto) The current (latest) store prices for each store that they were defined for | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
required | Array of objects (ProductVariantResponseDto) List of product variants | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "name": "string",
- "price": 0,
- "quantity": 0,
- "category": "string",
- "sku": "string",
- "thumbnail": "string",
- "invalidThumbnail": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "taxCode": "string",
- "restricted": true,
- "storePrices": [
- {
- "storeId": 1,
- "price": 0
}
], - "barcode": "string",
- "weight": 0
}Response samples
- 201
- 422
{- "id": "string",
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "productId": 0,
- "quantity": 0,
- "weight": 0,
- "sku": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "restricted": true,
- "taxCode": "string",
- "storePrices": [
- {
- "storeId": "string",
- "productId": "string",
- "price": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "variants": [
- {
- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}
]
}Get a list of all the taxrates available
Responses
Response Schema: application/json
| taxCode required | string Avalara tax code |
| country required | string Enum: "AC" "AD" "AE" "AF" "AG" "AI" "AL" "AM" "AN" "AO" "AR" "AT" "AU" "AW" "AX" "AZ" "BA" "BB" "BD" "BE" "BF" "BG" "BH" "BI" "BJ" "BL" "BM" "BN" "BO" "BQ" "BR" "BS" "BT" "BV" "BW" "BY" "BZ" "CA" "CC" "CD" "CF" "CG" "CH" "CI" "CK" "CL" "CM" "CN" "CO" "CR" "CU" "CV" "CW" "CX" "CY" "CZ" "DE" "DJ" "DK" "DM" "DO" "DZ" "EC" "EE" "EG" "EH" "ER" "ES" "ET" "FI" "FJ" "FK" "FO" "FR" "GA" "GB" "GD" "GE" "GF" "GG" "GH" "GI" "GL" "GM" "GN" "GP" "GQ" "GR" "GS" "GT" "GW" "GY" "HK" "HM" "HN" "HR" "HT" "HU" "ID" "IE" "IL" "IM" "IN" "IO" "IQ" "IR" "IS" "IT" "JE" "JM" "JO" "JP" "KE" "KG" "KH" "KI" "KM" "KN" "KP" "KR" "KW" "KY" "KZ" "LA" "LB" "LC" "LI" "LK" "LR" "LS" "LT" "LU" "LV" "LY" "MA" "MC" "MD" "ME" "MF" "MG" "MK" "ML" "MM" "MN" "MO" "MQ" "MR" "MS" "MT" "MU" "MV" "MW" "MX" "MY" "MZ" "NA" "NC" "NE" "NF" "NG" "NI" "NL" "NO" "NP" "NR" "NU" "NZ" "OM" "PA" "PE" "PF" "PG" "PH" "PK" "PL" "PM" "PN" "PS" "PT" "PY" "QA" "RE" "RO" "RS" "RU" "RW" "SA" "SB" "SC" "SD" "SE" "SG" "SH" "SI" "SJ" "SK" "SL" "SM" "SN" "SO" "SR" "SS" "ST" "SV" "SX" "SY" "SZ" "TA" "TC" "TD" "TF" "TG" "TH" "TJ" "TK" "TL" "TM" "TN" "TO" "TR" "TT" "TV" "TW" "TZ" "UA" "UG" "UM" "US" "UY" "UZ" "VA" "VC" "VE" "VG" "VN" "VU" "WF" "WS" "XK" "YE" "YT" "ZA" "ZM" "ZW" ISO 3166 two character country codes |
| description required | string a description of the tax code |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
[- {
- "taxCode": "string",
- "country": "AC",
- "description": "string"
}
]List categories
query Parameters
| count | number Default: 50 This endpoint doesn't support pagination but you can use count query param to specify number of results. |
Responses
Response Schema: application/json
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
[- "string"
]Get product detail by id
path Parameters
| id required | integer Id of a product |
Responses
Response Schema: application/json
| id required | string <integer> Id of the product | ||||||||||||||||||||||||
| name required | string | ||||||||||||||||||||||||
| price required | string or null <float> Unit price for single item, depending on configuration it may either contain the tax (suitable e.g. for integrations in EU) or not (suitable e.g. for integrations in the US) | ||||||||||||||||||||||||
| barcode required | string Default barcode of default variant for this product | ||||||||||||||||||||||||
| category required | string or null Deprecated | ||||||||||||||||||||||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||||||||||||||||||||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||||||||||||||||||||||
| productId required | integer or null Deprecated Id of a product in Shopify | ||||||||||||||||||||||||
| quantity required | integer or null Deprecated | ||||||||||||||||||||||||
| weight required | number or null Weight of a default variant | ||||||||||||||||||||||||
| sku required | string or null Deprecated | ||||||||||||||||||||||||
| inventoryItemId required | integer or null Deprecated | ||||||||||||||||||||||||
| externalId required | string or null Client defined product identifier | ||||||||||||||||||||||||
| restricted required | boolean Whether the product is a restriction item | ||||||||||||||||||||||||
| taxCode required | string or null Avalara tax code, available ig avalara integration is enabled | ||||||||||||||||||||||||
required | Array of objects (ProductStorePriceDto) The current (latest) store prices for each store that they were defined for | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
required | Array of objects (ProductVariantResponseDto) List of product variants | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "id": "string",
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "productId": 0,
- "quantity": 0,
- "weight": 0,
- "sku": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "restricted": true,
- "taxCode": "string",
- "storePrices": [
- {
- "storeId": "string",
- "productId": "string",
- "price": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "variants": [
- {
- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}
]
}Update product by product id
This endpoint allows you to update a product by specifying id in the path.
path Parameters
| id required | integer id of a product |
Request Body schema: application/jsonrequired
| name required | string | ||||
| price required | number >= 0 The default price, used if a store-specific price is not specified. | ||||
| quantity | integer >= 0 Deprecated Default: 0 | ||||
| category | string Deprecated | ||||
| sku | string Deprecated | ||||
| thumbnail | string URL to thumbnail. If not provided best-effort will be taken to resolve thumbnail url automatically | ||||
| invalidThumbnail | string Marks whether thumbnail is a valid image. Can only be specified if 'thumbnail' was also specified and it's value is not empty. If 'thumbnail' was specified then default value for this field is 'false'. Otherwise there is no default value and this field's value depends on whether thumbnail's url was automatically resolved | ||||
| inventoryItemId | integer Deprecated | ||||
| externalId | string Client defined product identifier | ||||
| taxCode | string or null Avalara tax code, available ig avalara integration is enabled | ||||
| restricted | boolean Whether the product is a restriction item | ||||
Array of objects (CreateStorePriceRequestDto) An optional list to specify prices per store. IMPORTANT - if specified once, you cannot go back to the default price! You will need to update the prices every time going forward. | |||||
Array
| |||||
| barcode required | string Default barcode of default variant for this product | ||||
| weight required | number Weight of a default variant | ||||
Responses
Response Schema: application/json
| id required | string <integer> Id of the product | ||||||||||||||||||||||||
| name required | string | ||||||||||||||||||||||||
| price required | string or null <float> Unit price for single item, depending on configuration it may either contain the tax (suitable e.g. for integrations in EU) or not (suitable e.g. for integrations in the US) | ||||||||||||||||||||||||
| barcode required | string Default barcode of default variant for this product | ||||||||||||||||||||||||
| category required | string or null Deprecated | ||||||||||||||||||||||||
| thumbnail required | string or null URL of the thumbnail for this product. Note that it needs not be the same as specified during product creation/update, as AIFI may host URLs in it's own storage. | ||||||||||||||||||||||||
| invalidThumbnail required | boolean Marks whether thumbnail is a valid image | ||||||||||||||||||||||||
| productId required | integer or null Deprecated Id of a product in Shopify | ||||||||||||||||||||||||
| quantity required | integer or null Deprecated | ||||||||||||||||||||||||
| weight required | number or null Weight of a default variant | ||||||||||||||||||||||||
| sku required | string or null Deprecated | ||||||||||||||||||||||||
| inventoryItemId required | integer or null Deprecated | ||||||||||||||||||||||||
| externalId required | string or null Client defined product identifier | ||||||||||||||||||||||||
| restricted required | boolean Whether the product is a restriction item | ||||||||||||||||||||||||
| taxCode required | string or null Avalara tax code, available ig avalara integration is enabled | ||||||||||||||||||||||||
required | Array of objects (ProductStorePriceDto) The current (latest) store prices for each store that they were defined for | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
required | Array of objects (ProductVariantResponseDto) List of product variants | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "name": "string",
- "price": 0,
- "quantity": 0,
- "category": "string",
- "sku": "string",
- "thumbnail": "string",
- "invalidThumbnail": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "taxCode": "string",
- "restricted": true,
- "storePrices": [
- {
- "storeId": 1,
- "price": 0
}
], - "barcode": "string",
- "weight": 0
}Response samples
- 200
- 422
{- "id": "string",
- "name": "string",
- "price": "string",
- "barcode": "string",
- "category": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "productId": 0,
- "quantity": 0,
- "weight": 0,
- "sku": "string",
- "inventoryItemId": 0,
- "externalId": "string",
- "restricted": true,
- "taxCode": "string",
- "storePrices": [
- {
- "storeId": "string",
- "productId": "string",
- "price": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "variants": [
- {
- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}
]
}Delete product by id
path Parameters
| id required | integer Id of a product |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Trigger an async job to sync product to store(s)
Request Body schema: application/jsonrequired
| storeId | integer Id of target store, or sync product to all store if not provided |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "storeId": 0
}Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Get product planogram
path Parameters
| id required | integer Id of a product |
query Parameters
| storeId | integer Example: storeId=11 Id of the physical store |
| withMisplacements | boolean Whether result should contain misplaced instances of the product |
Responses
Response Schema: application/json
required | object or null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "gondolasPlanogram": {
- "property1": {
- "productAvailable": true,
- "shelves": {
- "property1": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": null,
- "barcodeType": null,
- "productId": null,
- "name": null,
- "price": null,
- "thumbnail": null,
- "weight": null,
- "retailerType": null,
- "RIN": null,
- "restricted": null
}
}
]
}
], - "sizeType": "plate"
}, - "property2": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": null,
- "barcodeType": null,
- "productId": null,
- "name": null,
- "price": null,
- "thumbnail": null,
- "weight": null,
- "retailerType": null,
- "RIN": null,
- "restricted": null
}
}
]
}
], - "sizeType": "plate"
}
}
}, - "property2": {
- "productAvailable": true,
- "shelves": {
- "property1": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": null,
- "barcodeType": null,
- "productId": null,
- "name": null,
- "price": null,
- "thumbnail": null,
- "weight": null,
- "retailerType": null,
- "RIN": null,
- "restricted": null
}
}
]
}
], - "sizeType": "plate"
}, - "property2": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": null,
- "barcodeType": null,
- "productId": null,
- "name": null,
- "price": null,
- "thumbnail": null,
- "weight": null,
- "retailerType": null,
- "RIN": null,
- "restricted": null
}
}
]
}
], - "sizeType": "plate"
}
}
}
}
}Lists all customers
query Parameters
| minCreatedAt | string <date-time> Example: minCreatedAt=2024-09-22T00:00:00.000Z |
| maxCreatedAt | string <date-time> Example: maxCreatedAt=2024-09-29T00:00:00.000Z |
| minUpdatedAt | string <date-time> Example: minUpdatedAt=2024-09-23T00:00:00.000Z |
| maxUpdatedAt | string <date-time> Example: maxUpdatedAt=2024-09-30T00:00:00.000Z |
| externalId | string If provided filters result list by externalId(s) |
string If provided filters result list by email(s) | |
| paymentInstrumentProviderId | string If provided filters result list by id(s) of a payment instrument, associated with the resulting record, specified exactly as in payment provider's system |
Responses
Response Schema: application/json
| id required | integer |
| externalId required | string or null Id of the customer in external system |
| role required | string Enum: "customer" "employee" "tester" "untracked" "unknown" Role of the customer |
| metadata required | object or null This object can contain custom metadata information |
| priority required | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. |
| email required | string <email> |
| firstName required | string or null |
| lastName required | string or null |
| phone required | string or null |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
[- {
- "id": 0,
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string"
}
]Create customer
Request Body schema: application/jsonrequired
string <email> The system will randomly generate a fake email if not provided | |
| password | string <password> [ 8 .. 255 ] characters The system will randomly generate a fake password if not provided |
| externalId | string Id of the customer in external system |
| firstName | string |
| lastName | string |
| phone | string |
| role | string Default: "customer" Enum: "customer" "employee" "tester" "untracked" "unknown" Role of the customer |
| priority | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. |
| metadata | object or null Default: null This object can contain custom metadata information |
Responses
Response Schema: application/json
| id required | integer |
| externalId required | string or null Id of the customer in external system |
| role required | string Enum: "customer" "employee" "tester" "untracked" "unknown" Role of the customer |
| metadata required | object or null This object can contain custom metadata information |
| priority required | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. |
| email required | string <email> |
| firstName required | string or null |
| lastName required | string or null |
| phone required | string or null |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "email": "user@example.com",
- "password": "pa$$word",
- "externalId": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "role": "customer",
- "priority": 0,
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}
}Response samples
- 201
- 422
{- "id": 0,
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string"
}Notifies Register frontend to start a flow Deprecated
Notifies Register frontend to start a flow of registering new customer with specified token, this endpoint has been deprecated, use api/admin/v2/stores/{storeId}/check-in/{checkInDeviceId}/remote-register instead
Request Body schema: application/jsonrequired
| token required | string A string token to start frontend registration flow |
| storeId required | integer Id of the physical store |
| tokenType required | string Default: "SESSION_ID" Enum: "SESSION_ID" "NONE" session token type |
| checkInDeviceId | integer The id of check-in device |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "token": "string",
- "storeId": 0,
- "tokenType": "SESSION_ID",
- "checkInDeviceId": 0
}Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Get customer detail by customerId
path Parameters
| customerId required | integer |
Responses
Response Schema: application/json
| id required | integer |
| externalId required | string or null Id of the customer in external system |
| role required | string Enum: "customer" "employee" "tester" "untracked" "unknown" Role of the customer |
| metadata required | object or null This object can contain custom metadata information |
| priority required | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. |
| email required | string <email> |
| firstName required | string or null |
| lastName required | string or null |
| phone required | string or null |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "id": 0,
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string"
}Update customer by customerId
path Parameters
| customerId required | integer |
Request Body schema: application/jsonrequired
string <email> The system will randomly generate a fake email if not provided | |||||||||||||||||||
| externalId | string Id of the customer in external system | ||||||||||||||||||
| firstName | string | ||||||||||||||||||
| lastName | string | ||||||||||||||||||
| phone | string | ||||||||||||||||||
| role | string Default: "customer" Enum: "customer" "employee" "tester" "untracked" "unknown" Role of the customer | ||||||||||||||||||
| priority | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. | ||||||||||||||||||
| metadata | object or null Default: null This object can contain custom metadata information | ||||||||||||||||||
| password | string <password> [ 8 .. 255 ] characters New password that will be set for the user | ||||||||||||||||||
| currentPassword | string <password> [ 8 .. 255 ] characters Current password of the user | ||||||||||||||||||
| blocked | boolean If true, the customer cannot enter the store | ||||||||||||||||||
object (CardUpdateRequestDto) | |||||||||||||||||||
| |||||||||||||||||||
| cardType | string Deprecated Default: "NONE" Enum: "NONE" "STRIPE" "PAYTER" "ADYEN" "FREEDOM_PAY" "GENERIC" Card/payment provider, deprecated, use card.provider instead | ||||||||||||||||||
| cardToken | string or null Deprecated Card token to charge customer, pass null to delete the existing payment instrument, deprecated, use card.cardToken instead | ||||||||||||||||||
Responses
Response Schema: application/json
| id required | integer |
| externalId required | string or null Id of the customer in external system |
| role required | string Enum: "customer" "employee" "tester" "untracked" "unknown" Role of the customer |
| metadata required | object or null This object can contain custom metadata information |
| priority required | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. |
| email required | string <email> |
| firstName required | string or null |
| lastName required | string or null |
| phone required | string or null |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "email": "user@example.com",
- "externalId": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "role": "customer",
- "priority": 0,
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "password": "pa$$word",
- "currentPassword": "pa$$word",
- "blocked": true,
- "card": {
- "provider": "NONE",
- "underlyingPaymentProvider": "string",
- "cardToken": "string",
- "cardId": "string",
- "cardBin": "string",
- "cardLast4Digits": "stri",
- "cardExpiryDate": "string",
- "defaultCard": false,
- "cardBrand": "string"
}, - "cardType": "NONE",
- "cardToken": "string"
}Response samples
- 200
- 422
{- "id": 0,
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string"
}Set a card token for a customer
path Parameters
| customerId required | integer |
Request Body schema: application/jsonrequired
| provider required | string Enum: "NONE" "STRIPE" "PAYTER" "ADYEN" "FREEDOM_PAY" "GENERIC" Payment provider |
| cardToken required | string Enum: "NONE" "STRIPE" "PAYTER" "ADYEN" "FREEDOM_PAY" "GENERIC" Card token to charge customer |
Responses
Response Schema: application/json
| id required | integer |
| externalId required | string or null Id of the customer in external system |
| role required | string Enum: "customer" "employee" "tester" "untracked" "unknown" Role of the customer |
| metadata required | object or null This object can contain custom metadata information |
| priority required | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. |
| email required | string <email> |
| firstName required | string or null |
| lastName required | string or null |
| phone required | string or null |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "provider": "NONE",
- "cardToken": "NONE"
}Response samples
- 200
- 422
{- "id": 0,
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string"
}Create new entry code for a customer
path Parameters
| customerId required | integer |
query Parameters
| displayable | boolean If true, the returned value will be returned in a form which can be used as a qr-code payload. resulting qr-code can be scanned to let somebody into the store. otherwise the returned value will be returned "as is" and can be used in other calls to the APIs |
Request Body schema: application/jsonrequired
| code | string Entry code to be added to valid customer codes | ||||||
| groupSize | integer Group size for that entry code | ||||||
| sessionId | string Session token sent out later by aifi to identify transactions made on this entry code | ||||||
| referencedSessionId | string or null Default: null Referenced session token, that points to the source session | ||||||
| expiresAt | string <date-time> ISO 8601 encoded time, at which this entry code will expire. If not specified a default value (depending on a deployment) will be set. | ||||||
| priority | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. | ||||||
object Card reader error, to allow registration screen to display error message to customer | |||||||
| |||||||
Responses
Response Schema: application/json
| code required | string An entry code that can rendered as QR and used to enter AiFi store |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "code": "string",
- "groupSize": 0,
- "sessionId": "string",
- "referencedSessionId": null,
- "expiresAt": "2019-08-24T14:15:22Z",
- "priority": 0,
- "error": {
- "errorType": "string",
- "errorCode": 80,
- "message": "string"
}
}Response samples
- 201
- 422
{- "code": "string"
}Add a new card to customer
path Parameters
| customerId required | integer |
Request Body schema: application/jsonrequired
| provider required | string Enum: "NONE" "STRIPE" "PAYTER" "ADYEN" "FREEDOM_PAY" "GENERIC" |
| underlyingPaymentProvider | string To identify the real payment provider when provider is GENERIC |
| defaultCard | string Default: false Whether it's the default card |
| cardBrand | string <= 30 characters Allow retailer to specify card brand, the length of this field should be less than or equal to 30. if this value is unknown or not specified, empty string will be included in webhooks |
| cardToken required | string Card token to charge customer |
| cardId required | string Unique id of the card. as apposed to cardToken, it should be the same (for a physical card) upon every tokenization |
Responses
Response Schema: application/json
| id required | integer Id of the card |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "provider": "NONE",
- "underlyingPaymentProvider": "string",
- "defaultCard": false,
- "cardBrand": "string",
- "cardToken": "string",
- "cardId": "string"
}Response samples
- 201
- 422
{- "id": 0
}Delete a card by id
path Parameters
| customerId required | integer |
| cardId required | integer |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Mark a card as default
path Parameters
| customerId required | integer |
| cardId required | integer |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}List sessions
query Parameters
| minCreatedAt | string <date-time> Example: minCreatedAt=2024-09-22T00:00:00.000Z |
| maxCreatedAt | string <date-time> Example: maxCreatedAt=2024-09-29T00:00:00.000Z |
| minUpdatedAt | string <date-time> Example: minUpdatedAt=2024-09-23T00:00:00.000Z |
| maxUpdatedAt | string <date-time> Example: maxUpdatedAt=2024-09-30T00:00:00.000Z |
| count | integer <= 200 Default: 20 Number of results |
| after | string Id or base64 encoded cursor(id + sortKey) |
| before | string Id or base64 encoded cursor(id + sortKey) |
| orderBy | string Enum: "id" "code" "storeId" "visitors" "groupSize" "expiresAt" "customerId" "storeId" "codeLastSuccesfullyScannedAt" "customerLastEnteredAt" "createdAt" "updatedAt" The sort key, sorting by id by default |
| direction | string Enum: "asc" "desc" Direction of sorting |
| id | integer |
| code | string |
| sessionToken | string |
| storeId | integer |
| customerId | integer |
| status | Array of strings Items Enum: "active" "declined" "validated" "checkout_performed" |
| minVisitors | integer >= 0 |
| maxVisitors | integer >= 1 |
| minGroupSize | integer >= 0 |
| maxGroupSize | integer >= 1 |
| minExpiresAt | string <date-time> |
| maxExpiresAt | string <date-time> |
| minCodeLastSuccesfullyScannedAt | string <date-time> |
| maxCodeLastSuccesfullyScannedAt | string <date-time> |
| minCustomerLastEnteredAt | string <date-time> |
| maxCustomerLastEnteredAt | string <date-time> |
Responses
Response Schema: application/json
required | Array of objects (SessionListItemDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object (CursorBasedPaginationDto) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "data": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "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",
- "id": "string",
- "customerId": "string",
- "customer": {
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "id": "string"
}, - "store": {
- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string",
- "thirdPartyId": "string",
- "storeUrl": "string",
- "maxPeople": 0,
- "storeConfigId": 0,
- "name": "string",
- "id": "string",
- "employeeInside": true
}
}
], - "pagination": {
- "previous": {
- "count": 0,
- "before": "string",
- "direction": "asc"
}, - "next": {
- "count": 0,
- "after": "string",
- "direction": "asc"
}
}
}Update customer shopping session
As of so far, the endpoint only be used to report fraudulent behavior by mark shopping session suspectedFraud=true
path Parameters
| sessionId required | string Example: d3a00526-1864-4f6e-bb2d-46e3ab7fa780 A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Request Body schema: application/jsonrequired
| suspectedFraud | boolean Indicate whether the shopping session is suspected fraud, only true is allowed |
| metadata | object Represents an arbitrary object. Note that the
Be cautious, as replacing the |
Responses
Response Schema: application/json
| createdAt required | string <date-time> ISO formatted date representing when the entity was created | ||||||||||||||||||||||||||||||
| updatedAt required | string <date-time> ISO formatted date representing when the entity was last updated | ||||||||||||||||||||||||||||||
| id required | integer | ||||||||||||||||||||||||||||||
| customerId required | integer AiFi customer id | ||||||||||||||||||||||||||||||
| code required | string An entry code that can rendered as QR and used to enter AiFi store | ||||||||||||||||||||||||||||||
| codeFirstSuccesfullyScannedAt required | string or null <date-time> ISO formatted date, the first time when the QR get scanned successfully | ||||||||||||||||||||||||||||||
| codeLastSuccesfullyScannedAt required | string or null <date-time> ISO formatted date, the last time when the QR get scanned successfully | ||||||||||||||||||||||||||||||
| customerFirstEnteredAt required | string or null <date-time> ISO formatted time, when the first shopper enter the store | ||||||||||||||||||||||||||||||
| customerLastEnteredAt required | string or null <date-time> ISO formatted time, when the last shopper enter the store | ||||||||||||||||||||||||||||||
| customerFirstExitedAt required | string or null <date-time> ISO formatted time, when the first shopper exit the store | ||||||||||||||||||||||||||||||
| customerLastExitedAt required | string or null <date-time> ISO formatted time, when the last shopper exit the store | ||||||||||||||||||||||||||||||
| customerPaymentInstrumentId required | integer or null Payment instrument id | ||||||||||||||||||||||||||||||
| customerSatisfaction required | integer or null [ 0 .. 100 ] Satisfaction from the shopping session submitted by the customer. Can be null if not submitted or when customer wished to not ask him. | ||||||||||||||||||||||||||||||
| customerSatisfactionSubmitted required | boolean Default: false Whether satisfaction has been submitted | ||||||||||||||||||||||||||||||
| groupSize required | integer Expected group size associated with the shopping session | ||||||||||||||||||||||||||||||
| visitors required | integer Actual group size associated with the shopping session | ||||||||||||||||||||||||||||||
| locationId required | string or null | ||||||||||||||||||||||||||||||
| priority required | integer [ -10 .. 10 ] Default: 0 Customer priority. default to 0, which means any regular customer. customers with higher priority will have their shopping sessions prioritized during processing, the lower priority is opposite. | ||||||||||||||||||||||||||||||
| sessionToken required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||||||||||||||||
| sessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||||||||||||||||
| referencedSessionId required | string or null Default: null Referenced session token, that points to the source session | ||||||||||||||||||||||||||||||
| status required | string Enum: "active" "declined" "validated" "checkout_performed" | ||||||||||||||||||||||||||||||
| storeId required | integer or null AiFi store id | ||||||||||||||||||||||||||||||
| storeIdScannableAt required | integer or null the id of store which the QrCode of test case can be valided. It can be scanned at any store if the value is null. | ||||||||||||||||||||||||||||||
| suspectedFraud required | boolean Default: false Indicate whether the shopping session is suspected fraud | ||||||||||||||||||||||||||||||
| metadata required | object Represents an arbitrary object. Note that the
Be cautious, as replacing the | ||||||||||||||||||||||||||||||
| expiresAt required | string <date-time> ISO formatted date at which this entry code will expire | ||||||||||||||||||||||||||||||
object (CustomerResponseDto) | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
object (SessionListItemStoreDto) | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "suspectedFraud": true,
- "metadata": {
- "events": [
- {
- "eventId": "6bdbfb2d-65b2-491c-bc97-c0ac73338476",
- "metadata": {
- "key": "value"
}
}
], - "exampleKey": "exampleValue"
}
}Response samples
- 200
- 422
{- "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": {
- "id": 0,
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string"
}, - "store": {
- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string",
- "thirdPartyId": "string",
- "storeUrl": "string",
- "maxPeople": 0,
- "storeConfigId": 0,
- "name": "string",
- "id": "string",
- "employeeInside": true
}
}Manual checkout
Causes cart, of a specified sessionId, to be cleared. Effectively starts new transaction for given shopping session.
path Parameters
| sessionId required | string Example: d3a00526-1864-4f6e-bb2d-46e3ab7fa780 A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Request Body schema: application/jsonrequired
| transactionId | integer ID of transaction for specified shopping session. Should not be specified by retailer. If not provided will be evaluated automatically | ||||||||||
required | object (CartDto) | ||||||||||
| |||||||||||
Responses
Response Schema: application/json
| orderId required | integer | ||||
| storeId required | integer AiFi store id | ||||
required | object (StoreIdsDto) | ||||
| |||||
| totalPrice required | string <float> A decimal representation of the total price of this order | ||||
| paymentTransactionId | string or null Unique identifier of this payment transaction | ||||
| paymentFailed | boolean Informs whether payment failed, or was successfully collected | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "transactionId": 0,
- "cart": {
- "products": [
- {
- "productId": 1,
- "quantity": 0,
- "status": "correct"
}
]
}
}Response samples
- 200
- 422
{- "orderId": 1234,
- "storeId": 0,
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "totalPrice": "1.50",
- "paymentTransactionId": "string",
- "paymentFailed": true
}Get live cart
path Parameters
| sessionId required | string Example: d3a00526-1864-4f6e-bb2d-46e3ab7fa780 A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Responses
Response Schema: application/json
required | Array of objects (LiveCartProductDto) | ||||||||||||||
Array
| |||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "products": [
- {
- "id": "string",
- "name": "string",
- "price": "string",
- "barcode": "string",
- "thumbnail": "string",
- "externalId": "string",
- "quantity": 0
}
]
}Update live cart
path Parameters
| sessionId required | string Example: d3a00526-1864-4f6e-bb2d-46e3ab7fa780 A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Request Body schema: application/jsonrequired
required | object (UpdateCartDto) | ||||||||||
| |||||||||||
Responses
Response Schema: application/json
required | Array of objects (UpdateCartItemResponseDto) | ||||
Array
| |||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "cart": {
- "products": [
- {
- "productId": 1,
- "quantity": 0,
- "status": "correct"
}
]
}
}Response samples
- 200
- 422
{- "products": [
- {
- "productId": 1,
- "quantity": 0
}
]
}Add pre-authorization to session
path Parameters
| sessionId required | string Example: d3a00526-1864-4f6e-bb2d-46e3ab7fa780 A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Request Body schema: application/jsonrequired
| amount required | integer >= 1 Pre-auth amount presented as minor units |
| paymentInstrumentToken required | string |
| externalPreAuthId required | string |
Responses
Response Schema: application/json
| paymentInstrumentToken required | string |
| externalPreAuthId required | string |
| id required | integer Id of the pre-authorization |
| sessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "amount": 1,
- "paymentInstrumentToken": "string",
- "externalPreAuthId": "string"
}Response samples
- 201
- 422
{- "paymentInstrumentToken": "string",
- "externalPreAuthId": "string",
- "id": 0,
- "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780"
}Put scanned products to the session
path Parameters
| sessionId required | string Example: d3a00526-1864-4f6e-bb2d-46e3ab7fa780 A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Request Body schema: application/jsonrequired
required | Array of objects (ProductDto) | ||||||
Array
| |||||||
Responses
Response Schema: application/json
required | Array of objects (ProductDto) | ||||||
Array
| |||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "products": [
- {
- "productReference": "1234567890128",
- "quantity": 1,
- "referenceType": "barcode"
}
]
}Response samples
- 200
- 422
{- "products": [
- {
- "productReference": "1234567890128",
- "quantity": 1,
- "referenceType": "barcode"
}
]
}Get fraud scoring for the session
path Parameters
| sessionId required | string Example: d3a00526-1864-4f6e-bb2d-46e3ab7fa780 A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Responses
Response Schema: application/json
| fraudScore required | number [ 0 .. 1 ] A score between 0 and 1 indicating the likelihood of fraudulent activity. Higher values suggest greater risk. | ||||||||
| flaggedAsFraudulent required | boolean Indicates whether the transaction or entity was flagged as potentially fraudulent based on the fraud score. | ||||||||
Array of objects (FraudScoreMissedItemDto) | |||||||||
Array
| |||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "fraudScore": "0.86",
- "flaggedAsFraudulent": true,
- "missedItems": [
- {
- "categoryId": "1",
- "quantity": 1,
- "confidence": "0.86",
- "binId": "uuid1"
}
]
}Get list of contested orders
query Parameters
| minCreatedAt | string <date-time> Example: minCreatedAt=2024-09-22T00:00:00.000Z |
| maxCreatedAt | string <date-time> Example: maxCreatedAt=2024-09-29T00:00:00.000Z |
| minUpdatedAt | string <date-time> Example: minUpdatedAt=2024-09-23T00:00:00.000Z |
| maxUpdatedAt | string <date-time> Example: maxUpdatedAt=2024-09-30T00:00:00.000Z |
| status | string Enum: "contested" "reviewed" |
| orderId | integer |
| storeId | integer |
| startTime | string <date-time> |
| endTime | string <date-time> |
| page | integer Default: 0 |
| pageSize | integer Default: 10 |
Responses
Response Schema: application/json
required | Array of objects (ContestedListItemDto) List of contested orders match given criteria | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Offset based pagination | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "contestedOrders": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "orderId": "string",
- "orderVersion": 0,
- "sessionId": "string",
- "message": "string",
- "fromOperator": true,
- "status": "contested",
- "contestedTotalPrice": "120.00",
- "reviewedTotalPrice": "120.00",
- "originalTotalPrice": "123.45",
- "order": {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "version": 0,
- "isLatest": 0,
- "customerId": "11",
- "storeId": 1,
- "status": "draft",
- "transactionId": 0,
- "customerShoppingSessionId": 0,
- "externalId": "string",
- "externalStatus": "ok",
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "paidAt": "2019-08-24T14:15:22Z",
- "notificationSentAt": "2019-08-24T14:15:22Z",
- "extraText": "",
- "completedAt": "2019-08-24T14:15:22Z",
- "draftCreatedAt": "2019-08-24T14:15:22Z"
}
}
], - "pagination": {
- "previous": {
- "offset": 0,
- "count": 0
}, - "next": {
- "offset": 0,
- "count": 0
}
}
}Create a contest for order
Request Body schema: application/jsonrequired
| orderId required | integer Id of the order is being contested | ||||||
| message | string Default: "" Message provided by a customer, may be empty | ||||||
required | Array of objects (CreateContestOrderItemDto) Line items need to be contested | ||||||
Array
| |||||||
Responses
Response Schema: application/json
| createdAt required | string <date-time> ISO formatted date representing when the entity was created |
| id required | integer Id of contest item |
| productId required | integer Id of product |
| rin required | string <integer> Deprecated Use productId instead |
| contestedOrderId required | integer Id of the contested order |
| originalQuantity required | integer Quantity of the product in original order |
| contestedQuantity required | integer The quantity that the customer believes would be correct |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "orderId": 0,
- "message": "",
- "items": [
- {
- "id": 0,
- "productId": 0,
- "contestedQuantity": 0
}
]
}Response samples
- 201
- 422
[- {
- "createdAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "productId": 0,
- "rin": "string",
- "contestedOrderId": 0,
- "originalQuantity": 0,
- "contestedQuantity": 0
}
]Get contested order by original order id
path Parameters
| orderId required | integer |
Responses
Response Schema: application/json
| createdAt required | string <date-time> ISO formatted date representing when the entity was created | ||||||||||||||||||||||||||||||||||||||||||||||
| updatedAt required | string <date-time> ISO formatted date representing when the entity was last updated | ||||||||||||||||||||||||||||||||||||||||||||||
| deletedAt required | string or null <date-time> ISO formatted date representing when the entity was soft deleted | ||||||||||||||||||||||||||||||||||||||||||||||
| id required | integer Id of contested order | ||||||||||||||||||||||||||||||||||||||||||||||
| orderId required | string <integer> Id of original order | ||||||||||||||||||||||||||||||||||||||||||||||
| orderVersion required | integer Version of original order | ||||||||||||||||||||||||||||||||||||||||||||||
| sessionId required | string or null A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||||||||||||||||||||||||||||||||
| message required | string Message provided by a customer, may be empty | ||||||||||||||||||||||||||||||||||||||||||||||
| fromOperator required | boolean Whether created by operator | ||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Enum: "contested" "reviewed" "original" | ||||||||||||||||||||||||||||||||||||||||||||||
| contestedTotalPrice required | string Total price provided by a customer, may be empty. the service will calculate it if it is missing | ||||||||||||||||||||||||||||||||||||||||||||||
| reviewedTotalPrice required | string or null Total price confirmed during review, it's null if the status is not reviewed | ||||||||||||||||||||||||||||||||||||||||||||||
| originalTotalPrice required | string Total price of original order | ||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (ContestedItemDto) Line items get contested | ||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||
required | object The transaction related to the contested order | ||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "orderId": "string",
- "orderVersion": 0,
- "sessionId": "string",
- "message": "string",
- "fromOperator": true,
- "status": "contested",
- "contestedTotalPrice": "120.00",
- "reviewedTotalPrice": "120.00",
- "originalTotalPrice": "123.45",
- "items": [
- {
- "id": 0,
- "productId": 0,
- "name": "string",
- "price": "string",
- "thumbnail": "string",
- "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"
}, - "originalQuantity": 0,
- "contestedQuantity": 0,
- "reviewedQuantity": 0
}
], - "transaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentFailed": true
}
}Update contested order
path Parameters
| orderId required | integer |
Request Body schema: application/jsonrequired
| reviewedTotalPrice required | number Default: null It will calculate the reviewedTotalPrice based on contested items if there is no By default, reviewedTotalPrice takes precedence over cart mutator totalPrice. Cart Mutator implementation should respect and properly handle adjusted reviewedTotalPrice. | ||||||
required | Array of objects (UpdateContestOrderItemDto) | ||||||
Array
| |||||||
Responses
Response Schema: application/json
| createdAt required | string <date-time> ISO formatted date representing when the entity was created | ||||||||||||||||||||||||||||||||||||||||||||||
| updatedAt required | string <date-time> ISO formatted date representing when the entity was last updated | ||||||||||||||||||||||||||||||||||||||||||||||
| deletedAt required | string or null <date-time> ISO formatted date representing when the entity was soft deleted | ||||||||||||||||||||||||||||||||||||||||||||||
| id required | integer Id of contested order | ||||||||||||||||||||||||||||||||||||||||||||||
| orderId required | string <integer> Id of original order | ||||||||||||||||||||||||||||||||||||||||||||||
| orderVersion required | integer Version of original order | ||||||||||||||||||||||||||||||||||||||||||||||
| sessionId required | string or null A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||||||||||||||||||||||||||||||||
| message required | string Message provided by a customer, may be empty | ||||||||||||||||||||||||||||||||||||||||||||||
| fromOperator required | boolean Whether created by operator | ||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Enum: "contested" "reviewed" "original" | ||||||||||||||||||||||||||||||||||||||||||||||
| contestedTotalPrice required | string Total price provided by a customer, may be empty. the service will calculate it if it is missing | ||||||||||||||||||||||||||||||||||||||||||||||
| reviewedTotalPrice required | string or null Total price confirmed during review, it's null if the status is not reviewed | ||||||||||||||||||||||||||||||||||||||||||||||
| originalTotalPrice required | string Total price of original order | ||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (ContestedItemDto) Line items get contested | ||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||
required | object The transaction related to the contested order | ||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "reviewedTotalPrice": null,
- "items": [
- {
- "id": 0,
- "productId": 0,
- "reviewedQuantity": 0
}
]
}Response samples
- 200
- 422
{- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "id": 0,
- "orderId": "string",
- "orderVersion": 0,
- "sessionId": "string",
- "message": "string",
- "fromOperator": true,
- "status": "contested",
- "contestedTotalPrice": "120.00",
- "reviewedTotalPrice": "120.00",
- "originalTotalPrice": "123.45",
- "items": [
- {
- "id": 0,
- "productId": 0,
- "name": "string",
- "price": "string",
- "thumbnail": "string",
- "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"
}, - "originalQuantity": 0,
- "contestedQuantity": 0,
- "reviewedQuantity": 0
}
], - "transaction": {
- "paymentTransactionId": "string",
- "refunded": true,
- "tryRefundTimes": 0,
- "paymentFailed": true
}
}Get list of stores
query Parameters
| count | integer <= 200 Default: 20 Number of results |
| after | string Id or base64 encoded cursor(id + sortKey) |
| before | string Id or base64 encoded cursor(id + sortKey) |
| orderBy | string The sort key, sorting by id by default |
| direction | string Enum: "asc" "desc" Direction of sorting |
| id | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| status | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers |
| externalId | string External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" |
| deploymentStatus | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing |
| aifiUniqueStoreId | string Unique identifier across all AiFi stores. it will only be filled in by TechOPS/deployment engineers |
Responses
Response Schema: application/json
required | Array of objects (StoreListItemResponseDto) | ||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||
required | object (CursorBasedPaginationDto) | ||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "stores": [
- {
- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string",
- "id": "string",
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "name": "",
- "displayableName": "",
- "thirdPartyId": "string",
- "storeUrl": "string",
- "maxPeople": 0,
- "storeConfigId": 0,
- "externalId": "string",
- "health": "online",
- "address": { }
}
], - "pagination": {
- "previous": {
- "count": 0,
- "before": "string",
- "direction": "asc"
}, - "next": {
- "count": 0,
- "after": "string",
- "direction": "asc"
}
}
}Create a store
Request Body schema: application/jsonrequired
| aifiUniqueStoreId required | string Unique identifier across all AiFi stores. it will only be filled in by TechOPS/deployment engineers |
| status required | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers |
| deploymentStatus required | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing |
| maxPeople | integer Default: 0 How many people can be at the store at the same time |
| storeUrl required | string <uri> On-premise api url of a store |
| name | string A combination of retailer name, city and country mainly used in aifi internally, it's not very friendly to customer, so the field displayableName will be used as store name in SMS notification |
| displayableName | string Store name from customer perspective, displayableName is a value set in the DB or a default of using store.name |
| thirdPartyId | string External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" |
| addressLine1 required | string Address of a store, including details such as: street name, building number, floor, etc |
| addressCity required | string City of the address |
| addressRegion required | string The region of the address, such as the province, state, or district |
| addressCountry required | string Enum: "AC" "AD" "AE" "AF" "AG" "AI" "AL" "AM" "AN" "AO" "AR" "AT" "AU" "AW" "AX" "AZ" "BA" "BB" "BD" "BE" "BF" "BG" "BH" "BI" "BJ" "BL" "BM" "BN" "BO" "BQ" "BR" "BS" "BT" "BV" "BW" "BY" "BZ" "CA" "CC" "CD" "CF" "CG" "CH" "CI" "CK" "CL" "CM" "CN" "CO" "CR" "CU" "CV" "CW" "CX" "CY" "CZ" "DE" "DJ" "DK" "DM" "DO" "DZ" "EC" "EE" "EG" "EH" "ER" "ES" "ET" "FI" "FJ" "FK" "FO" "FR" "GA" "GB" "GD" "GE" "GF" "GG" "GH" "GI" "GL" "GM" "GN" "GP" "GQ" "GR" "GS" "GT" "GW" "GY" "HK" "HM" "HN" "HR" "HT" "HU" "ID" "IE" "IL" "IM" "IN" "IO" "IQ" "IR" "IS" "IT" "JE" "JM" "JO" "JP" "KE" "KG" "KH" "KI" "KM" "KN" "KP" "KR" "KW" "KY" "KZ" "LA" "LB" "LC" "LI" "LK" "LR" "LS" "LT" "LU" "LV" "LY" "MA" "MC" "MD" "ME" "MF" "MG" "MK" "ML" "MM" "MN" "MO" "MQ" "MR" "MS" "MT" "MU" "MV" "MW" "MX" "MY" "MZ" "NA" "NC" "NE" "NF" "NG" "NI" "NL" "NO" "NP" "NR" "NU" "NZ" "OM" "PA" "PE" "PF" "PG" "PH" "PK" "PL" "PM" "PN" "PS" "PT" "PY" "QA" "RE" "RO" "RS" "RU" "RW" "SA" "SB" "SC" "SD" "SE" "SG" "SH" "SI" "SJ" "SK" "SL" "SM" "SN" "SO" "SR" "SS" "ST" "SV" "SX" "SY" "SZ" "TA" "TC" "TD" "TF" "TG" "TH" "TJ" "TK" "TL" "TM" "TN" "TO" "TR" "TT" "TV" "TW" "TZ" "UA" "UG" "UM" "US" "UY" "UZ" "VA" "VC" "VE" "VG" "VN" "VU" "WF" "WS" "XK" "YE" "YT" "ZA" "ZM" "ZW" Country code of the address. it's a ISO_3166-1_alpha-2 code |
| addressPostalCode required | string Postal code of the address. |
Responses
Response Schema: application/json
| aifiUniqueStoreId required | string Unique identifier across all AiFi stores. it will only be filled in by TechOPS/deployment engineers | ||||
| status required | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers | ||||
| deploymentStatus required | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing | ||||
| addressLine1 required | string Address of a store, including details such as: street name, building number, floor, etc | ||||
| addressCity required | string City of the address | ||||
| addressRegion required | string The region of the address, such as the province, state, or district | ||||
| addressCountry required | string Enum: "AC" "AD" "AE" "AF" "AG" "AI" "AL" "AM" "AN" "AO" "AR" "AT" "AU" "AW" "AX" "AZ" "BA" "BB" "BD" "BE" "BF" "BG" "BH" "BI" "BJ" "BL" "BM" "BN" "BO" "BQ" "BR" "BS" "BT" "BV" "BW" "BY" "BZ" "CA" "CC" "CD" "CF" "CG" "CH" "CI" "CK" "CL" "CM" "CN" "CO" "CR" "CU" "CV" "CW" "CX" "CY" "CZ" "DE" "DJ" "DK" "DM" "DO" "DZ" "EC" "EE" "EG" "EH" "ER" "ES" "ET" "FI" "FJ" "FK" "FO" "FR" "GA" "GB" "GD" "GE" "GF" "GG" "GH" "GI" "GL" "GM" "GN" "GP" "GQ" "GR" "GS" "GT" "GW" "GY" "HK" "HM" "HN" "HR" "HT" "HU" "ID" "IE" "IL" "IM" "IN" "IO" "IQ" "IR" "IS" "IT" "JE" "JM" "JO" "JP" "KE" "KG" "KH" "KI" "KM" "KN" "KP" "KR" "KW" "KY" "KZ" "LA" "LB" "LC" "LI" "LK" "LR" "LS" "LT" "LU" "LV" "LY" "MA" "MC" "MD" "ME" "MF" "MG" "MK" "ML" "MM" "MN" "MO" "MQ" "MR" "MS" "MT" "MU" "MV" "MW" "MX" "MY" "MZ" "NA" "NC" "NE" "NF" "NG" "NI" "NL" "NO" "NP" "NR" "NU" "NZ" "OM" "PA" "PE" "PF" "PG" "PH" "PK" "PL" "PM" "PN" "PS" "PT" "PY" "QA" "RE" "RO" "RS" "RU" "RW" "SA" "SB" "SC" "SD" "SE" "SG" "SH" "SI" "SJ" "SK" "SL" "SM" "SN" "SO" "SR" "SS" "ST" "SV" "SX" "SY" "SZ" "TA" "TC" "TD" "TF" "TG" "TH" "TJ" "TK" "TL" "TM" "TN" "TO" "TR" "TT" "TV" "TW" "TZ" "UA" "UG" "UM" "US" "UY" "UZ" "VA" "VC" "VE" "VG" "VN" "VU" "WF" "WS" "XK" "YE" "YT" "ZA" "ZM" "ZW" Country code of the address. it's a ISO_3166-1_alpha-2 code | ||||
| addressPostalCode required | string Postal code of the address. | ||||
required | object Store identifiers | ||||
| |||||
| thirdPartyId required | string or null Deprecated External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" | ||||
| storeUrl required | string or null On-premise api url of a store | ||||
| maxPeople required | integer How many people can be at the store at the same time | ||||
| storeConfigId required | integer or null Id of store config | ||||
| externalId required | string or null External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" | ||||
| health required | string Enum: "online" "offline" "shadow" If thirdPartyId is empty, will return empty string. if not, will return 'offline' at the moment | ||||
| address required | object Deprecated Always return empty object | ||||
| id required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. | ||||
| name required | string or null A combination of retailer name, city and country mainly used in aifi internally, it's not very friendly to customer, so the field displayableName will be used as store name in SMS notification | ||||
| displayableName required | string or null Store name from customer perspective, displayableName is a value set in the DB or a default of using store.name | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "maxPeople": 0,
- "name": "string",
- "displayableName": "string",
- "thirdPartyId": "string",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string"
}Response samples
- 200
- 422
{- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string",
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "thirdPartyId": "string",
- "storeUrl": "string",
- "maxPeople": 0,
- "storeConfigId": 0,
- "externalId": "string",
- "health": "online",
- "address": { },
- "id": 0,
- "name": "string",
- "displayableName": "string"
}Get a store
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| aifiUniqueStoreId required | string Unique identifier across all AiFi stores. it will only be filled in by TechOPS/deployment engineers | ||||
| status required | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers | ||||
| deploymentStatus required | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing | ||||
| addressLine1 required | string Address of a store, including details such as: street name, building number, floor, etc | ||||
| addressCity required | string City of the address | ||||
| addressRegion required | string The region of the address, such as the province, state, or district | ||||
| addressCountry required | string Enum: "AC" "AD" "AE" "AF" "AG" "AI" "AL" "AM" "AN" "AO" "AR" "AT" "AU" "AW" "AX" "AZ" "BA" "BB" "BD" "BE" "BF" "BG" "BH" "BI" "BJ" "BL" "BM" "BN" "BO" "BQ" "BR" "BS" "BT" "BV" "BW" "BY" "BZ" "CA" "CC" "CD" "CF" "CG" "CH" "CI" "CK" "CL" "CM" "CN" "CO" "CR" "CU" "CV" "CW" "CX" "CY" "CZ" "DE" "DJ" "DK" "DM" "DO" "DZ" "EC" "EE" "EG" "EH" "ER" "ES" "ET" "FI" "FJ" "FK" "FO" "FR" "GA" "GB" "GD" "GE" "GF" "GG" "GH" "GI" "GL" "GM" "GN" "GP" "GQ" "GR" "GS" "GT" "GW" "GY" "HK" "HM" "HN" "HR" "HT" "HU" "ID" "IE" "IL" "IM" "IN" "IO" "IQ" "IR" "IS" "IT" "JE" "JM" "JO" "JP" "KE" "KG" "KH" "KI" "KM" "KN" "KP" "KR" "KW" "KY" "KZ" "LA" "LB" "LC" "LI" "LK" "LR" "LS" "LT" "LU" "LV" "LY" "MA" "MC" "MD" "ME" "MF" "MG" "MK" "ML" "MM" "MN" "MO" "MQ" "MR" "MS" "MT" "MU" "MV" "MW" "MX" "MY" "MZ" "NA" "NC" "NE" "NF" "NG" "NI" "NL" "NO" "NP" "NR" "NU" "NZ" "OM" "PA" "PE" "PF" "PG" "PH" "PK" "PL" "PM" "PN" "PS" "PT" "PY" "QA" "RE" "RO" "RS" "RU" "RW" "SA" "SB" "SC" "SD" "SE" "SG" "SH" "SI" "SJ" "SK" "SL" "SM" "SN" "SO" "SR" "SS" "ST" "SV" "SX" "SY" "SZ" "TA" "TC" "TD" "TF" "TG" "TH" "TJ" "TK" "TL" "TM" "TN" "TO" "TR" "TT" "TV" "TW" "TZ" "UA" "UG" "UM" "US" "UY" "UZ" "VA" "VC" "VE" "VG" "VN" "VU" "WF" "WS" "XK" "YE" "YT" "ZA" "ZM" "ZW" Country code of the address. it's a ISO_3166-1_alpha-2 code | ||||
| addressPostalCode required | string Postal code of the address. | ||||
required | object Store identifiers | ||||
| |||||
| thirdPartyId required | string or null Deprecated External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" | ||||
| storeUrl required | string or null On-premise api url of a store | ||||
| maxPeople required | integer How many people can be at the store at the same time | ||||
| storeConfigId required | integer or null Id of store config | ||||
| externalId required | string or null External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" | ||||
| health required | string Enum: "online" "offline" "shadow" If thirdPartyId is empty, will return empty string. if not, will return 'offline' at the moment | ||||
| address required | object Deprecated Always return empty object | ||||
| id required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. | ||||
| name required | string or null A combination of retailer name, city and country mainly used in aifi internally, it's not very friendly to customer, so the field displayableName will be used as store name in SMS notification | ||||
| displayableName required | string or null Store name from customer perspective, displayableName is a value set in the DB or a default of using store.name | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string",
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "thirdPartyId": "string",
- "storeUrl": "string",
- "maxPeople": 0,
- "storeConfigId": 0,
- "externalId": "string",
- "health": "online",
- "address": { },
- "id": 0,
- "name": "string",
- "displayableName": "string"
}Update a store
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| aifiUniqueStoreId | string Unique identifier across all AiFi stores. it will only be filled in by TechOPS/deployment engineers |
| status | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers |
| deploymentStatus | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing |
| maxPeople | integer How many people can be at the store at the same time |
| storeUrl | string <uri> On-premise api url of a store |
| name | string A combination of retailer name, city and country mainly used in aifi internally, it's not very friendly to customer, so the field displayableName will be used as store name in SMS notification |
| displayableName | string Store name from customer perspective, displayableName is a value set in the DB or a default of using store.name |
| thirdPartyId | string or null External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" if you send null for this variable, it'll clear thirdPartyId |
| addressLine1 | string Address of a store, including details such as: street name, building number, floor, etc |
| addressCity | string City of the address |
| addressRegion | string The region of the address, such as the province, state, or district |
| addressCountry | string Enum: "AC" "AD" "AE" "AF" "AG" "AI" "AL" "AM" "AN" "AO" "AR" "AT" "AU" "AW" "AX" "AZ" "BA" "BB" "BD" "BE" "BF" "BG" "BH" "BI" "BJ" "BL" "BM" "BN" "BO" "BQ" "BR" "BS" "BT" "BV" "BW" "BY" "BZ" "CA" "CC" "CD" "CF" "CG" "CH" "CI" "CK" "CL" "CM" "CN" "CO" "CR" "CU" "CV" "CW" "CX" "CY" "CZ" "DE" "DJ" "DK" "DM" "DO" "DZ" "EC" "EE" "EG" "EH" "ER" "ES" "ET" "FI" "FJ" "FK" "FO" "FR" "GA" "GB" "GD" "GE" "GF" "GG" "GH" "GI" "GL" "GM" "GN" "GP" "GQ" "GR" "GS" "GT" "GW" "GY" "HK" "HM" "HN" "HR" "HT" "HU" "ID" "IE" "IL" "IM" "IN" "IO" "IQ" "IR" "IS" "IT" "JE" "JM" "JO" "JP" "KE" "KG" "KH" "KI" "KM" "KN" "KP" "KR" "KW" "KY" "KZ" "LA" "LB" "LC" "LI" "LK" "LR" "LS" "LT" "LU" "LV" "LY" "MA" "MC" "MD" "ME" "MF" "MG" "MK" "ML" "MM" "MN" "MO" "MQ" "MR" "MS" "MT" "MU" "MV" "MW" "MX" "MY" "MZ" "NA" "NC" "NE" "NF" "NG" "NI" "NL" "NO" "NP" "NR" "NU" "NZ" "OM" "PA" "PE" "PF" "PG" "PH" "PK" "PL" "PM" "PN" "PS" "PT" "PY" "QA" "RE" "RO" "RS" "RU" "RW" "SA" "SB" "SC" "SD" "SE" "SG" "SH" "SI" "SJ" "SK" "SL" "SM" "SN" "SO" "SR" "SS" "ST" "SV" "SX" "SY" "SZ" "TA" "TC" "TD" "TF" "TG" "TH" "TJ" "TK" "TL" "TM" "TN" "TO" "TR" "TT" "TV" "TW" "TZ" "UA" "UG" "UM" "US" "UY" "UZ" "VA" "VC" "VE" "VG" "VN" "VU" "WF" "WS" "XK" "YE" "YT" "ZA" "ZM" "ZW" Country code of the address. it's a ISO_3166-1_alpha-2 code |
| addressPostalCode | string Postal code of the address. |
Responses
Response Schema: application/json
| aifiUniqueStoreId required | string Unique identifier across all AiFi stores. it will only be filled in by TechOPS/deployment engineers | ||||
| status required | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers | ||||
| deploymentStatus required | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing | ||||
| addressLine1 required | string Address of a store, including details such as: street name, building number, floor, etc | ||||
| addressCity required | string City of the address | ||||
| addressRegion required | string The region of the address, such as the province, state, or district | ||||
| addressCountry required | string Enum: "AC" "AD" "AE" "AF" "AG" "AI" "AL" "AM" "AN" "AO" "AR" "AT" "AU" "AW" "AX" "AZ" "BA" "BB" "BD" "BE" "BF" "BG" "BH" "BI" "BJ" "BL" "BM" "BN" "BO" "BQ" "BR" "BS" "BT" "BV" "BW" "BY" "BZ" "CA" "CC" "CD" "CF" "CG" "CH" "CI" "CK" "CL" "CM" "CN" "CO" "CR" "CU" "CV" "CW" "CX" "CY" "CZ" "DE" "DJ" "DK" "DM" "DO" "DZ" "EC" "EE" "EG" "EH" "ER" "ES" "ET" "FI" "FJ" "FK" "FO" "FR" "GA" "GB" "GD" "GE" "GF" "GG" "GH" "GI" "GL" "GM" "GN" "GP" "GQ" "GR" "GS" "GT" "GW" "GY" "HK" "HM" "HN" "HR" "HT" "HU" "ID" "IE" "IL" "IM" "IN" "IO" "IQ" "IR" "IS" "IT" "JE" "JM" "JO" "JP" "KE" "KG" "KH" "KI" "KM" "KN" "KP" "KR" "KW" "KY" "KZ" "LA" "LB" "LC" "LI" "LK" "LR" "LS" "LT" "LU" "LV" "LY" "MA" "MC" "MD" "ME" "MF" "MG" "MK" "ML" "MM" "MN" "MO" "MQ" "MR" "MS" "MT" "MU" "MV" "MW" "MX" "MY" "MZ" "NA" "NC" "NE" "NF" "NG" "NI" "NL" "NO" "NP" "NR" "NU" "NZ" "OM" "PA" "PE" "PF" "PG" "PH" "PK" "PL" "PM" "PN" "PS" "PT" "PY" "QA" "RE" "RO" "RS" "RU" "RW" "SA" "SB" "SC" "SD" "SE" "SG" "SH" "SI" "SJ" "SK" "SL" "SM" "SN" "SO" "SR" "SS" "ST" "SV" "SX" "SY" "SZ" "TA" "TC" "TD" "TF" "TG" "TH" "TJ" "TK" "TL" "TM" "TN" "TO" "TR" "TT" "TV" "TW" "TZ" "UA" "UG" "UM" "US" "UY" "UZ" "VA" "VC" "VE" "VG" "VN" "VU" "WF" "WS" "XK" "YE" "YT" "ZA" "ZM" "ZW" Country code of the address. it's a ISO_3166-1_alpha-2 code | ||||
| addressPostalCode required | string Postal code of the address. | ||||
required | object Store identifiers | ||||
| |||||
| thirdPartyId required | string or null Deprecated External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" | ||||
| storeUrl required | string or null On-premise api url of a store | ||||
| maxPeople required | integer How many people can be at the store at the same time | ||||
| storeConfigId required | integer or null Id of store config | ||||
| externalId required | string or null External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" | ||||
| health required | string Enum: "online" "offline" "shadow" If thirdPartyId is empty, will return empty string. if not, will return 'offline' at the moment | ||||
| address required | object Deprecated Always return empty object | ||||
| id required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. | ||||
| name required | string or null A combination of retailer name, city and country mainly used in aifi internally, it's not very friendly to customer, so the field displayableName will be used as store name in SMS notification | ||||
| displayableName required | string or null Store name from customer perspective, displayableName is a value set in the DB or a default of using store.name | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "maxPeople": 0,
- "name": "string",
- "displayableName": "string",
- "thirdPartyId": "string",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string"
}Response samples
- 200
- 422
{- "aifiUniqueStoreId": "string",
- "status": "OPEN",
- "deploymentStatus": "LIVE",
- "addressLine1": "string",
- "addressCity": "string",
- "addressRegion": "string",
- "addressCountry": "AC",
- "addressPostalCode": "string",
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "thirdPartyId": "string",
- "storeUrl": "string",
- "maxPeople": 0,
- "storeConfigId": 0,
- "externalId": "string",
- "health": "online",
- "address": { },
- "id": 0,
- "name": "string",
- "displayableName": "string"
}Notifies Register frontend to start a flow, of registering new customer with specified token
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| checkInDeviceId required | integer |
Request Body schema: application/jsonrequired
| token required | string A string token to start frontend registration flow |
| tokenType required | string Default: "SESSION_ID" Enum: "SESSION_ID" "NONE" session token type |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "token": "string",
- "tokenType": "SESSION_ID"
}Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}For a given store, zone and time return a list of shoppers, who were present in the zone at that time
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| zoneId required | string |
query Parameters
| timestamp required | string Example: timestamp=1697721601000 Ether Unix timestamp in milliseconds (always UTC), example: 1697721601000. Or ISO8601 format with milliseconds (timezone can be passed according to standard), example: "2023-10-05T14:48:00.000Z"
|
Responses
Response Schema: application/json
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null External id of a store, retailers can specify their own id for the store via this field We would send this field in the payload of checkout webhook with key storeExternalId For example, we will include "storeExternalId": "store0001" in the payload of checkout webhook if retailer specifies this field with "store0001" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Store Identifiers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (ShopperInZoneCameraImageDto) List of camera images, one image for each camera. the list may be empty if no images could be found | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (ShopperInZoneDto) All shoppers that were in the zone | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "storeId": 0,
- "storeExternalId": "string",
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "cameraImages": [
- {
- "cameraId": 0,
- "frameUri": "string"
}
], - "shoppers": [
- {
- "shopper": {
- "shopperId": "string",
- "shopperFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
], - "faceCoordinates": [
- {
- "cameraId": 0,
- "location": {
- "topLeft": {
- "x": 0,
- "y": 0
}, - "bottomRight": {
- "x": 0,
- "y": 0
}
}
}
], - "interactionsCount": 0,
- "restrictedInteractionsCount": 0,
- "interestGroups": [
- {
- "id": "string",
- "name": "string",
- "interactionsCount": 0
}
]
}, - "session": {
- "sessionId": "string",
- "shoppingSessionFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
], - "interactionsCount": 0,
- "restrictedInteractionsCount": 0,
- "interestGroups": [
- {
- "id": "string",
- "name": "string",
- "interactionsCount": 0
}
]
}, - "customer": {
- "externalId": "string",
- "role": "customer",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "priority": 0,
- "id": "string"
}, - "enteredAt": "2019-08-24T14:15:22Z"
}
]
}Get heatmap during specified period
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
query Parameters
| from required | integer >= 0 Star timestamp |
| to required | integer >= 0 End timestamp |
Responses
Response Schema: application/json
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
"string"Get store status
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| status required | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers |
| employeeInside required | boolean A flag indicate whether employee is currently present in the store, we will mark all unexpected shoppers(targets that appeared and weren’t bound to a proper session) as employees when the flag employeeInside=true |
| deploymentStatus required | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "status": "OPEN",
- "employeeInside": true,
- "deploymentStatus": "LIVE"
}Set store status
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| status | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers |
| employeeInside | boolean Whether any employee is in the store |
| deploymentStatus | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing |
Responses
Response Schema: application/json
| status required | string Enum: "OPEN" "CLOSED" "CLOSED_FOR_MAINTENANCE" Status of a store, indicates whether the store is open to customers |
| employeeInside required | boolean A flag indicate whether employee is currently present in the store, we will mark all unexpected shoppers(targets that appeared and weren’t bound to a proper session) as employees when the flag employeeInside=true |
| deploymentStatus required | string Enum: "LIVE" "TESTING" "DEPLOYMENT" "DECOMMISSIONED" Deployment status of a store, indicated whether the store is live, under deployment or testing |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "status": "OPEN",
- "employeeInside": true,
- "deploymentStatus": "LIVE"
}Response samples
- 200
- 422
{- "status": "OPEN",
- "employeeInside": true,
- "deploymentStatus": "LIVE"
}Get customers count Deprecated
This endpoint has been deprecated, use api/admin/v2/stores/{storeId}/customers/count instead
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| visitorsInStoreCount required | integer How many people in the store |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "visitorsInStoreCount": 0
}Get all gondola basic information
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| id required | integer Id of a gondola | ||||
required | Array of objects (ShelfIdDto) | ||||
Array
| |||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
[- {
- "id": 2,
- "shelves": [
- {
- "id": "2-5",
- "shelfIndex": 5
}
]
}
]Get one gondola information
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| gondolaId required | integer Example: 2 Id of a gondola |
query Parameters
| includeCoordinates | boolean Default: false |
| includeGlobalCoordinates | boolean Default: false |
| includeBins | boolean Default: false |
Responses
Response Schema: application/json
object Available only if query parameter includeCoordinates=true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Available only if query parameter includeCoordinates=true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Available only if query parameter includeCoordinates=true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Available only if query parameter includeGlobalCoordinates=true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id required | integer Id of a gondola | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (GondolaShelfDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name required | string or null Name of the gondola | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| disabledAt required | string or null <date-time> When the gondola get disabled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "dimensions": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "globalCoordinates": {
- "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}, - "id": 2,
- "shelves": {
- "dimensions": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "globalCoordinates": {
- "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}, - "id": "2-5",
- "shelfIndex": 5,
- "bins": [
- {
- "dimensions": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "globalCoordinates": {
- "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}, - "id": 0,
- "index": 0
}
]
}, - "name": "string",
- "disabledAt": "2019-08-24T14:15:22Z"
}Update specified gondola
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| gondolaId required | integer Example: 2 Id of a gondola |
Request Body schema: application/jsonrequired
| name | string Name of the gondola | ||||||||||||||||||||||||||||||
| disabled | boolean Whether disable the gondola | ||||||||||||||||||||||||||||||
object Update the coordinates of specified gondola | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
| id required | integer Id of a gondola | ||||
| name required | string or null Name of the gondola | ||||
| disabledAt required | string or null <date-time> When the gondola get disabled | ||||
required | Array of objects (ShelfIdDto) | ||||
Array
| |||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "name": "string",
- "disabled": true,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "translationX": 0,
- "translationY": 0,
- "translationZ": 0
}, - "rotation": {
- "rotationX": 0,
- "rotationY": 0,
- "rotationZ": 0
}
}
}
}Response samples
- 200
- 422
{- "id": 2,
- "name": "string",
- "disabledAt": "2019-08-24T14:15:22Z",
- "shelves": [
- {
- "id": "2-5",
- "shelfIndex": 5
}
]
}Get shelves of one gondola
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| gondolaId required | integer Example: 2 Id of a gondola |
Responses
Response Schema: application/json
required | object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "shelves": {
- "property1": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": "850050071228",
- "barcodeType": "upc",
- "productId": 49427929792799,
- "name": "White Claw Black Cherry",
- "price": 1,
- "weight": 0,
- "retailerType": "shopify",
- "RIN": "string",
- "restricted": true
}
}
]
}
], - "sizeType": "plate"
}, - "property2": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": "850050071228",
- "barcodeType": "upc",
- "productId": 49427929792799,
- "name": "White Claw Black Cherry",
- "price": 1,
- "weight": 0,
- "retailerType": "shopify",
- "RIN": "string",
- "restricted": true
}
}
]
}
], - "sizeType": "plate"
}
}
}Create a shelf
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| gondolaId required | integer Id of a gondola | ||||||||||||||||||||||||||||||
| shelfIndex required | integer Index of a shelf | ||||||||||||||||||||||||||||||
object The coordinates of the shelf | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
| gondolaId required | integer Id of a gondola | ||||||||||||||||||||||||||||||
| shelfIndex required | integer Index of a shelf | ||||||||||||||||||||||||||||||
required | object Coordinates of the shelf | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "gondolaId": 2,
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "translationX": 0,
- "translationY": 0,
- "translationZ": 0
}, - "rotation": {
- "rotationX": 0,
- "rotationY": 0,
- "rotationZ": 0
}
}
}
}Response samples
- 201
- 422
{- "gondolaId": 2,
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}
}Get shelf by shelf id
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| shelfId required | string [ 3 .. 64 ] characters Example: 2-5 Combination of gondola id and shelf index |
Responses
Response Schema: application/json
| gondolaId required | integer Id of a gondola | ||||||||||||||||||||||||||||||
| shelfIndex required | integer Index of a shelf | ||||||||||||||||||||||||||||||
required | object Coordinates of the shelf | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "gondolaId": 2,
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}
}Delete shelf by shelf id
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| shelfId required | string [ 3 .. 64 ] characters Example: 2-5 Combination of gondola id and shelf index |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Update shelf coordinates by shelf id
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| shelfId required | string [ 3 .. 64 ] characters Example: 2-5 Combination of gondola id and shelf index |
Request Body schema: application/jsonrequired
required | object The coordinates of the shelf | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
| gondolaId required | integer Id of a gondola | ||||||||||||||||||||||||||||||
| shelfIndex required | integer Index of a shelf | ||||||||||||||||||||||||||||||
required | object Coordinates of the shelf | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "translationX": 0,
- "translationY": 0,
- "translationZ": 0
}, - "rotation": {
- "rotationX": 0,
- "rotationY": 0,
- "rotationZ": 0
}
}
}
}Response samples
- 200
- 422
{- "gondolaId": 2,
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}
}Get shelves inventory
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| shelfId required | string [ 3 .. 64 ] characters Example: 2-5 Combination of gondola id and shelf index |
Responses
Response Schema: application/json
| shelfIndex required | integer Index of a shelf | ||||||||||||||||||||||||||||||||||||||||||||||
required | object Coordinates of the shelf | ||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (ShelfBinDto) | ||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||
| sizeType required | string Enum: "plate" "meters" | ||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": "850050071228",
- "barcodeType": "upc",
- "productId": 49427929792799,
- "name": "White Claw Black Cherry",
- "price": 1,
- "weight": 0,
- "retailerType": "shopify",
- "RIN": "string",
- "restricted": true
}
}
]
}
], - "sizeType": "plate"
}Get gondola planogram
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| gondolaId required | integer Example: 2 Id of a gondola |
query Parameters
| tOrigin | string <date-time> Example: tOrigin=2023-07-03T10:00:00.000Z |
Responses
Response Schema: application/json
| tOrigin | string <date-time> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gondolas required | Array of integers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| currentGondola required | integer or null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object or null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "tOrigin": "2023-07-03T10:00:00.000Z",
- "gondolas": [
- 0
], - "currentGondola": 0,
- "gondolaPlanogram": {
- "shelves": {
- "property1": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": "850050071228",
- "barcodeType": "upc",
- "productId": 49427929792799,
- "name": "White Claw Black Cherry",
- "price": 1,
- "weight": 0,
- "retailerType": "shopify",
- "RIN": "string",
- "restricted": true
}
}
]
}
], - "sizeType": "plate"
}, - "property2": {
- "shelfIndex": 5,
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}, - "rotation": {
- "x": "0.8978",
- "y": "0.0254",
- "z": "2.1645"
}
}
}, - "bins": [
- {
- "binSize": 0,
- "productId": 0,
- "productName": "string",
- "productBarcode": "string",
- "thumbnail": "string",
- "restricted": true,
- "productUnits": 0,
- "unplannedProductsUnits": 0,
- "products": [
- {
- "quantity": 0,
- "product": {
- "barcode": "850050071228",
- "barcodeType": "upc",
- "productId": 49427929792799,
- "name": "White Claw Black Cherry",
- "price": 1,
- "weight": 0,
- "retailerType": "shopify",
- "RIN": "string",
- "restricted": true
}
}
]
}
], - "sizeType": "plate"
}
}
}
}Set shelf planogram
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| gondolaId required | integer Example: 2 Id of a gondola |
Request Body schema: application/jsonrequired
| shelfIndex required | integer Index of a shelf | ||||
required | Array of objects (SetPlanogramBinDto) | ||||
Array
| |||||
| sizeType | string Default: "plate" Enum: "plate" "meters" | ||||
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "shelfIndex": 5,
- "bins": [
- {
- "size": 0,
- "productId": 0
}
], - "sizeType": "plate"
}Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Update inventory
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| shelfId required | string [ 3 .. 64 ] characters Example: 2-5 Combination of gondola id and shelf index |
| binIndex required | integer >= 0 Index of target bin |
Request Body schema: application/jsonrequired
required | object (InventoryRequestProductDto) | ||||
| |||||
| quantityDifference required | integer [ -1000 .. 1000 ] Update with quantity difference | ||||
Responses
Response Schema: application/json
| gondolaId required | integer Id of a gondola | ||||||||||||||||||||||||||||||||||||||
| shelfIndex required | integer Index of a shelf | ||||||||||||||||||||||||||||||||||||||
| id required | string [ 3 .. 64 ] characters Combination of gondola id and shelf index | ||||||||||||||||||||||||||||||||||||||
required | object Coordinates of the shelf | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
required | Array of objects (UpdateInventoryBinResponseDto) | ||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "product": {
- "barcode": "850050071228",
- "barcodeType": "upc"
}, - "quantityDifference": -1000
}Response samples
- 200
- 422
{- "gondolaId": 2,
- "shelfIndex": 5,
- "id": "2-5",
- "coordinates": {
- "dimX": 0,
- "dimY": 0,
- "dimZ": 0,
- "transform": {
- "translation": {
- "translationX": 0,
- "translationY": 0,
- "translationZ": 0
}, - "rotation": {
- "rotationX": 0,
- "rotationY": 0,
- "rotationZ": 0
}
}
}, - "bins": [
- {
- "products": [
- {
- "product": {
- "barcode": "850050071228",
- "barcodeType": "upc",
- "name": "White Claw Black Cherry",
- "price": 1,
- "weight": 0,
- "retailerType": "shopify",
- "RIN": "string",
- "restricted": true
}, - "quantity": 0
}
], - "size": 0,
- "defaultProduct": {
- "barcode": "850050071228",
- "barcodeType": "upc"
}
}
]
}Check parcels
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| customerId required | integer Id of customer | ||||
required | Array of objects (ParcelProductDto) | ||||
Array
| |||||
Responses
Response Schema: application/json
| status required | string Enum: "CORRECT" "PARCEL_NOT_OWNED" |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "customerId": 0,
- "parcels": [
- {
- "barcode": "string",
- "quantity": 1
}
]
}Response samples
- 200
- 422
{- "status": "CORRECT"
}Verify entry-code by entry Deprecated
DEPRECATED - use verify QR code by device
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| entryId required | string |
Request Body schema: application/jsonrequired
| verificationCode required | string An entry code that can rendered as QR and used to enter AiFi store |
Responses
Response Schema: application/json
| status required | string Value: "OK" validation success |
| sessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
| groupSize required | integer expected number of people to enter the store |
| role required | string Enum: "customer" "employee" "tester" "untracked" "unknown" role of the customer |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "verificationCode": "string"
}Response samples
- 200
- 422
{- "status": "OK",
- "sessionId": "string",
- "groupSize": 0,
- "role": "customer"
}Verify entry code and check in by device id
Endpoint returns 200 http code also in all instances when the code was successfully
examined but rejected from one of the reasons bellow.
Http error codes are used only when there are other errors preventing the check.
When the code is validated successfully, the response includes `status:OK` and `sessionId`, `sessionId`
is _customer's shopping session id_ (also referenced as transactionId on some AIFI
diagrams).
When the code is validated failed, the response includes `status:FAILED` and `reason`.
List of possible reasons for which the code could get rejected:
message: 'Invalid verification code',
code: 1,
message: 'Verification code has expired',
code: 2,
message: 'Verification code was already used',
code: 3,
message: 'Verification code was already declined',
code: 4,
message: 'Verification code was issued for different store',
code: 5,
message: 'Customer was not found',
code: 6,
message: "Customer doesn't have associated stripe customerId",
code: 7,
message: "Customer doesn't have payment method set up",
code: 8,
message: "Customer has unsettled transactions"
code: 9,
message: "Customer's card is expired"
code: 10,
message: "The limit of people in this store was reached"
code: 11,
message: "The store is closed"
code: 12,
message: "The store is closed for maintenance"
code: 13,
message: "External verification error"
code: 14,
message: "Couldn't pre-authorize required amount on customer's card"
code: 15,
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| checkInDeviceId required | integer |
Request Body schema: application/jsonrequired
| verificationCode required | string An entry code that can rendered as QR and used to enter AiFi store |
Responses
Response Schema: application/json
| status required | string Value: "OK" validation success |
| sessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
| groupSize required | integer expected number of people to enter the store |
| role required | string Enum: "customer" "employee" "tester" "untracked" "unknown" role of the customer |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "verificationCode": "string"
}Response samples
- 200
- 422
{- "status": "OK",
- "sessionId": "string",
- "groupSize": 0,
- "role": "customer"
}Create check tasks
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| shelfId required | string [ 3 .. 64 ] characters Combination of gondola id and shelf index |
| binIndex | integer >= 0 Index of target bin |
Responses
Response Schema: application/json
| code required | number |
| msg required | string |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "shelfId": "2-5",
- "binIndex": 0
}Response samples
- 201
- 422
{- "code": 0,
- "msg": "string"
}Get list of cameras
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| id required | integer |
| cameraType required | string Enum: "unknown" "rgb" "depth" |
| k1 | string |
| k2 | string |
| p1 | string |
| p2 | string |
| fx | string |
| fy | string |
| cx | string |
| cy | string |
| rotationX | string |
| rotationY | string |
| rotationZ | string |
| translationX | string |
| translationY | string |
| translationZ | string |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
[- {
- "id": 0,
- "cameraType": "unknown",
- "k1": "0.0",
- "k2": "0.0",
- "p1": "0.0",
- "p2": "0.0",
- "fx": "0.0",
- "fy": "0.0",
- "cx": "0.0",
- "cy": "0.0",
- "rotationX": "0.0",
- "rotationY": "0.0",
- "rotationZ": "0.0",
- "translationX": "0.0",
- "translationY": "0.0",
- "translationZ": "0.0"
}
]Get a camera by id
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| cameraId required | integer >= 1 Id of the camera |
Responses
Response Schema: application/json
| id required | integer |
| cameraType required | string Enum: "unknown" "rgb" "depth" |
| k1 | string |
| k2 | string |
| p1 | string |
| p2 | string |
| fx | string |
| fy | string |
| cx | string |
| cy | string |
| rotationX | string |
| rotationY | string |
| rotationZ | string |
| translationX | string |
| translationY | string |
| translationZ | string |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "id": 0,
- "cameraType": "unknown",
- "k1": "0.0",
- "k2": "0.0",
- "p1": "0.0",
- "p2": "0.0",
- "fx": "0.0",
- "fy": "0.0",
- "cx": "0.0",
- "cy": "0.0",
- "rotationX": "0.0",
- "rotationY": "0.0",
- "rotationZ": "0.0",
- "translationX": "0.0",
- "translationY": "0.0",
- "translationZ": "0.0"
}Get on-prem services health
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| status required | string Enum: "UNKNOWN" "OK" "WARNING" "CRITICAL" Overall status | ||||
| version required | string Version of store-api | ||||
required | Array of objects (StatusMessageDto) | ||||
Array
| |||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "status": "UNKNOWN",
- "version": "string",
- "statusMessages": [
- {
- "status": "UNKNOWN",
- "message": "string"
}
]
}Get customers count
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| count required | integer |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "count": 0
}Update an event by event id
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| eventId required | string id of an event |
Request Body schema: application/jsonrequired
| shopperId required | string identifier of the shopper | ||||||||||
Array of objects (EventAnnotationProductDto) | |||||||||||
Array
| |||||||||||
Responses
Response Schema: application/json
| shopperId required | string identifier of the shopper |
| eventId required | string id of an event |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "shopperId": "string",
- "products": [
- {
- "productId": "string",
- "quantity": 0,
- "binIndex": 1,
- "shelfIndex": 1,
- "gondolaId": 1
}
]
}Response samples
- 200
- 422
{- "shopperId": "string",
- "eventId": "string"
}Update an event by event id, events annotation for backward compatibility
path Parameters
| eventId required | string id of an event |
Request Body schema: application/jsonrequired
| shopperId required | string identifier of the shopper | ||||||||||
Array of objects (EventAnnotationProductDto) | |||||||||||
Array
| |||||||||||
Responses
Response Schema: application/json
| shopperId required | string identifier of the shopper |
| eventId required | string id of an event |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "shopperId": "string",
- "products": [
- {
- "productId": "string",
- "quantity": 0,
- "binIndex": 1,
- "shelfIndex": 1,
- "gondolaId": 1
}
]
}Response samples
- 200
- 422
{- "shopperId": "string",
- "eventId": "string"
}Confirm an event by event id
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| eventId required | string id of an event |
Request Body schema: application/jsonrequired
| shopperId required | string identifier of the shopper | ||||||||||
Array of objects (EventAnnotationProductDto) | |||||||||||
Array
| |||||||||||
Responses
Response Schema: application/json
| shopperId required | string identifier of the shopper |
| eventId required | string id of an event |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "shopperId": "string",
- "products": [
- {
- "productId": "string",
- "quantity": 0,
- "binIndex": 1,
- "shelfIndex": 1,
- "gondolaId": 1
}
]
}Response samples
- 200
- 422
{- "shopperId": "string",
- "eventId": "string"
}Confirm an event by event id, events annotation for backward compatibility
path Parameters
| eventId required | string id of an event |
Request Body schema: application/jsonrequired
| shopperId required | string identifier of the shopper | ||||||||||
Array of objects (EventAnnotationProductDto) | |||||||||||
Array
| |||||||||||
Responses
Response Schema: application/json
| shopperId required | string identifier of the shopper |
| eventId required | string id of an event |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "shopperId": "string",
- "products": [
- {
- "productId": "string",
- "quantity": 0,
- "binIndex": 1,
- "shelfIndex": 1,
- "gondolaId": 1
}
]
}Response samples
- 200
- 422
{- "shopperId": "string",
- "eventId": "string"
}Create an event for a third party device
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| thirdPartyDeviceId required | string Id of the third party device |
Request Body schema: application/jsonrequired
| uuid required | string <uuid> | ||||||
| timestamp required | integer unix timestamp (in seconds) when this event occured | ||||||
required | Array of objects (EventProductDto) | ||||||
Array
| |||||||
object | |||||||
| |||||||
Responses
Response Schema: application/json
| uuid required | string <uuid> The id of the event |
| sourceId required | string The id of the third party device |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "uuid": "04178fa1-0b07-4e3f-b3ca-6c60d528cf82",
- "timestamp": 1611928852,
- "products": [
- {
- "productReference": "1234567890128",
- "quantity": 1,
- "referenceType": "barcode"
}
], - "metadata": "{\"key\": \"value\"}"
}Response samples
- 201
- 422
{- "uuid": "04178fa1-0b07-4e3f-b3ca-6c60d528cf82",
- "sourceId": "string"
}Delete a third party device event by event id
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| thirdPartyDeviceId required | string Id of the third party device |
| eventId required | string id of the event |
Responses
Response Schema: application/json
| uuid required | string <uuid> The id of the event |
| sourceId required | string The id of the third party device |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 204
- 422
{- "uuid": "04178fa1-0b07-4e3f-b3ca-6c60d528cf82",
- "sourceId": "string"
}Create an event for a shopper
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| uuid required | string <uuid> | ||||||
| timestamp required | integer unix timestamp (in seconds) when this event occured | ||||||
required | Array of objects (EventProductDto) | ||||||
Array
| |||||||
object | |||||||
| |||||||
| shopperId required | string Identifier of the Shopper | ||||||
Responses
Response Schema: application/json
| uuid required | string <uuid> The id of the event |
| sourceId required | string The id of the third party device |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "uuid": "04178fa1-0b07-4e3f-b3ca-6c60d528cf82",
- "timestamp": 1611928852,
- "products": [
- {
- "productReference": "1234567890128",
- "quantity": 1,
- "referenceType": "barcode"
}
], - "metadata": "{\"key\": \"value\"}",
- "shopperId": "string"
}Response samples
- 201
- 422
{- "uuid": "04178fa1-0b07-4e3f-b3ca-6c60d528cf82",
- "sourceId": "string"
}Create an frame annotation event for IDAP
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| idapDeviceId required | string Example: 37a426e5-f432-4f1c-9563-f6a8c795ca39 Id of the IDAP device |
Request Body schema: application/jsonrequired
| timestamp required | integer unix timestamp (in milliseconds) when this event occurred | ||||||||||||||||
| uniqueEventId required | string <= 256 characters unique id of the event | ||||||||||||||||
| sessionId | string or null <= 256 characters Default: null A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||||||||
| oldShopperId | string or null Default: null Identifier of previous shopper that did reid | ||||||||||||||||
required | object (MetadataDto) | ||||||||||||||||
| |||||||||||||||||
Responses
Response Schema: application/json
| uniqueEventId required | string <= 256 characters unique id of the event |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "timestamp": 1709171638704,
- "uniqueEventId": "bbd3fb79-f6c0-44df-bee0-0647e51b6c83",
- "sessionId": null,
- "oldShopperId": null,
- "metadata": {
- "subsystem": "FACE",
- "faceX1": 624,
- "faceY1": 694,
- "faceX2": 296,
- "faceY2": 376,
- "distanceM": 3.12,
- "externalId": "25ff492f-ed5b-4e89-a06e-adbb38c6f094",
- "detectionSequenceId": 0
}
}Response samples
- 200
- 422
{- "uniqueEventId": "bbd3fb79-f6c0-44df-bee0-0647e51b6c83"
}Session confirmation api proxy
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| sessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Responses
Response Schema: application/json
| id required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
| transactionId required | integer |
| confirmation required | string Enum: "manual" "auto" "none" |
| shoppersRole required | string Enum: "customer" "employee" "tester" "untracked" "unknown" |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "id": "string",
- "transactionId": 0,
- "confirmation": "manual",
- "shoppersRole": "customer"
}Correct reid
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| shopperId required | string identifier of the shopper |
| shopperReId required | string the correct reid of the shopper |
Responses
Response Schema: application/json
| shopperId required | string identifier of the shopper |
| shopperReId required | string the correct reid of the shopper |
| shoppingSessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "shopperId": "string",
- "shopperReId": "string"
}Response samples
- 200
- 422
{- "shopperId": "string",
- "shopperReId": "string",
- "shoppingSessionId": "string"
}Update the specific shopper
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| shopperId required | string identifier of the shopper |
Request Body schema: application/jsonrequired
| sessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "sessionId": "string"
}Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Update the specific shopper
For a given store, notify about shoppers' identities match
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Request Body schema: application/jsonrequired
| registeredShopperId required | string Identifier of the shopper belonging to registered session |
| registeredSessionId required | string SessionId for the registered shopper |
| visitorShopperId required | string Identifier of the shopper belonging to visitor session |
| visitorSessionId required | string SessionId for the visitor shopper that was matched with a registered shopper |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "registeredShopperId": "768593402456789",
- "registeredSessionId": "cdf95c70-53e6-4f41-9edd-a288d834c16f",
- "visitorShopperId": "766789212312312",
- "visitorSessionId": "fdb04f43-f274-4692-a0f5-dc6ea16ba10e"
}Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Get zones
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
query Parameters
| label | Array of strings Default: "" Items Enum: "none" "unknown" "entry" "exit" "checkout" "scanning" "employeeEntrance" "trackingBoundaries" "trackingInvalid" "trackingEntry" "trackingExit" "framesOnPull" If provided filters result list by zone labels |
Responses
Response Schema: application/json
| id required | string |
| labels required | Array of strings Items Enum: "none" "unknown" "entry" "exit" "checkout" "scanning" "employeeEntrance" "trackingBoundaries" "trackingInvalid" "trackingEntry" "trackingExit" "framesOnPull" If provided filters result list by zone labels |
| name required | string |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
[- {
- "id": "string",
- "labels": [
- "none"
], - "name": "string"
}
]List RFID tags
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
query Parameters
| offset | integer >= 0 Pagination offset |
| count | integer [ 1 .. 200 ] Default: 50 Number of results |
| epc | Array of strings Filter by epc |
Responses
Response Schema: application/json
required | object (OffsetBasedPaginationDto) | ||||||||||||||||
| |||||||||||||||||
required | Array of objects (TagResponseDto) | ||||||||||||||||
Array
| |||||||||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "pagination": {
- "previous": {
- "offset": 0,
- "count": 0
}, - "next": {
- "offset": 0,
- "count": 0
}
}, - "tags": [
- {
- "epc": {
- "id": "30340bf8dc40882d3e83b804"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Upsert tags
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
header Parameters
| x-batch-strategy required | string Enum: "all-or-nothing" "ignore-errors"
|
Request Body schema: application/jsonrequired
required | Array of objects (EpcTagDto) Multi RFID epc tags | ||||||
Array
| |||||||
Responses
Response Schema: application/json
required | Array of objects (TagResponseDto) Successfully upserted tags | ||||||||||
Array
| |||||||||||
required | object (UpsertTagErrorDto) | ||||||||||
| |||||||||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "tags": [
- {
- "epc": {
- "id": "30340bf8dc40882d3e83b804"
}
}
]
}Response samples
- 200
- 422
{- "success": [
- {
- "epc": {
- "id": "30340bf8dc40882d3e83b804"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "errors": {
- "invalidTags": [
- "string"
], - "tagsMissingProduct": [
- "string"
]
}
}Delete all RFID tags
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
Responses
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 422
{- "message": "Invalid request body",
- "type": "E_INVALID_BODY",
- "errors": [
- {
- "error": "\"email\" is required",
- "rule": "any.required",
- "field": "\"email\""
}
]
}Get RFID tag
path Parameters
| storeId required | integer Id of a physical store. The id is required when retailer want to make a call to specified store. |
| id required | string Example: 30340bf8dc40882d3e83b804 epc string |
Responses
Response Schema: application/json
required | object (EpcDto) | ||
| |||
| createdAt required | string <date-time> ISO formatted date of order creation | ||
| updatedAt required | string <date-time> ISO formatted date of last order update | ||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "epc": {
- "id": "30340bf8dc40882d3e83b804"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Get retailer config
Responses
Response Schema: application/json
| domainName required | string Domain name |
| powerbiGuid required | string or null Powerbi guid (GUID) string token |
| createdAt required | string <date-time> ISO formatted date |
| updatedAt required | string <date-time> ISO formatted date |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "domainName": "string",
- "powerbiGuid": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Update retailer config
Request Body schema: application/jsonrequired
| domainName | string Domain name |
| powerbiGuid | string or null Powerbi guid (GUID) string token, pass null to clear it |
Responses
Response Schema: application/json
| domainName required | string Domain name |
| powerbiGuid required | string or null Powerbi guid (GUID) string token |
| createdAt required | string <date-time> ISO formatted date |
| updatedAt required | string <date-time> ISO formatted date |
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Request samples
- Payload
{- "domainName": "string",
- "powerbiGuid": "string"
}Response samples
- 200
- 422
{- "domainName": "string",
- "powerbiGuid": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Get system configuration
Responses
Response Schema: application/json
| jiraHelpdeskLink required | string <uri> Link to jira help desk | ||||
required | object Currency configuration | ||||
| |||||
required | object Product configuration | ||||
| |||||
required | object Tax configuration | ||||
| |||||
required | object Product Categories API configuration | ||||
| |||||
| payments required | object Payments configuration returned by Generic Payment Bridge. For detailed structure please refer to GPB - Configuration documentation. | ||||
Response Schema: application/json
| message required | string | ||||||
| type required | string | ||||||
required | Array of objects (ErrorDetailDto) | ||||||
Array
| |||||||
Response samples
- 200
- 422
{- "currency": {
- "code": "USD",
- "symbol": "$"
}, - "product": {
- "priceIncludesTax": true
}, - "tax": {
- "provider": "AIFI"
}, - "productCategoriesApi": {
- "enabled": true
}, - "payments": { }
}customer entered a checkout zone
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.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object or object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| checkoutZoneId required | string For old integrations it will be sent as an integer, while for new ones it will be a string. Eventually all integrations will be converted to strings. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| specialAttention | boolean Deprecated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shoppingSessionFlags | Array of strings Deprecated Items Enum: "POTENTIALLY_INTERACTED_WITH_ALCOHOL" "POTENTIALLY_SUSPICIOUS_BEHAVIOUR" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Object holding information about the shopper who triggered the webhook | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (CheckoutZoneCartItemDto) Available only if the webhook is configured with option 'send_cart' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
Request samples
- Payload
{- "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
- "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",
- "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",
- "shoppingSessionFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
], - "interactionsCount": 0,
- "restrictedInteractionsCount": 0,
- "interestGroups": [
- {
- "id": "string",
- "name": "string",
- "interactionsCount": 0
}
]
}, - "checkoutZoneId": "string",
- "specialAttention": true,
- "shoppingSessionFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
], - "shopper": {
- "shopperId": "string",
- "shopperFlags": "POTENTIALLY_INTERACTED_WITH_ALCOHOL",
- "interactionsCount": 0,
- "restrictedInteractionsCount": 0,
- "reappeared": true,
- "interestGroups": [
- {
- "id": "string",
- "name": "string",
- "interactionsCount": 0
}
]
}, - "cart": [
- {
- "id": "string",
- "name": "string",
- "barcode": "string",
- "category": "string",
- "sku": "string",
- "thumbnail": "string",
- "externalId": "string",
- "price": 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"
}
}
]
}Response samples
- 200
"string"customer left a checkout zone
AiFi system shall call this webhook when a customer left 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/left" will be called in this case.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object or object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| checkoutZoneId required | string For old integrations it will be sent as an integer, while for new ones it will be a string. Eventually all integrations will be converted to strings. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| specialAttention | boolean Deprecated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shoppingSessionFlags | Array of strings Deprecated Items Enum: "POTENTIALLY_INTERACTED_WITH_ALCOHOL" "POTENTIALLY_SUSPICIOUS_BEHAVIOUR" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Object holding information about the shopper who triggered the webhook | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array of objects (CheckoutZoneCartItemDto) Available only if the webhook is configured with option 'send_cart' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
Request samples
- Payload
{- "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
- "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",
- "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",
- "shoppingSessionFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
], - "interactionsCount": 0,
- "restrictedInteractionsCount": 0,
- "interestGroups": [
- {
- "id": "string",
- "name": "string",
- "interactionsCount": 0
}
]
}, - "checkoutZoneId": "string",
- "specialAttention": true,
- "shoppingSessionFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
], - "shopper": {
- "shopperId": "string",
- "shopperFlags": "POTENTIALLY_INTERACTED_WITH_ALCOHOL",
- "interactionsCount": 0,
- "restrictedInteractionsCount": 0,
- "reappeared": true,
- "interestGroups": [
- {
- "id": "string",
- "name": "string",
- "interactionsCount": 0
}
]
}, - "cart": [
- {
- "id": "string",
- "name": "string",
- "barcode": "string",
- "category": "string",
- "sku": "string",
- "thumbnail": "string",
- "externalId": "string",
- "price": 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"
}
}
]
}Response samples
- 200
"string"customer group checked out
AiFi system shall call this webhook when a customer checked out in a store and an order is being placed in AiFi system (we use statuses "draft" and "completed" for it), or a contested order has been reviewed already (status "reviewed"). This webhook will capture the payment information from response and update order status based on that, after the checkout webhook only if the retailer is not integrated the payment providers of AiFi. If the retailer returns the multiple paymentIds, we will only store the first paymentId at the moment, and the rest will be ignored.
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.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | SessionShallowDto (object) or InvalidSessionInWebhookDto (object) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| orderId required | integer AiFi internal order id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Enum: "reviewed" "draft" "completed" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (CheckoutCartItemDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| amount required | number Deprecated A calculated total for the order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalPrice required | string <float> A calculated total for the order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalTax required | string <float> Total tax for the order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subtotalPrice required | string <float> Subtotal price(totalPrice - totalTax = subtotalPrice) for the order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (WebhookPaymentPayloadDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
| externalId | string | ||||
object Payment information captured from checkout webhook response | |||||
| |||||
Request samples
- Payload
{- "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"
}, - "predictedVariants": [
- {
- "quantity": 0,
- "variant": {
- "id": 0,
- "name": "string",
- "thumbnail": "string",
- "invalidThumbnail": true,
- "externalId": "string",
- "weight": "string",
- "barcodes": [
- {
- "isDefault": true,
- "barcode": "string"
}
], - "isDefault": true,
- "productId": 0
}
}
], - "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"
]
}
}Response samples
- 200
{- "externalId": "string",
- "payment": {
- "paymentStatus": "success",
- "paymentTransactionIds": [
- "string"
]
}
}customer entered a store
AiFi system shall call this webhook when a customer entered a store. This webhook is intended to be only informative: no response is parsed and no action is taken regardless of the response.
IMPORTANT NOTE: This event is going to be triggered for every person from the group, that entered on the account of the provided customer. As an example, for a group of 2 people that enter together on a single app, you get the exact same push notification twice, with customer field being the person that app was registered for, after each person has entered the store.
Note: as an integrator, the URL you specify for transitions webhooks will be re-used for all transitions 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.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | SessionShallowDto (object) or InvalidSessionInWebhookDto (object) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object or null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shopperId required | string Identifier of the Shopper | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (TransitionShopperDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
Request samples
- Payload
{- "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",
- "payment": {
- "paymentProvider": "NONE"
}, - "shopperId": "string",
- "shopper": {
- "shopperId": "string"
}
}Response samples
- 200
"string"customer left a store
AiFi system shall call this webhook when a customer left a store. This webhook is intended to be only informative: no response is parsed and no action is taken regardless of the response.
IMPORTANT NOTE: This event is going to be triggered for every person from the group, that entered on the account of the provided customer. As an example, for a group of 2 people that enter together on a single app, you get the exact same push notification twice, with customer field being the person that app was registered for, after each person has left the store.
Note: as an integrator, the URL you specify for transitions webhooks will be re-used for all transitions 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.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | SessionShallowDto (object) or InvalidSessionInWebhookDto (object) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object or null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shopperId required | string Identifier of the Shopper | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (TransitionShopperDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
Request samples
- Payload
{- "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",
- "payment": {
- "paymentProvider": "NONE"
}, - "shopperId": "string",
- "shopper": {
- "shopperId": "string"
}
}Response samples
- 200
"string"verify entry-code at external provider
AiFi system shall call this webhook during the entry-code validation.
In regular mode, the webhook is only called if both the entry code and the customer owning it were previously registered in AiFi system.
However, if the QR code passthrough option is turned on (consult your account manager if you need this option turned on), the webhook is called as the first step during the validation. In this case, the retailer can optionally return a customerId that will be used to match the customer entity and dynamically create the entry code. If no customerId is returned, but status is still OK, AiFi will dynamically create both the customer entity and the associated entry code.
Retailer or third party can perform their additional checks (such as: pre-authorization of funds etc) and return to AiFi whether their checks succeeded. Take note, that AiFi can deny customer the entry without calling this endpoint (for example, when the store is closed). AiFi may also deny entry after this call, if a payment provider is specified on AiFi side and the payment methods checks fail.
Endpoint returns 200 http code also in all instances when the code was successfully examined but rejected for any reason.
Http error codes are used only when there are other errors preventing the check, such as: 404, reason: 'Customer id
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.
Request Body schema: application/jsonrequired
| storeId required | integer AiFi store id | ||||||||
required | object (StoreIdsDto) | ||||||||
| |||||||||
| storeExternalId required | string or null Retailer store id | ||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||
| customerId required | integer or null Deprecated AiFi customer id | ||||||||
required | object or null Customer information | ||||||||
| |||||||||
| role required | string or null Deprecated Enum: "customer" "employee" "tester" "untracked" "unknown" | ||||||||
| checkInDeviceId required | integer or null The id of check-in device | ||||||||
| entryCode required | string Entry code to be verified | ||||||||
| expectedGroupSize required | integer or null Group size that was specified by the user in the customer app, when requesting a qr code | ||||||||
| groupSize | integer Size of a group that was present in the scanning zone during qr code scan | ||||||||
required | object (PaymentProviderInfoDto) | ||||||||
| |||||||||
Responses
Response Schema: application/json
| status required | string Enum: "OK" "FAILED" Status of the entry-code verification. 'OK' if validation passed, 'FAILED' if validation failed. |
| reason | string Reason for failure (if applicable) |
| sessionId | string (Optional) Override of the default session id to be then used in further communication. The length of sessionId must be ≤ 36 characters. JWT strings are prohibited. |
| customerId | number (Optional, QR code passthrough mode only) specify AiFi customer ID to be matched with this dynamic entry code |
Request samples
- Payload
{- "storeId": 0,
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "storeExternalId": "string",
- "timeOfOrigin": "2019-08-24T14:15:22Z",
- "timeOfIssue": "2019-08-24T14:15:22Z",
- "customerId": 0,
- "customer": {
- "externalId": "string",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "id": "string",
- "role": "customer"
}, - "role": "customer",
- "checkInDeviceId": 0,
- "entryCode": "string",
- "expectedGroupSize": 0,
- "groupSize": 0,
- "payment": {
- "paymentProvider": "NONE"
}
}Response samples
- 200
{- "status": "FAILED",
- "reason": "Payment verification failed",
- "sessionId": "cc256d83-a307-483e-b3bf-3740cb925f92",
- "customerId": 123
}notify external provider on entry-code validation failure
AiFi system shall call this webhook when entry-code validation fails due to some reason. Request is sent as a fire-and-forget, hence retailer's response will not be used at all. 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.
Request Body schema: application/jsonrequired
| storeId required | integer AiFi store id | ||||||||
required | object (StoreIdsDto) | ||||||||
| |||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||
| sessionId required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||
required | object or null Customer information | ||||||||
| |||||||||
| checkInDeviceId required | integer or null The id of check-in device | ||||||||
| entryCode required | string Entry code to be verified | ||||||||
| errorMessage required | string Message describing cause of the issue | ||||||||
| errorCode required | integer Error code describing cause of the issue | ||||||||
Responses
Response Schema: application/json
Request samples
- Payload
{- "storeId": 0,
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "timeOfOrigin": "2019-08-24T14:15:22Z",
- "timeOfIssue": "2019-08-24T14:15:22Z",
- "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
- "customer": {
- "externalId": "string",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "id": "string",
- "role": "customer"
}, - "checkInDeviceId": 0,
- "entryCode": "string",
- "errorMessage": "string",
- "errorCode": 0
}Response samples
- 200
"string"request to third party to evaluate order price
AiFi system shall call this webhook when a customer checked out, but before an order is being placed in AiFi system. The webhook expects that the third party system is going to take the list of the products specified and based on them calculate the final total price of the order, that is going to be then used to check out the customer.
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.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | SessionShallowDto (object) or InvalidSessionInWebhookDto (object) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| orderId required | integer AiFi internal order id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Value: "completed" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (PriceCalculatorCartItemDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
| totalPrice required | string <number> A decimal representation of the total price to charge the customer | ||||||
| totalTax | string <number> A decimal representation of the total tax to charge the customer | ||||||
Array of objects (ApiProductPrice) Effective prices for each order position | |||||||
Array
| |||||||
Request samples
- Payload
{- "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": "completed",
- "cart": [
- {
- "id": "string",
- "name": "string",
- "barcode": "string",
- "category": "string",
- "sku": "string",
- "thumbnail": "string",
- "externalId": "string",
- "price": 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"
}
}
]
}Response samples
- 200
{- "totalPrice": "1.35",
- "totalTax": "0.35",
- "effectivePrices": [
- {
- "id": 28612838096970,
- "effectivePrice": "1.35",
- "message": "Promo 50% off"
}
]
}request to third party with cart mutation
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.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | SessionShallowDto (object) or InvalidSessionInWebhookDto (object) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | Array of objects (CartMutatorCartItemDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (CartMutatorMetadataDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| orderId required | integer AiFi internal order id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status required | string Enum: "reviewed" "draft" "completed" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalPrice required | string <float> A calculated total for the order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalTax required | string <float> Total tax for the order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subtotalPrice required | string <float> Subtotal price(totalPrice - totalTax = subtotalPrice) for the order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (PaymentInfoDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Response Schema: application/json
| orderId required | number AiFi internal order id | ||||||||||||||||||||||||||
| totalPrice required | string <number> A calculated total for the order | ||||||||||||||||||||||||||
| subtotalPrice required | string <number> Subtotal price (totalPrice - totalTax = subtotalPrice) for the order | ||||||||||||||||||||||||||
| totalTax required | string <number> Total tax for the order | ||||||||||||||||||||||||||
required | Array of objects (CartItem) adjusted list of items in the cart of the customer | ||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||
Request samples
- Payload
{- "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",
- "cart": [
- {
- "id": "string",
- "name": "string",
- "barcode": "string",
- "category": "string",
- "sku": "string",
- "thumbnail": "string",
- "externalId": "string",
- "price": 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"
}, - "quantity": 0,
- "subtotalPrice": "1.80",
- "totalPrice": "2.15",
- "totalTax": "0.35",
- "taxLines": [
- {
- "taxId": "string",
- "title": "string",
- "rate": "string",
- "amount": "string"
}
]
}
], - "metadata": {
- "cart": {
- "priceIncludesTax": true
}
}, - "orderId": 0,
- "status": "reviewed",
- "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"
}
}
}Response samples
- 200
{- "orderId": 123,
- "totalPrice": "10.99",
- "subtotalPrice": "10.00",
- "totalTax": "0.99",
- "cart": [
- {
- "id": "28587028316208",
- "externalId": "some-external-id-208",
- "quantity": 1,
- "totalPrice": "5.40",
- "subtotalPrice": "5.38",
- "totalTax": "0.02",
- "taxLines": [
- {
- "title": "string",
- "rate": "string",
- "amount": "string",
- "taxId": "string"
}
], - "isDeposit": true
}
]
}start remote register
AiFi system shall call this webhook during in /api/admin/v2/customers/remote-register is called in AiFi system.
This webhook is to notify the Checkout-UI that it should start a flow of registering new customer, with specified sessionId.
Request Body schema: application/jsonrequired
| storeId required | integer AiFi store id | ||||||||||
required | object (StoreIdsDto) | ||||||||||
| |||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||
| token required | string A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. | ||||||||||
| tokenType | string Default: "SESSION_ID" Enum: "NONE" "STRIPE" "PAYTER" "ADYEN" "FREEDOM_PAY" "GENERIC" "SESSION_ID" Registration token type | ||||||||||
| checkInDeviceId required | integer or null This property will contain a null value if the endpoint | ||||||||||
required | object or null Customer information | ||||||||||
| |||||||||||
required | object or null | ||||||||||
| |||||||||||
Responses
Request samples
- Payload
{- "storeId": 0,
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "storeExternalId": "string",
- "timeOfOrigin": "2019-08-24T14:15:22Z",
- "timeOfIssue": "2019-08-24T14:15:22Z",
- "token": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
- "tokenType": "NONE",
- "checkInDeviceId": 0,
- "customer": {
- "externalId": "string",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "id": "string",
- "role": "customer"
}, - "customerPersonalInfo": {
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "phoneNumber": "string"
}
}customer was created or updated
AiFi system shall call this webhook when a customer is created and his personal data is fully collected. Additionally, it will be called every time when existing customer's personal data is updated. Personal data considered here is either of [firstName, lastName, email, phoneNumber]. This webhook is intended to be only informative: no response is parsed and no action is taken regardless of the response.
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.
Request Body schema: application/jsonrequired
required | object Customer information | ||||||||||
| |||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||
required | object (CustomerPersonalInfoDto) | ||||||||||
| |||||||||||
Responses
Response Schema: application/json
Request samples
- Payload
{- "customer": {
- "externalId": "string",
- "metadata": {
- "arbitraryKey": "arbitraryValue"
}, - "id": "string",
- "role": "customer"
}, - "timeOfOrigin": "2019-08-24T14:15:22Z",
- "timeOfIssue": "2019-08-24T14:15:22Z",
- "customerPersonalInfo": {
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "phoneNumber": "string"
}
}Response samples
- 200
"string"possible fraudulent shoppers/strange behaviors are identified
AiFi system shall call this webhook when a possible fraudulent shoppers/strange behaviors are identified. This webhook is intended to be only informative: no response is parsed and no action is taken regardless of the response.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | SessionShallowDto (object) or InvalidSessionInWebhookDto (object) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (PaymentInfoDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Request samples
- Payload
{- "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",
- "payment": {
- "paymentProvider": "NONE",
- "paymentInstrument": {
- "type": "card",
- "cardBin": "string",
- "cardLast4": "string",
- "cardExpMonth": 0,
- "cardExpYear": 0,
- "cardBrand": "string"
}
}
}tracking
The AiFi system will trigger this webhook when the Retailer will call us on any of the below endpoints. Its primary function is to inform an external system about the association match of an individual within the AiFi system.
- /stores/:storeId/idapDevices/:idapDeviceId/frame-annotation-event
Request Body schema: application/jsonrequired
| storeId required | integer AiFi store id | ||||
required | object (StoreIdsDto) | ||||
| |||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||
| shopperId required | string or null Identifier of the Shopper. It can be null when AiFi will not be able to match Shopper | ||||
| uniqueEventId required | string External unique event id that comes to AiFi systems from outside system | ||||
Responses
Request samples
- Payload
{- "storeId": 0,
- "store": {
- "oasisApiStoreId": 0,
- "aifiUniqueStoreId": "string"
}, - "timeOfOrigin": "2019-08-24T14:15:22Z",
- "timeOfIssue": "2019-08-24T14:15:22Z",
- "shopperId": "string",
- "uniqueEventId": "string"
}restricted products interactions
The AiFi system will trigger this webhook when shopper will interact with any of restricted products
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| eventId required | string Source event identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (RestrictedProductsInteractionShopperDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | SessionShallowWithFlagsDto (object) or InvalidSessionInWebhookDto (object) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shoppingSessionFlags required | Array of strings Deprecated Items Enum: "POTENTIALLY_INTERACTED_WITH_ALCOHOL" "POTENTIALLY_SUSPICIOUS_BEHAVIOUR" Use session.shoppingSessionFlags | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| productIds required | Array of strings List of products with interaction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gondolaIds required | Array of integers List of gondolas | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Request samples
- Payload
{- "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
- "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",
- "eventId": "string",
- "shopper": {
- "shopperId": "string",
- "shopperFlags": "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
}, - "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",
- "shoppingSessionFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
]
}, - "shoppingSessionFlags": [
- "POTENTIALLY_INTERACTED_WITH_ALCOHOL"
], - "productIds": [
- "string"
], - "gondolaIds": [
- 0
]
}identity matching
AiFi system will trigger this webhook once it detects that a visitor shopper can be matched automatically to some registered session. As an integrator, upon receiving, you should create a new session (for the same customer to whom the registered session belongs to) and assign the visitor shopper to it. The intended result is to make sure that this shopper is no longer a visitor but a registered shopper and therefore can be charged upon finishing his shopping journey.
Request Body schema: application/jsonrequired
| sessionId required | string Deprecated A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Customer information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeId required | integer AiFi store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object (StoreIdsDto) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| storeExternalId required | string or null Retailer store id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfOrigin required | string <date-time> ISO formatted creation time of the event, that caused this webhook to be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timeOfIssue required | string <date-time> ISO formatted time, in which this webhook was sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Provides details about the session for the registered shopper that was matched with the visitor shopper. During identity matching, the system attempts to associate the visitor shopper with the corresponding registered shopper. Ultimately, the goal is to link the visitor shopper to the session of the same customer for whom the registered session was originally created. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| visitorShopperId required | string Identifier of the Visitor shopper that was matched with registered shopper during identity matching | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Responses
Request samples
- Payload
{- "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",
- "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",
- "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"
}, - "visitorShopperId": "string"
}