SOAP / REST API Add-On

Adds WebAPI endpoints for integrations (REST + SOAP).

Overview

Pricesystem ships with core read endpoints for calculated prices (see "Core endpoints" below).

This add-on provides CRUD endpoints per price type module:

  • Customerprice API (mageb2b/pricesystem-customerprice-api)
  • Categoryprice API (mageb2b/pricesystem-categoryprice-api)
  • Pricelist API (mageb2b/pricesystem-pricelist-api)
  • Product Customer Matrix API (mageb2b/pricesystem-productcustomermatrix-api)

Installation

Install the add-on for each module:

composer config bearer.repo.softwaresilo.io <token>
composer config repositories.softwaresilo composer https://repo.softwaresilo.io/
composer require mageb2b/pricesystem-customerprice-api:*
composer require mageb2b/pricesystem-categoryprice-api:*
composer require mageb2b/pricesystem-pricelist-api:*
composer require mageb2b/pricesystem-productcustomermatrix-api:*

php bin/magento setup:upgrade
php bin/magento cache:flush

Core API Endpoints

The core package mageb2b/pricesystem provides calculated price endpoints:

REST URL note:

  • REST routes use the base path /rest and an optional store code:
    • /rest/V1/... (default)
    • /rest/{storeCode}/V1/... (store view scope)
Method URL Notes
POST /V1/pricesystem/get-final-price Admin context (ACL: MageB2B_PricesystemCore::main)
POST /V1/pricesystem/get-multi-price Admin context (ACL: MageB2B_PricesystemCore::main)
POST /V1/pricesystem/me/get-final-price Customer token only (self)
POST /V1/pricesystem/me/get-multi-price Customer token only (self)
POST /V1/pricesystem/context/get-final-price Context-based (anonymous)
POST /V1/pricesystem/context/get-multi-price Context-based (anonymous)

Authentication / Permissions

Pricesystem uses Magento's standard WebAPI authentication and ACL. The required permission depends on the endpoint:

  • Core admin endpoints require the ACL resource MageB2B_PricesystemCore::main
  • /me/... endpoints require a customer token (self)
  • /context/... endpoints are available for anonymous (context-based)

Get An Admin Token (Example)

curl -X POST "https://your-store.com/rest/V1/integration/admin/token" \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"***"}'

Then use it:

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://your-store.com/rest/V1/pricesystem/customerprice/search"

CRUD Endpoints (Add-On)

These endpoints are added by installing the API package for the corresponding price type module.

Customerprice (mageb2b/pricesystem-customerprice-api)

Method URL
GET /V1/pricesystem/customerprice/:id
GET /V1/pricesystem/customerprice/search
POST /V1/pricesystem/customerprice
PUT /V1/pricesystem/customerprice/:id
POST /V1/pricesystem/customerprice/savebulk
DELETE /V1/pricesystem/customerprice/:id
DELETE /V1/pricesystem/customerprice/deleteByCustomerId/:customerId
POST /V1/pricesystem/customerprice/deletebulk

Categoryprice (mageb2b/pricesystem-categoryprice-api)

Method URL
GET /V1/pricesystem/categoryprice/:id
GET /V1/pricesystem/categoryprice/search
POST /V1/pricesystem/categoryprice
PUT /V1/pricesystem/categoryprice/:id
DELETE /V1/pricesystem/categoryprice/:id
GET /V1/pricesystem/categoryprice/customergroup/:id
GET /V1/pricesystem/categoryprice/customergroup/search
POST /V1/pricesystem/categoryprice/customergroup
PUT /V1/pricesystem/categoryprice/customergroup/:id
DELETE /V1/pricesystem/categoryprice/customergroup/:id

Pricelist (mageb2b/pricesystem-pricelist-api)

Method URL
GET /V1/pricesystem/pricelist/:id
GET /V1/pricesystem/pricelist/search
POST /V1/pricesystem/pricelist
PUT /V1/pricesystem/pricelist/:id
POST /V1/pricesystem/pricelistbulk
DELETE /V1/pricesystem/pricelist/:id
DELETE /V1/pricesystem/pricelist/all
GET /V1/pricesystem/pricelistproduct/:id
GET /V1/pricesystem/pricelistproduct/search
POST /V1/pricesystem/pricelistproduct
POST /V1/pricesystem/pricelistproductbulk
PUT /V1/pricesystem/pricelistproduct/:id
PUT /V1/pricesystem/pricelistproductbulk
DELETE /V1/pricesystem/pricelistproduct/:id
GET /V1/pricesystem/pricelistcustomer/:id
GET /V1/pricesystem/pricelistcustomer/search
POST /V1/pricesystem/pricelistcustomer
PUT /V1/pricesystem/pricelistcustomer/:id
DELETE /V1/pricesystem/pricelistcustomer/:id
DELETE /V1/pricesystem/pricelistcustomer/deleteByCustomerId/:customerId
GET /V1/pricesystem/pricelistgroup/:id
GET /V1/pricesystem/pricelistgroup/search
POST /V1/pricesystem/pricelistgroup
PUT /V1/pricesystem/pricelistgroup/:id
DELETE /V1/pricesystem/pricelistgroup/:id

Product Customer Matrix (mageb2b/pricesystem-productcustomermatrix-api)

Method URL
GET /V1/pricesystem/productcustomermatrix/:id
GET /V1/pricesystem/productcustomermatrix/search
POST /V1/pricesystem/productcustomermatrix
PUT /V1/pricesystem/productcustomermatrix/:id
DELETE /V1/pricesystem/productcustomermatrix/:id
GET /V1/pricesystem/productcustomermatrixattribute/:id
GET /V1/pricesystem/productcustomermatrixattribute/search
POST /V1/pricesystem/productcustomermatrixattribute
PUT /V1/pricesystem/productcustomermatrixattribute/:id
DELETE /V1/pricesystem/productcustomermatrixattribute/:id
GET /V1/pricesystem/productcustomermatrixcustomer/:id
GET /V1/pricesystem/productcustomermatrixcustomer/search
POST /V1/pricesystem/productcustomermatrixcustomer
PUT /V1/pricesystem/productcustomermatrixcustomer/:id
DELETE /V1/pricesystem/productcustomermatrixcustomer/:id

Found an issue with this documentation? Let us know