Gravity Field API - V1
  1. SSAPI
Gravity Field API - V1
  • SSAPI
    • /ssapi/page
      POST
    • /ssapi/event
      POST
    • /ssapi/engagement
      POST
    • /ssapi/choose
      POST
  • Schemas
    • Schemas
      • addToCart
      • purchase
      • removeFromCart
      • syncCart
      • addToWishList
      • changeAttr
      • filterItems
      • keywordSearch
      • promocodeEntered
      • sortItems
      • newsletterSubscription
      • signUp
      • login
      • customEvent
      • user
      • session
      • context
    • Response
      • ValidationError
    • Untitled Schema
  1. SSAPI

/ssapi/event

POST
/ssapi/event
Report a predefined or custom event.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Successful store event
Body

🟢204No Content
🟠401Unauthorized
🟠422Parameter Error
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST '/ssapi/event' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user": {
        "id": "100"
    },
    "session": {
        "custom": "custom_session_100"
    },
    "context": {
        "page": {
            "type": "PRODUCT",
            "data": [
                "sku_1"
            ],
            "location": "https://test.ru/product/sku_1"
        },
        "device": {
            "userAgent": "Mozilla/5.0 ...",
            "ip": "8.8.8.8"
        }
    },
    "events": [
        {
            "name": "Purchased online",
            "properties": {
                "eventType": "purchase-v1",
                "value": 100,
                "uniqueTransactionId": "f8709115-eeaa-404d-84da-a1eeafb82e0e",
                "cart": [
                    {
                        "productId": "sku_1",
                        "quantity": 2,
                        "itemPrice": 10
                    },
                    {
                        "productId": "sku_2",
                        "quantity": 1,
                        "itemPrice": 80
                    }
                ]
            }
        }
    ]
}'
Response Response Example
200 - EventStoreUserAndAuthorizationCuid
{
    "user": {
        "slid": "65fafcdae8dc0a8e690a4102"
    },
    "session": {
        "sl": "58DA42F2-BD26-4517-A81B-4DA4369E2529"
    }
}
Modified at 2025-07-30 13:23:50
Previous
/ssapi/page
Next
/ssapi/engagement
Built with