{
	"info": {
		"_postman_id": "f7140bf3-ef69-40f4-b464-9e4c246805a6",
		"name": "MiaPosCollection",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "9240280"
	},
	"item": [
		{
			"name": "1. POS activation",
			"item": [
				{
					"name": "standart",
					"item": [
						{
							"name": "1.2.1 Initialize Terminal Activation",
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-DEVICE",
										"value": "{{deviceName}}",
										"type": "text"
									},
									{
										"key": "X-PLATFORM-TYPE",
										"value": "{{platformType}}",
										"type": "text"
									},
									{
										"key": "X-PLATFORM-VERSION",
										"value": "{{platformVersion}}",
										"type": "text"
									},
									{
										"key": "X-INSTALLATION-ID",
										"value": "{{installationId}}",
										"type": "text"
									},
									{
										"key": "X-NATIVE-APP-VERSION",
										"value": "{{posTerminalVersion}}",
										"type": "text"
									},
									{
										"key": "X-POS-APP-VERSION",
										"value": "{{appVersion}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"terminalId\": \"{{terminalId}}\",\r\n    \"merchantIdno\": \"{{merchantIdno}}\"\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/pos/api/v1/terminal-activation/init",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"pos",
										"api",
										"v1",
										"terminal-activation",
										"init"
									]
								}
							},
							"response": []
						},
						{
							"name": "1.2.2 (Optional) Otp resend for Terminal Activaion",
							"request": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"terminalActivationId\": \"{{terminalActivationId}}\"\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/pos/api/v1/terminal-activation/otp-resend",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"pos",
										"api",
										"v1",
										"terminal-activation",
										"otp-resend"
									]
								}
							},
							"response": []
						},
						{
							"name": "1.2.3 Confirm Terminal Activation",
							"request": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"terminalActivationId\": \"{{terminalActivationId}}\",\r\n    \"otpCode\": \"666666\"\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/pos/api/v1/terminal-activation/confirm",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"pos",
										"api",
										"v1",
										"terminal-activation",
										"confirm"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "simplified",
					"item": []
				},
				{
					"name": "1.1 Determine allowed activation type for terminal",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-DEVICE",
								"value": "{{deviceName}}",
								"type": "text"
							},
							{
								"key": "X-PLATFORM-TYPE",
								"value": "{{platformType}}",
								"type": "text"
							},
							{
								"key": "X-PLATFORM-VERSION",
								"value": "{{platformVersion}}",
								"type": "text"
							},
							{
								"key": "X-INSTALLATION-ID",
								"value": "{{installationId}}",
								"type": "text"
							},
							{
								"key": "X-NATIVE-APP-VERSION",
								"value": "{{posTerminalVersion}}",
								"type": "text"
							},
							{
								"key": "X-POS-APP-VERSION",
								"value": "{{appVersion}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/terminal-activation/type?terminalId={{terminalId}}&merchantIdno={{merchantIdno}}",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"terminal-activation",
								"type"
							],
							"query": [
								{
									"key": "terminalId",
									"value": "{{terminalId}}"
								},
								{
									"key": "merchantIdno",
									"value": "{{merchantIdno}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "2. Operator Authorization and Access Token Retrieval",
			"item": [
				{
					"name": "2.1 Operator Login",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"terminalActivationId\": \"{{terminalActivationId}}\",\r\n    \"username\": \"{{userName}}\",\r\n    \"password\": \"{{userPassword}}\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/seller/login",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"seller",
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "2.2 (Optional) Refresh Tokens",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"refreshToken\": \"{{refreshToken}}\",\r\n    \"terminalActivationId\": \"{{terminalActivationId}}\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/seller/refresh",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"seller",
								"refresh"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "3. Operator Shift Management",
			"item": [
				{
					"name": "3.1 Open Shift",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/shift/open",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"shift",
								"open"
							]
						}
					},
					"response": []
				},
				{
					"name": "3.2 (Optional) Check Shift Status",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/shift/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"shift",
								"check"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "4. (deprecated) Generate QR Code for Payment (Dynamic QR for a Specified Amount)",
			"item": [
				{
					"name": "4.1 Generate QR Code",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"amount\": 9.99\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/qr/generate",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"qr",
								"generate"
							]
						}
					},
					"response": []
				},
				{
					"name": "4.2 (Optional) Check QR Code Status",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"amount\": 9.99\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/qr/:qrId/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"qr",
								":qrId",
								"check"
							],
							"variable": [
								{
									"key": "qrId",
									"value": "{{qrId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "4.3 Cancel QR Code",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"amount\": 9.99\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/qr/:qrId/cancel",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"qr",
								":qrId",
								"cancel"
							],
							"variable": [
								{
									"key": "qrId",
									"value": "{{qrId}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "4. (new) Query version for working with Dynamic, Hybrid, Static QR codes",
			"item": [
				{
					"name": "4.1.  Information about active QR",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v2/qr/active?isImageRequired=false",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v2",
								"qr",
								"active"
							],
							"query": [
								{
									"key": "isImageRequired",
									"value": "false"
								},
								{
									"key": "type",
									"value": "hybrid",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "4.2. Create QR code",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"qrType\": \"hybrid\",\r\n  \"amountType\": \"fixed\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v2/qr",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v2",
								"qr"
							]
						}
					},
					"response": []
				},
				{
					"name": "4.3. (Optional) Creates a new QR code extension",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"amount\": 250.14\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v2/qr/:qrId/extension",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v2",
								"qr",
								":qrId",
								"extension"
							],
							"variable": [
								{
									"key": "qrId",
									"value": "{{qrId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "4.4. Qr extension check state pay",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v2/qr/extension/:extensionId/check",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v2",
								"qr",
								"extension",
								":extensionId",
								"check"
							],
							"variable": [
								{
									"key": "extensionId",
									"value": "{{extensionId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "4.5. (Optional) Cancels QR code extension",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v2/qr/extension/:extensionId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v2",
								"qr",
								"extension",
								":extensionId"
							],
							"variable": [
								{
									"key": "extensionId",
									"value": "{{extensionId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "4.6. (Optional) Get QR code details by id",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v2/qr/:qrId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v2",
								"qr",
								":qrId"
							],
							"variable": [
								{
									"key": "qrId",
									"value": "{{qrId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "4.7. Cancel qr-code and extension",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v2/qr/:qrId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v2",
								"qr",
								":qrId"
							],
							"variable": [
								{
									"key": "qrId",
									"value": "{{qrId}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "5. Close shift",
			"item": [
				{
					"name": "5.1 Close shift",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/shift/close",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"shift",
								"close"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "6. Retrieve Z-Report",
			"item": [
				{
					"name": "6.1 Get Z-Report",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/shift/:shiftId/z-report",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"shift",
								":shiftId",
								"z-report"
							],
							"variable": [
								{
									"key": "shiftId",
									"value": "{{shiftId}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "7. Operator logout",
			"item": [
				{
					"name": "7.1  Operator Logout",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"refreshToken\": \"{{refreshToken}}\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/seller/logout",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"seller",
								"logout"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Retrieve information about Transactions",
			"item": [
				{
					"name": "Retrieve all transactions by shift",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/tx?shiftId={{shiftId}}",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"tx"
							],
							"query": [
								{
									"key": "shiftId",
									"value": "{{shiftId}}",
									"description": "Unique shift identifier for which transaction requests are made"
								},
								{
									"key": "txId",
									"value": "{{txId}}",
									"description": "Integer <int64> ID of the transaction from which earlier transactions are requested. If not transmitted, the most current data is returned",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Retrieve transaction details",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/tx/:txId",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"tx",
								":txId"
							],
							"variable": [
								{
									"key": "txId",
									"value": "{{txId}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Return tx",
			"item": [
				{
					"name": "Get Return Reason list.",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/tx/return/reason",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"tx",
								"return",
								"reason"
							]
						}
					},
					"response": []
				},
				{
					"name": "Create a return transaction",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"txId\": 886,\r\n    \"fullRefund\": true,\r\n    \"reasonCode\": \"AC02\",\r\n    \"reasonMessage\": \"Test return tx by client\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/tx/return",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"tx",
								"return"
							]
						},
						"description": "Initiates a return transaction for a completed transaction."
					},
					"response": []
				},
				{
					"name": "Get return request status.",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": ""
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Pos settings",
			"item": [
				{
					"name": "Get pos terminal settings",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/settings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"settings"
							]
						}
					},
					"response": []
				},
				{
					"name": "Set QR code settings",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{accessToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"qrType\": \"dynamic\",\r\n  \"qrAmountType\": \"fixed\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrl}}/pos/api/v1/qr-settings",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								"pos",
								"api",
								"v1",
								"qr-settings"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Tool to change Qr status",
			"item": [
				{
					"name": "Change transaction status",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Request-ID",
								"value": "{{intgRequestId}}",
								"type": "text"
							},
							{
								"key": "Receiver-Participant-Code",
								"value": "{{intgParticipantCode}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "[\r\n  {\r\n    \"signalCode\": \"Payment\",\r\n    \"signalDtTm\": \"2024-07-01T10:00:27+03:00\",\r\n    \"qrHeaderUUID\": \"{{qrHeaderUUID}}\",\r\n    \"payment\": {\r\n      \"system\": \"IPS\",\r\n      \"reference\": \"pacs.008.001.10|2023-10-24|CMTBMD2X|CMTBAWEB1024B050\",\r\n      \"amount\": {\r\n        \"sum\": \"22.00\",\r\n        \"currency\": \"MDL\"\r\n      },\r\n      \"dtTm\": \"2024-06-24T14:00:27+03:00\"\r\n    }\r\n  }\r\n]",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{baseUrlIntegration}}/external-integration/api/v1/qr/signals",
							"host": [
								"{{baseUrlIntegration}}"
							],
							"path": [
								"external-integration",
								"api",
								"v1",
								"qr",
								"signals"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"variable": [
		{
			"key": "terminalActivationId",
			"value": "\"ecd29bb4-2607-4866-8893-6f8c0e55f79b\""
		}
	]
}