Init
This commit is contained in:
5
backend/artifacts/products/order-status.http
Normal file
5
backend/artifacts/products/order-status.http
Normal file
@@ -0,0 +1,5 @@
|
||||
### Get order statuses
|
||||
|
||||
GET {{url}}/api/products/order-statuses
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{token}}
|
||||
92
backend/artifacts/products/order.http
Normal file
92
backend/artifacts/products/order.http
Normal 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}}
|
||||
32
backend/artifacts/products/product-category.http
Normal file
32
backend/artifacts/products/product-category.http
Normal 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}}
|
||||
29
backend/artifacts/products/product-price.http
Normal file
29
backend/artifacts/products/product-price.http
Normal 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}}
|
||||
86
backend/artifacts/products/product.http
Normal file
86
backend/artifacts/products/product.http
Normal 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--
|
||||
5
backend/artifacts/products/shipment-status.http
Normal file
5
backend/artifacts/products/shipment-status.http
Normal file
@@ -0,0 +1,5 @@
|
||||
### Get shipment statuses
|
||||
|
||||
GET {{url}}/api/products/shipment-statuses
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{token}}
|
||||
17
backend/artifacts/products/shipment.http
Normal file
17
backend/artifacts/products/shipment.http
Normal 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}}
|
||||
18
backend/artifacts/products/stock.http
Normal file
18
backend/artifacts/products/stock.http
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
||||
31
backend/artifacts/products/warehouse.http
Normal file
31
backend/artifacts/products/warehouse.http
Normal 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}}
|
||||
Reference in New Issue
Block a user