Create a price function

Request

POST https://api.nexway.store/products/price-functions

Request body

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

{
    "createDate": "date-time",
    "customerId": "string",
    "dbVersion": "int64",
    "expression": "string",
    "id": "string",
    "modelVersion": "string",
    "name": "string",
    "parameters": [
        {
            "defaultValue": "string",
            "field": "string",
            "internalDesc": "string",
            "labels": {
                "<key>": "string"
            },
            "max": "int32",
            "min": "int32",
            "pattern": "string",
            "type": "string"
        }
    ],
    "productFields": [
        "string"
    ],
    "updateDate": "date-time",
    "variables": [
        "string"
    ]
}

Properties

Name Type Description Additional
createDate date-time Optional
customerId string

Customer ID

Optional
dbVersion int64 Optional
expression string Optional
id string Optional
modelVersion string Optional
name string Optional
parameters[] array

Parameters of the expression

Optional
parameters[].defaultValue string

Default value of the parameter

parameters[].field string

Name of the parameter

parameters[].internalDesc string

Internal description of the parameter

Optional
parameters[].labels object Optional
parameters[].labels.<key> map of string Optional
parameters[].max int32

Max value

parameters[].min int32

Min value

parameters[].pattern string

Pattern value

parameters[].type string

The type of the parameter

Possible values are:

  • INTEGER
  • STRING
productFields[] array of string

Product fields used in the expression

Optional
updateDate date-time Optional
variables[] array of string

Variables used in the expression

Optional

Authorisation

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
201 Created

Success

Success
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Failure


Explore this API

priceFunction

priceFunction

Request Content-Type
Response Content-Type

Choose an authorisation method:

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