Create a manual tax calculator

How to create a manual tax calculator via API

To create a new manual tax calculator, send a POST request to the /api/manual_tax_calculators endpoint, passing the resource arguments in the request body.

Request

POST https://yourdomain.commercelayer.io/api/manual_tax_calculators

Arguments

Body ParameterTypeRequired

type

string

Required

attributes.name

string

Required

attributes.reference

string

Optional

attributes.reference_origin

string

Optional

attributes.metadata

object

Optional

relationships.tax_rules

array

Optional

Example

The following request creates a new manual tax calculator:

curl -g -X POST \
  'https://yourdomain.commercelayer.io/api/manual_tax_calculators' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{
  "data": {
    "type": "manual_tax_calculators",
    "attributes": {
      "name": "Personal tax calculator"
    }
  }
}'

Last updated