Skip to main content

Manager Approval Rules API (0.1)

Download OpenAPI specification:Download

Represents a set of rules which triggers a mandatory approval request within the order fulfillment process, typically during checkout in NewStore Associate App. For example cash_payment_rule or discount_rule.

List approval rules

Retrieves all manager approval rules.

Authorizations:
newStoreAccessToken

Responses

Response samples

Content type
application/json
{
  • "rules": [
    ]
}

Create approval rule

Creates a rule containing the criteria that determines if an order needs approval before it can be placed by an associate via NewStore Associate App.

You can use the following criteria to set approval rules:

Criterion name Type
has_discount Boolean
discount_value Number
discount_percentage Number
discount_level order or item
payment_methods Array
is_return Boolean
is_blind_return Boolean
refund_value Number
has_tax_exemption Boolean
order_value Number

Note: NewStore Associate App allows the associate to apply discounts either on order level or on item level using the discount_level property. If no value for discount_level is specified, it is set to order by default.

You can apply a fixed discount amount to an order or item(s) using the discount_value property.

If an order or item matches or exceeds the criteria specified in the approval rules, the order will need approval on the app.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
label
required
string

A short identifier for the approval rule. Cannot contain spaces.

description
required
string

The human readable description to display the rule on frontend applications.

required
Array of objects or objects or objects or objects non-empty

The criteria that determine if an order requires manager approval.

Responses

Request samples

Content type
application/json
Example

Orders with a discount of 80% or more need approval on the app.

{
  • "label": "RestrictDiscountsAbove80Percent",
  • "description": "Discounts equal or above 80%",
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "successful": true,
  • "message": ""
}

Update approval rule

Updates the specified approval rule.

Note: Requires the /{label} to identify the rule

Authorizations:
newStoreAccessToken
path Parameters
label
required
string

The unique identifier of a manager approval rule.

Request Body schema: application/json
label
required
string

A short identifier for the approval rule. Cannot contain spaces.

description
required
string

The human readable description to display the rule on frontend applications.

required
Array of objects or objects or objects or objects non-empty

The criteria that determine if an order requires manager approval.

Responses

Request samples

Content type
application/json
{
  • "label": "RestrictDiscountsAbove80Percent",
  • "description": "Discounts equal or above 80%",
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "successful": true,
  • "message": ""
}

Delete approval rule

Deletes the specified rule.

Note: Requires the /{label} to identify the rule

Authorizations:
newStoreAccessToken
path Parameters
label
required
string

The unique identifier of a manager approval rule.

Responses

Response samples

Content type
application/json
{
  • "successful": true,
  • "message": ""
}