Customer Tax
The customer tax resource.
Basehttps://rest.carbon.ms/customerTax
GET
/customerTaxList customer taxs
Retrieve a paginated list of customer taxs. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows 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
/customerTaxRetrieve a customer tax
Fetch a single customer tax by filtering on `customerId`.
Query parameters
customerIdstringMatch 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
/customerTaxCreate a customer tax
Create a new customer tax.
Body parameters
taxIdstringvatNumberstringeoristringtaxExemptbooleanrequiredtaxExemptionReasontaxExemptionReasontaxExemptionCertificateNumberstringtaxExemptionCertificatePathstringcompanyIdstringrequiredReferences 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
/customerTaxUpdate a customer tax
Update an existing customer tax, matched on `customerId`.
Body parameters
taxIdstringvatNumberstringeoristringtaxExemptbooleanrequiredtaxExemptionReasontaxExemptionReasontaxExemptionCertificateNumberstringtaxExemptionCertificatePathstringcompanyIdstringrequiredReferences 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
/customerTaxDelete a customer tax
Delete a customer tax, matched on `customerId`. Returns 204 No Content.
Query parameters
customerIdstringThe `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