> ## 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 bill

## Field support per integration

<AccordionGroup>
  <Accordion title="Exact Online" icon={<div dangerouslySetInnerHTML={{__html: `<svg width="24" height="24" viewBox="0 0 842 179" transform="translate(-7,-4)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="M.06.529h841.83V178.94H.06z"/></defs><g fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><path fill="#D9252A" mask="url(https://mintlify.s3.us-west-1.amazonaws.com/maesn/api-reference/accounting-endpoints/bills#b)" d="M112.97 58.348H0v33.794h128.574V58.348H112.97M111.616 116.693H0v33.794h16.958v-.001h94.658v.001h16.958v-33.794h-16.958M566.017 146.261h-50.69c-8.447 0-13.465-4.492-13.465-12.677 0-8.181 5.018-12.668 13.465-12.668h50.69v25.345zM542.521 29.045h-46.878v-.001h-20.734v33.791h20.734v-.001h44.761c20.032 0 25.448 7.694 25.603 25.346H513.74c-30.887 0-47.784 15.84-47.784 45.404 0 29.31 16.897 45.414 47.784 45.414h82.11l.032-.002h6.566v-92.13c0-39.079-14.785-57.821-59.927-57.821zM732.45 145.204h-42.503c-22.97 0-31.424-11.086-31.424-41.181 0-30.094 8.454-41.185 31.424-41.185h41.973l.065-.003h6.556V29.044h-52.293c-46.724 0-64.681 23.233-64.681 74.979 0 51.742 17.957 74.973 64.681 74.973h52.796v-33.791h-6.562l-.032-.001M269.888 145.205h-39.992c-19.092 0-27.963-6.758-30.417-23.753h59.03v.022h20.732v-6.021c.014-.2.026-.401.026-.609V94.253c0-.207-.012-.409-.026-.609v-5.961h-5.827a8.685 8.685 0 0 0-.747-.033h-73.324c2.254-17.607 11.101-24.815 30.553-24.815h60.194V29.044h-18.099v.003h-45.789c-46.733 0-64.677 23.228-64.677 74.973 0 51.741 17.944 74.979 64.677 74.979h57.819c.022 0 .043-.002.065-.003h6.535v-33.791h-20.733M835.286 145.205H805.98c-7.125 0-11.358-5.012-11.358-13.99v-68.38h44.091V29.047h-44.091V.529h-36.426v133.323c0 30.894 14.521 45.147 44.616 45.147h32.474l.066-.003h6.538v-33.791h-6.604M456.904 172.136l-53.323-70.381 49.893-65.848v-.001l5.199-6.862h-42.787l-3.597 4.749-.001.001-30.095 39.725-30.1-39.725-.001-.002-3.598-4.748h-44.367l55.879 73.758-57.729 76.197 14.575-.003h28.211l3.598-4.747.002-.002 32.737-43.209 32.738 43.209v.001l3.598 4.748h44.367l-5.199-6.86"/></g></svg>`,}}/>}>
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
      You can obtain this value by using the `GET Companies` endpoint available under the Authentication section.
    </Note>

    Supported Request Parameters:

    <ResponseField name="billDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="billNumber" type="string" />

    <ResponseField name="contactId" type="string" required />

    <ResponseField name="currency" type="enum">
      Available options (3-letter ISO 4217):
      `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYR`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EEK`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GQE`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZM`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`, `SRD`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VEB`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XDR`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMK`, `ZWR`
    </ResponseField>

    <ResponseField name="dueDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="fileId" type="string" />

    <ResponseField name="journalCode" type="string" required />

    <ResponseField name="lineItems" type="LineItem[]" required>
      <Expandable title="properties">
        <ResponseField name="id" type="string" required />

        <ResponseField name="accountId" type="string" required />

        <ResponseField name="deferredEndDate" type="string">
          Date to identify the start of the range for deferred costs. Use together with `deferredStartDate`.
        </ResponseField>

        <ResponseField name="deferredStartDate" type="string">
          Date to identify the start of the range for deferred costs. Use together with `deferredEndDate`.
        </ResponseField>

        <ResponseField name="description" type="string" />

        <ResponseField name="dimensions" type="Dimension[]" />

        <Expandable title="properties">
          <ResponseField name="name" type="string" required />

          <ResponseField name="categoryName" type="string" required />
        </Expandable>

        <ResponseField name="quantity" type="number">
          Note that quantity can be a decimal numeral.
        </ResponseField>

        <ResponseField name="taxCode" type="string" />

        <Note>
          If the `taxCode` is not provided, it will be set to the default tax code for the account.
        </Note>

        <ResponseField name="taxRatePercentage" type="number" />

        <ResponseField name="totalNetAmount" type="number">
          The total amount for the item excluding tax.
        </ResponseField>

        <Note>
          If the `taxCode` is provided and is of type INCLUSIVE, the `totalNetAmount` will be treated as a gross amount (i.e., including tax).
        </Note>
      </Expandable>
    </ResponseField>

    <ResponseField name="paymentReference " type="string" />

    <ResponseField name="paymentStatus" type="enum">
      Available options: `BAD_DEBT`, `PENDING`, `PAID`
    </ResponseField>

    <ResponseField name="paymentTermCode" type="string" />

    <ResponseField name="reference" type="string" />

    <ResponseField name="status" type="enum">
      Available options: `OPEN`, `PAID`, `OVERDUE`
    </ResponseField>
  </Accordion>

  <Accordion title="fortnox" icon={<svg width="24" height="24" transform="translate(-7,-4)" viewBox="0 0 942 942" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="942" height="942" fill="#023826"/><path d="M187.3 399.302H148.877C122.135 399.302 104 417.437 104 444.179V540.388C104 543.155 105.537 544.692 108.303 544.692H129.666C132.433 544.692 133.969 543.155 133.969 540.388V500.429H187.453C190.22 500.429 191.757 498.892 191.757 496.126V475.685C191.757 472.919 190.22 471.382 187.453 471.382H133.816V443.411C133.816 434.497 139.81 428.503 148.724 428.503H187.3C190.066 428.503 191.603 426.966 191.603 424.199V403.605C191.603 400.839 190.066 399.302 187.3 399.302Z" fill="white"/><path d="M260.916 424.971C225.568 424.971 200.209 451.713 200.209 485.985C200.209 520.258 225.721 547 260.916 547C296.111 547 321.623 520.258 321.623 485.985C321.623 451.713 296.265 424.971 260.916 424.971ZM260.916 518.26C242.781 518.26 229.41 504.735 229.41 485.985C229.41 467.235 242.627 453.711 260.916 453.711C279.205 453.711 292.423 467.235 292.423 485.985C292.423 504.735 279.205 518.26 260.916 518.26Z" fill="white"/><path d="M467.167 427.121H430.742V399.303C430.742 396.537 429.205 395 426.439 395H405.076C402.31 395 400.773 396.537 400.773 399.303V427.121H375.107C348.519 427.121 330.229 445.256 330.229 471.998V540.39C330.229 543.156 331.766 544.693 334.533 544.693H355.896C358.662 544.693 360.199 543.156 360.199 540.39V471.076C360.199 462.162 366.193 456.168 375.107 456.168H400.773V499.816C400.773 526.558 418.908 544.693 445.65 544.693H467.013C469.779 544.693 471.316 543.156 471.316 540.39V519.949C471.316 517.183 469.779 515.646 467.013 515.646H445.804C436.89 515.646 430.896 509.652 430.896 500.738V456.168H467.32C470.087 456.168 471.624 454.631 471.624 451.865V431.424C471.47 428.504 469.933 427.121 467.167 427.121Z" fill="white"/><path d="M533.558 424.971C501.283 424.971 480.074 445.719 480.074 477.379V540.545C480.074 543.311 481.611 544.848 484.377 544.848H505.74C508.506 544.848 510.043 543.311 510.043 540.545V477.379C510.043 463.086 519.418 453.864 533.558 454.018C547.697 453.864 557.072 462.932 557.072 477.379V540.545C557.072 543.311 558.609 544.848 561.376 544.848H582.738C585.505 544.848 587.042 543.311 587.042 540.545V477.379C587.042 445.719 565.833 424.971 533.558 424.971Z" fill="white"/><path d="M656.36 424.971C621.012 424.971 595.653 451.713 595.653 485.985C595.653 520.258 621.165 547 656.36 547C691.709 547 717.068 520.258 717.068 485.985C717.068 451.713 691.555 424.971 656.36 424.971ZM656.36 518.26C638.225 518.26 624.854 504.735 624.854 485.985C624.854 467.235 638.071 453.711 656.36 453.711C674.496 453.711 687.867 467.235 687.867 485.985C687.867 504.735 674.496 518.26 656.36 518.26Z" fill="white"/><path d="M797.753 485.675L835.561 447.867C837.559 445.87 837.559 443.872 835.561 441.874L820.653 426.966C818.655 424.968 816.657 424.968 814.659 426.966L776.852 464.773L739.044 426.966C737.046 424.968 735.048 424.968 733.05 426.966L718.142 441.874C716.144 443.872 716.144 445.87 718.142 447.867L755.95 485.675L717.835 523.483C715.837 525.481 715.837 527.478 717.835 529.476L732.743 544.384C734.741 546.382 736.739 546.382 738.737 544.384L776.544 506.577L814.352 544.384C816.35 546.382 818.348 546.382 820.346 544.384L835.253 529.476C837.251 527.478 837.251 525.481 835.253 523.483L797.753 485.675Z" fill="white"/></svg>}>
    Support rawData: `true`

    <br />

    <ResponseField name="billDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="billNumber" type="string" />

    <ResponseField name="contactId" type="string" required />

    <ResponseField name="currency" type="enum">
      Available options (3-letter ISO 4217):
      `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYR`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EEK`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GQE`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LTL`, `LVL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRO`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZM`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLL`, `SOS`, `SRD`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VEB`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XDR`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMK`, `ZWR`
    </ResponseField>

    <ResponseField name="dueDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="lineItems" type="BillLineItem[]">
      <Expandable title="properties">
        <Note>
          Fortnox may automatically generate an empty line item by default.
        </Note>

        <ResponseField name="accountId" type="string" />

        <ResponseField name="dimensions" type="Dimension[]">
          <Expandable title="properties">
            <ResponseField name="name" type="string" required />
          </Expandable>
        </ResponseField>

        <ResponseField name="itemId" type="string" />

        <ResponseField name="itemName" type="string" />

        <ResponseField name="quantity" type="number" />

        <ResponseField name="totalGrossAmount" type="number" />

        <ResponseField name="unitAmount" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="reference" type="string" />

    <ResponseField name="totalGrossAmount" type="number" />
  </Accordion>

  <Accordion title="Lexware Office" icon={<svg width="24" height="24" transform="translate(-7,-4)" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 476 476" enable-background="new 0 0 476 476" xml:space="preserve"> <path fill="#FFFFFF" opacity="1.000000" stroke="none" d=" M477.000000,189.000000 C477.000000,285.308167 477.000000,381.116333 477.000000,476.962250 C318.400177,476.962250 159.800308,476.962250 1.100232,476.962250 C1.100232,318.441864 1.100232,159.883652 1.100232,1.162721 C159.666534,1.162721 318.333252,1.162721 477.000000,1.162721 C477.000000,63.532967 477.000000,126.016479 477.000000,189.000000 M446.995667,21.494019 C432.466522,8.986734 415.185760,3.189814 396.446228,3.135990 C295.961365,2.847371 195.475250,2.979640 94.989624,3.042453 C87.891098,3.046890 80.777168,3.464551 73.697624,4.030548 C53.210831,5.668432 36.344028,14.396834 22.628456,29.766514 C9.308527,44.692833 3.199280,62.425301 3.139154,81.873207 C2.835702,180.024948 2.972577,278.178162 3.043210,376.330780 C3.049997,385.762329 3.313016,395.221771 4.069869,404.618896 C5.702843,424.894073 14.409182,441.637695 29.634809,455.248077 C44.828835,468.830139 62.862339,474.841370 82.692390,474.888306 C184.677277,475.129669 286.663025,475.014343 388.648468,474.958130 C393.747284,474.955292 398.849792,474.394135 403.943665,474.002869 C424.643127,472.412781 441.651276,463.655182 455.463043,448.128998 C468.627167,433.330902 474.791534,415.753876 474.852203,396.487854 C475.169250,295.836517 475.019653,195.183655 474.957428,94.531364 C474.953156,87.599487 474.517944,80.653847 473.973846,73.738945 C472.330414,52.852646 463.415985,35.624752 446.995667,21.494019 z"/> <path fill="#FF4554" opacity="1.000000" stroke="none" d=" M447.251953,21.749489 C463.415985,35.624752 472.330414,52.852646 473.973846,73.738945 C474.517944,80.653847 474.953156,87.599487 474.957428,94.531364 C475.019653,195.183655 475.169250,295.836517 474.852203,396.487854 C474.791534,415.753876 468.627167,433.330902 455.463043,448.128998 C441.651276,463.655182 424.643127,472.412781 403.943665,474.002869 C398.849792,474.394135 393.747284,474.955292 388.648468,474.958130 C286.663025,475.014343 184.677277,475.129669 82.692390,474.888306 C62.862339,474.841370 44.828835,468.830139 29.634809,455.248077 C14.409182,441.637695 5.702843,424.894073 4.069869,404.618896 C3.313016,395.221771 3.049997,385.762329 3.043210,376.330780 C2.972577,278.178162 2.835702,180.024948 3.139154,81.873207 C3.199280,62.425301 9.308527,44.692833 22.628456,29.766514 C36.344028,14.396834 53.210831,5.668432 73.697624,4.030548 C80.777168,3.464551 87.891098,3.046890 94.989624,3.042453 C195.475250,2.979640 295.961365,2.847371 396.446228,3.135990 C415.185760,3.189814 432.466522,8.986734 447.251953,21.749489 M245.830063,196.670471 C229.240814,176.236420 212.603531,155.840958 196.125214,135.317841 C194.140945,132.846481 192.173462,131.909119 189.025299,131.925995 C164.531158,132.057373 140.035980,131.998642 115.541115,131.998672 C114.312561,131.998672 113.084007,131.998657 110.948524,131.998657 C140.137726,168.006500 168.637009,203.163269 197.279678,238.496902 C168.580673,273.907013 140.030655,309.133270 110.960907,345.000824 C138.221222,345.000824 164.377075,345.057922 190.531189,344.872437 C192.276718,344.860077 194.487534,343.400391 195.675735,341.952362 C212.476944,321.476807 229.147781,300.894135 245.830566,280.321533 C257.047455,266.489288 268.233368,252.631958 279.667694,238.495834 C268.439850,224.630234 257.348236,210.932877 245.830063,196.670471 M321.500000,131.997894 C310.669128,131.997894 299.835327,132.140366 289.009125,131.915695 C285.521240,131.843307 283.174988,132.786209 280.975769,135.572678 C271.688568,147.339783 262.272736,159.009521 252.678162,170.526764 C250.478699,173.166977 250.711716,174.762390 252.776138,177.243301 C261.405884,187.614075 269.824463,198.160416 278.333435,208.631821 C282.506378,213.767136 286.707794,218.879288 291.182983,224.352509 C316.193787,193.499420 340.854492,163.078232 366.049530,131.997894 C350.801788,131.997894 336.650909,131.997894 321.500000,131.997894 M281.165253,341.494324 C282.854797,344.413147 285.376343,345.092468 288.683350,345.074127 C312.820404,344.940186 336.958496,345.006805 361.096283,344.989197 C362.464722,344.988190 363.833038,344.803009 365.791565,344.660614 C340.728668,313.754456 316.129791,283.420532 291.373047,252.891907 C290.647675,253.558655 290.119812,253.936844 289.724365,254.422806 C277.225006,269.783569 264.790314,285.197479 252.198013,300.481567 C250.158096,302.957520 251.066422,304.396515 252.713669,306.404053 C262.108368,317.853607 271.392456,329.393951 281.165253,341.494324 z"/> <path fill="#FFFEFE" opacity="1.000000" stroke="none" d=" M246.043335,196.953003 C257.348236,210.932877 268.439850,224.630234 279.667694,238.495834 C268.233368,252.631958 257.047455,266.489288 245.830566,280.321533 C229.147781,300.894135 212.476944,321.476807 195.675735,341.952362 C194.487534,343.400391 192.276718,344.860077 190.531189,344.872437 C164.377075,345.057922 138.221222,345.000824 110.960907,345.000824 C140.030655,309.133270 168.580673,273.907013 197.279678,238.496902 C168.637009,203.163269 140.137726,168.006500 110.948524,131.998657 C113.084007,131.998657 114.312561,131.998672 115.541115,131.998672 C140.035980,131.998642 164.531158,132.057373 189.025299,131.925995 C192.173462,131.909119 194.140945,132.846481 196.125214,135.317841 C212.603531,155.840958 229.240814,176.236420 246.043335,196.953003 z"/> <path fill="#FFFEFE" opacity="1.000000" stroke="none" d=" M322.000000,131.997894 C336.650909,131.997894 350.801788,131.997894 366.049530,131.997894 C340.854492,163.078232 316.193787,193.499420 291.182983,224.352509 C286.707794,218.879288 282.506378,213.767136 278.333435,208.631821 C269.824463,198.160416 261.405884,187.614075 252.776138,177.243301 C250.711716,174.762390 250.478699,173.166977 252.678162,170.526764 C262.272736,159.009521 271.688568,147.339783 280.975769,135.572678 C283.174988,132.786209 285.521240,131.843307 289.009125,131.915695 C299.835327,132.140366 310.669128,131.997894 322.000000,131.997894 z"/> <path fill="#FFFEFE" opacity="1.000000" stroke="none" d=" M280.939697,341.198853 C271.392456,329.393951 262.108368,317.853607 252.713669,306.404053 C251.066422,304.396515 250.158096,302.957520 252.198013,300.481567 C264.790314,285.197479 277.225006,269.783569 289.724365,254.422806 C290.119812,253.936844 290.647675,253.558655 291.373047,252.891907 C316.129791,283.420532 340.728668,313.754456 365.791565,344.660614 C363.833038,344.803009 362.464722,344.988190 361.096283,344.989197 C336.958496,345.006805 312.820404,344.940186 288.683350,345.074127 C285.376343,345.092468 282.854797,344.413147 280.939697,341.198853 z"/></svg>}>
    Supported Request Parameters:

    <ResponseField name="billDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z

      <Note>
        It is required when `status` is OPEN.
      </Note>
    </ResponseField>

    <ResponseField name="billNumber" type="string">
      <Note>
        It is required when `status` is OPEN.
      </Note>
    </ResponseField>

    <ResponseField name="contactId" type="string" required />

    <ResponseField name="dueDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="lineItems" type="BillLineItem[]">
      <Expandable title="properties">
        <ResponseField name="accountId" type="string" required />

        <ResponseField name="taxRatePercentage" type="number" required />

        <ResponseField name="totalGrossAmount" type="number" required>
          It is the line item total amount including tax.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="status" type="enum">
      Available options: `DRAFT`, `OPEN`

      <Note>
        If not provided, the default value is `DRAFT`.
      </Note>
    </ResponseField>

    <ResponseField name="totalGrossAmount" type="number">
      It is the sum of all line items `totalGrossAmount`.

      <Note>
        It is required when `status` is OPEN.
      </Note>
    </ResponseField>

    <ResponseField name="totalTaxAmount" type="number">
      <Note>
        It is required when `status` is OPEN.
      </Note>
    </ResponseField>
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml post /accounting/bills
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/bills:
    post:
      tags:
        - accounting
      operationId: createBill
      parameters:
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBillRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/BillResponseDto'
                        type: object
components:
  schemas:
    CreateBillRequestDto:
      type: object
      properties:
        accountId:
          type: string
          example: 6733a433-9662-4a40-8e36-e38ebda94fe1
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        billDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        billNumber:
          type: string
          example: '1020'
        contactId:
          type: string
          example: eaa28f49-6028-4b6e-bb12-d8f6278073fc
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        deliveryDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        dueDate:
          type: string
          example: '2021-07-01T00:00:00Z'
        fileId:
          type: string
          example: 93c6b8e0-80a4-4c22-a46c-18beebab82d6
        journalCode:
          type: string
          example: '30'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/CreateBillLineItem'
        name:
          type: string
          example: Office Supplies
        oneLineAddress:
          type: string
          example: Main street 45, Berlin
        paidDate:
          type: string
          example: '2021-01-25T00:00:00Z'
        paymentDays:
          type: number
          example: 30
        'paymentReference ':
          type: string
          example: Edefad142e764894
        paymentStatus:
          type: string
          example: PENDING
          enum:
            - NO_OPEN_ITEM
            - PENDING
            - PAID
            - PARTLY_PAID
            - CANCELED
            - PARTIAL_CANCELLATION
            - BAD_DEBT
            - DEBITED
            - CREDIT_NOTE_CLEARED
            - CLEARED_WITH_CREDIT_NOTE
            - UNKNOWN
        paymentTermCode:
          type: string
          example: '21'
        reference:
          type: string
          example: 026 / 245
        shippingDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        shippingType:
          type: string
          example: DELIVERY
          enum:
            - SERVICE
            - SERVICEPERIOD
            - DELIVERY
            - DELIVERYPERIOD
            - NONE
        status:
          type: string
          example: DRAFT
          enum:
            - DRAFT
            - CORRECTIVE
            - SUBMITTED
            - DOCUMENT_CREATED
            - OPEN
            - PARTIALLY_PAID
            - PAID
            - PARTIALLY_OVERDUE
            - OVERDUE
            - VOIDED
        taxRule:
          type: string
          example: NET
          enum:
            - NET
            - TAXFREE
            - INTRACOMMUNITY_GOODS
            - INTRACOMMUNITY_SERVICE
            - EXPORT_SERVICE
            - EXPORT_GOODS
            - REVERSE_CHARGE
            - GROSS
            - CONSTRUCTION_SERVICE
            - PHOTOVOLTAIC_EQUIPMENT
            - SMALL_BUSINESS_VAT_EXEMPTION
            - NON_DOMESTIC_SERVICE
            - OSS_GOODS
            - OSS_ELECTRONIC_SERVICES
            - OSS_SERVICES
        taxText:
          type: string
          example: Tax 19 percent
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    BillResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 9714f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        accountId:
          type: string
          example: 6733a433-9662-4a40-8e36-e38ebda94fe1
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        billDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        billNumber:
          type: string
          example: '1020'
        contactId:
          type: string
          example: eaa28f49-6028-4b6e-bb12-d8f6278073fc
        createdDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        deliveryDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        dueDate:
          type: string
          example: '2021-07-01T00:00:00Z'
        fileId:
          type: string
          example: 93c6b8e0-80a4-4c22-a46c-18beebab82d6
        journalCode:
          type: string
          example: '30'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/BillLineItem'
        name:
          type: string
          example: Office Supplies
        oneLineAddress:
          type: string
          example: Main street 45, Berlin
        paidDate:
          type: string
          example: '2021-01-25T00:00:00Z'
        paymentDays:
          type: number
          example: 30
        paymentReference:
          type: string
          example: Edefad142e764894
        paymentStatus:
          type: string
          example: PENDING
          enum:
            - NO_OPEN_ITEM
            - PENDING
            - PAID
            - PARTLY_PAID
            - CANCELED
            - PARTIAL_CANCELLATION
            - BAD_DEBT
            - DEBITED
            - CREDIT_NOTE_CLEARED
            - CLEARED_WITH_CREDIT_NOTE
            - UNKNOWN
        paymentTermCode:
          type: string
          example: '21'
        reference:
          type: string
          example: 026 / 245
        shippingDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        shippingType:
          type: string
          example: DELIVERY
          enum:
            - SERVICE
            - SERVICE_PERIOD
            - DELIVERY
            - DELIVERY_PERIOD
        status:
          type: string
          example: DRAFT
          enum:
            - DRAFT
            - CORRECTIVE
            - SUBMITTED
            - DOCUMENT_CREATED
            - OPEN
            - PARTIALLY_PAID
            - PAID
            - PARTIALLY_OVERDUE
            - OVERDUE
            - VOIDED
        taxRule:
          type: string
          example: NET
          enum:
            - NET
            - TAXFREE
            - INTRACOMMUNITY_GOODS
            - INTRACOMMUNITY_SERVICE
            - EXPORT_SERVICE
            - EXPORT_GOODS
            - REVERSE_CHARGE
            - GROSS
            - CONSTRUCTION_SERVICE
            - PHOTOVOLTAIC_EQUIPMENT
            - SMALL_BUSINESS_VAT_EXEMPTION
            - NON_DOMESTIC_SERVICE
            - OSS_GOODS
            - OSS_ELECTRONIC_SERVICES
            - OSS_SERVICES
        taxText:
          type: string
          example: Tax 19 percent
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
    Address:
      type: object
      properties:
        addressLine1:
          type: string
          example: Main street 45
        addressLine2:
          type: string
          example: 2nd floor
        city:
          type: string
          example: Berlin
        countryCode:
          type: string
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          example: DE
        postalCode:
          type: string
          example: '10243'
        type:
          type: string
          enum:
            - BILLING
            - DELIVERY
            - SELLING
          example: BILLING
    CreateBillLineItem:
      type: object
      properties:
        accountId:
          type: string
          example: 6733a433-9662-4a40-8e36-e38ebda94fe1
        accountNumber:
          type: string
          example: '200'
        deferredEndDate:
          type: string
          example: '2021-06-01T00:00:00Z'
        deferredStartDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        description:
          type: string
          example: SEOUL Guest Chair, red
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/LineItemDimension'
        itemId:
          type: string
          example: 4f3a2hf4-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        itemName:
          type: string
          example: RED CHAIR
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: '03'
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
        unitAmount:
          type: number
          example: 100
        unitDiscountAmount:
          type: number
          example: 10
        unitDiscountPercentage:
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    BillLineItem:
      type: object
      properties:
        id:
          type: string
          example: 987a2b3c-4d5e-6f7g-8h9i-0j1k2l3m4n5o
        accountId:
          type: string
          example: 6733a433-9662-4a40-8e36-e38ebda94fe1
        accountNumber:
          type: string
          example: '200'
        createdDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        deferredEndDate:
          type: string
          example: '2021-06-01T00:00:00Z'
        deferredStartDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        description:
          type: string
          example: SEOUL Guest Chair, red
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/LineItemDimension'
        itemId:
          type: string
          example: 4f3a2hf4-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        itemName:
          type: string
          example: RED CHAIR
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: '03'
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
        unitAmount:
          type: number
          example: 100
        unitDiscountAmount:
          type: number
          example: 10
        unitDiscountPercentage:
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
    LineItemDimension:
      type: object
      properties:
        name:
          type: string
          example: C1
        categoryName:
          type: string
          example: CostCenter
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````