Update a product

You need to have a valid JWT to access to this API. Please read JWT Authentication.

Request

PATCH https://api.nexway.store/products/{id}

Path parameters

Parameter name Value Description Additional
id string

product ID

Required

Query parameters

Parameter name Value Description Additional
autoDetectOverriding boolean

autoDetectOverriding

Request body

The request body takes a complete ProductUpdate resource, containing the following writable properties:

{
    "availableVariables": [
        {
            "defaultValue": "string",
            "field": "string",
            "internalDesc": "string",
            "labels": {
                "<key>": "string"
            },
            "localizedValue": {
                "<key>": {
                    "<key>": "string"
                }
            },
            "type": "string",
            "value": {}
        }
    ],
    "codeName": "string",
    "creationDate": "string",
    "defaultLocale": "string",
    "externalContext": "string",
    "fulfillmentTemplate": "string",
    "genericName": "string",
    "lifeTime": "string",
    "localizedLongDesc": {
        "<key>": "string"
    },
    "localizedShortDesc": {
        "<key>": "string"
    },
    "marketingName": {
        "<key>": "string"
    },
    "prices": {
        "defaultCurrency": "string",
        "priceByCountryByCurrency": {
            "<key>": {
                "<key>": {
                    "value": "double",
                    "vatIncluded": "boolean"
                }
            }
        }
    },
    "pricesByStores": {
        "<key>": {
            "defaultCurrency": "string",
            "priceByCountryByCurrency": {
                "<key>": {
                    "<key>": {
                        "value": "double",
                        "vatIncluded": "boolean"
                    }
                }
            }
        }
    },
    "publisherRefId": "string",
    "relatedContents": [
        "object"
    ],
    "resources": [
        {
            "url": "string"
        }
    ],
    "sellingStores": [
        "object"
    ],
    "subscriptionTemplate": "string",
    "type": "string",
    "updateDate": "date-time",
    "var": "string",
    "variantOf": "string"
}

Properties

Name Type Description Additional
availableVariables[] array

Available variables of the product

Optional
availableVariables[].defaultValue string

Name of the variable

availableVariables[].field string

Name of the variable

availableVariables[].internalDesc string

Internal description of the variable

Optional
availableVariables[].labels object Optional
availableVariables[].labels.<key> map of string Optional
availableVariables[].localizedValue object

Localized values of the variable

Optional
availableVariables[].localizedValue.<key> map of object Optional
availableVariables[].localizedValue.<key>.<key> map of string Optional
availableVariables[].type string

The type of the variable

Possible values are:

  • LIST
  • RANGE
  • BOOL
availableVariables[].value object

Possible values of the variable

Optional
codeName string

Code name of product

Optional
creationDate string Optional
defaultLocale string

Default locale of the product

externalContext string

External context

Optional
fulfillmentTemplate string

Fulfillment template name

Optional
genericName string

name of product

Optional
lifeTime string

lifeTime

localizedLongDesc object

Product long description

localizedLongDesc.<key> map of string Optional
localizedShortDesc object

Product short descriptions

localizedShortDesc.<key> map of string Optional
marketingName object

Product names

marketingName.<key> map of string Optional
prices object Prices
prices.defaultCurrency string

Default currency (ISO-4217) of the product

prices.priceByCountryByCurrency object

Detail the price of product by currency (ISO-4217) and country (ISO-3166-1 alpha-2), each currency needed a default price

prices.priceByCountryByCurrency.<key> map of object Optional
prices.priceByCountryByCurrency.<key>.<key> map of object PriceInformation Optional
prices.priceByCountryByCurrency.<key>.<key>.value double

The price of product, use -1 to specify to use the currency price for this country

prices.priceByCountryByCurrency.<key>.<key>.vatIncluded boolean

Indicated if the price include the VAT

Optional
pricesByStores object

Override the product price for a specific store

pricesByStores.<key> map of object Prices Optional
pricesByStores.<key>.defaultCurrency string

Default currency (ISO-4217) of the product

pricesByStores.<key>.priceByCountryByCurrency object

Detail the price of product by currency (ISO-4217) and country (ISO-3166-1 alpha-2), each currency needed a default price

pricesByStores.<key>.priceByCountryByCurrency.<key> map of object Optional
pricesByStores.<key>.priceByCountryByCurrency.<key>.<key> map of object PriceInformation Optional
pricesByStores.<key>.priceByCountryByCurrency.<key>.<key>.value double

The price of product, use -1 to specify to use the currency price for this country

pricesByStores.<key>.priceByCountryByCurrency.<key>.<key>.vatIncluded boolean

Indicated if the price include the VAT

Optional
publisherRefId string

Publisher reference of the product

relatedContents[] array of object

Links for download the related contents file of product

Optional
resources[] array

Resources of the product

Optional
resources[].url string

URL of the asset

sellingStores[] array of object

List of stores selling this product

subscriptionTemplate string

Subscription template name

Optional
type string

Type of product

Possible values are:

  • SOFTWARE
  • GAMES
  • CASUAL
  • SERVICE
Optional
updateDate date-time Optional
var string Optional
variantOf string Optional

Authorisation

You need to have a valid JWT to access to this API. Please read JWT Authentication.

This request requires the use of one of following authorisation methods: OAuth2.

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
200 OK

Success

Product
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Failure

Example

{
    "codeName": "CODE",
    "customerId": "a0253398-b0c5-4c2d-a15f-bd97ea4be60",
    "defaultLocale": "en-US",
    "fulfillmentTemplate": "com2us",
    "genericName": "My Product",
    "lifeTime": "2YEARS",
    "localizedLongDesc": "{\"en-GB\":\"Long description\" }",
    "localizedShortDesc": "{\"en-GB\":\"Short description\" }",
    "marketingName": "{\"en-GB\":\"Name\" }",
    "parentId": "a0253398-b0c5-4c2d-a15f-bd97ea4be60",
    "prices": {
        "defaultCurrency": "EUR",
        "priceByCountryByCurrency": "{\"USD\":{\"default\":{\"value\":1599,\"vatIncluded\":false},\"CA\":{\"value\":1999,\"vatIncluded\":true}}}"
    },
    "pricesByStores": "{\"1f2c173a-066e-4706-9209-1c46c12f2d3c\": {\"defaultCurrency\": \"BRL\",\"values\": {\"BRL\": {\"default\": {\"value\": 5000,\"vatIncluded\": false}}}}}",
    "publisherRefId": "SKU",
    "relatedContents": "[{\"file\":\"vlc.exe\",\"label\":\"Link for windows:\"},{\"file\":\"https://vlc.org/vlc/vlc-2.2.6.dmg\",\"label\":\"Link for MAC OS X:\"]",
    "sellingStores": "[\"1f2c173a-066e-4706-9209-1c46c12f2d3c\"]",
    "status": "ENABLED",
    "subscriptionTemplate": "CUSTOMER_ABO_1Y",
    "type": "SOFTWARE"
}

Explore this API

id

product ID

autoDetectOverriding

autoDetectOverriding

product

product

Request Content-Type
Response Content-Type

Choose an authorisation method:

Access Token Access token to be used for request
Try it out!