Skip to content

Commit

Permalink
UNITY-8531 REST: extend PATCH/GET operations on Product API
Browse files Browse the repository at this point in the history
UNITY-8531 REST: extend PATCH/GET operations on Product API
  • Loading branch information
bolsu committed Aug 29, 2023
1 parent 40406f2 commit b9b74d0
Show file tree
Hide file tree
Showing 13 changed files with 165 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Dr. Boom",
"upc": null,
"ean": null,
Expand Down Expand Up @@ -354,6 +359,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
15 changes: 15 additions & 0 deletions _raml/apps/products/examples/get_product_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Dr. Boom",
"upc": null,
"ean": null,
Expand Down Expand Up @@ -250,6 +255,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down Expand Up @@ -513,6 +523,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"sfUrl": "http://pm.epages.com/epages/apidocu.sf/?ObjectPath=/Shops/apidocu/Products/Cust001",
"productNumber": "Cust001",
"isProductNumberVisible": true,
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Dr. Boom",
"upc": null,
"ean": null,
Expand Down Expand Up @@ -284,6 +289,11 @@
"sfUrl": "http://pm.epages.com/epages/apidocu.sf/?ObjectPath=/Shops/apidocu/Products/HP-003",
"productNumber": "HP-003",
"isProductNumberVisible": true,
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
60 changes: 60 additions & 0 deletions _raml/apps/products/examples/patch_product_productid_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,64 @@
"op": "replace",
"path": "/producttype",
"value": "6489A241-7B85-54B0-0B69-C0A8020205ED"
},
{
"op": "add",
"path": "/isNew",
"value": true
},
{
"op": "add",
"path": "/newnessDate",
"value": "2023-08-08T22:00:00Z"
},
{
"op": "add",
"path": "/video",
"value": { "type":"YouTube", "id":"XXXXXXXXXXX" }
},
{
"op": "add",
"path": "/isManufacturerPriceRRP",
"value": false
},
{
"op": "add",
"path": "/referencePriceInfo",
"value": {"refAmount":1, "refUnit":"piece", "refContentAmount":2}
},
{
"op": "add",
"path": "/isShippingLinkVisible",
"value": true
},
{
"op": "add",
"path": "/customisationInfo",
"value": {"isCustomizable":1, "customizableTextLength":50, "customizableHeadlineText":"headline text"}
},
{
"op": "add",
"path": "/title",
"value": "My title"
},
{
"op": "add",
"path": "/productDataSheet",
"value": {"fileName":"myfilename.jpg", "url":"https://www.example.com/file.jpg"}
},
{
"op": "add",
"path": "/shippingMethodsRestrictedTo",
"value": ["64BDD860-786B-D5AB-F659-AC1200030B22"]
},
{
"op": "add",
"path": "/isVATInfoVisible",
"value": true
},
{
"op": "add",
"path": "/productCode",
"value": "examplecode"
}]
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
15 changes: 15 additions & 0 deletions _raml/apps/products/examples/post_product_find_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
"sfUrl": "http://pm.epages.com/epages/apidocu.sf/?ObjectPath=/Shops/apidocu/Products/Cust001",
"productNumber": "Cust001",
"isProductNumberVisible": true,
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Dr. Boom",
"upc": null,
"ean": null,
Expand Down Expand Up @@ -238,6 +243,11 @@
"sfUrl": "http://pm.epages.com/epages/apidocu.sf/?ObjectPath=/Shops/apidocu/Products/HP-003",
"productNumber": "HP-003",
"isProductNumberVisible": true,
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down Expand Up @@ -437,6 +447,11 @@
"sfUrl": "http://pm.epages.com/epages/apidocu.sf/?ObjectPath=/Shops/apidocu/Products/HS-001",
"productNumber": "HS-001",
"isProductNumberVisible": true,
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
5 changes: 5 additions & 0 deletions _raml/apps/products/examples/post_product_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Awesome Products Company",
"upc": null,
"ean": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
"sfUrl": "http://pm.epages.com/epages/apidocu.sf/?ObjectPath=/Shops/apidocu/Products/Cust001",
"productNumber": "Cust001",
"isProductNumberVisible": true,
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Dr. Boom",
"upc": null,
"ean": null,
Expand Down Expand Up @@ -284,6 +289,11 @@
"sfUrl": "http://pm.epages.com/epages/apidocu.sf/?ObjectPath=/Shops/apidocu/Products/HP-003",
"productNumber": "HP-003",
"isProductNumberVisible": true,
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Bass by Dr.Boom",
"upc": null,
"ean": null,
Expand Down
10 changes: 10 additions & 0 deletions _raml/apps/products/products.raml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ post:
- /productImage⁴<br>
- /stocklevel²³<br>
- /visible¹<br><br>
- /isNew<br>
- /newnessDate<br>
- /video<br>
- /isManufacturerPriceRRP<br>
- /referencePriceInfo<br>
- /isShippingLinkVisible<br>
- /customisationInfo<br>
- /title<br>
- /productDataSheet<br>
- /productCode<br>

**¹** supports *add* only<br>
**²** value will not be replaced, but changed, i.e. if the stocklevel is 3 and you add 1, you will get 4; if you add -5, you will get -2.<br>
Expand Down
5 changes: 5 additions & 0 deletions _raml/apps/search/examples/post_search_products_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
"isCustomizable": true,
"customizableTextLength": 50,
"customizableHeadlineText": "Customize your product",
"newnessDate": "2023-08-08T00:00:00Z",
"refAmount": 1,
"refUnit": "piece",
"refContentAmount": 2,
"productCode": null,
"manufacturer": "Dr. Boom",
"upc": null,
"ean": null,
Expand Down
10 changes: 10 additions & 0 deletions apps/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,11 @@ This object is used for the attributes of basePrice, depositPrice, ecoParticipat
| isCustomizable | boolean | Indicates if the product is customizable in the storefront. |
| customizableTextLength | number | The maximum length of the custom text the customer can enter for a product in the storefront. |
| customizableHeadlineText | string | The headline for the customization text field in the storefront. |
| newnessDate | string | The date when the 'New' marker is set to expire. Expressed according to ISO 8601. |
| refAmount | string | The product reference amount with respect to the product price (e.g. every 1 'piece' costs 10,00 €) |
| refUnit | string | The product reference unit. Can be *byte*, *kilobyte*, *megabyte*, *gigabyte*, *terrabyte*, *gram*, *kilogram*, *milligram*, *ounce*, *pound*, *tone*, *litre*, *cubicfoot*, *cubicinch*, *cubicmetre*, *cubicyard*, *fluidounce*, *gallon*, *millilitre*, *quart*, *metre*, *centimetre*, *foot*, *inch*, *kilometre*, *millimetre*, *yard*, *piece*, *bottle*, *box*, *can*, *capsule*, *carton*, *glass*, *kit*, *pack*, *packet*, *pair*, *roll*, *set*, *sheet*, *ticket*, *unit*, *second*, *day*, *hour*, *minute*, *month*, *night*, *week*, *year*, *squaremetre*, *squarecentimetre*, *squarefoot*, *squareinch*, *squaremillimetre*, *squareyard* |
| refContentAmount | string | The number of reference units that is packaged within the product itself (e.g. the product contains 2 'piece(s)') |
| productCode | string | The product code (e.g. EAN, UPC, ASIN und ISBN) |

## product (create request)

Expand Down Expand Up @@ -751,6 +756,11 @@ This object is used for the attributes of basePrice, depositPrice, ecoParticipat
| isCustomizable | boolean | Indicates if the product is customizable in the storefront. |
| customizableTextLength | number | The maximum length of the custom text the customer can enter for a product in the storefront. |
| customizableHeadlineText | string | The headline for the customization text field in the storefront. |
| newnessDate | string | The date when the 'New' marker is set to expire. Expressed according to ISO 8601. |
| refAmount | string | The product reference amount with respect to the product price (e.g. every 1 'piece' costs 10,00 €) |
| refUnit | string | The product reference unit. Can be *byte*, *kilobyte*, *megabyte*, *gigabyte*, *terrabyte*, *gram*, *kilogram*, *milligram*, *ounce*, *pound*, *tone*, *litre*, *cubicfoot*, *cubicinch*, *cubicmetre*, *cubicyard*, *fluidounce*, *gallon*, *millilitre*, *quart*, *metre*, *centimetre*, *foot*, *inch*, *kilometre*, *millimetre*, *yard*, *piece*, *bottle*, *box*, *can*, *capsule*, *carton*, *glass*, *kit*, *pack*, *packet*, *pair*, *roll*, *set*, *sheet*, *ticket*, *unit*, *second*, *day*, *hour*, *minute*, *month*, *night*, *week*, *year*, *squaremetre*, *squarecentimetre*, *squarefoot*, *squareinch*, *squaremillimetre*, *squareyard* |
| refContentAmount | string | The number of reference units that is packaged within the product itself (e.g. the product contains 2 'piece(s)') |
| productCode | string | The product code (e.g. EAN, UPC, ASIN und ISBN) |
| query | string | The search query. |
| fallbackQuery | string | The fallback used if the original query did not produce any results. |
| facets | array of [facet](page:apps-data-types#facet) | The refined search filter options. |
Expand Down

0 comments on commit b9b74d0

Please sign in to comment.