Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: True Fit - Consumer Checkout API
description: These APIs can be used to create a custom True Fit integration.
version: '3.0'
servers:
- url: /profile/public/v3/{tla}
tags:
- name: Checkout
description: An endpoint for tracking checkout events.
paths:
/checkout:
post:
tags:
- Checkout
summary: Track a checkout event for the retailer when a user completes an order and…
parameters:
- name: X-TF-UserToken
in: header
description: The session token for the current user.
required: true
style: simple
explode: false
schema:
type: string
- name: X-TF-StoreUserId
in: header
description: The store user id for the current user.
required: false
style: simple
explode: false
schema:
type: string
- name: locale
in: query
description: 'Identifier specifying the locale to use when retrieving suggested brands or any type of sizes e.g. sizes, bra sizes, inseams or sleeve lengths. This attribute is only required when the store supports multiple locales. Use an ISO 639 language code followed by an ISO 3166 country code, e.g. en_US. '
required: false
style: form
explode: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutEvent'
responses:
'201':
description: Checkout event successfully tracked
headers:
X-TF-UserToken:
description: The updated token for the user. This updated token should be used on all following requests. This header is only present when the token has cycled.
style: simple
explode: false
schema:
type: string
X-TF-UserTokenMaxAge:
description: This will be most useful when storing the token as a cookie. The value is the suggested max age of the token (in seconds).
style: simple
explode: false
schema:
type: integer
'400':
description: If line items are defined, but the checkout type is defined and is not LineItem. Or the type is LineItem and there are no products defined.
operationId: postCheckout
x-operation-id-source: derived
components:
schemas:
IntegrationPlatform:
type: string
enum:
- web
- app
CheckoutEvent:
required:
- orderId
type: object
properties:
orderId:
type: string
example: '236272'
deviceType:
$ref: '#/components/schemas/DeviceType'
integrationPlatform:
$ref: '#/components/schemas/IntegrationPlatform'
widgetHidden:
type: boolean
example: false
storeExperimentKey:
type: string
example: TestGroupA
checkoutType:
$ref: '#/components/schemas/CheckoutType'
products:
type: array
items:
$ref: '#/components/schemas/LineItem'
DeviceType:
type: string
enum:
- desktop
- mobile
LineItem:
required:
- currency
- price
- productId
- quantity
type: object
properties:
productId:
type: string
example: shirt-123
quantity:
type: integer
example: 1
price:
type: number
example: 12.99
currency:
type: string
example: USD
colorId:
type: string
example: Blue
size:
type: string
example: large
sku:
type: string
example: 034592
salesGroup:
type: string
example: ''
CheckoutType:
type: string
enum:
- LineItem
- OrderNotify
- TrackCheckout
- TrackCheckoutApi
x-explorer-enabled: false