This commit is contained in:
Viktoria Polyakova
2026-01-25 08:57:38 +00:00
commit 4fb101c5db
7657 changed files with 497012 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
### Get order statuses
GET {{url}}/api/products/order-statuses
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,92 @@
### Get entity order
GET {{url}}/api/products/orders/entity/{{entityId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Get entity order products count
GET {{url}}/api/products/orders/entity/{{entityId}}/products-count
Content-Type: application/json
Authorization: Bearer {{token}}
### Create order
POST {{url}}/api/products/orders
Content-Type: application/json
Authorization: Bearer {{token}}
{
"entityId": {{entityId}},
"currency": "USD",
"taxIncluded": true,
"statusId": {{orderStatusId}},
"warehouseId": {{warehouseId}},
"items": [
{
"productId": {{productId}},
"quantity": 5,
"unitPrice": 100,
"tax": 10,
"discount": 0,
"sortOrder": 0,
"reservations": [
{
"warehouseId": {{warehouseId}},
"quantity": 5
},
{
"warehouseId": {{secondWarehouseId}},
"quantity": 10
}
]
}
]
}
### Update order
PUT {{url}}/api/products/orders/{{orderId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"entityId": {{entityId}},
"currency": "USD",
"taxIncluded": true,
"statusId": {{orderStatusId}},
"warehouseId": {{secondWarehouseId}},
"items": [
{
"id": 14,
"productId": {{productId}},
"quantity": 10,
"unitPrice": 200,
"tax": 10,
"discount": 30,
"sortOrder": 2,
"reservations": [
{
"warehouseId": {{warehouseId}},
"quantity": 5
}
]
},
{
"id": -1,
"productId": {{productId}},
"quantity": 20,
"unitPrice": 100,
"tax": 20,
"discount": 30,
"sortOrder": 3,
"reservations": []
}
]
}
### Change order status
PUT {{url}}/api/products/orders/{{orderId}}/status/{{orderStatusId}}
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,32 @@
### Get categories
GET {{url}}/api/products/categories
Content-Type: application/json
Authorization: Bearer {{token}}
### Create category
POST {{url}}/api/products/categories
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Category 1",
"parentId": null
}
### Update category
PUT {{url}}/api/products/categories/{{productCategoryId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Category new name"
}
### Delete category
DELETE {{url}}/api/products/categories/123
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,29 @@
### Create product price
POST {{url}}/api/products/{{productId}}/prices
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": null,
"unitPrice": 100,
"currency": "EUR"
}
### Update product price
PUT {{url}}/api/products/{{productId}}/prices/{{productPriceId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Updated price",
"unitPrice": 200,
"currency": "USD"
}
### Delete product price
DELETE {{url}}/api/products/{{productId}}/prices/67
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,86 @@
### Get products
GET {{url}}/api/products?categoryId={{productCategoryId}}&search=some&offset=0&limit=10
Content-Type: application/json
Authorization: Bearer {{token}}
### Get products by ids
GET {{url}}/api/products?ids=1,2,3
Content-Type: application/json
Authorization: Bearer {{token}}
### Get product
GET {{url}}/api/products/{{productId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Create product
POST {{url}}/api/products
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Some product",
"type": "service",
"description": "Some description",
"sku": "some-product",
"unit": "some-unit",
"tax": 10,
"categoryId": {{productCategoryId}},
"prices": [
{
"name": "Price in USD",
"unitPrice": 100,
"currency": "USD"
},
{
"name": "Price in KZT",
"unitPrice": 200,
"currency": "KZT"
}
],
"photoFileIds": ["c7d48430-a2b7-4ea5-96a2-58bc40d90574"],
"stocks": [
{
"warehouseId": {{warehouseId}},
"stockQuantity": 100
}
]
}
### Update product
PUT {{url}}/api/products/{{productId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "New product name",
"description": "New description",
"sku": "new-product",
"unit": "new-unit",
"tax": 20,
"categoryId": {{productCategoryId}}
}
### Delete product
DELETE {{url}}/api/products/123
Content-Type: application/json
Authorization: Bearer {{token}}
### Upload product photos
POST {{url}}/api/products/{{productId}}/photos
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary="abcd"
--abcd
Content-Disposition: form-data; name="test"; filename="test.png"
Content-Type: image/png
< ../_resources/test.png
--abcd--

View File

@@ -0,0 +1,5 @@
### Get shipment statuses
GET {{url}}/api/products/shipment-statuses
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,17 @@
### Get shipments
GET {{url}}/api/products/shipments?offset=0&limit=10
Content-Type: application/json
Authorization: Bearer {{token}}
### Get shipment by id
GET {{url}}/api/products/shipments/{{shipmentId}}
Content-Type: application/json
Authorization: Bearer {{token}}
### Change shipment status
PUT {{url}}/api/products/shipments/{{shipmentId}}/status/{{shipmentStatusId}}
Content-Type: application/json
Authorization: Bearer {{token}}

View File

@@ -0,0 +1,18 @@
### Update product stocks
PUT {{url}}/api/products/{{productId}}/stocks
Content-Type: application/json
Authorization: Bearer {{token}}
{
"stocks": [
{
"warehouseId": {{warehouseId}},
"stockQuantity": 100
},
{
"warehouseId": {{secondWarehouseId}},
"stockQuantity": 200
}
]
}

View File

@@ -0,0 +1,31 @@
### Get warehouses
GET {{url}}/api/products/warehouses
Content-Type: application/json
Authorization: Bearer {{token}}
### Create warehouse
POST {{url}}/api/products/warehouses
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "Some warehouse"
}
### Update warehouse
PUT {{url}}/api/products/warehouses/{{warehouseId}}
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "New warehouse name"
}
### Delete warehouse
DELETE {{url}}/api/products/warehouses/123
Content-Type: application/json
Authorization: Bearer {{token}}