GET /V1/taxRules/{ruleId}

Get TaxRule

Path parameters

  • ruleId integer Required

Responses

  • 200 Success.

    Hide response attributes Show response attributes object
    • id integer

      Id

    • code string Required

      Tax rule code

    • priority integer Required

      Priority

    • position integer Required

      Sort order.

    • customer_tax_class_ids array[integer] Required

      Customer tax class id

    • product_tax_class_ids array[integer] Required

      Product tax class id

    • tax_rate_ids array[integer] Required

      Tax rate ids

    • calculate_subtotal boolean

      Calculate subtotal.

    • extension_attributes object

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

    Hide response attributes Show response attributes object
    • id integer

      Id

    • code string Required

      Tax rule code

    • priority integer Required

      Priority

    • position integer Required

      Sort order.

    • customer_tax_class_ids array[integer] Required

      Customer tax class id

    • product_tax_class_ids array[integer] Required

      Product tax class id

    • tax_rate_ids array[integer] Required

      Tax rate ids

    • calculate_subtotal boolean

      Calculate subtotal.

    • extension_attributes object

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

  • 401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • 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 list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

GET /V1/taxRules/{ruleId}
curl \
 --request GET 'https://magento2.winkelstraat.mac/rest/all/V1/taxRules/{ruleId}'
Response examples (200)
{
  "id": 42,
  "code": "string",
  "priority": 42,
  "position": 42,
  "customer_tax_class_ids": [
    42
  ],
  "product_tax_class_ids": [
    42
  ],
  "tax_rate_ids": [
    42
  ],
  "calculate_subtotal": true,
  "extension_attributes": {}
}
Response examples (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id type="integer">42</id>
  <code>string</code>
  <priority type="integer">42</priority>
  <position type="integer">42</position>
  <customer-tax-class-ids type="array">
    <customer-tax-class-id type="integer">42</customer-tax-class-id>
  </customer-tax-class-ids>
  <product-tax-class-ids type="array">
    <product-tax-class-id type="integer">42</product-tax-class-id>
  </product-tax-class-ids>
  <tax-rate-ids type="array">
    <tax-rate-id type="integer">42</tax-rate-id>
  </tax-rate-ids>
  <calculate-subtotal type="boolean">true</calculate-subtotal>
  <extension-attributes>
  </extension-attributes>
</root>
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 (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
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"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>