Merge branch 'main' of ssh://git.ma-al.com:8822/goc_daniel/b2b into orders

This commit is contained in:
Daniel Goc
2026-04-14 13:14:52 +02:00
59 changed files with 1986 additions and 864 deletions

View File

@@ -1,7 +1,7 @@
info:
name: Change Locales
type: http
seq: 3
seq: 5
http:
method: POST

View File

@@ -1,7 +1,7 @@
info:
name: Delete Index - MeiliSearch
type: http
seq: 5
seq: 7
http:
method: DELETE

View File

@@ -1,7 +1,7 @@
info:
name: Search Index Settings
type: http
seq: 4
seq: 6
http:
method: POST

View File

@@ -1,7 +1,7 @@
info:
name: Search Items
type: http
seq: 2
seq: 4
http:
method: POST

View File

@@ -1,7 +1,7 @@
info:
name: auth
type: folder
seq: 6
seq: 2
request:
auth: inherit

View File

@@ -11,7 +11,7 @@ http:
data: |-
{
"b2b_id_currency" : 1,
"conversion_rate": 4.2
"conversion_rate": 3
}
auth: inherit

View File

@@ -11,7 +11,7 @@ http:
runtime:
variables:
- name: id
value: "1"
value: "2"
settings:
encodeUrl: true

View File

@@ -1,7 +1,7 @@
info:
name: currency
type: folder
seq: 8
seq: 9
request:
auth: inherit

View File

@@ -5,10 +5,10 @@ info:
http:
method: GET
url: "{{bas_url}}/restricted/customer?id=1"
url: "{{bas_url}}/restricted/customer?id=2"
params:
- name: id
value: "1"
value: "2"
type: query
auth: inherit

View File

@@ -5,10 +5,10 @@ info:
http:
method: GET
url: "{{bas_url}}/restricted/customer/list?search="
url: "{{bas_url}}/restricted/customer/list?search=marek"
params:
- name: search
value: ""
value: marek
type: query
auth: inherit

View File

@@ -1,7 +1,7 @@
info:
name: customer
type: folder
seq: 9
seq: 10
request:
auth: inherit

View File

@@ -5,7 +5,7 @@ info:
http:
method: GET
url: "{{bas_url}}/restricted/product/200/1/5"
url: "{{bas_url}}/restricted/product/51/1/7"
auth: inherit
settings:

View File

@@ -0,0 +1,22 @@
info:
name: Product Variants List
type: http
seq: 3
http:
method: GET
url: "{{bas_url}}/restricted/product/list-variants/{{product_id}}"
body:
type: json
data: ""
runtime:
variables:
- name: product_id
value: "51"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -5,7 +5,7 @@ info:
http:
method: GET
url: "{{bas_url}}/restricted/product/list?p=1&elems=30&sort=product_id,asc&category_id_in=243&reference=~62"
url: "{{bas_url}}/restricted/product/list?p=1&elems=30&reference=~NC100"
params:
- name: p
value: "1"
@@ -16,12 +16,22 @@ http:
- name: sort
value: product_id,asc
type: query
disabled: true
- name: category_id_in
value: "243"
value: "23"
type: query
disabled: true
- name: reference
value: ~62
value: ~NC100
type: query
- name: is_new_eq
value: "0"
type: query
disabled: true
- name: is_favorite_eq
value: "false"
type: query
disabled: true
body:
type: json
data: ""

View File

@@ -1,7 +1,7 @@
info:
name: product
type: folder
seq: 7
seq: 8
request:
auth: inherit

View File

@@ -0,0 +1,20 @@
info:
name: Activate
type: http
seq: 5
http:
method: PATCH
url: "{{bas_url}}/restricted/specific-price/{{id}}/activate"
auth: inherit
runtime:
variables:
- name: id
value: "1"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,27 @@
info:
name: Create
type: http
seq: 3
http:
method: POST
url: "{{bas_url}}/restricted/specific-price"
body:
type: json
data: |-
{
"name": "Summer Sale 3",
"scope": "shop",
"reduction_type": "amount",
"price": 69,
"from_quantity": 1,
"is_active": true,
"currency_id": 2
}
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,20 @@
info:
name: Deactivate
type: http
seq: 6
http:
method: PATCH
url: "{{bas_url}}/restricted/specific-price/{{id}}/deactivate"
auth: inherit
runtime:
variables:
- name: id
value: "1"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,20 @@
info:
name: Delete
type: http
seq: 7
http:
method: DELETE
url: "{{bas_url}}/restricted/price-reductions/{{id}}"
auth: inherit
runtime:
variables:
- name: id
value: "1"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,20 @@
info:
name: Get
type: http
seq: 2
http:
method: GET
url: "{{bas_url}}/restricted/specific-price/{{id}}"
auth: inherit
runtime:
variables:
- name: id
value: "1"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,15 @@
info:
name: List
type: http
seq: 1
http:
method: GET
url: "{{bas_url}}/restricted/specific-price"
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,38 @@
info:
name: Update
type: http
seq: 4
http:
method: PUT
url: "{{bas_url}}/restricted/specific-price/{{id}}"
body:
type: json
data: |-
{
"name": "Summer Sale Updated",
"reduction_type": "amount",
"percentage_reduction": 50.0,
"price": 69,
"currency_id": 1,
"scope": "shop",
"is_active": true,
"from_quantity":1
// "product_ids": [51,53],
// "category_ids": [1],
// "product_attribute_ids": [1114],
// "country_ids": [1],
// "customer_ids": [2,1]
}
auth: inherit
runtime:
variables:
- name: id
value: "3"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,73 @@
info:
name: specific_price
type: folder
seq: 3
docs:
content: |
# Specific Price API
Endpoints for managing specific price rules (price reductions).
## Scopes
Specific prices can be **global** or **scoped**:
- **Global**: If all scope arrays (`product_ids`, `category_ids`, `product_attribute_ids`, `country_ids`, `customer_ids`) are empty, the price reduction applies to everything.
- **Scoped**: If ANY scope array has values, the price reduction applies only when ANY condition matches (UNION logic).
### Scope Fields
| Field | Type | Description |
|-------|------|-------------|
| `product_ids` | uint[] | Specific products |
| `category_ids` | uint[] | Products in categories |
| `product_attribute_ids` | uint[] | Product variants (e.g., size, color) |
| `country_ids` | uint[] | Customers in countries |
| `customer_ids` | uint[] | Specific customers |
### Examples
**Global** (applies to all products):
```json
{
"name": "Global Sale",
"reduction_type": "percentage",
"percentage_reduction": 10,
"from_quantity": 1
}
```
**Scoped to specific products**:
```json
{
"name": "Product Sale",
"reduction_type": "percentage",
"percentage_reduction": 20,
"product_ids": [1, 2, 3]
}
```
**Scoped to category + country**:
```json
{
"name": "Category Country Sale",
"reduction_type": "amount",
"price": 9.99,
"category_ids": [5],
"country_ids": [1]
}
```
## Reduction Types
- `percentage`: Requires `percentage_reduction` (e.g., 10.5 = 10.5% off)
- `amount`: Requires `price` (fixed price after reduction)
## Validation
- `reduction_type` is required and must be "percentage" or "amount"
- If `reduction_type` is "percentage", then `percentage_reduction` is required
- If `reduction_type` is "amount", then `price` is required
type: text/markdown

View File

@@ -5,10 +5,10 @@ info:
http:
method: GET
url: http://localhost:3000/api/v1/restricted/menu/get-breadcrumb?root_category_id=10&category_id=13
url: http://localhost:3000/api/v1/restricted/menu/get-breadcrumb?root_category_id=2&category_id=13
params:
- name: root_category_id
value: "10"
value: "2"
type: query
- name: category_id
value: "13"

View File

@@ -5,10 +5,10 @@ info:
http:
method: GET
url: http://localhost:3000/api/v1/restricted/menu/get-category-tree?root_category_id=10
url: http://localhost:3000/api/v1/restricted/menu/get-category-tree?root_category_id=2
params:
- name: root_category_id
value: "10"
value: "2"
type: query
auth: inherit