{
  "info": {
    "name": "atoship API",
    "_postman_id": "atoship-api-collection-v1",
    "description": "Official atoship API collection for shipping label generation, tracking, and carrier management. Includes all V1 API endpoints with examples and pre-configured requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "1.0.0"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Account",
      "description": "Account management, balance, and settings",
      "item": [
        {
          "name": "Get Account",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/account",
              "host": ["{{base_url}}"],
              "path": ["account"]
            },
            "description": "Retrieve account information including balance, settings, and organization details."
          }
        },
        {
          "name": "Update Account",
          "request": {
            "method": "PUT",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"My Company\",\n  \"email\": \"support@example.com\",\n  \"phone\": \"+1234567890\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/account",
              "host": ["{{base_url}}"],
              "path": ["account"]
            }
          }
        }
      ]
    },
    {
      "name": "Addresses",
      "description": "Create, validate, and manage shipping addresses",
      "item": [
        {
          "name": "Create Address",
          "request": {
            "method": "POST",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"John Doe\",\n  \"company\": \"Acme Corp\",\n  \"street1\": \"123 Main St\",\n  \"city\": \"San Francisco\",\n  \"state\": \"CA\",\n  \"zip\": \"94105\",\n  \"country\": \"US\",\n  \"phone\": \"+14155551234\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/addresses",
              "host": ["{{base_url}}"],
              "path": ["addresses"]
            }
          }
        }
      ]
    },
    {
      "name": "Rates",
      "item": [
        {
          "name": "Get Shipping Rates",
          "request": {
            "method": "POST",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": {\n    \"street1\": \"123 Sender St\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n    \"zip\": \"94105\",\n    \"country\": \"US\"\n  },\n  \"to\": {\n    \"street1\": \"456 Recipient Ave\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zip\": \"10001\",\n    \"country\": \"US\"\n  },\n  \"parcel\": {\n    \"length\": 10,\n    \"width\": 8,\n    \"height\": 6,\n    \"weight\": 16\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/rates",
              "host": ["{{base_url}}"],
              "path": ["rates"]
            }
          }
        }
      ]
    },
    {
      "name": "Labels",
      "item": [
        {
          "name": "Create Label",
          "request": {
            "method": "POST",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": {\n    \"name\": \"Sender\",\n    \"street1\": \"123 Sender St\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n    \"zip\": \"94105\",\n    \"country\": \"US\"\n  },\n  \"to\": {\n    \"name\": \"Recipient\",\n    \"street1\": \"456 Ave\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zip\": \"10001\",\n    \"country\": \"US\"\n  },\n  \"parcel\": {\n    \"length\": 10,\n    \"width\": 8,\n    \"height\": 6,\n    \"weight\": 16\n  },\n  \"carrier\": \"USPS\",\n  \"service\": \"Priority\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/labels",
              "host": ["{{base_url}}"],
              "path": ["labels"]
            }
          }
        },
        {
          "name": "Get Label",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/labels/:id",
              "host": ["{{base_url}}"],
              "path": ["labels", ":id"],
              "variable": [{"key": "id", "value": "label_123456"}]
            }
          }
        },
        {
          "name": "List Labels",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/labels?limit=10",
              "host": ["{{base_url}}"],
              "path": ["labels"],
              "query": [{"key": "limit", "value": "10"}]
            }
          }
        }
      ]
    },
    {
      "name": "Tracking",
      "item": [
        {
          "name": "Get Tracking",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/tracking/:tracking_number",
              "host": ["{{base_url}}"],
              "path": ["tracking", ":tracking_number"],
              "variable": [{"key": "tracking_number", "value": "9400100000000000000000"}]
            }
          }
        }
      ]
    },
    {
      "name": "Carrier Accounts",
      "item": [
        {
          "name": "List Carrier Accounts",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/carrier-accounts",
              "host": ["{{base_url}}"],
              "path": ["carrier-accounts"]
            }
          }
        },
        {
          "name": "Create Carrier Account",
          "request": {
            "method": "POST",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"carrier\": \"USPS\",\n  \"accountNumber\": \"123456789\",\n  \"credentials\": {\n    \"clientId\": \"your_client_id\",\n    \"clientSecret\": \"your_client_secret\"\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/carrier-accounts",
              "host": ["{{base_url}}"],
              "path": ["carrier-accounts"]
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List Webhooks",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/webhooks",
              "host": ["{{base_url}}"],
              "path": ["webhooks"]
            }
          }
        },
        {
          "name": "Create Webhook",
          "request": {
            "method": "POST",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/webhook\",\n  \"events\": [\"label.created\", \"tracking.updated\"]\n}"
            },
            "url": {
              "raw": "{{base_url}}/webhooks",
              "host": ["{{base_url}}"],
              "path": ["webhooks"]
            }
          }
        }
      ]
    },
    {
      "name": "Returns",
      "item": [
        {
          "name": "Create Return Label",
          "request": {
            "method": "POST",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": {\n    \"name\": \"Customer\",\n    \"street1\": \"456 Ave\",\n    \"city\": \"New York\",\n    \"state\": \"NY\",\n    \"zip\": \"10001\",\n    \"country\": \"US\"\n  },\n  \"to\": {\n    \"name\": \"Return Center\",\n    \"street1\": \"123 St\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n    \"zip\": \"94105\",\n    \"country\": \"US\"\n  },\n  \"parcel\": {\n    \"weight\": 16\n  }\n}"
            },
            "url": {
              "raw": "{{base_url}}/returns",
              "host": ["{{base_url}}"],
              "path": ["returns"]
            }
          }
        }
      ]
    },
    {
      "name": "Insurance",
      "item": [
        {
          "name": "List Insurances",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/insurances",
              "host": ["{{base_url}}"],
              "path": ["insurances"]
            }
          }
        },
        {
          "name": "Create Claim",
          "request": {
            "method": "POST",
            "header": [{"key": "Content-Type", "value": "application/json"}],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"claimType\": \"damage\",\n  \"description\": \"Package damaged\",\n  \"claimAmount\": 150\n}"
            },
            "url": {
              "raw": "{{base_url}}/insurances/:id/claim",
              "host": ["{{base_url}}"],
              "path": ["insurances", ":id", "claim"],
              "variable": [{"key": "id", "value": "ins_123"}]
            }
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://atoship.com/api/v1"
    },
    {
      "key": "api_key",
      "value": "ak_live_your_api_key_here"
    }
  ]
}
