{
  "info": {
    "name": "Nielsen Chase CRM - External API",
    "_postman_id": "a1b2c3d4-external-api",
    "description": "Postman collection for External API endpoints",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Companies - List",
      "request": {
        "method": "GET",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}", "type": "text" }
        ],
        "url": { "raw": "{{baseUrl}}/companies", "host": ["{{baseUrl}}"], "path": ["companies"] }
      }
    },
    {
      "name": "Companies - Create",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}", "type": "text" },
          { "key": "Content-Type", "value": "application/json", "type": "text" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"company_name\": \"ACME Test Sanayi A.\",\n  \"contact_person_name\": \"Ayse Yilmaz\",\n  \"contact_person_email\": \"ayse.yilmaz@acme.test\",\n  \"contact_person_phone\": \"+905551234567\",\n  \"company_address\": \"Organize Sanayi...,\",\n  \"company_city\": \"Istanbul\"\n}"
        },
        "url": { "raw": "{{baseUrl}}/companies", "host": ["{{baseUrl}}"], "path": ["companies"] }
      }
    },
    {
      "name": "Projects - List",
      "request": { "method": "GET", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }], "url": { "raw": "{{baseUrl}}/projects", "host": ["{{baseUrl}}"], "path": ["projects"] } }
    },
    {
      "name": "Projects - Create",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": { "mode": "raw", "raw": "{\n  \"name\": \"API Test Project\",\n  \"description\": \"Test project via API\",\n  \"company_id\": \"31d26468-b80d-49a9-b241-b954a4e451f9\",\n  \"product_name\": \"Test Product\",\n  \"product_details\": \"Product technical details\",\n  \"gtip_hs_code\": \"8537.10.00\",\n  \"target_countries\": [\"Almanya\", \"Fransa\", \"İtalya\"],\n  \"excluded_countries\": [\"Çin\", \"Rusya\"],\n  \"product_certificates\": \"CE, ISO 9001, RoHS certificates\",\n  \"capacity_report_url\": \"https://example.com/capacity-report.pdf\",\n  \"official_website_url\": \"https://company-website.com\",\n  \"average_cost\": 1500.50,\n  \"unit_cost\": 125.75,\n  \"currency\": \"USD\",\n  \"priority\": \"medium\"\n}" },
        "url": { "raw": "{{baseUrl}}/projects", "host": ["{{baseUrl}}"], "path": ["projects"] }
      }
    },
    {
      "name": "Projects - Get",
      "request": { "method": "GET", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }], "url": { "raw": "{{baseUrl}}/projects/{{projectId}}", "host": ["{{baseUrl}}"], "path": ["projects","{{projectId}}"] } }
    },
    {
      "name": "Projects - Update Status",
      "request": {
        "method": "PUT",
        "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" },{ "key": "Content-Type", "value": "application/json" }],
        "body": { "mode": "raw", "raw": "{\n  \"status\": \"completed\",\n  \"notes\": \"Completed via API\"\n}" },
        "url": { "raw": "{{baseUrl}}/projects/{{projectId}}/status", "host": ["{{baseUrl}}"], "path": ["projects","{{projectId}}","status"] }
      }
    },
    {
      "name": "Projects - Approve",
      "request": { "method": "POST", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }], "body": { "mode": "raw", "raw": "{\n  \"approved\": true\n}" }, "url": { "raw": "{{baseUrl}}/projects/{{projectId}}/approve", "host": ["{{baseUrl}}"], "path": ["projects","{{projectId}}","approve"] } }
    },
    {
      "name": "Project Files - List",
      "request": { "method": "GET", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }], "url": { "raw": "{{baseUrl}}/projects/{{projectId}}/files", "host": ["{{baseUrl}}"], "path": ["projects","{{projectId}}","files"] } }
    },
    {
      "name": "Project Files - Upload (multipart)",
      "request": {
        "method": "POST",
        "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }],
        "body": {
          "mode": "formdata",
          "formdata": [
            { "key": "file", "type": "file" },
            { "key": "file_type", "value": "certificate", "type": "text" },
            { "key": "description", "value": "Certificate upload", "type": "text" }
          ]
        },
        "url": { "raw": "{{baseUrl}}/projects/{{projectId}}/files", "host": ["{{baseUrl}}"], "path": ["projects","{{projectId}}","files"] }
      }
    },
    {
      "name": "Project File - Download",
      "request": { "method": "GET", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }], "url": { "raw": "{{baseUrl}}/projects/{{projectId}}/files/{{fileId}}/download", "host": ["{{baseUrl}}"], "path": ["projects","{{projectId}}","files","{{fileId}}","download"] } }
    },
    {
      "name": "Subscriptions - Get",
      "request": { "method": "GET", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }], "url": { "raw": "{{baseUrl}}/subscriptions", "host": ["{{baseUrl}}"], "path": ["subscriptions"] } }
    },
    {
      "name": "Support Tickets - List",
      "request": { "method": "GET", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }], "url": { "raw": "{{baseUrl}}/support/tickets", "host": ["{{baseUrl}}"], "path": ["support","tickets"] } }
    },
    {
      "name": "Support Tickets - Create",
      "request": {
        "method": "POST",
        "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" },{ "key": "Content-Type", "value": "application/json" }],
        "body": { "mode": "raw", "raw": "{\n  \"user_id\": \"user-uuid\",\n  \"title\": \"Integration Issue\",\n  \"description\": \"Details...\"\n}" },
        "url": { "raw": "{{baseUrl}}/support/tickets", "host": ["{{baseUrl}}"], "path": ["support","tickets"] }
      }
    },
    {
      "name": "Support Tickets - Update Status",
      "request": { "method": "PUT", "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" },{ "key": "Content-Type", "value": "application/json" }], "body": { "mode": "raw", "raw": "{\n  \"status\": \"resolved\"\n}" }, "url": { "raw": "{{baseUrl}}/support/tickets/{{ticketId}}/status", "host": ["{{baseUrl}}"], "path": ["support","tickets","{{ticketId}}","status"] } }
    }
  ],
  "variable": [
    { "key": "baseUrl", "value": "https://ncportal.tech/api/external" },
    { "key": "apiKey", "value": "YOUR_API_KEY_HERE" },
    { "key": "projectId", "value": "" },
    { "key": "fileId", "value": "" },
    { "key": "ticketId", "value": "" }
  ]
}
