Skip to main content

Create Usergroup Pricing

POST 

/usergroups/:lookupKey/:lookupValue/pricing

Use this endpoint to define pricing for an existing usergroup. The usergroup can be identified by it's lookup key. It is required to provide either categories or products or both in the payload.

Use cases

A common use case for this endpoint is when you want to give discounts only for a specific usergroup and all users in that usergroup. If a user in that usergroup already has pricing defined, the price set on the parent usergroup will be ignored.

If you want for ex. to give a discount of 20% of sales price on all products in a given category you can use the SP type pricing for a category. The usergroup will have discounted prices on all products that belong in that category.

Another common use case is to set a specific price for a product only for users in a given usergroup.

Request

Path Parameters

    lookupKey stringrequired

    Lookup key. Read more about usergroup lookup keys

    lookupValue stringrequired

    The value of the key (id or sourceId)

Body

    categories

    object[]

  • Array [

  • id number

    pricing

    object

    amount number
    type string
  • ]

  • products

    object[]

  • Array [

  • id number

    pricing

    object

    amount number
    price number
    type string
  • ]

  • shopId number

Responses

Create Usergroup Pricing - 200

Response Headers

  • Alt-Svc

    string

  • Via

    string

  • alt-svc

    string

  • content-length

    string

  • date

    string

  • return-format

    string

  • server

    string

  • x-request-id

    string

Schema

    data

    object[]

  • Array [

  • action string
    error string
    key number
    lookupKey string
    success boolean
  • ]

  • messages string[]
    total number
Loading...