đź“–
Sizebay
  • Initial page
  • Virtual Fitting Room
    • Introduction
    • Implementation directly on your code
    • Implementation via Tag Manager
    • Implementation (via API)
    • Implementation on Vtex IO
    • Implementation on Shopify
    • Checking the Installation
    • Custom Implantation Events
    • Configuration Profiles
    • Understanding Responsivity
  • Data Integration
    • XML Feed Product Integration
    • API Product Integration
    • Onpage Product Integration
    • Return Data Integration
    • Product Variants Integration
      • V1
    • Categories accepted by the Integration
    • Size Tailor
  • Shopping tracker
    • Introduction
    • Sizebay Tracker Script (Client Implementation)
    • Sizebay Tracker Script (Sizebay Implementation)
    • Sizebay Tracker via API (Easy Setup)
    • Sizebay Tracker - Supported Countries and Currencies
    • Platforms
      • Shopify
        • Technical Note
      • Prestashop
      • Magento
      • WooCommerce
Powered by GitBook
On this page
  • Starter Guide
  • 1. Adding products to the cart
  • Cart
  • 2. Finalizing the order
  • Ordered

Was this helpful?

  1. Shopping tracker

Sizebay Tracker via API (Easy Setup)

Starter Guide

ATTENTION: The asterisk (*) symbol, when placed next to a field or item in forms or documentation, typically denotes that the information is mandatory or required.

ATTENTION: Sending the country value is only mandatory if you want to segregate the data by country. If there is no need to segregate by country, you can proceed without providing this information.

1. Adding products to the cart

An important step in the process is when the user adds a product to the shopping cart. This a very important moment and indicates that the user has actually engaged with the product (or with the offer).

Cart

POST https://vfr-v3-production.sizebay.technology/plugin/new/cart?sid=*

Endpoint for adding the product in the cart.

Headers Parameters

Name
Type
Description

x-szb-country

string

Country running plugin (ex: BR, US, MX, DE)

x-szb-device*

string

User device

Possible values: DESKTOP, MOBILE, TABLET, APP

x-szb-tenant-id*

string

Store ID

x-szb-referer*

string

The referer must be the (domain) of the store, for example: “store.sizebay.com”, without https://.

Query Parameters

Name
Type
Description

sid

string

User identification

Request Body

Name
Type
Description

payload

object

Payload with all products added to cart

The SID must me retrieved from the cookies, identified as SIZEBAY_SESSION_ID_V4

Payload Example:

{
  "products": [
    {
      "permalink": "https://www.sizebay.com.br/product/product-example"
    }
  ],
  "tenantId": 000
}

Field

Type

Description

tenantId

string

Sizebay Store ID

products

array

Array containing the product permalink

permalink

string

Product URL

Important: The tenantId should be provided by our Support Team (support@sizebay.com)

2. Finalizing the order

The checkout page is the most important page in the process, as it represents the sale itself. It is through the sales indicators that the exchanges/returns rate of the products sold are analyzed.

ATTENTION: Sending the country value is only mandatory if you want to segregate the data by country. If there is no need to segregate by country, you can proceed without providing this information.

Ordered

POST https://vfr-v3-production.sizebay.technology/plugin/new/ordered?sid=*

Endpoint to register a new order.

Headers Parameters

Name
Type
Description

x-szb-country

string

Country running plugin (ex: BR, US, MX, DE)

x-szb-device*

string

User device

Possible values: DESKTOP, MOBILE, TABLET, APP

x-szb-tenant-id*

string

Store ID

x-szb-referer*

string

The referer must be the (domain) of the store, for example: “store.sizebay.com”, without https://.

Query Parameters

Name
Type
Description

sid

string

User identification

Request Body

Name
Type
Description

payload

object

Payload with the order information

The SID must me retrieved from the cookies, identified as SIZEBAY_SESSION_ID_V4

{
  "orderId": "000000",
  "items": [
    {
      "permalink": "https://www.sizebay.com.br/product/product-example",
      "price": 75,
      "quantity": 1,
      "size": "M",
      "feedProductId": "00000",
      "sku": "A1P"
    }
  ],
  "tenantId": 000,
  "currency": "EUR"
}

Field

Type

Description

tenantId

string

Sizebay Store ID

orderId

string

Must be filled in with the order code generated as soon as the purchase is made. It is with this information that we will be able to track this shopping experience in case of a future exchanged/returned product

items

array

Array with the various items that were sold in this purchased order. There are no product limits to be included. Each product has the attributes described below:

permalink

string

Product URL. It must be the same used in the shopping cart

price

float

The price of the product sold

quantity

int

Number of itens

size

string

Clothing size ordered

feedProductId

string

global product id (id for all variations)

sku

string

Id of product variation

currency

string

Currency applied to the ordered item

Important: The tenantId should be provided by our Support Team (support@sizebay.com)

Last updated 1 month ago

Was this helpful?

Important: For the complete list of supported countries and currencies, please head over to the session

Sizebay Tracker - Supported Countries and Currencies