> ## Documentation Index
> Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a ticket for a damaged parcel

> Create a ticket for a damaged parcel. It works with both your own contract and parcels created using Sendcloud rates.



## OpenAPI

````yaml /.openapi/v3/support/openapi.yaml post /dsf/tickets/damage
openapi: 3.1.0
info:
  title: Support API [BETA]
  version: 3.0.0
  contact:
    name: Sendcloud API Support
    url: https://www.sendcloud.dev
    email: contact@sendcloud.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The Sendcloud Support API lets you create support tickets easily and
    efficiently. This API can be used in conjunction with other core Sendcloud
    features or independently.
servers:
  - url: https://panel.sendcloud.sc/api/v3
    description: Sendcloud Production
security: []
tags:
  - name: Support
    description: Sendcloud's Support API
  - name: File upload
  - name: Carrier support contacts
  - name: Create ticket
  - name: Documents
  - name: Requested data
paths:
  /dsf/tickets/damage:
    post:
      tags:
        - Create ticket
      summary: Create a ticket for a damaged parcel
      description: >-
        Create a ticket for a damaged parcel. It works with both your own
        contract and parcels created using Sendcloud rates.
      operationId: sc-public-v3-dsf-post-tickets_damage
      parameters:
        - $ref: '#/components/parameters/IsPortalClaimParam'
      requestBody:
        description: >-
          Data that is needed for creation of a ticket for own contract parcel
          and parcels created using Sendcloud rates is different. Please refer
          to relevant examples below.
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateDamagedOwnContract'
                - $ref: '#/components/schemas/CreateDamagedTransactional'
      responses:
        '202':
          $ref: '#/components/responses/CreateTicketAccepted'
        '400':
          $ref: '#/components/responses/CreateTicketBadRequest'
        '406':
          $ref: '#/components/responses/CreateTicketNotAcceptable'
        '422':
          $ref: '#/components/responses/CreateTicketUnprocessableContent'
        '429':
          $ref: '#/components/responses/CreateTicketRateLimitExceededResponse'
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  parameters:
    IsPortalClaimParam:
      name: is_portal_claim
      in: query
      description: >-
        Set to `true` to force a portal claim. Supported for `Colissimo`,
        `Chronopost`, `Colis Privé`, `Mondial Relay`, `InPost ES`, and `DHL
        Express` carriers only. Requires a carrier contract setup.
      required: false
      schema:
        type: boolean
        default: false
  schemas:
    CreateDamagedOwnContract:
      title: Own contract parcel
      type: object
      properties:
        tracking_number:
          $ref: '#/components/schemas/TrackingNumberField'
        carrier_contract_id:
          $ref: '#/components/schemas/CarrierContractIdField'
        contents_sales_price:
          $ref: '#/components/schemas/ContentsSalesValueField'
        contents_purchase_price:
          $ref: '#/components/schemas/ContentsPurchaseValueField'
        contents_description:
          $ref: '#/components/schemas/ContentsDescriptionField'
        parcel_exterior_description:
          $ref: '#/components/schemas/ParcelExteriorDescriptionField'
        additional_remarks:
          $ref: '#/components/schemas/AdditionalRemarksField'
        customer_confirmation:
          $ref: '#/components/schemas/CustomerConfirmationField'
        sales_invoice:
          $ref: '#/components/schemas/SalesInvoiceField'
        purchase_invoice:
          $ref: '#/components/schemas/PurchaseInvoiceField'
        exterior_photo:
          $ref: '#/components/schemas/ExteriorPhotoField'
        interior_photo:
          $ref: '#/components/schemas/InteriorPhotoField'
        damage_photo_1:
          $ref: '#/components/schemas/DamagePhoto1Field'
        damage_photo_2:
          $ref: '#/components/schemas/DamagePhoto2Field'
        package_photo:
          $ref: '#/components/schemas/PackagePhotoField'
        entire_product_photo:
          $ref: '#/components/schemas/EntireProductPhotoField'
      required:
        - tracking_number
    CreateDamagedTransactional:
      title: Sendcloud rates parcel
      type: object
      properties:
        tracking_number:
          $ref: '#/components/schemas/TrackingNumberField'
        contents_sales_price:
          $ref: '#/components/schemas/ContentsSalesValueField'
        contents_purchase_price:
          $ref: '#/components/schemas/ContentsPurchaseValueField'
        contents_description:
          $ref: '#/components/schemas/ContentsDescriptionField'
        parcel_exterior_description:
          $ref: '#/components/schemas/ParcelExteriorDescriptionField'
        additional_remarks:
          $ref: '#/components/schemas/AdditionalRemarksField'
        customer_confirmation:
          $ref: '#/components/schemas/CustomerConfirmationField'
        sales_invoice:
          $ref: '#/components/schemas/SalesInvoiceField'
        purchase_invoice:
          $ref: '#/components/schemas/PurchaseInvoiceField'
        exterior_photo:
          $ref: '#/components/schemas/ExteriorPhotoField'
        interior_photo:
          $ref: '#/components/schemas/InteriorPhotoField'
        damage_photo_1:
          $ref: '#/components/schemas/DamagePhoto1Field'
        damage_photo_2:
          $ref: '#/components/schemas/DamagePhoto2Field'
        package_photo:
          $ref: '#/components/schemas/PackagePhotoField'
        entire_product_photo:
          $ref: '#/components/schemas/EntireProductPhotoField'
      required:
        - tracking_number
        - contents_sales_price
        - contents_description
        - parcel_exterior_description
        - additional_remarks
        - customer_confirmation
        - sales_invoice
        - purchase_invoice
        - exterior_photo
        - interior_photo
        - damage_photo_1
        - damage_photo_2
        - package_photo
        - entire_product_photo
    TrackingNumberField:
      description: Parcel tracking number
      type: string
      example: 3SABCD1234567
    CarrierContractIdField:
      description: >-
        The ID of the carrier contract associated with the parcel. Required when
        creating a ticket for a support only parcel that is not tracked in the
        Sendcloud system. The contract must belong to the authenticated user.
      type: integer
      example: 123
    ContentsSalesValueField:
      description: Sales value of the contents of the parcel
      type: object
      properties:
        price:
          type: number
          format: double
        currency:
          $ref: '#/components/schemas/CurrencyType'
      example:
        price: 10.55
        currency: EUR
    ContentsPurchaseValueField:
      description: Purchase value of the contents of the parcel
      type: object
      properties:
        price:
          type: number
          format: double
        currency:
          $ref: '#/components/schemas/CurrencyType'
      example:
        price: 8
        currency: EUR
    ContentsDescriptionField:
      description: Description of the contents of the parcel
      type: string
      example: The parcel contains 3 t-shits and 1 pair of shoes.
    ParcelExteriorDescriptionField:
      description: Parcel exterior description
      type: string
      example: The box has our branding.
    AdditionalRemarksField:
      description: Additional remarks about the parcel
      type: string
    CustomerConfirmationField:
      description: Written confirmation about the problem by the intended receiver
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    SalesInvoiceField:
      description: The sales invoice
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    PurchaseInvoiceField:
      description: The purchase invoice
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    ExteriorPhotoField:
      description: A photo of the exterior of the shipment's box
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    InteriorPhotoField:
      description: A photo of the inside padding material
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    DamagePhoto1Field:
      description: A photo of the damaged goods
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    DamagePhoto2Field:
      description: An additional photo of the damaged goods
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    PackagePhotoField:
      description: >-
        A photo of the opened package taken from above. The entire contents of
        the inner package must be clearly visible
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    EntireProductPhotoField:
      description: A photo showing the entire product
      type: object
      properties:
        file_token:
          type: string
          description: Token received after uploading a file via /api/v3/dsf/files API
      example:
        file_token: b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
    CreateTicketResponseSchema:
      title: Create ticket response
      description: Create ticket response
      type: object
      properties:
        ticket_id:
          type: string
          title: Ticket id
      required:
        - ticket_id
    ErrorsResponseSchema:
      description: Support API error response.
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                title: Error code
                type: string
              detail:
                title: Error description
                type: string
              title:
                title: Error title
                type: string
              status:
                title: HTTP status code
                type: integer
      required:
        - errors
    CurrencyType:
      type: string
      enum:
        - EUR
        - GBP
        - USD
  responses:
    CreateTicketAccepted:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateTicketResponseSchema'
          example:
            ticket_id: b99c8ea5-3156-442e-8dfe-c746218a3fbe
    CreateTicketBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          examples:
            Parcel not found:
              value:
                errors:
                  - code: bad_request
                    detail: Parcel not found.
                    title: Bad Request
                    status: 400
            Data validation errors:
              value:
                errors:
                  - code: bad_request
                    detail: >-
                      Validation Error. Errors: [{'type': 'missing', 'loc':
                      ('contents_sales_price',), 'msg': 'Field required'}]
                    title: Bad Request
                    status: 400
    CreateTicketNotAcceptable:
      description: Invalid payload format
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          example:
            errors:
              - code: not_acceptable
                detail: Invalid JSON
                title: Not Acceptable
                status: 406
    CreateTicketUnprocessableContent:
      description: Ticket can not be created due to deflection rules
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          examples:
            Deflection rules violation:
              value:
                errors:
                  - code: unprocessable_content
                    detail: 'Cannot create ticket. Reason: Parcel is already delivered'
                    title: Unprocessable Content
                    status: 422
            Carrier support contact is missing for own contract parcel:
              value:
                errors:
                  - code: unprocessable_content
                    detail: >-
                      Carrier support contact is required for own contract
                      parcel
                    title: Unprocessable Content
                    status: 422
    CreateTicketRateLimitExceededResponse:
      description: >-
        Rate limit exceeded. Ticket creation is limited to 15 requests per
        minute.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          example:
            errors:
              - code: hit_rate_limit
                detail: 'Rate limit exceeded: 15 per 1 minute'
                title: Rate limit exceeded
                status: 429
  securitySchemes:
    HTTPBasicAuth:
      type: http
      description: >-
        Basic Authentication using API key and secrets is currently the main
        authentication mechanism.
      scheme: basic
    OAuth2ClientCreds:
      type: oauth2
      description: >-
        OAuth2 is a standardized protocol for authorization that allows users to
        share their private resources stored on one site with another site
        without having to provide their credentials. OAuth2 Client Credentials
        Grant workflow. This workflow is typically used for server-to-server
        interactions that require authorization to access specific resources.
      flows:
        clientCredentials:
          tokenUrl: https://account.sendcloud.com/oauth2/token/
          scopes:
            api: Default OAuth scope required to access Sendcloud API.

````