107 | GET /api/pincode/:merchantId/:pincode
108 |
109 | Check if a pincode is serviced by a merchant.
111 |Example Response (Pincode is serviced):
112 |
113 | {
114 | "serviced": true
115 | }
116 |
117 | Example Response (Pincode is not serviced):
118 |
119 | {
120 | "serviced": false
121 | }
122 |
123 |
127 | GET /api/pincode/:merchantId
128 |
129 | Returns a list of pincodes serviced by the merchant in a sorted manner.
131 |Example Response:
132 |
133 | {
134 | "pincodesList": [
135 | "110001",
136 | "110064"
137 | ]
138 | }
139 |
140 |
144 | POST /api/pincode/:merchantId/:pincode
145 |
146 | Inserts a single pincode to the Redis set against the key merchant:${merchantId}
Example Response:
149 |
150 | 'Pincode ${pincode} added to set for merchant ${merchantId}'
151 |
152 |
156 | POST /api/pincode/:merchantId
157 |
158 | Upload a CSV file containing the pincodes for a merchant under the column named pincode
160 | and set pincodes for a merchant with the provided ID. The pincodes are
161 | added as values in a Redis set against the key merchant:${merchantId}
Example Request:
163 |
164 | FormData:
165 | - csvFile: [CSV File]
166 |
167 | Example Response:
168 |
169 | 'CSV processing complete, added the pincodes successfully'
170 |
171 | Example of csvFile in request:
173 |