Pricing Engine API (0.2.1)

Download OpenAPI specification:Download

API for a pricing engine that is called by the enfore platform

pricing

Pricing engine

Get a pricing based on a pricing engine context in the given organisation (compatible to version 0.1.x)

path Parameters
org-id
required
string

ID of the organization whose data is being accessed.

Request Body schema: application/json
register_id
string <= 256 characters

The technical identifier of the device where the order is processed assigned by the enfore platform.

operator_id
string <= 256 characters

The technical identifier of the cashier who is processing the order assigned by the enfore platform.

sales_channel_id
string <= 256 characters

The technical identifier of the store where the order is processed assigned by the enfore platform.

customer_id
string <= 256 characters

The technical identifier of the customer assigned by the enfore platform.

sales_orders_id
string <= 256 characters

The ID of the order that this PricingEngineContext corresponds to.

manual_discount
object (ManualDiscount)
discounts
Array of objects (DiscountOrMarkupOrderLevel)
markups
Array of objects (DiscountOrMarkupOrderLevel)
items
required
Array of objects (PricingEngineContextLineItem)
additional_invoice_information
Array of objects (AdditionalInvoiceInformation)
last_pricing_status
object (PricingStatus)

Status flag and, when necessary, description, checksum and external_data for a calculation done by the external pricing engine.

Responses

200

Result of the external pricing engine

400

Invalid parameters were sent by the client

403

Credentials missing or not sufficient

post /org/{org-id}/pricing/
/org/{org-id}/pricing/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "register_id": "string",
  • "operator_id": "string",
  • "sales_channel_id": "string",
  • "customer_id": "string",
  • "sales_orders_id": "string",
  • "manual_discount":
    {
    },
  • "discounts":
    [
    ],
  • "markups":
    [
    ],
  • "items":
    [
    ],
  • "additional_invoice_information":
    [
    ],
  • "last_pricing_status":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "pricing_status":
    {
    },
  • "items":
    [
    ],
  • "unchanged_items":
    [
    ],
  • "additional_items":
    [
    ],
  • "manual_discount":
    {
    },
  • "discounts":
    [
    ],
  • "markups":
    [
    ],
  • "additional_invoice_information":
    [
    ]
}

Get a pricing evaluation based on a pricing evaluation context in the given organisation

path Parameters
org-id
required
string

ID of the organization whose data is being accessed.

Request Body schema: application/json
context_id
string <= 256 characters

A technical identifier that identifies the basket context in the application that requests a pricing evaluation, e.g. a sales order.

register_id
string <= 256 characters

The technical identifier of the device where the the price evaluation is triggered.

operator_id
string <= 256 characters

The technical identifier of the cashier who is operating the device at the time of evaluation.

sales_channel_id
required
string <= 256 characters

The technical identifier of the branch office where the device is located.

customer
required
object (CustomerIdentifier)

Information about the customer assigned to the basket.

items
required
Array of objects (PricingEvaluationContextLineItem)
use_net_amounts
required
boolean

If TRUE, all input amounts are net amounts and all results must be provided as net amounts Otherwise, all input amounts are gross amounts and all results must be provided as gross amounts. If some amounts required for any calculations need a conversion, the taxes provided in the items of the context can be used for that.

discount_requests
Array of objects (DiscountRequest)

Applicable discounts that have been added already from the client side. The external pricing engine must keep them and apply them in its calculations.

markup_requests
Array of objects (MarkupRequest)

Applicable non-discountable markups that have been added already from the client side. The external pricing engine must keep them and apply them in its calculations.

selected_coupons
Array of objects (ExternalCouponIdentifier)

Identifiers of coupons that have been selected for this context and must be evaluated. If the evaluation yields that the discount is applicable, a discount application is expected in the result data and the identifier of the coupon is expected to appear in its appliedCoupons. Coupons that already have been evaluated, are provided as discount request with a coupon identifier.

customer_cards
Array of objects (ExternalCustomerCard)

External customer cards presented for the basket. Usually they are input for external promotions. The enfore platform does not evaluate them, it just provides them as input for any external promotion or external pricing engine APIs.

last_pricing_status
object (PricingStatus)

Status flag and, when necessary, description, checksum and external_data for a calculation done by the external pricing engine.

Responses

200

Result of the external pricing engine

400

Invalid parameters were sent by the client

403

Credentials missing or not sufficient

404

Resource(s) not found or invalid identifier

post /org/{org-id}/pricingevaluation/
/org/{org-id}/pricingevaluation/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "context_id": "string",
  • "register_id": "string",
  • "operator_id": "string",
  • "sales_channel_id": "string",
  • "customer":
    {
    },
  • "items":
    [
    ],
  • "use_net_amounts": true,
  • "discount_requests":
    [
    ],
  • "markup_requests":
    [
    ],
  • "selected_coupons":
    [
    ],
  • "customer_cards":
    [
    ],
  • "last_pricing_status":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ],
  • "additional_extra_charges":
    [
    ],
  • "result_data":
    {
    }
}