Posting specific tax profiles
Endpoints: POST /admin/tax_profiles
Purpose
The POST /admin/tax_profiles
API is used to create a new tax profile in the system. This allows administrators to define and store specific tax configurations that can be applied to products and categories. It ensures that tax-related information is accurately maintained and available for use across the platform.
Path Parameters
No path parameters for this endpoint.
Query Parameters
This endpoint does not have any query parameters.
Use Case
Administrators use this endpoint when they need to add a new tax profile for different tax scenarios. For example, when a new tax regulation is introduced or a region-specific tax policy needs to be applied, this endpoint enables the creation of those profiles. This is crucial for maintaining compliance and ensuring accurate tax calculations for transactions.
Request Body
The request payload requires a name
for the tax profile and optionally allows a description and a flag to set it as the default tax profile. If the id
field is not provided, it will be automatically generated by the system.
{
"tax_profile": {
"id": "TAX_PROFILE_ID",
"name": "TAX_PROFILE_NAME",
"description": "TAX_PROFILE_DESCRIPTION",
"default": IS_DEFAULT
}
}
Response
The response includes the newly created tax profile’s details, including the generated or provided ID, name, description, default status, and timestamps for creation and last update.
{
"tax_profile": {
"id": TAX_PROFILE_ID,
"name": "TAX_PROFILE_NAME",
"description": "TAX_PROFILE_DESCRIPTION",
"default": IS_DEFAULT,
"created_at": "CREATED_TIMESTAMP",
"updated_at": "UPDATED_TIMESTAMP"
}
}