| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | No | Des | Method | Header | Payload | Respond | Error code | Validation | Note | |||||||||||||||
2 | 1 | Get information about store config module | URL: {{base_url}}/graphql | |||||||||||||||||||||
3 | POST | Content-Type : application/json | query { bssProductLabelStoreConfig { active display_multiple_label display_only_out_of_stock_label not_display_label_on selector_product_list selector_product_page } } | { "data": { "bssProductLabelStoreConfig": { "active": "0", "display_multiple_label": "0", "display_only_out_of_stock_label": null, "not_display_label_on": null, "selector_product_list": ".product-image-container", "selector_product_page": ".fotorama__stage" } } } | 400 bad request | require + store_view | ||||||||||||||||||
4 | 2 | Create query to get information about product label according to id | URL: {{base_url}}/graphql | |||||||||||||||||||||
5 | POST | Content-Type : application/json | query { bssProductLabel( product_label_id: 10 ) { name active image image_data { left top width height widthOrigin heightOrigin angle } priority store_views customer_groups valid_start_date valid_end_date apply_outofstock_product conditions_serialized{ type attribute operator is_value_processed aggregator conditions } created_at updated_at } } | { "data": { "bssProductLabel": { "name": "out of stock", "active": 1, "image": "product_label/original_photo/1673839859.png", "image_data": { "left": 2.734375, "top": 5.76171875, "width": 26.660519348663, "height": 15.166873229462, "widthOrigin": 273, "heightOrigin": 155, "angle": 0 }, "priority": 50, "store_views": null, "customer_groups": null, "valid_start_date": null, "valid_end_date": null, "apply_outofstock_product": "1", "conditions_serialized": { "type": "Magento\\CatalogRule\\Model\\Rule\\Condition\\Combine", "attribute": null, "operator": null, "is_value_processed": null, "aggregator": "all", "conditions": "[{\"type\":\"Magento\\\\CatalogRule\\\\Model\\\\Rule\\\\Condition\\\\Product\",\"attribute\":\"category_ids\",\"operator\":\"==\",\"value\":\"4\",\"is_value_processed\":false}]" }, "created_at": "2023-01-16 03:30:59", "updated_at": "2023-01-16 03:30:59" } } } | 400 bad request | require + product_label_id | ||||||||||||||||||
6 | 3 | Add the product label active=1 information to product query (for in stock products) | URL: {{base_url}}/graphql | |||||||||||||||||||||
7 | POST | Content-Type : application/json | { products(filter: { sku: { eq: "24-MB01" } }) { items { product_label { name image image_data { left top width height widthOrigin heightOrigin angle } } } } } | { "data": { "products": { "items": [ { "product_label": [ { "name": "yolo", "image": "http://m245clone2.local/media/product_label/original_photo/1673853533.png", "image_data": { "left": 41.89453125, "top": 78.02734375, "width": 19.565280392873, "height": 16.695705935252, "widthOrigin": 200, "heightOrigin": 170, "angle": 0 } }, { "name": "out of stock", "image": "http://m245clone2.local/media/product_label/original_photo/1673839859.png", "image_data": { "left": 2.734375, "top": 5.76171875, "width": 26.660519348663, "height": 15.166873229462, "widthOrigin": 273, "heightOrigin": 155, "angle": 0 } } ] } ] } } } | ||||||||||||||||||||
8 | ||||||||||||||||||||||||
9 | ||||||||||||||||||||||||
10 | ||||||||||||||||||||||||
11 | ||||||||||||||||||||||||
12 | ||||||||||||||||||||||||
13 | ||||||||||||||||||||||||
14 | ||||||||||||||||||||||||
15 | ||||||||||||||||||||||||
16 | ||||||||||||||||||||||||
17 | ||||||||||||||||||||||||
18 | ||||||||||||||||||||||||
19 | ||||||||||||||||||||||||
20 | ||||||||||||||||||||||||
21 | ||||||||||||||||||||||||
22 | ||||||||||||||||||||||||
23 | ||||||||||||||||||||||||
24 | ||||||||||||||||||||||||
25 | ||||||||||||||||||||||||
26 | ||||||||||||||||||||||||
27 | ||||||||||||||||||||||||
28 | ||||||||||||||||||||||||
29 | ||||||||||||||||||||||||
30 | ||||||||||||||||||||||||
31 | ||||||||||||||||||||||||
32 | ||||||||||||||||||||||||
33 | ||||||||||||||||||||||||
34 | ||||||||||||||||||||||||
35 | ||||||||||||||||||||||||
36 | ||||||||||||||||||||||||
37 | ||||||||||||||||||||||||
38 | ||||||||||||||||||||||||
39 | ||||||||||||||||||||||||
40 | ||||||||||||||||||||||||
41 | ||||||||||||||||||||||||
42 | ||||||||||||||||||||||||
43 | ||||||||||||||||||||||||
44 | ||||||||||||||||||||||||
45 | ||||||||||||||||||||||||
46 | ||||||||||||||||||||||||
47 | ||||||||||||||||||||||||
48 | ||||||||||||||||||||||||
49 | ||||||||||||||||||||||||
50 | ||||||||||||||||||||||||
51 | ||||||||||||||||||||||||
52 | ||||||||||||||||||||||||
53 | ||||||||||||||||||||||||
54 | ||||||||||||||||||||||||
55 | ||||||||||||||||||||||||
56 | ||||||||||||||||||||||||
57 | ||||||||||||||||||||||||
58 | ||||||||||||||||||||||||
59 | ||||||||||||||||||||||||
60 | ||||||||||||||||||||||||
61 | ||||||||||||||||||||||||
62 | ||||||||||||||||||||||||
63 | ||||||||||||||||||||||||
64 | ||||||||||||||||||||||||
65 | ||||||||||||||||||||||||
66 | ||||||||||||||||||||||||
67 | ||||||||||||||||||||||||
68 | ||||||||||||||||||||||||
69 | ||||||||||||||||||||||||
70 | ||||||||||||||||||||||||
71 | ||||||||||||||||||||||||
72 | ||||||||||||||||||||||||
73 | ||||||||||||||||||||||||
74 | ||||||||||||||||||||||||
75 | ||||||||||||||||||||||||
76 | ||||||||||||||||||||||||
77 | ||||||||||||||||||||||||
78 | ||||||||||||||||||||||||
79 | ||||||||||||||||||||||||
80 | ||||||||||||||||||||||||
81 | ||||||||||||||||||||||||
82 | ||||||||||||||||||||||||
83 | ||||||||||||||||||||||||
84 | ||||||||||||||||||||||||
85 | ||||||||||||||||||||||||
86 | ||||||||||||||||||||||||
87 | ||||||||||||||||||||||||
88 | ||||||||||||||||||||||||
89 | ||||||||||||||||||||||||
90 | ||||||||||||||||||||||||
91 | ||||||||||||||||||||||||
92 | ||||||||||||||||||||||||
93 | ||||||||||||||||||||||||
94 | ||||||||||||||||||||||||
95 | ||||||||||||||||||||||||
96 | ||||||||||||||||||||||||
97 | ||||||||||||||||||||||||
98 | ||||||||||||||||||||||||
99 | ||||||||||||||||||||||||
100 | ||||||||||||||||||||||||