- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createTaxRatesWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createTaxRatesWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates one or more tax rates. It's used by the Create Tax Rates Admin API Route.
You can use this workflow within your own customizations or custom workflows, allowing you to create tax rates in your custom flows.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
CreateTaxRatesWorkflowInput
CreateTaxRatesWorkflowInputThe tax rates to create.
CreateTaxRatesWorkflowInput
CreateTaxRatesWorkflowInputtax_region_id
stringThe associated tax region's ID.
tax_region_id
stringname
stringThe name of the tax rate.
name
stringrate
null | numberOptionalThe rate to charge.
rate
null | numberOptionalcode
null | stringOptionalThe code of the tax rate.
code
null | stringOptionalThe rules of the tax rate.
is_default
booleanOptionalWhether the tax rate is default.
is_default
booleanOptionalcreated_by
stringOptionalWho created the tax rate. For example, the ID of the user
that created the tax rate.
created_by
stringOptionalHolds custom data in key-value pairs.
Output#
CreateTaxRatesWorkflowOutput
CreateTaxRatesWorkflowOutputThe created tax rates.
CreateTaxRatesWorkflowOutput
CreateTaxRatesWorkflowOutputid
stringThe ID of the tax rate.
id
stringrate
null | numberThe rate to charge.
rate
null | numbercode
null | stringThe code the tax rate is identified by.
code
null | stringname
stringThe name of the Tax Rate.
name
stringmetadata
null | Record<string, unknown>Holds custom data in key-value pairs.
metadata
null | Record<string, unknown>tax_region_id
stringThe ID of the associated tax region.
tax_region_id
stringis_combinable
booleanWhether the tax rate should be combined with parent rates.
Learn more here.
is_combinable
booleanis_default
booleanWhether the tax rate is the default rate for the region.
is_default
booleancreated_at
string | DateThe creation date of the tax rate.
created_at
string | Dateupdated_at
string | DateThe update date of the tax rate.
updated_at
string | Datedeleted_at
null | DateThe deletion date of the tax rate.
deleted_at
null | Datecreated_by
null | stringWho created the tax rate. For example, the ID of the user that created the tax rate.
created_by
null | stringWas this page helpful?