Accounts
Profile API
Method: GET
Endpoint: https://api.kwsdk.io/api/1.0/account/profile
Query params:
field
optional?
value
q
YES
The profile fields to retrieve, separated by commas. Accepted values: SUBSCRIPTIONS, CONTEXT, ALL. If not provided, ALL is assumed.
Headers:
The response is a JSON with the following fields:
field
optional?
description
operation_status
NO
The operation status code (specified below).
account_profile
YES
An Account Profile
object (specified below). Returned only if operation_status = SUCCESS.
For this API, the field authentication_integration_status can be ignored, since it contains the same information as in operation_status.
operation_status
name
description
0
SUCCESS
The account profile was fetch successfully.
1
ERROR_INVALID_TOKEN
The authentication token is either missing or invalid.
Account Profile object:
field
optional?
description
account_info
NO
An object holding information related to the account (account id, identity pool, sign up dates and last context update)
credentials_info
NO
An object with the confirmation status of the credentials associated to this account
subscriptions
YES
An array of Subscription
objects. Only returned if q
contains ALL or SUBSCRIPTION
context
YES
An object holding the account context (a simple key-value store). Only returned if q
contains ALL or CONTEXT
Subscription object:
field
description
id
The subscription id on Kiwi
subscription_platform
The monetization platform of the subscription (specified below)
subscription_type
1 = AUTO_RENEWABLE, 2 = NON_RENEWING
subscription_status
The subscription status (specified below)
cancel_reason
Optional. The code representing the reason why this subscription was cancelled
sku
The SKU of the product
currency_code
The currency used when charging the subscription
price
The number of cents representing the price (e.g. 4.99 USD -> currency_code = USD, price = 499)
external_transaction_id
The id of the subscription on the external platform
created_as_trial
Whether the subscription was originally created in trial
trial_duration_in_days
Optional. If the subscription was created with a trial period, the number of days of the trial
activated_at
The date of activation of the subscription
expires_at
The current expiration date of the subscription
last_renew_at
The date of the last renew of the subscription
extra_data
An object containing extra info from the external subscription platform (ex: phone number (carrier billing), customer id (Stripe), etc)
monetization_platform
name
1
App Store (iTunes)
2
Google Play
3
Mozca
4
SBS (carrier billing)
5
Mozca - Fortumo
6
Mozca - Boku
7
Smartcoin
8
Pagar.me
9
Stripe
10
Gift card
11
Vindi
12
Nexxera
subscription_status
name
1
ACTIVE
2
EXPIRED
3
CANCELLED
4
TRIAL
5
UNKNOWN
6
WAITING_RENEW
Last updated