Skip to main content

Automatic Promotions (v1.0)

Download OpenAPI specification:Download

Use this API to manage automatic promotions in NewStore.. For a guide on how to use automatic promotions via NewStore Omnichannel Manager, see this guide.

Manage promotions

Use this resource to manage automatic promotions in NewStore, such as creating, retrieving, or updating promotions.

You can use these methods to create automatic promotions for specific products or for the whole cart, which are applied automatically during checkout in NewStore Associate App. This includes creating promotions for both, percentage or fixed amount discounts.

For more information on automatic promotions, see the process documentation or this guide.

Create promotion

Use this method to create an automatic promotion. You can create promotions for specific products or for the whole cart in the order.

You can create promotions that apply percentage discounts or fixed amount discounts on specified products or the cart. For more information, see the process documentation or this guide.

Authorizations:
newStoreAccessToken
header Parameters
x-request-id
string
Request Body schema: application/json

a new promotion

active
boolean

Indicates whether the promotion is active or not

name
required
string

The name of the promotion

description
string
localizedTimezone
boolean

Optional, this property determines local timezone validity for the promotion. If true, UTC is assumed with no timezone required in "validFrom" and "validTo". If false, timezone must be specified in those fields.

validFrom
required
string(?:^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$)|(?:...

The date the promotion becomes valid. If localizedTimezone is false, timezone can be indicated at the end of the string.

validTo
string(?:^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$)|(?:...

The date the promotion becomes invalid. If localizedTimezone is false, timezone can be indicated at the end of the string.

Array of objects
required
object
stores
Array of strings

Indicates in which stores the promotion can be used. A list of IDs states that the promotion can be used in the given stores while an empty array states that the promotion can be used in any store.

Responses

Request samples

Content type
application/json
Example
{
  • "name": "Cart level percentage promotion",
  • "description": "A promotion with type CartLevelPercentage",
  • "localizedTimezone": false,
  • "validFrom": "2022-01-01T00:00:00+01:00",
  • "validTo": "2022-04-01T00:00:00+01:00",
  • "category": {
    },
  • "currencies": [
    ]
}

Response samples

Content type
application/json
{
  • "promotion": {
    },
  • "links": {
    }
}

List promotions

Retrieves all automatic promotions created for your business via NewStore Omnichannel Manager or the create promotion method.

Authorizations:
newStoreAccessToken
query Parameters
count
required
integer

The number of promotions to get at once

page
required
integer

The page number

header Parameters
x-request-id
string

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "links": {
    },
  • "pagination": {
    }
}

Get promotion

Retrieves the specified automatic promotion by ID. To retrieve the promotion ID, use the List promotions method.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string
header Parameters
x-request-id
string

Responses

Response samples

Content type
application/json
{
  • "promotion": {
    },
  • "links": {
    }
}

Update promotion

Updates the specified promotion with new information. Use this method to switch a promotion to an active state or change the currencies that the promotion can be applied to, and so on. Given the nature of the update via the PUT method the complete object has to be passed. The only property that cannot be updated is the category.

To retrieve the promotion ID, use the List promotions method.

Authorizations:
newStoreAccessToken
path Parameters
id
required
string
header Parameters
x-request-id
string
Request Body schema: application/json

The updated promotion

tenant
string
version
required
string
active
boolean

Indicates whether the promotion is active or not

name
string

The name of the promotion

description
string
localizedTimezone
boolean

Optional, this property determines local timezone validity for the promotion. If true, UTC is assumed with no timezone required in "validFrom" and "validTo". If false, timezone must be specified in those fields.

validFrom
string(?:^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$)|(?:...

The date the promotion becomes valid. If localizedTimezone is false, timezone can be indicated at the end of the string.

validTo
string(?:^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$)|(?:...

The date the promotion becomes invalid. If localizedTimezone is false, timezone can be indicated at the end of the string.

Array of objects
object
stores
Array of strings

Indicates in which stores the promotion can be used. A list of IDs states that the promotion can be used in the given stores while an empty array states that the promotion can be used in any store.

Responses

Request samples

Content type
application/json
{
  • "id": "62839b62-80ff-4000-8000-01b47275b241",
  • "name": "My Promotion",
  • "description": "My Promotion Description",
  • "localizedTimezone": false,
  • "validFrom": "2022-01-01T00:00:00+01:00",
  • "validTo": "2022-04-01T00:00:00+01:00",
  • "category": [
    ],
  • "active": true,
  • "currencies": [
    ],
  • "stores": [ ],
  • "version": "6f419b7b-1529-4c33-a5ba-a07762850db1"
}

Response samples

Content type
application/json
{
  • "promotion": {
    },
  • "links": {
    }
}