ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
1. GraphQL API
2
3
All GraphQL API for M2 Order Delivery Date are listed as below:
4
NoGraphURLMethodHeaderPayloadRespondError codeValidation
5
1Get store config information of the module{{base_url}}/graphqlPOSTContent-Type : application/jsonquery {
bssDeliveryDateStoreConfig(
store_view: 1
) {
active
on_which_page
as_processing_days
cut_off_time
block_out_holidays
time_slots
shipping_comment
date_day_off
date_fields
icon_calendar
process_time
is_field_required_date
is_field_required_timeslot
is_field_required_comment
}
}
{
"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 requestrequire
+ store_view
6
2Add order delivery date into cart{{base_url}}/graphqlPOSTContent-Type : application/json
Authorization: bearer token (customer)
mutation {
applyDeliveryCart (
input: {
cart_id: "IgjCLnvNHHjMTudDJUtZw6aKYi9D5RBK"
shipping_arrival_timeslot: "100"
shipping_arrival_date: "2020-07-22"
shipping_arrival_comments: "ok"
}
) {
cart {
shipping_arrival_timeslot
shipping_arrival_date
shipping_arrival_comments
}
}
}
{
"data": {
"applyDeliveryCart": {
"cart": {
"shipping_arrival_timeslot": "100",
"shipping_arrival_date": "2020-07-22",
"shipping_arrival_comments": "aaaaa"
}
}
}
}
400 bad request
401Unauthorized
require + cart_id
7
3
Get order delivery date at cart query of default
{{base_url}}/graphqlPOSTContent-Type : application/json
Authorization: bearer token (customer)
{
cart(cart_id: "IgjCLnvNHHjMTudDJUtZw6aKYi9D5RBK") {
delivery_date {
shipping_arrival_timeslot
shipping_arrival_date
shipping_arrival_comments
}
}
}
{
"data": {
"cart": {
"delivery_date": {
"shipping_arrival_timeslot": "1",
"shipping_arrival_date": "2020-07-17",
"shipping_arrival_comments": "1"
}
}
}
}
400 bad request
401Unauthorized
require + cart_id
8
4Get information in order history{{base_url}}/graphqlPOSTContent-Type : application/json
Authorization: bearer token (customer)
{
customer {
orders(filter: {number: {eq: "000000003"}}) {
total_count
items {
id
number
order_date
status
total {
order_delivery_date {
time_slot_price {
value
}
}
}
}
}
}
}
{
"data": {
"customer": {
"orders": {
"total_count": 1,
"items": [
{
"id": "Mw==",
"number": "000000003",
"order_date": "2023-02-06 07:51:07",
"status": "Pending",
"total": {
"order_delivery_date": {
"time_slot_price": {
"value": 5
}
}
}
}
]
}
}
}
}
400 bad request
401Unauthorized
9
2. Install/Uninstall/Disable (SSH, Composer)
10
Install (GraphQL only)- php bin/magento module:enable Bss_OrderDeliveryDateGraphQl
- php bin/magento setup:upgrade
- php bin/magento setup:static-content:deploy
11
Disable (GraphQL only)- php bin/magento module:disable Bss_OrderDeliveryDateGraphQl
- php bin/magento cache:flush
12
Uninstall (GraphQL only)bin/magento module:disable Bss_OrderDeliveryDateGraphQl
remove directory from app/code manually
bin/magento setup:upgrade
bin/magento cache:flush
13
3. Note
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