{
	"info": {
		"_postman_id": "197df37f-f820-4f09-b556-f76e75e24ff1",
		"name": "Metafields Manager API Collection",
		"description": "Complete collection for all Metafields Manager routes",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "33841587"
	},
	"item": [
		{
			"name": "Export Metafields",
			"item": [
				{
					"name": "Export Metafields History",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/export/{{resource}}/history",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"export",
								"{{resource}}",
								"history"
							]
						},
						"description": "Get export history for metafields by resource type"
					},
					"response": []
				},
				{
					"name": "Export Metafields Estimate",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/export/{{resource}}/estimate",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"export",
								"{{resource}}",
								"estimate"
							]
						},
						"description": "Get count estimate for export with filters"
					},
					"response": []
				},
				{
					"name": "Generate Export Metafields",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"exportType\": \"shared\"\n    }"
						},
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/export/{{resource}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"export",
								"{{resource}}"
							],
							"query": [
								{
									"key": "exportType",
									"value": "shared",
									"disabled": true
								}
							]
						},
						"description": "Start a new metafields export with optional filters"
					},
					"response": []
				},
				{
					"name": "Get Export",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/export/{{resource}}/{{export_id}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"export",
								"{{resource}}",
								"{{export_id}}"
							]
						},
						"description": "Get the status and details of an export job"
					},
					"response": []
				},
				{
					"name": "Download Export Metafields",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/export/{{resource}}/{{export_id}}/download",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"export",
								"{{resource}}",
								"{{export_id}}",
								"download"
							]
						},
						"description": "Download exported metafields CSV file"
					},
					"response": []
				},
				{
					"name": "Cancel Export Metafields",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/export/{{resource}}/{{export_id}}/batch",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"export",
								"{{resource}}",
								"{{export_id}}",
								"batch"
							]
						},
						"description": "Cancel an active export"
					},
					"response": []
				}
			]
		},
		{
			"name": "Import Metafields",
			"item": [
				{
					"name": "Import Metafields History",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/import/{{resource}}/history",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"import",
								"{{resource}}",
								"history"
							]
						},
						"description": "Get import history for metafields by resource type"
					},
					"response": []
				},
				{
					"name": "Generate Import Metafields",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "files",
									"type": "file",
									"src": "/Users/tomsaunders/Downloads/2025-08-13-09-14-39-product-210.csv"
								},
								{
									"key": "importType",
									"value": "custom",
									"type": "text"
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/import/{{resource}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"import",
								"{{resource}}"
							]
						},
						"description": "Start a new metafields import from CSV file"
					},
					"response": []
				},
				{
					"name": "Get Import",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/import/{{resource}}/{{import_id}}",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"import",
								"{{resource}}",
								"{{import_id}}"
							]
						},
						"description": "Get the status and details of an import job"
					},
					"response": []
				},
				{
					"name": "Download Import Metafields",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/import/{{resource}}/{{import_id}}/download",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"import",
								"{{resource}}",
								"{{import_id}}",
								"download"
							]
						},
						"description": "Download import results CSV file"
					},
					"response": []
				},
				{
					"name": "Cancel Import Metafields",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{auth_token}}"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/stores/{{store_hash}}/metafields/import/{{resource}}/{{import_id}}/batch",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"api",
								"v1",
								"stores",
								"{{store_hash}}",
								"metafields",
								"import",
								"{{resource}}",
								"{{import_id}}",
								"batch"
							]
						},
						"description": "Cancel an active import"
					},
					"response": []
				}
			]
		}
	],
	"variable": [
		{
			"key": "base_url",
			"value": "https://metafields.space48apps.com"
		},
		{
			"key": "store_hash",
			"value": ""
		},
		{
			"key": "resource",
			"value": "product"
		},
		{
			"key": "export_id",
			"value": ""
		},
		{
			"key": "import_id",
			"value": ""
		},
		{
			"key": "auth_token",
			"value": ""
		}
	]
}
