Supplier Tax

The supplier tax resource.

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

List supplier taxs

Retrieve a paginated list of supplier 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/supplierTax
curl --request GET \
  --url 'https://rest.carbon.ms/supplierTax?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "supplierId": "xyz789",
    "taxExempt": true,
    "companyId": "xyz789",
    "taxId": "xyz789",
    "vatNumber": "string",
    "eori": "string",
    "taxExemptionReason": "string",
    "taxExemptionCertificateNumber": "string"
  }
]
GET/supplierTax

Retrieve a supplier tax

Fetch a single supplier tax by filtering on `supplierId`.

Query parameters

supplierIdstring

Match on the supplier tax's `supplierId`, e.g. `eq.{id}`.

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

Create a supplier tax

Create a new supplier tax.

Body parameters

taxIdstring
vatNumberstring
eoristring
taxExemptbooleanrequired
taxExemptionReasontaxExemptionReason
taxExemptionCertificateNumberstring
taxExemptionCertificatePathstring
companyIdstringrequired

References company.id

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

Update a supplier tax

Update an existing supplier tax, matched on `supplierId`.

Body parameters

taxIdstring
vatNumberstring
eoristring
taxExemptbooleanrequired
taxExemptionReasontaxExemptionReason
taxExemptionCertificateNumberstring
taxExemptionCertificatePathstring
companyIdstringrequired

References company.id

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

Delete a supplier tax

Delete a supplier tax, matched on `supplierId`. Returns 204 No Content.

Query parameters

supplierIdstring

The `supplierId` of the supplier tax to delete, e.g. `eq.{id}`.

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