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

> Create a ticket for a delayed parcel. This support type is only available for parcels created using Sendcloud rates.

<Info>
  OAuth2 scopes required: `write:support-ticket`. See [Scopes for OAuth apps](/api/v3/scopes).
</Info>


## OpenAPI

````yaml /.openapi/v3/support/openapi.yaml post /dsf/tickets/delay
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/delay:
    post:
      tags:
        - Create ticket
      summary: Create a ticket for a delayed parcel
      description: >-
        Create a ticket for a delayed parcel. This support type is only
        available for parcels created using Sendcloud rates.
      operationId: sc-public-v3-dsf-post-tickets_delay
      parameters:
        - $ref: '#/components/parameters/IsPortalClaimParam'
      requestBody:
        description: >-
          Data that is needed for creation of a ticket for a delayed parcel
          created using Sendcloud rates.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDelayedTransactional'
      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:
    CreateDelayedTransactional:
      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'
        sales_invoice:
          $ref: '#/components/schemas/SalesInvoiceField'
        purchase_invoice:
          $ref: '#/components/schemas/PurchaseInvoiceField'
      required:
        - tracking_number
        - contents_sales_price
        - contents_description
        - parcel_exterior_description
        - sales_invoice
        - purchase_invoice
    TrackingNumberField:
      description: Parcel tracking number
      type: string
      example: 3SABCD1234567
    ContentsSalesValueField:
      description: Sales value of the contents of the parcel
      type: object
      properties:
        price:
          type: number
          format: double
        currency:
          $ref: '#/components/schemas/currency-code'
      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/currency-code'
      example:
        price: 8
        currency: EUR
    ContentsDescriptionField:
      description: Description of the contents of the parcel
      type: string
      example: The parcel contains 3 T-shirts and 1 pair of shoes.
    ParcelExteriorDescriptionField:
      description: Parcel exterior description
      type: string
      example: The box has our branding.
    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
    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
    currency-code:
      title: Currency Code
      type: string
      description: Three-letter ISO 4217 currency code
      pattern: ^[A-Z]{3}$
      example: EUR
  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 can not 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.