> ## 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 late delivery

> Create a ticket for a late delivery. This support type is only available for parcels sent under your own carrier contract.

> [!NOTE]
>
> OAuth2 scopes required: `write:support-ticket`. See [Scopes for OAuth apps](https://sendcloud.dev/api/v3/scopes.md).


## OpenAPI

````yaml /.openapi/v3/support/openapi.yaml post /dsf/tickets/late-delivery
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/late-delivery:
    post:
      tags:
        - Create ticket
      summary: Create a ticket for a late delivery
      description: >-
        Create a ticket for a late delivery. This support type is only available
        for parcels sent under your own carrier contract.
      operationId: sc-public-v3-dsf-post-tickets_late_delivery
      parameters:
        - $ref: '#/components/parameters/IsPortalClaimParam'
      requestBody:
        description: Create a ticket for a late delivery using your own carrier contract.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLateDeliveryOwnContract'
      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:
            - write:support-ticket
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:
    CreateLateDeliveryOwnContract:
      title: Own contract parcel
      type: object
      properties:
        tracking_number:
          $ref: '#/components/schemas/TrackingNumberField'
        carrier_contract_id:
          $ref: '#/components/schemas/CarrierContractIdField'
        additional_remarks:
          $ref: '#/components/schemas/AdditionalRemarksField'
      required:
        - tracking_number
    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
    AdditionalRemarksField:
      description: Additional remarks about the parcel
      type: string
    CreateTicketResponseSchema:
      title: Create ticket response
      description: Create ticket response
      type: object
      properties:
        ticket_id:
          type: integer
          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
  responses:
    CreateTicketAccepted:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateTicketResponseSchema'
          example:
            ticket_id: 155
    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 cannot be created, either because deflection rules block the
        request or because `is_portal_claim=true` was set but the parcel's
        carrier contract has no portal claim credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          examples:
            Deflection rules violation (generic):
              value:
                errors:
                  - code: unprocessable_content
                    detail: >-
                      Cannot create a ticket: You cannot create a support ticket
                      at this moment.
                    title: Unprocessable Content
                    status: 422
            Deflection rules violation (duplicate ticket):
              value:
                errors:
                  - code: unprocessable_content
                    detail: >-
                      Cannot create a ticket: You already submitted a ticket for
                      this shipment, which you can find here. If you have
                      further questions, please reply to the confirmation email
                      that was sent earlier. This way we can help you more
                      quickly.
                    title: Unprocessable Content
                    status: 422
            Deflection rules violation (own contract carrier):
              value:
                errors:
                  - code: unprocessable_content
                    detail: >-
                      Cannot create a ticket: The shipment was created via your
                      own contract. Please contact PostNL service desk for
                      support
                    title: Unprocessable Content
                    status: 422
            Deflection rules violation (carrier support contact not configured):
              value:
                errors:
                  - code: unprocessable_content
                    detail: >-
                      Cannot create a ticket: Please go to the settings page to
                      configure a contact information for the carrier you are
                      shipping with.
                    title: Unprocessable Content
                    status: 422
            Portal claim requested without a portal contract:
              value:
                errors:
                  - code: unprocessable_content
                    detail: >-
                      Portal claim flag requires a portal contract. This parcel
                      does not have portal contract credentials.
                    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:
            read:analytics: View your shipping analytics
            read:audit-log: View your account's audit log
            read:brand: View your brands
            write:brand: Manage your brands
            write:carrier: Configure carriers and contracts
            read:checkout: View your dynamic checkout configurations and templates
            read:event-subscription: View your event subscriptions
            write:event-subscription: Create and manage your event subscriptions
            read:integration: View your integrations
            write:integration: Connect and manage integrations
            read:invoice: View your invoices
            read:notification: View your notifications
            write:notification: Manage your notifications
            read:operational-settings: >-
              View your warehouses, shipping lanes, and other operational
              settings
            write:operational-settings: >-
              Manage your warehouses, shipping lanes, and other operational
              settings
            read:order: View your orders
            write:order: Import and process your orders
            read:organization: View organization settings
            write:organization: Change organization settings
            read:parcel: View your shipments and their tracking status
            write:parcel: Create, announce, and cancel shipments
            read:pickup: View carrier pickups and the options available for scheduling them
            write:pickup: Schedule and manage carrier pickups
            read:price: View shipping prices
            write:product: Manage your product catalog
            read:return: View your returns
            write:return: Create and manage returns
            read:return-settings: View your return settings
            write:return-settings: Configure your return settings
            read:service-point: View carrier service points
            read:shipping-method: View shipping methods, products and prices
            read:shipping-rule: View your shipping rules
            write:shipping-rule: Create and manage shipping rules
            read:support-ticket: View your support tickets
            write:support-ticket: Manage your support tickets
            read:tracking-message: View your tracking notifications
            write:tracking-message: Manage your tracking notifications
            read:tracking-page: View your tracking page
            write:tracking-page: Customize your tracking page
            read:user: Read your basic account information

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.