Create

POST /V1/taxRates

Create or update tax rate

Body

  • taxRate object Required

    Tax rate interface.

    Hide taxRate attributes Show taxRate attributes object
    • id integer

      Id

    • tax_country_id string Required

      Country id

    • tax_region_id integer

      Region id

    • region_name string

      Region name

    • tax_postcode string

      Postcode

    • zip_is_range integer

      Zip is range

    • zip_from integer

      Zip range from

    • zip_to integer

      Zip range to

    • rate number Required

      Tax rate in percentage

    • code string Required

      Tax rate code

    • titles array[object]

      Tax rate title interface.

      Tax rate title interface.

      Hide titles attributes Show titles attributes object
      • store_id string Required

        Store id

      • value string Required

        Title value

      • extension_attributes object

        ExtensionInterface class for @see \Magento\Tax\Api\Data\TaxRateTitleInterface

    • extension_attributes object

      ExtensionInterface class for @see \Magento\Tax\Api\Data\TaxRateInterface

Responses

  • 200

    200 Success.

    Hide response attributes Show response attributes object
    • id integer

      Id

    • tax_country_id string Required

      Country id

    • tax_region_id integer

      Region id

    • region_name string

      Region name

    • tax_postcode string

      Postcode

    • zip_is_range integer

      Zip is range

    • zip_from integer

      Zip range from

    • zip_to integer

      Zip range to

    • rate number Required

      Tax rate in percentage

    • code string Required

      Tax rate code

    • titles array[object]

      Tax rate title interface.

      Tax rate title interface.

      Hide titles attributes Show titles attributes object
      • store_id string Required

        Store id

      • value string Required

        Title value

      • extension_attributes object

        ExtensionInterface class for @see \Magento\Tax\Api\Data\TaxRateTitleInterface

    • extension_attributes object

      ExtensionInterface class for @see \Magento\Tax\Api\Data\TaxRateInterface

  • 401

    401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • 400

    400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • 500

    Internal Server error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • default

    Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

POST /V1/taxRates
curl \
 --request POST 'https://magento2.winkelstraat.mac/rest/all/V1/taxRates' \
 --data '{"taxRate":{"id":42,"tax_country_id":"string","tax_region_id":42,"region_name":"string","tax_postcode":"string","zip_is_range":42,"zip_from":42,"zip_to":42,"rate":42.0,"code":"string","titles":[{"store_id":"string","value":"string","extension_attributes":{}}],"extension_attributes":{}}}'
Request examples
{
  "taxRate": {
    "id": 42,
    "tax_country_id": "string",
    "tax_region_id": 42,
    "region_name": "string",
    "tax_postcode": "string",
    "zip_is_range": 42,
    "zip_from": 42,
    "zip_to": 42,
    "rate": 42.0,
    "code": "string",
    "titles": [
      {
        "store_id": "string",
        "value": "string",
        "extension_attributes": {}
      }
    ],
    "extension_attributes": {}
  }
}
Response examples (200)
{
  "id": 42,
  "tax_country_id": "string",
  "tax_region_id": 42,
  "region_name": "string",
  "tax_postcode": "string",
  "zip_is_range": 42,
  "zip_from": 42,
  "zip_to": 42,
  "rate": 42.0,
  "code": "string",
  "titles": [
    {
      "store_id": "string",
      "value": "string",
      "extension_attributes": {}
    }
  ],
  "extension_attributes": {}
}
Response examples (401)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (500)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}