---
updatedAt: 2025-09-10T21:00:24.000Z
agentTools:
  projectIndex: https://shipcars.readme.io/llms.txt
---

# /attachments/{id}/download/

Downloads an identified attachment.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "CTMS",
    "description": "Ship.Cars CTMS",
    "contact": {
      "url": "https://ship.cars",
      "email": "support@ship.cars"
    },
    "version": "1.0.0"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "oauth2",
        "flows": {
          "password": {
            "tokenUrl": "https://auth.ship.cars/auth/realms/master/protocol/openid-connect/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://ship.cars/api"
    }
  ],
  "paths": {
    "/attachments/{id}/download/": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "description": "Downloads an identified attachment.",
        "operationId": "attachments_download",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Authenticates API requests with a valid access token.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique ID of the attachment.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "<<PDF file>>"
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "<<ZIP file>>"
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                }
              },
              "application/json": {
                "example": {
                  "detail": "Authentication credentials were not provided."
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                }
              },
              "application/zip": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                }
              },
              "application/json": {
                "example": {
                  "detail": "Not found."
                }
              }
            }
          }
        },
        "x-code-samples": [
          {
            "lang": "cURL",
            "source": "curl --request GET \\\n--url 'https://ship.cars/api/attachments/q1kmd/download/' \\\n--header 'Authorization: Bearer <<USER_ACCESS_TOKEN>>'\n"
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```