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

# Create journal entry attachment

## Field support per integration

<AccordionGroup>
  <Accordion title="Business Central" icon={<svg width="24" height="24" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg" transform="translate(-7,-4)"> <g clip-path="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#clip0)"> <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="96" height="96"> <path fill-rule="evenodd" clip-rule="evenodd" d="M0 48C0 52.2526 2.94943 55.8163 6.91426 56.7571C10.3435 72.9252 23.0749 85.6565 39.2429 89.0857C40.1837 93.0506 43.7474 96 48 96C52.2526 96 55.8163 93.0506 56.7571 89.0857C72.9251 85.6565 85.6565 72.9252 89.0857 56.7572C93.0505 55.8164 95.9999 52.2527 95.9999 48.0001C95.9999 43.7476 93.0506 40.1839 89.0858 39.243C85.6566 23.0749 72.9252 10.3435 56.7571 6.91426C55.8163 2.94943 52.2526 0 48 0C43.7474 0 40.1837 2.94943 39.2429 6.91426C23.0748 10.3435 10.3435 23.0749 6.91426 39.2429C2.94943 40.1837 0 43.7474 0 48Z" fill="#8DF7DB"/> </mask> <g mask="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#mask0)"> <circle cx="48" cy="48" r="48" fill="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#paint0_linear)"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M52 17.0645C54.9634 15.5918 57 12.5337 57 9C57 4.02944 52.9706 0 48 0C43.0294 0 39 4.02944 39 9C39 12.5337 41.0365 15.5918 44 17.0645V23H52V17.0645Z" fill="#9DF3F9"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M44 78.9355C41.0366 80.4082 39 83.4663 39 87C39 91.9706 43.0294 96 48 96C52.9706 96 57 91.9706 57 87C57 83.4663 54.9634 80.4082 52 78.9355L52 73L44 73L44 78.9355Z" fill="#82EBF1"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M17.0645 44C15.5918 41.0366 12.5337 39 9 39C4.02944 39 -6.10673e-07 43.0294 -3.93402e-07 48C-1.76132e-07 52.9706 4.02944 57 9 57C12.5337 57 15.5918 54.9634 17.0645 52L23 52L23 44L17.0645 44Z" fill="#9DF3F9"/> <g filter="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#filter0_f)"> <circle cx="48" cy="50" r="26" fill="black" fill-opacity="0.32"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M59.3172 54.0001C57.6698 58.6609 53.2249 62.0001 48 62.0001C41.3726 62.0001 36 56.6275 36 50.0001C36 43.3727 41.3726 38.0001 48 38.0001C53.2249 38.0001 57.6698 41.3394 59.3172 46.0001H80V54.0001H59.3172Z" fill="black" fill-opacity="0.32"/> <path d="M87 59.0001C82.0294 59.0001 78 54.9707 78 50.0001C78 45.0296 82.0294 41.0001 87 41.0001C91.9706 41.0001 96 45.0296 96 50.0001C96 54.9707 91.9706 59.0001 87 59.0001Z" fill="black" fill-opacity="0.32"/> </g> <g filter="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#filter1_f)"> <circle cx="48" cy="48.38" r="26" fill="black" fill-opacity="0.24"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M59.3172 52.3801C57.6698 57.0409 53.2249 60.3801 48 60.3801C41.3726 60.3801 36 55.0075 36 48.3801C36 41.7527 41.3726 36.3801 48 36.3801C53.2249 36.3801 57.6698 39.7194 59.3172 44.3801H80V52.3801H59.3172Z" fill="black" fill-opacity="0.24"/> <path d="M87 57.3801C82.0294 57.3801 78 53.3507 78 48.3801C78 43.4096 82.0294 39.3801 87 39.3801C91.9706 39.3801 96 43.4096 96 48.3801C96 53.3507 91.9706 57.3801 87 57.3801Z" fill="black" fill-opacity="0.24"/> </g> <circle cx="48" cy="48" r="26" fill="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#paint1_linear)"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M59.3172 52.0001C57.6698 56.6609 53.2249 60.0001 48 60.0001C41.3726 60.0001 36 54.6275 36 48.0001C36 41.3727 41.3726 36.0001 48 36.0001C53.2249 36.0001 57.6698 39.3394 59.3172 44.0001H80V52.0001H59.3172Z" fill="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#paint2_linear)"/> <path d="M87 57.0001C82.0294 57.0001 78 52.9707 78 48.0001C78 43.0296 82.0294 39.0001 87 39.0001C91.9706 39.0001 96 43.0296 96 48.0001C96 52.9707 91.9706 57.0001 87 57.0001Z" fill="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/journalentries/attachments#paint3_linear)"/> </g> </g> <defs> <filter id="filter0_f" x="14" y="16" width="90" height="68" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> <feFlood flood-opacity="0" result="BackgroundImageFix"/> <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/> <feGaussianBlur stdDeviation="4" result="effect1_foregroundBlur"/> </filter> <filter id="filter1_f" x="21.24" y="21.62" width="75.52" height="53.52" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> <feFlood flood-opacity="0" result="BackgroundImageFix"/> <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/> <feGaussianBlur stdDeviation="0.38" result="effect1_foregroundBlur"/> </filter> <linearGradient id="paint0_linear" x1="22.7027" y1="11.3514" x2="72.6487" y2="84.6487" gradientUnits="userSpaceOnUse"> <stop stop-color="#009CA8"/> <stop offset="1" stop-color="#007D85"/> </linearGradient> <linearGradient id="paint1_linear" x1="31.7838" y1="26.2703" x2="66.1622" y2="83.3514" gradientUnits="userSpaceOnUse"> <stop stop-color="#36E3EE"/> <stop offset="1" stop-color="#00B1BE"/> </linearGradient> <linearGradient id="paint2_linear" x1="31.1352" y1="24" x2="75.2433" y2="63.5676" gradientUnits="userSpaceOnUse"> <stop stop-color="#D2F6F9"/> <stop offset="1" stop-color="#82EBF1"/> <stop offset="1" stop-color="#82EBF1"/> </linearGradient> <linearGradient id="paint3_linear" x1="96.9731" y1="50.919" x2="72.3244" y2="42.1622" gradientUnits="userSpaceOnUse"> <stop stop-color="#9AEEF3"/> <stop offset="1" stop-color="#82EBF1"/> </linearGradient> <clipPath id="clip0"> <rect width="96" height="96" fill="white"/></clipPath></defs></svg>}>
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameters `environmentName` and `companyId` are correctly populated.
      You can obtain these values by using the `GET Environments` and `GET Companies` endpoints available under the Authentication section.
    </Note>

    <ResponseField name="file" type="File" required />
  </Accordion>

  <Accordion title="Xero" icon={<svg width="24" height="24" viewBox="0 0 45 46" xmlns="http://www.w3.org/2000/svg" transform="translate(-7,-4)"><path fill="#13B5EA" d="M22.457 45.49c12.402 0 22.456-10.072 22.456-22.495C44.913 10.57 34.86.5 22.457.5 10.054.5 0 10.57 0 22.995 0 35.418 10.054 45.49 22.457 45.49"/><path class="logo-xero-blue__text" fill="#fff" d="M10.75 22.935l3.832-3.85a.688.688 0 0 0-.977-.965l-3.83 3.833-3.845-3.84a.687.687 0 0 0-.966.979l3.832 3.837-3.83 3.84a.688.688 0 1 0 .964.981l3.84-3.842 3.825 3.827a.685.685 0 0 0 1.184-.473.68.68 0 0 0-.2-.485l-3.83-3.846m22.782.003c0 .69.56 1.25 1.25 1.25a1.25 1.25 0 0 0-.001-2.5c-.687 0-1.246.56-1.246 1.25m-2.368 0c0-1.995 1.62-3.62 3.614-3.62 1.99 0 3.613 1.625 3.613 3.62s-1.622 3.62-3.613 3.62a3.62 3.62 0 0 1-3.614-3.62m-1.422 0c0 2.78 2.26 5.044 5.036 5.044s5.036-2.262 5.036-5.043c0-2.78-2.26-5.044-5.036-5.044a5.046 5.046 0 0 0-5.036 5.044m-.357-4.958h-.21c-.635 0-1.247.2-1.758.595a.696.696 0 0 0-.674-.54.68.68 0 0 0-.68.684l.002 8.495a.687.687 0 0 0 1.372-.002v-5.224c0-1.74.16-2.444 1.648-2.63.14-.017.288-.014.29-.014.406-.015.696-.296.696-.675a.69.69 0 0 0-.69-.688m-13.182 4.127c0-.02.002-.04.003-.058a3.637 3.637 0 0 1 7.065.055H16.2zm8.473-.13c-.296-1.403-1.063-2.556-2.23-3.296a5.064 5.064 0 0 0-5.61.15 5.098 5.098 0 0 0-1.973 5.357 5.08 5.08 0 0 0 4.274 3.767c.608.074 1.2.04 1.81-.12a4.965 4.965 0 0 0 1.506-.644c.487-.313.894-.727 1.29-1.222.006-.01.014-.017.022-.027.274-.34.223-.826-.077-1.056-.254-.195-.68-.274-1.014.156-.072.104-.153.21-.24.315-.267.295-.598.58-.994.802-.506.27-1.08.423-1.69.427-1.998-.023-3.066-1.42-3.447-2.416a3.716 3.716 0 0 1-.153-.58l-.01-.105h7.17c.982-.022 1.51-.717 1.364-1.51z"/></svg>}>
    Supported Request Parameters:

    <ResponseField name="file" type="File" required />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml POST /accounting/journalEntries/{journalEntryId}/Attachments
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/journalEntries/{journalEntryId}/Attachments:
    post:
      tags:
        - accounting
      operationId: create JournalEntry Attachment
      parameters:
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
        - name: journalEntryId
          required: true
          in: path
          schema:
            type: string
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
            example: example value
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
            example: example value
          required: true
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateAttachmentRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/DocumentResponseDto'
components:
  schemas:
    CreateAttachmentRequestDto:
      type: object
      properties:
        file:
          type: string
          format: binary
      required:
        - file
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    DocumentResponseDto:
      type: object
      properties:
        id:
          type: string
          example: document id
        base64Encoded:
          type: boolean
          example: true
        content:
          type: string
          example: content
        contentType:
          type: string
          example: application/pdf
        fileName:
          type: string
          example: invoice.pdf
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````