> ## 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 lost parcel

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



## OpenAPI

````yaml /.openapi/v3/support/openapi.yaml post /dsf/tickets/lost
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/lost:
    post:
      tags:
        - Create ticket
      summary: Create a ticket for a lost parcel
      description: >-
        Create a ticket for a lost parcel. It works with both your own contract
        and parcels created using Sendcloud rates.
      operationId: sc-public-v3-dsf-post-tickets_lost
      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/CreateLostOwnContract'
                - $ref: '#/components/schemas/CreateLostTransactional'
      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:
    CreateLostOwnContract:
      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'
        parcel_dimensions:
          $ref: '#/components/schemas/ParcelDimensionsField'
        additional_remarks:
          $ref: '#/components/schemas/AdditionalRemarksField'
        sales_invoice:
          $ref: '#/components/schemas/SalesInvoiceField'
        purchase_invoice:
          $ref: '#/components/schemas/PurchaseInvoiceField'
        customer_confirmation:
          $ref: '#/components/schemas/CustomerConfirmationField'
        carrier_claim_form:
          $ref: '#/components/schemas/CarrierClaimForm'
      required:
        - tracking_number
    CreateLostTransactional:
      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'
        parcel_dimensions:
          $ref: '#/components/schemas/ParcelDimensionsField'
        additional_remarks:
          $ref: '#/components/schemas/AdditionalRemarksField'
        sales_invoice:
          $ref: '#/components/schemas/SalesInvoiceField'
        purchase_invoice:
          $ref: '#/components/schemas/PurchaseInvoiceField'
        customer_confirmation:
          $ref: '#/components/schemas/CustomerConfirmationField'
        carrier_claim_form:
          $ref: '#/components/schemas/CarrierClaimForm'
      required:
        - tracking_number
        - contents_sales_price
        - contents_description
        - parcel_exterior_description
        - parcel_dimensions
        - additional_remarks
        - sales_invoice
        - purchase_invoice
        - customer_confirmation
        - carrier_claim_form
    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.
    ParcelDimensionsField:
      description: Measurements of the parcel in cm (L × W × H)
      type: object
      properties:
        length:
          type: number
          description: Parcel length in cm
        width:
          type: number
          description: Parcel width in cm
        height:
          type: number
          description: Parcel height in cm
      required:
        - length
        - width
        - height
    AdditionalRemarksField:
      description: Additional remarks about the parcel
      type: string
    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
    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
    CarrierClaimForm:
      description: Filled in carrier claim form file
      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.

````