201 lines
11 KiB
Plaintext
201 lines
11 KiB
Plaintext
0: Nearle Mobile API û Full GraphQL Documentation
|
|
1: GetCustomerLocations
|
|
2: REST Params:
|
|
3: {"customerid": 6060}
|
|
4: GraphQL Query:
|
|
5: query GetCustomerLocations($customerid: bigint!) {
|
|
6: customer_locations(where: { customerid: { _eq: $customerid } }) {
|
|
7: locationid
|
|
8: latitude
|
|
9: longitude
|
|
10: address
|
|
11: }
|
|
12: }
|
|
13: GraphQL Variables:
|
|
14: {"customerid": 6060}
|
|
15: GetCustomerOrdersV3
|
|
16: REST Params:
|
|
17: {"customerid":6060,"tenantid":1087,"moduleid":2,"fromdate":"2026-01-01T00:00:00","todate":"2026-12-31T23:59:59","orderstatus":"delivered","keyword":"%pizza%","limit":10,"offset":0}
|
|
18: GraphQL Query:
|
|
19: query GetCustomerOrders($customerid: bigint!, $tenantid: bigint!, $moduleid: bigint!, $fromdate: timestamptz!, $todate: timestamptz!, $orderstatus: String!, $keyword: String, $limit: Int!, $offset: Int!) {
|
|
20: orders(
|
|
21: where: {
|
|
22: customerid: { _eq: $customerid }
|
|
23: tenantid: { _eq: $tenantid }
|
|
24: moduleid: { _eq: $moduleid }
|
|
25: orderstatus: { _eq: $orderstatus }
|
|
26: orderdate: { _gte: $fromdate, _lte: $todate }
|
|
27: _or: [{ orderid: { _ilike: $keyword } }]
|
|
28: }
|
|
29: limit: $limit
|
|
30: offset: $offset
|
|
31: ) {
|
|
32: orderid
|
|
33: orderstatus
|
|
34: orderamount
|
|
35: }
|
|
36: }
|
|
37: GraphQL Variables:
|
|
38: {"customerid":6060,"tenantid":1087,"moduleid":2,"fromdate":"2026-01-01T00:00:00","todate":"2026-12-31T23:59:59","orderstatus":"delivered","keyword":"%pizza%","limit":10,"offset":0}
|
|
39: GetCustomer
|
|
40: REST Params:
|
|
41: {"customerid":6060}
|
|
42: GraphQL Query:
|
|
43: query GetCustomer($customerid: bigint!) {
|
|
44: customers(where: { customerid: { _eq: $customerid } }) {
|
|
45: customerid
|
|
46: name
|
|
47: contactno
|
|
48: }
|
|
49: }
|
|
50: GraphQL Variables:
|
|
51: {"customerid":6060}
|
|
52: GetCustomerRequests
|
|
53: REST Params:
|
|
54: {"customerid":6060,"limit":10,"offset":0}
|
|
55: GraphQL Query:
|
|
56: query GetCustomerRequests($customerid: bigint!, $limit: Int!, $offset: Int!) {
|
|
57: customer_requests(where: { customerid: { _eq: $customerid } }, limit: $limit, offset: $offset) {
|
|
58: requestid
|
|
59: status
|
|
60: }
|
|
61: }
|
|
62: GraphQL Variables:
|
|
63: {"customerid":6060,"limit":10,"offset":0}
|
|
64: GetProductSubcategories
|
|
65: REST Params:
|
|
66: {"categoryid":1001}
|
|
67: GraphQL Query:
|
|
68: query GetProductSubcategories($categoryid: bigint!) {
|
|
69: app_subcategory(where: { categoryid: { _eq: $categoryid } }) {
|
|
70: subcategoryid
|
|
71: subcategoryname
|
|
72: }
|
|
73: }
|
|
74: GraphQL Variables:
|
|
75: {"categoryid":1001}
|
|
76: GetAppCategories
|
|
77: REST Params:
|
|
78: {}
|
|
79: GraphQL Query:
|
|
80: query GetAppCategories {
|
|
81: app_category {
|
|
82: categoryid
|
|
83: categoryname
|
|
84: }
|
|
85: }
|
|
86: GraphQL Variables:
|
|
87: {}
|
|
88: GetProductVariants
|
|
89: REST Params:
|
|
90: {"tenantid":1087,"subcategoryid":14}
|
|
91: GraphQL Query:
|
|
92: query GetProductVariants($tenantid: bigint!, $subcategoryid: bigint!) {
|
|
93: product_variants(where: { tenantid: { _eq: $tenantid }, subcategoryid: { _eq: $subcategoryid } }) {
|
|
94: variantid
|
|
95: productname
|
|
96: price
|
|
97: }
|
|
98: }
|
|
99: GraphQL Variables:
|
|
100: {"tenantid":1087,"subcategoryid":14}
|
|
101: GetTenantPromotions
|
|
102: REST Params:
|
|
103: {"tenantid":1087,"locationid":1}
|
|
104: GraphQL Query:
|
|
105: query GetTenantPromotions($tenantid: bigint!, $locationid: bigint!) {
|
|
106: promotions(where: { tenantid: { _eq: $tenantid }, locationid: { _eq: $locationid } }) {
|
|
107: promotionid
|
|
108: title
|
|
109: }
|
|
110: }
|
|
111: GraphQL Variables:
|
|
112: {"tenantid":1087,"locationid":1}
|
|
113: GetAppConfig
|
|
114: REST Params:
|
|
115: {"configid":15}
|
|
116: GraphQL Query:
|
|
117: query GetAppConfig($configid: bigint!) {
|
|
118: app_config(where: { configid: { _eq: $configid } }) {
|
|
119: configkey
|
|
120: configvalue
|
|
121: }
|
|
122: }
|
|
123: GraphQL Variables:
|
|
124: {"configid":15}
|
|
125: searchcustomers
|
|
126: REST Params:
|
|
127: {"tenantid":1087,"keyword":"%john%"}
|
|
128: GraphQL Query:
|
|
129: query SearchCustomers($tenantid: bigint!, $keyword: String!) {
|
|
130: customers(where: { tenantid: { _eq: $tenantid }, name: { _ilike: $keyword } }) {
|
|
131: customerid
|
|
132: name
|
|
133: }
|
|
134: }
|
|
135: GraphQL Variables:
|
|
136: {"tenantid":1087,"keyword":"%john%"}
|
|
137: getTenantorders
|
|
138: REST Params:
|
|
139: {}
|
|
140: GraphQL Query:
|
|
141: query GetTenantOrders {
|
|
142: orders {
|
|
143: orderid
|
|
144: tenantid
|
|
145: }
|
|
146: }
|
|
147: GraphQL Variables:
|
|
148: {}
|
|
149: getstaff
|
|
150: REST Params:
|
|
151: {"tenantid":1087}
|
|
152: GraphQL Query:
|
|
153: query GetStaff($tenantid: bigint!) {
|
|
154: staff(where: { tenantid: { _eq: $tenantid } }) {
|
|
155: staffid
|
|
156: name
|
|
157: }
|
|
158: }
|
|
159: GraphQL Variables:
|
|
160: {"tenantid":1087}
|
|
161: GetTenantInfo
|
|
162: REST Params:
|
|
163: {"tenantid":1079}
|
|
164: GraphQL Query:
|
|
165: query GetTenantInfo($tenantid: bigint!) {
|
|
166: tenants(where: { tenantid: { _eq: $tenantid } }) {
|
|
167: tenantname
|
|
168: city
|
|
169: }
|
|
170: }
|
|
171: GraphQL Variables:
|
|
172: {"tenantid":1079}
|
|
173: getTenantlocations
|
|
174: REST Params:
|
|
175: {"tenantid":1}
|
|
176: GraphQL Query:
|
|
177: query GetTenantLocations($tenantid: bigint!) {
|
|
178: tenant_locations(where: { tenantid: { _eq: $tenantid } }) {
|
|
179: locationid
|
|
180: locationname
|
|
181: }
|
|
182: }
|
|
183: GraphQL Variables:
|
|
184: {"tenantid":1}
|
|
185: getapplocations
|
|
186: REST Params:
|
|
187: {}
|
|
188: GraphQL Query:
|
|
189: query GetAppLocations {
|
|
190: app_location {
|
|
191: applocationid
|
|
192: locationname
|
|
193: }
|
|
194: }
|
|
195: GraphQL Variables:
|
|
196: {}
|
|
197: getsubcategory
|
|
198: REST Params:
|
|
199: {"moduleid":6,"categoryid":1}
|