{
  "info": {
    "_postman_id": "gcn-enterprise-api-v1",
    "name": "GCN Enterprise API",
    "description": "Global Container Network partner REST API.\n\n1. Set collection variables `baseUrl` and `apiKey`.\n2. Mint a key in Business Dashboard → Enterprise API.\n3. Run Ready → Me → Inventory Bulk → Listings Bulk → other modules.\n\nOpenAPI: {{baseUrl}}/openapi",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://www.globalcontainernetwork.com/api/v1"
    },
    {
      "key": "apiKey",
      "value": "gcn_test_REPLACE_ME"
    },
    {
      "key": "bulkJobId",
      "value": ""
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{apiKey}}", "type": "string" }]
  },
  "item": [
    {
      "name": "Meta",
      "item": [
        {
          "name": "Ready",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/ready"
          }
        },
        {
          "name": "Health",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/health"
          }
        },
        {
          "name": "OpenAPI",
          "request": {
            "auth": { "type": "noauth" },
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/openapi"
          }
        },
        {
          "name": "Me",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{baseUrl}}/me"
          }
        }
      ]
    },
    {
      "name": "Inventory",
      "item": [
        {
          "name": "List inventory",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/inventory?limit=50",
              "host": ["{{baseUrl}}"],
              "path": ["inventory"],
              "query": [{ "key": "limit", "value": "50" }]
            }
          }
        },
        {
          "name": "Create inventory",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Idempotency-Key", "value": "inv-{{$timestamp}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"ERP-STOCK-001\",\n  \"containerType\": \"DRY\",\n  \"size\": \"S40HC\",\n  \"condition\": \"CARGO_WORTHY\",\n  \"country\": \"DE\",\n  \"city\": \"Hamburg\",\n  \"port\": \"DEHAM\",\n  \"quantity\": 24,\n  \"price\": 1250,\n  \"currency\": \"EUR\",\n  \"notesEn\": \"Available week 30\",\n  \"notesDe\": \"Verfügbar KW 30\"\n}"
            },
            "url": "{{baseUrl}}/inventory"
          }
        },
        {
          "name": "Bulk upsert inventory",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const j = pm.response.json();",
                  "if (j && j.data && j.data.id) { pm.collectionVariables.set('bulkJobId', j.data.id); }"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"syncMode\": \"upsert\",\n  \"items\": [\n    {\n      \"externalId\": \"ERP-STOCK-001\",\n      \"containerType\": \"DRY\",\n      \"size\": \"S40HC\",\n      \"condition\": \"CARGO_WORTHY\",\n      \"country\": \"DE\",\n      \"city\": \"Hamburg\",\n      \"quantity\": 24,\n      \"currency\": \"EUR\"\n    },\n    {\n      \"externalId\": \"ERP-STOCK-002\",\n      \"containerType\": \"REEFER\",\n      \"size\": \"S40HC\",\n      \"condition\": \"USED\",\n      \"country\": \"NL\",\n      \"city\": \"Rotterdam\",\n      \"quantity\": 8,\n      \"currency\": \"EUR\"\n    }\n  ]\n}"
            },
            "url": "{{baseUrl}}/inventory/bulk"
          }
        }
      ]
    },
    {
      "name": "Listings",
      "item": [
        {
          "name": "Bulk upsert listings",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"syncMode\": \"upsert\",\n  \"items\": [\n    {\n      \"externalId\": \"ERP-LIST-100\",\n      \"titleEn\": \"40HC dry — Hamburg\",\n      \"titleDe\": \"40HC Dry — Hamburg\",\n      \"descriptionEn\": \"Immediate availability, CW.\",\n      \"descriptionDe\": \"Sofort verfügbar, CW.\",\n      \"listingType\": \"SALE\",\n      \"containerType\": \"HIGH_CUBE\",\n      \"size\": \"S40HC\",\n      \"condition\": \"CARGO_WORTHY\",\n      \"country\": \"DE\",\n      \"city\": \"Hamburg\",\n      \"price\": 2800,\n      \"currency\": \"EUR\"\n    }\n  ]\n}"
            },
            "url": "{{baseUrl}}/listings/bulk"
          }
        },
        {
          "name": "List listings",
          "request": {
            "method": "GET",
            "url": "{{baseUrl}}/listings"
          }
        }
      ]
    },
    {
      "name": "Freight / Depots / Manufacturers / Ports",
      "item": [
        {
          "name": "Bulk freight",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"syncMode\": \"upsert\",\n  \"items\": [{\n    \"externalId\": \"ERP-FRT-001\",\n    \"titleEn\": \"Hamburg → Shanghai FCL\",\n    \"titleDe\": \"Hamburg → Shanghai FCL\",\n    \"descriptionEn\": \"Weekly sailing, dry containers.\",\n    \"descriptionDe\": \"Wöchentliche Abfahrt, Dry-Container.\",\n    \"mode\": \"SEA\",\n    \"serviceType\": \"PORT_TO_PORT\",\n    \"originCountry\": \"DE\",\n    \"originCity\": \"Hamburg\",\n    \"originPort\": \"DEHAM\",\n    \"destCountry\": \"CN\",\n    \"destCity\": \"Shanghai\",\n    \"destPort\": \"CNSHA\",\n    \"currency\": \"EUR\"\n  }]\n}"
            },
            "url": "{{baseUrl}}/freight/bulk"
          }
        },
        {
          "name": "Bulk depots",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"syncMode\": \"upsert\",\n  \"items\": [{\n    \"externalId\": \"ERP-DEP-001\",\n    \"nameEn\": \"Hamburg Depot\",\n    \"nameDe\": \"Depot Hamburg\",\n    \"descriptionEn\": \"Storage and repair services.\",\n    \"descriptionDe\": \"Lager- und Reparaturservices.\",\n    \"country\": \"DE\",\n    \"city\": \"Hamburg\",\n    \"services\": [\"storage\", \"repair\"]\n  }]\n}"
            },
            "url": "{{baseUrl}}/depots/bulk"
          }
        },
        {
          "name": "Bulk manufacturers",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"syncMode\": \"upsert\",\n  \"items\": [{\n    \"externalId\": \"ERP-MFR-001\",\n    \"nameEn\": \"Qingdao Containers Co\",\n    \"nameDe\": \"Qingdao Containers Co\",\n    \"descriptionEn\": \"Dry and reefer manufacturing.\",\n    \"descriptionDe\": \"Dry- und Reefer-Fertigung.\",\n    \"country\": \"CN\",\n    \"city\": \"Qingdao\",\n    \"specialties\": [\"dry\", \"reefer\"]\n  }]\n}"
            },
            "url": "{{baseUrl}}/manufacturers/bulk"
          }
        },
        {
          "name": "Bulk ports",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"syncMode\": \"upsert\",\n  \"items\": [{\n    \"externalId\": \"ERP-PRT-001\",\n    \"code\": \"DEXXX\",\n    \"nameEn\": \"Example Port\",\n    \"nameDe\": \"Beispielhafen\",\n    \"descriptionEn\": \"Partner-submitted port profile.\",\n    \"descriptionDe\": \"Partner-Hafenprofil.\",\n    \"country\": \"DE\",\n    \"city\": \"Example\",\n    \"facilities\": [\"rail\", \"crane\"]\n  }]\n}"
            },
            "url": "{{baseUrl}}/ports/bulk"
          }
        }
      ]
    },
    {
      "name": "Bulk jobs",
      "item": [
        {
          "name": "Get bulk job",
          "request": {
            "method": "GET",
            "url": "{{baseUrl}}/bulk/{{bulkJobId}}"
          }
        }
      ]
    },
    {
      "name": "Inquiries",
      "item": [
        {
          "name": "List inbound inquiries",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/inquiries?direction=inbound",
              "host": ["{{baseUrl}}"],
              "path": ["inquiries"],
              "query": [{ "key": "direction", "value": "inbound" }]
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List webhooks",
          "request": {
            "method": "GET",
            "url": "{{baseUrl}}/webhooks"
          }
        },
        {
          "name": "Create webhook",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://your-erp.example/hooks/gcn\",\n  \"events\": [\"*\"]\n}"
            },
            "url": "{{baseUrl}}/webhooks"
          }
        }
      ]
    }
  ]
}
