Update customer shopping session
Authorization
bearerAuth In: header
Path Parameters
A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system.
Request Body
application/json
Indicate whether the shopping session is suspected fraud, only true is allowed
Represents an arbitrary object. Note that the events key is reserved by AiFi for ThirdParty and Handoff Events. The value provided in the metadata field will completely overwrite the existing object.
If your integration depends on the events key in the metadata, ensure it is preserved to avoid accidental deletion.
To add new keys to the existing metadata object:
- Retrieve the current metadata using the Get Session List endpoint.
- Merge the retrieved metadata with the new keys you wish to add.
- Submit the updated object in the
metadatafield.
Be cautious, as replacing the metadata value without preserving necessary keys may lead to unintended data loss.
Response Body
application/json
application/json
curl -X PATCH "https://oasis-api.public.sandbox.oasis.aifi.com/api/admin/v2/sessions/d3a00526-1864-4f6e-bb2d-46e3ab7fa780" \ -H "Content-Type: application/json" \ -d '{}'{
"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
}
}{
"message": "Invalid request body",
"type": "E_INVALID_BODY",
"errors": [
{
"error": "\"email\" is required",
"rule": "any.required",
"field": "\"email\""
}
]
}How is this guide?