younifyd
Menu

Get Application Session

Get Application session

GET/v1/applications/{applicationId}/sessions/{sessionId}

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Application Session action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{getApplicationSession.response.data}}.

Request

Path parameters

applicationIdinteger (int64)required

The ID of the Application. It is displayed in your Talon.One deployment URL.

sessionIdinteger (int64)required

The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint.

Response

Returns 200 with an object. Read it in later steps with {{getApplicationSession.response.data.<field>}}.

idinteger (int64)

The internal ID of this entity.

createdstring (date-time)

The time this entity was created.

integrationIdstring (string)

The integration ID set by your integration layer.

storeIntegrationIdstring

The integration ID of the store. You choose this ID when you create a store.

applicationIdinteger (int64)

The ID of the Application that owns this entity.

profileIdinteger (int64)

The globally unique Talon.One ID of the customer that created this entity.

profileintegrationidstring

Integration ID of the customer for the session.

couponstring

Any coupon code entered.

referralstring

Any referral code entered.

statestring

Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions).

One ofopenclosedpartially_returnedcancelled

cartItemsarray<object>

Serialized JSON representation.

namestring

Name of item.

skustringrequired

Stock keeping unit of item.

quantityinteger (int64)required

Number of units of this item. Due to [cart item flattening](https://docs.talon.one/docs/product/rules/understanding-cart-item-flattening), if you provide a quantity greater than 1, the item will be split in as many items as the provided quantity. This will impact the number of **per-item** effects triggered from your campaigns.

returnedQuantityinteger (int64)

Number of returned items, calculated internally based on returns of this item.

remainingQuantityinteger (int64)

Remaining quantity of the item, calculated internally based on returns of this item.

pricenumber

Price of the item in the currency defined by your Application. This field is required if this item is not part of a [catalog](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). If it is part of a catalog, setting a price here overrides the price from the catalog.

categorystring

Type, group or model of the item.

productobject1 fields

The specific properties of the product this item belongs to, if available.

weightnumber

Weight of item in grams.

heightnumber

Height of item in mm.

widthnumber

Width of item in mm.

lengthnumber

Length of item in mm.

positionnumber

Position of the Cart Item in the Cart (calculated internally).

attributesobject

Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item. Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property. **Note:** Any previously defined attributes that you do not include in the array will be removed.

additionalCostsobject

Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs).

catalogItemIDinteger (int64)

The catalog item ID.

selectedPriceTypestring

The selected price type for this cart item (e.g. the price for members only).

adjustmentReferenceIdstring (uuid)

The reference ID of the selected price adjustment for this cart item. Only returned if the selected price resulted from a price adjustment.

adjustmentEffectiveFromstring (date-time)

The date and time from which the price adjustment is effective. Only returned if the selected price resulted from a price adjustment that contains this field.

adjustmentEffectiveUntilstring (date-time)

The date and time until which the price adjustment is effective. Only returned if the selected price resulted from a price adjustment that contains this field.

pricesobject

A map of keys and values representing the price types and related price adjustment details for this cart item. The keys correspond to the `priceType` names.

discountsobject

**API V1 only.** A map of labeled discount values, in the same currency as the session. If you are using the V2 endpoints, refer to the `totalDiscounts` property instead.

totalDiscountsnumber

The total sum of the discounts applied to this session. **Note:** If more than one session is returned, this value is displayed as `0`.

totalnumber

The total sum of the session before any discounts applied.

attributesobject

Arbitrary properties associated with this item.

json
{
  "id": 6,
  "created": {},
  "integrationId": "URNGV8294NV",
  "applicationId": 322,
  "coupon": "BKDB946",
  "referral": "BKDB946",
  "state": "closed",
  "cartItems": [
    {
      "remainingQuantity": 1,
      "product": {
        "name": "sample_product"
      },
      "quantity": 1,
      "returnedQuantity": 1,
      "length": 1.4658129805029452,
      "weight": 1130,
      "adjustmentReferenceId": "68851723-e6fa-488f-ace9-112581e6c19b",
      "adjustmentEffectiveFrom": {},
      "catalogItemID": 5,
      "additionalCosts": {
        "shipping": {
          "price": 9
        }
      },
      "price": 99.99,
      "selectedPriceType": "member",
      "name": "Air Glide",
      "width": 6.027456183070403,
      "attributes": {
        "image": "11.jpeg",
        "material": "leather"
      },
      "adjustmentEffectiveUntil": {},
      "position": 5.962133916683182,
      "sku": "SKU1241028",
      "category": "shoes",
      "prices": {
        "member": {
          "price": 90,
          "adjustmentReferenceId": "68851723-e6fa-488f-ace9-112581e6c19b",
          "effectiveFrom": {},
          "effectiveUntil": {}
        },
        "base": {
          "price": 100
        }
      },
      "height": 0.8008281904610115
    }
  ],
  "discounts": {},
  "totalDiscounts": 100,
  "total": 200,
  "storeIntegrationId": "STORE-001"
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.