Skip to main content

Manager approval (1.0.0)

Download OpenAPI specification:Download

Manager approval API

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.

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_method String
is_return Boolean
is_blind_return Boolean
refund_value Number
has_tax_exemption Boolean
order_value Number

Available values of the payment_method field are: cash, credit_card, manual_credit_card, gift_card, and non_integrated.

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.

Request Body schema: application/json
label
string

A unique rule name.

description
string

A shrot human readable description of the rule.

Array of objects

List of criteria.

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

path Parameters
label
required
string

The unique identifier of a manager approval rule.

Request Body schema: application/json
label
string

A unique rule name.

description
string

A shrot human readable description of the rule.

Array of objects

List of criteria.

Responses

Request samples

Content type
application/json
{
  • "summary": "Order level discount approval",
  • "description": "Orders with a discount of 80% or more need approval on the app.\n",
  • "value": {
    }
}

Response samples

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

Delete approval rule

Deletes the specified rule.

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

path Parameters
label
required
string

The unique identifier of a manager approval rule.

Responses

Response samples

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