{
	"info": {
		"_postman_id": "546f62e2-1548-41d4-85c2-afa615b2d73e",
		"name": "CMS Integration",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "6299033",
		"_collection_link": "https://wordbee-it.postman.co/workspace/My-Workspace~6f9aa275-090a-4d7b-8b67-a802f2b5f202/collection/6299033-546f62e2-1548-41d4-85c2-afa615b2d73e?action=share&source=collection_link&creator=6299033"
	},
	"item": [
		{
			"name": "files",
			"item": [
				{
					"name": "projects/{pid}/workflows/new",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{ \r\n    \"src\": \"en\",\r\n    \"trgs\": [ \"fr\", \"de\" ],\r\n    \"deadline\": \"2024-06-03T06:00:00Z\",\r\n    \"maxFilesInJob\": 1,\r\n    \"files\": [\r\n        {\r\n            \"token\": \"{{uploadedFile}}\",\r\n            \"name\": \"file-001.htm\"\r\n        }\r\n    ],\r\n    \"_callback\": {\r\n        \"url\": \"https://webhook.site/0653ca99-192e-4789-bdc8-30cc9200798e\",\r\n        \"headers\": []\r\n    }\r\n}"
						},
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/new",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"new"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/{did}/files/{locale}",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/files/fr/file",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"files",
								"fr",
								"file"
							]
						}
					},
					"response": []
				},
				{
					"name": "Upload document",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"pm.globals.set(\"uploadedFile\", jsonData.result.token); //jsonData.value);\r",
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "",
									"type": "file",
									"src": "/C:/Users/sbohm/Desktop/Dev/Samples/Fuzzy1.html"
								}
							]
						},
						"url": {
							"raw": "{{API2URL}}/api/media/upload?filename=sample.html",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"media",
								"upload"
							],
							"query": [
								{
									"key": "filename",
									"value": "sample.html"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Upload document 2",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"pm.globals.set(\"uploadedFile2\", jsonData.result.token); //jsonData.value);\r",
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "",
									"type": "file",
									"src": "/C:/Users/sbohm/Desktop/Dev/Samples/Fuzzy2.html"
								}
							]
						},
						"url": {
							"raw": "{{API2URL}}/api/media/upload?filename=sample.html",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"media",
								"upload"
							],
							"query": [
								{
									"key": "filename",
									"value": "sample.html"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "list",
			"item": [
				{
					"name": "projects/{pid}/workflows/list",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{ \"query2\": '{preference}.Matches(\"WM-17228\", \"prefix\")' }"
						},
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/list/full",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"list",
								"full"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/list/_internal/unittest",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{ \"query2\": '{reference}.Matches(\"WM-13280\", \"prefix\")' }"
						},
						"url": {
							"raw": "{{API2URL}}/api/projects/6757/workflows/list/_internal/unittest",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6757",
								"workflows",
								"list",
								"_internal",
								"unittest"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/list/completed",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/10415/workflows/list/completed?minutes=360",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"10415",
								"workflows",
								"list",
								"completed"
							],
							"query": [
								{
									"key": "minutes",
									"value": "360"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "attachments",
			"item": [
				{
					"name": "projects/{pid}/workflows/{did}/attachments/{loc}",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/attachments/fr",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"attachments",
								"fr"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/{did}/attachments/{loc}/file",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/attachments/fr/file?filename=test1.htm",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"attachments",
								"fr",
								"file"
							],
							"query": [
								{
									"key": "filename",
									"value": "test1.htm"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/{did}/attachments/{loc}/file (POST)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"token\": \"{{uploadedFile}}\",\r\n    \"name\": \"test1.htm\"\r\n}"
						},
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/attachments/fr/file",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"attachments",
								"fr",
								"file"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/{did}/attachments/{loc}/file (DELETE)",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n     \"name\": \"test1.htm\"\r\n}"
						},
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/attachments/fr/file",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"attachments",
								"fr",
								"file"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "status",
			"item": [
				{
					"name": "projects/{pid}/workflows/{did}/status/{loc}/",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/status/fr",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"status",
								"fr"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/{did}/status",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/10415/workflows/27638/status",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"10415",
								"workflows",
								"27638",
								"status"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/{did}/status/{trg}/delivery/success",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/status/fr/delivery/success",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"status",
								"fr",
								"delivery",
								"success"
							]
						}
					},
					"response": []
				},
				{
					"name": "projects/{pid}/workflows/{did}/status/{trg}/delivery/failure",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/status/fr/delivery/failure",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"status",
								"fr",
								"delivery",
								"failure"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "wordcounts",
			"item": [
				{
					"name": "projects/{pid}/workflows/{did}/wordcounts/{loc}",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Auth-Token",
								"value": "{{api2token}}",
								"type": "text"
							},
							{
								"key": "X-Auth-AccountId",
								"value": "{{PLATFORMID}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{API2URL}}/api/projects/6985/workflows/19112/wordcounts/fr",
							"host": [
								"{{API2URL}}"
							],
							"path": [
								"api",
								"projects",
								"6985",
								"workflows",
								"19112",
								"wordcounts",
								"fr"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Authenticate",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"",
							"var jsonData = pm.response.json();",
							"pm.globals.set(\"api2token\", jsonData); //jsonData.value);",
							""
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n \"accountid\": \"{{PLATFORMID}}\",\r\n \"key\": \"{{API2KEY}}\"\r\n}"
				},
				"url": {
					"raw": "{{API2URL}}/api/auth/token",
					"host": [
						"{{API2URL}}"
					],
					"path": [
						"api",
						"auth",
						"token"
					]
				}
			},
			"response": []
		},
		{
			"name": "Disconnect",
			"request": {
				"method": "DELETE",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json"
					},
					{
						"key": "X-Auth-Token",
						"value": "{{api2token}}",
						"type": "text"
					},
					{
						"key": "X-Auth-AccountId",
						"value": "{{PLATFORMID}}",
						"type": "text"
					}
				],
				"url": {
					"raw": "{{API2URL}}/api/auth/token",
					"host": [
						"{{API2URL}}"
					],
					"path": [
						"api",
						"auth",
						"token"
					]
				}
			},
			"response": []
		}
	]
}