Push cart mutator

request to third party with cart mutation

POST
/api/push/cart-mutator

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

sessionId*stringDeprecated

A unique token to identify a shopping session. Note, sessionToken and sessionId are same concept in AIFI system. Deprecated, usesession.sessionId

session*|
customer*

Customer information

storeId*integer

AiFi store id

store*
storeExternalId*|

Retailer store id

timeOfOrigin*string

ISO formatted creation time of the event, that caused this webhook to be sent

Formatdate-time
timeOfIssue*string

ISO formatted time, in which this webhook was sent

Formatdate-time
cart*array<>
metadata*
orderId*integer

AiFi internal order id

status*string
Value in"reviewed" | "draft" | "completed"
totalPrice*string

A calculated total for the order

Formatfloat
totalTax*string

Total tax for the order

Formatfloat
subtotalPrice*string

Subtotal price(totalPrice - totalTax = subtotalPrice) for the order

Formatfloat
payment*

Response Body

application/json

curl -X POST "https://oasis-api.public.sandbox.oasis.aifi.com/api/push/cart-mutator" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",    "session": {      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "id": 0,      "customerId": 0,      "code": "c69bb289-1190-4156-b9f6-bfb7f61e85db",      "codeFirstSuccesfullyScannedAt": "2019-08-24T14:15:22Z",      "codeLastSuccesfullyScannedAt": "2019-08-24T14:15:22Z",      "customerFirstEnteredAt": "2019-08-24T14:15:22Z",      "customerLastEnteredAt": "2019-08-24T14:15:22Z",      "customerFirstExitedAt": "2019-08-24T14:15:22Z",      "customerLastExitedAt": "2019-08-24T14:15:22Z",      "customerPaymentInstrumentId": 0,      "customerSatisfaction": 95,      "customerSatisfactionSubmitted": false,      "groupSize": 0,      "visitors": 0,      "locationId": "string",      "priority": 0,      "sessionToken": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",      "sessionId": "d3a00526-1864-4f6e-bb2d-46e3ab7fa780",      "referencedSessionId": null,      "status": "active",      "storeId": 0,      "storeIdScannableAt": 0,      "suspectedFraud": false,      "metadata": {        "events": [          {            "eventId": "6bdbfb2d-65b2-491c-bc97-c0ac73338476",            "metadata": {              "key": "value"            }          }        ],        "exampleKey": "exampleValue"      },      "expiresAt": "2019-08-24T14:15:22Z"    },    "customer": {      "externalId": "string",      "metadata": {        "arbitraryKey": "arbitraryValue"      },      "id": "string",      "role": "customer"    },    "storeId": 0,    "store": {      "oasisApiStoreId": 0,      "aifiUniqueStoreId": "string"    },    "storeExternalId": "string",    "timeOfOrigin": "2019-08-24T14:15:22Z",    "timeOfIssue": "2019-08-24T14:15:22Z",    "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"      }    }  }'
{
  "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
    }
  ]
}

How is this guide?

AiFI AI Chat

Beta

Powered by AiFi

Ask docs or API questions to get grounded answers.