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

# Create tax rate

> Create a custom rate or a code mapping for a default rate.



## OpenAPI

````yaml post /v1/taxes/rates
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/taxes/rates:
    post:
      tags:
        - Taxes
      summary: Create tax rate
      description: Create a custom rate or a code mapping for a default rate.
      operationId: createTaxRate
      requestBody:
        description: Tax rate creation payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaxRate'
      responses:
        '201':
          description: Tax rate created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxRate'
        '400':
          description: Invalid tax rate mapping.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    CreateTaxRate:
      oneOf:
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Tax rate code identifier.
              example: STAND_VAT
            invoicing_entity_id:
              type: string
              description: ID of the invoicing entity to which the tax rate is attached.
              example: ive_jerrb484RHn
            type:
              type: string
              enum:
                - custom
              description: Tax rate mapping type.
              example: custom
            name:
              type: string
              minLength: 1
              description: Name of the tax rate.
              example: VAT
            description:
              type:
                - string
                - 'null'
              description: Internal description of the tax rate.
              example: Standard VAT
            country:
              type:
                - string
                - 'null'
              enum:
                - AD
                - AE
                - AF
                - AG
                - AI
                - AL
                - AM
                - AO
                - AQ
                - AR
                - AS
                - AT
                - AU
                - AW
                - AX
                - AZ
                - BA
                - BB
                - BD
                - BE
                - BG
                - BH
                - BI
                - BJ
                - BL
                - BM
                - BN
                - BO
                - BQ
                - BR
                - BS
                - BT
                - BF
                - 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
                - IC
                - 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
                - PS
                - PT
                - PT-20
                - PT-30
                - 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
                - XK
                - YE
                - YT
                - ZA
                - ZM
                - ZW
              description: >-
                Optional country or tax territory required when matching a
                manual rate.
              example: FR
            rate:
              type: number
              minimum: 0
              maximum: 100
              description: The percentage rate of the tax.
              example: 20
          required:
            - code
            - invoicing_entity_id
            - type
            - name
            - rate
          additionalProperties: false
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Tax rate code identifier.
              example: STAND_VAT
            invoicing_entity_id:
              type: string
              description: ID of the invoicing entity to which the tax rate is attached.
              example: ive_jerrb484RHn
            type:
              type: string
              enum:
                - default
              description: Tax rate mapping type.
              example: default
            country:
              anyOf:
                - type: string
                  enum:
                    - AD
                    - AE
                    - AF
                    - AG
                    - AI
                    - AL
                    - AM
                    - AO
                    - AQ
                    - AR
                    - AS
                    - AT
                    - AU
                    - AW
                    - AX
                    - AZ
                    - BA
                    - BB
                    - BD
                    - BE
                    - BG
                    - BH
                    - BI
                    - BJ
                    - BL
                    - BM
                    - BN
                    - BO
                    - BQ
                    - BR
                    - BS
                    - BT
                    - BF
                    - 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
                    - IC
                    - 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
                    - PS
                    - PT
                    - PT-20
                    - PT-30
                    - 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
                    - XK
                    - YE
                    - YT
                    - ZA
                    - ZM
                    - ZW
                  description: >-
                    Two-letter country code in ISO format. See [ISO 3166-1
                    alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  example: FR
                - type: string
                  enum:
                    - IC
                    - OTHER
              description: Country or tax territory to which the default rate applies.
              example: FR
            rate_class:
              type: string
              enum:
                - standard_rate
                - reduced_rate
                - reduced_rate_alt
                - super_reduced_rate
                - parking_rate
                - exempt
                - reverse_charge
              description: Class of the default tax rate.
              example: standard_rate
          required:
            - code
            - invoicing_entity_id
            - type
            - country
            - rate_class
          additionalProperties: false
    TaxRate:
      oneOf:
        - type: object
          properties:
            id:
              type: string
              description: Tax rate ID.
              example: taxr_YfiSnLIYORD9VN
            code:
              type: string
              description: Tax rate code identifier.
              example: STAND_VAT
            invoicing_entity_id:
              type: string
              description: ID of the invoicing entity to which the tax rate is attached.
              example: ive_jerrb484RHn
            created_at:
              type: string
              format: date-time
              description: >-
                Tax rate creation date. UTC date time string in the [ISO
                8601](https://en.wikipedia.org/wiki/ISO_8601) format.
              example: '2024-06-03T12:32:22Z'
            updated_at:
              type: string
              format: date-time
              description: >-
                Tax rate last edition date. UTC date time string in the [ISO
                8601](https://en.wikipedia.org/wiki/ISO_8601) format.
              example: '2024-06-07T18:13:25Z'
            type:
              type: string
              enum:
                - custom
              description: Tax rate mapping type.
              example: custom
            name:
              type: string
              description: Name of the tax rate.
              example: VAT
            description:
              type:
                - string
                - 'null'
              description: Internal description of the tax rate.
              example: Standard VAT
            country:
              type:
                - string
                - 'null'
              enum:
                - AD
                - AE
                - AF
                - AG
                - AI
                - AL
                - AM
                - AO
                - AQ
                - AR
                - AS
                - AT
                - AU
                - AW
                - AX
                - AZ
                - BA
                - BB
                - BD
                - BE
                - BG
                - BH
                - BI
                - BJ
                - BL
                - BM
                - BN
                - BO
                - BQ
                - BR
                - BS
                - BT
                - BF
                - 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
                - IC
                - 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
                - PS
                - PT
                - PT-20
                - PT-30
                - 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
                - XK
                - YE
                - YT
                - ZA
                - ZM
                - ZW
              description: >-
                Optional country or tax territory required when matching a
                manual rate.
              example: FR
            rate:
              type: number
              description: The percentage rate of the tax.
              example: 20
          required:
            - id
            - code
            - invoicing_entity_id
            - created_at
            - updated_at
            - type
            - name
            - description
            - country
            - rate
        - type: object
          properties:
            id:
              type: string
              description: Tax rate ID.
              example: taxr_YfiSnLIYORD9VN
            code:
              type: string
              description: Tax rate code identifier.
              example: STAND_VAT
            invoicing_entity_id:
              type: string
              description: ID of the invoicing entity to which the tax rate is attached.
              example: ive_jerrb484RHn
            created_at:
              type: string
              format: date-time
              description: >-
                Tax rate creation date. UTC date time string in the [ISO
                8601](https://en.wikipedia.org/wiki/ISO_8601) format.
              example: '2024-06-03T12:32:22Z'
            updated_at:
              type: string
              format: date-time
              description: >-
                Tax rate last edition date. UTC date time string in the [ISO
                8601](https://en.wikipedia.org/wiki/ISO_8601) format.
              example: '2024-06-07T18:13:25Z'
            type:
              type: string
              enum:
                - default
              description: Tax rate mapping type.
              example: default
            country:
              anyOf:
                - type: string
                  enum:
                    - AD
                    - AE
                    - AF
                    - AG
                    - AI
                    - AL
                    - AM
                    - AO
                    - AQ
                    - AR
                    - AS
                    - AT
                    - AU
                    - AW
                    - AX
                    - AZ
                    - BA
                    - BB
                    - BD
                    - BE
                    - BG
                    - BH
                    - BI
                    - BJ
                    - BL
                    - BM
                    - BN
                    - BO
                    - BQ
                    - BR
                    - BS
                    - BT
                    - BF
                    - 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
                    - IC
                    - 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
                    - PS
                    - PT
                    - PT-20
                    - PT-30
                    - 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
                    - XK
                    - YE
                    - YT
                    - ZA
                    - ZM
                    - ZW
                  description: >-
                    Two-letter country code in ISO format. See [ISO 3166-1
                    alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                  example: FR
                - type: string
                  enum:
                    - IC
                    - OTHER
              description: Country or tax territory to which the default rate applies.
              example: FR
            rate_class:
              type: string
              enum:
                - standard_rate
                - reduced_rate
                - reduced_rate_alt
                - super_reduced_rate
                - parking_rate
                - exempt
                - reverse_charge
              description: Class of the default tax rate.
              example: standard_rate
          required:
            - id
            - code
            - invoicing_entity_id
            - created_at
            - updated_at
            - type
            - country
            - rate_class
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````