Documentation Sweet Pricing API

GET / productgroups / :productGroupId / variants

This endpoint gets a list of pricing models for a particular in-app store. Each result details the audience share, user segments and product IDs.

URL

https://api.sweetpricing.com/v1.0/productgroups/:productGroupId/variants

Header

Field Type Description
Authorization String

Header of form api-key <API key>

Authorization: api-key <API Key>

Parameters

Field Type Description
:productGroupId Number

Product group ID

200

Field Type Description
variants Object[]
variants.id Number

ID of the variant

variants.audienceSharePercent Number

Number between 0 and 100, the fraction of user sessions that this experiment targets.

variants.variantsegments Object[]

Array for each segment that is targeted by this variant.

variants.variantsegments.id Number

ID of the variantsegment record.

variants.variantsegments.order Number

Order of precedence for segments (where lower = more precedence)

variants.variantsegments.segment Object
variants.variantsegments.segment.id Number

ID of the segment that is being used.

variants.variantsegments.segment.name String

Name of the segment being used.

variants.variantsegments.pricepoints Object[]

Array of pricepoints for individual products.

variants.variantsegments.pricepoints.productId Number

ID of the product

variants.variantsegments.pricepoints.mode Boolean

'dynamic' if using machine learning based dynamic pricing; 'static' otherwise

variants.variantsegments.pricepoints.pricepoint Object
variants.variantsegments.pricepoints.pricepoint.id Number

ID of the pricepoint.

variants.variantsegments.pricepoints.pricepoint.sku String

SKU of the pricepoint.

variants.variantsegments.pricepoints.pricepoint.multiplier Mixed

Number.

variants.variantsegments.pricepoints.dynamicDefaultPricepoint Object

Pricepoint for dynamic pricing failure or performance testing.

variants.variantsegments.pricepoints.dynamicDefaultPricepoint.id Number

ID of the pricepoint.

variants.variantsegments.pricepoints.dynamicDefaultPricepoint.sku String

SKU of the pricepoint.

variants.variantsegments.pricepoints.dynamicDefaultPricepoint.multiplier Mixed

Number.

variants.variantsegments.pricepoints.dynamicPricepoints Object[]

Array of pricepoints available for dynamic selection.

variants.variantsegments.pricepoints.dynamicPricepoints.id Number

ID of the pricepoint.

variants.variantsegments.pricepoints.dynamicPricepoints.sku String

SKU of the pricepoint.

variants.variantsegments.pricepoints.dynamicPricepoints.multiplier Mixed

Number.

{
	"variants": [{
		"id": 1,
		"audienceSharePercent": 5,
		"variantsegments": [{
			"id": 1,
			"order": 1,
			"segment": {
				"id": 1,
				"name": "All Users"
			},
			"pricepoints": [{
				"productId": 1,
				"mode": "static",
				"pricepoint": {
					"id": 1,
					"sku": "com.sweetpricing.100coins",
					"multiplier": 1
				},
				"dynamicDefaultPricepoint": {
					"id": 1,
					"sku": "com.sweetpricing.100coins",
					"multiplier": 1
				},
				"dynamicPricepoints": [{
					"id": 1,
					"sku": "com.sweetpricing.100coins",
					"multiplier": 1
				}]
			}]
		}]
	}]
}

401

Name Description
401

You are not authenticated to perform the request.

403

Name Description
403

You are not allowed to view/modify this resource.

404

Name Description
404

Resource not found.