Customer Tax

The customer tax resource.

Basehttps://rest.carbon.ms/customerTax
GET/customerTax

List customer taxs

Retrieve a paginated list of customer taxs. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/customerTax
curl --request GET \
  --url 'https://rest.carbon.ms/customerTax?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "customerId": "xyz789",
    "taxExempt": true,
    "companyId": "xyz789",
    "taxId": "xyz789",
    "vatNumber": "string",
    "eori": "string",
    "taxExemptionReason": "string",
    "taxExemptionCertificateNumber": "string"
  }
]
GET/customerTax

Retrieve a customer tax

Fetch a single customer tax by filtering on `customerId`.

Query parameters

customerIdstring

Match on the customer tax's `customerId`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/customerTax
curl --request GET \
  --url 'https://rest.carbon.ms/customerTax?customerId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "customerId": "xyz789",
  "taxExempt": true,
  "companyId": "xyz789",
  "taxId": "xyz789",
  "vatNumber": "string",
  "eori": "string",
  "taxExemptionReason": "string",
  "taxExemptionCertificateNumber": "string"
}
POST/customerTax

Create a customer tax

Create a new customer tax.

Body parameters

taxIdstring
vatNumberstring
eoristring
taxExemptbooleanrequired
taxExemptionReasontaxExemptionReason
taxExemptionCertificateNumberstring
taxExemptionCertificatePathstring
companyIdstringrequired

References company.id

POSThttps://rest.carbon.ms/customerTax
curl --request POST \
  --url https://rest.carbon.ms/customerTax \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"taxExempt":true,"companyId":"xyz789"}'
Response
{
  "customerId": "xyz789",
  "taxExempt": true,
  "companyId": "xyz789",
  "taxId": "xyz789",
  "vatNumber": "string",
  "eori": "string",
  "taxExemptionReason": "string",
  "taxExemptionCertificateNumber": "string"
}
PATCH/customerTax

Update a customer tax

Update an existing customer tax, matched on `customerId`.

Body parameters

taxIdstring
vatNumberstring
eoristring
taxExemptbooleanrequired
taxExemptionReasontaxExemptionReason
taxExemptionCertificateNumberstring
taxExemptionCertificatePathstring
companyIdstringrequired

References company.id

PATCHhttps://rest.carbon.ms/customerTax
curl --request PATCH \
  --url 'https://rest.carbon.ms/customerTax?customerId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"taxId":"xyz789"}'
Response
{
  "customerId": "xyz789",
  "taxExempt": true,
  "companyId": "xyz789",
  "taxId": "xyz789",
  "vatNumber": "string",
  "eori": "string",
  "taxExemptionReason": "string",
  "taxExemptionCertificateNumber": "string"
}
DELETE/customerTax

Delete a customer tax

Delete a customer tax, matched on `customerId`. Returns 204 No Content.

Query parameters

customerIdstring

The `customerId` of the customer tax to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/customerTax
curl --request DELETE \
  --url 'https://rest.carbon.ms/customerTax?customerId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content