> ## 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 requested data response

> Depending on the requested `data_type`, additional documents/photos, text input, or sales data may be required.

For the `sales_data` type, detailed sales data is expected, including item descriptions, quantities, prices, and tax rates. The data has to be passed as a valid JSON object under the `sales_data` key of the payload. Each item can optionally include a `sales_date` to specify the date of the sale, which will be used as the invoice date. If not provided, the parcel announcement date will be used.

A file object is expected for the following `data_type`'s: `sales_invoice`, `purchase_invoice`, `claim_letter`.
Files are expected to be passed in the `attachments` array.


## OpenAPI

````yaml /.openapi/v3/support/openapi.yaml post /dsf/tickets/requested-data
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/requested-data:
    parameters: []
    post:
      tags:
        - Requested data
      summary: Create a requested data response
      description: >-
        Depending on the requested `data_type`, additional documents/photos,
        text input, or sales data may be required.
      operationId: sc-public-v3-dsf-post-requested_data
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                request_id:
                  type: integer
                  description: >-
                    The id of the requested data. You can get it from the
                    /related-data GET endpoint
                comment:
                  type:
                    - string
                    - 'null'
                  description: Optional comment input from the user.
                attachments:
                  type: array
                  description: >-
                    List of file tokens that will be uploaded as the
                    requested-data. To generate the file tokens, use the [Upload
                    a file](/api/v3/support/files) or [Generate
                    Documents](api/v3/support/generate-sales-invoice) endpoints.
                  items:
                    type: object
                    properties:
                      file_token:
                        type: string
                        description: >-
                          Token received after uploading a file via the [Upload
                          a file](/api/v3/support/files) endpoint.
                    example:
                      file_token: >-
                        b90e7a70-57c6-4338-992a-eae50d637261-6170706c69636174696f6e2f706466
                    required:
                      - file_token
                sales_data:
                  type: array
                  description: >-
                    Detailed sales information for each item in the shipment.
                    Required when `data_type` is `sales_data`. Pass force
                    parameter if sales data has a large total amount.
                  items:
                    type: object
                    properties:
                      product_description:
                        description: Description of the product
                        type: string
                      quantity:
                        description: Quantity of the product
                        type: integer
                      selling_price:
                        description: Price per product item. **Must be tax-included.**
                        type: number
                        format: double
                      currency:
                        $ref: '#/components/schemas/CurrencyType'
                      tax_rate:
                        description: Tax rate for the product
                        type: number
                      sales_date:
                        description: >-
                          Date of the sale. Used as the invoice date when
                          generating sales invoices. If not provided, the parcel
                          announcement date will be used.
                        type:
                          - string
                          - 'null'
                        format: date-time
                    required:
                      - product_description
                      - quantity
                      - selling_price
                      - currency
                      - tax_rate
                force:
                  type: boolean
                  description: >-
                    Bypasses the maximum invoice amount validation (5000 EUR).
                    Only use this when strictly necessary, as the validation
                    exists to prevent erroneous invoices.
                  default: false
              required:
                - request_id
            examples:
              File request:
                value:
                  request_id: 144
                  comment: Sales invoice
                  attachments:
                    - file_token: 4b08344f-8325-40df-8273-c0c31c412bb0
              Textual data request:
                value:
                  request_id: 144
                  comment: Lost parcel contained 3 t-shirts and 1 pants
              Sales data request:
                value:
                  request_id: 144
                  sales_data:
                    - product_description: T-Shirt
                      quantity: 3
                      selling_price: 19.95
                      currency: EUR
                      tax_rate: 21
                      sales_date: '2025-03-15T10:30:00Z'
                    - product_description: Pants
                      quantity: 1
                      selling_price: 45
                      currency: EUR
                      tax_rate: 21
                      sales_date: '2025-03-15T10:30:00Z'
                  force: true
      responses:
        '200':
          description: Data was uploaded successfully.
        '400':
          $ref: '#/components/responses/ProvideRequestedDataBadRequest'
        '404':
          $ref: '#/components/responses/RequestIdNotFoundResponse'
        '429':
          $ref: '#/components/responses/RateLimitExceededResponse'
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds: []
components:
  schemas:
    CurrencyType:
      type: string
      enum:
        - EUR
        - GBP
        - USD
    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:
    ProvideRequestedDataBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          examples:
            Invalid JSON:
              value:
                errors:
                  - code: bad_request
                    detail: Invalid JSON
                    title: Bad Request
                    status: 400
            Validation Error:
              value:
                errors:
                  - code: bad_request
                    detail: >-
                      Validation Error. Errors: [{'type': 'missing', 'loc':
                      ('request_id',), 'msg': 'Field required'}]
                    title: Bad Request
                    status: 400
            Action not allowed:
              value:
                errors:
                  - code: bad_request
                    detail: Action is not allowed or has already been completed
                    title: Bad Request
                    status: 400
            Sales data required:
              value:
                errors:
                  - code: bad_request
                    detail: Sales data is required
                    title: Bad Request
                    status: 400
    RequestIdNotFoundResponse:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          example:
            errors:
              - code: not_found
                detail: request_id not found
                title: Not Found
                status: 400
    RateLimitExceededResponse:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorsResponseSchema'
          example:
            errors:
              - code: hit_rate_limit
                detail: 'Rate limit exceeded: 30 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.

````