Address

The address resource.

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

List addresss

Retrieve a paginated list of addresss. 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/address
curl --request GET \
  --url 'https://rest.carbon.ms/address?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "addressLine1": "string",
    "addressLine2": "string",
    "city": "string",
    "stateProvince": "string",
    "postalCode": "string",
    "countryCode": "string"
  }
]
GET/address

Retrieve a address

Fetch a single address by filtering on `id`.

Query parameters

idstring

Match on the address's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/address
curl --request GET \
  --url 'https://rest.carbon.ms/address?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "addressLine1": "string",
  "addressLine2": "string",
  "city": "string",
  "stateProvince": "string",
  "postalCode": "string",
  "countryCode": "string"
}
POST/address

Create a address

Create a new address.

Body parameters

addressLine1string
addressLine2string
citystring
stateProvincestring
postalCodestring
countryCodestring

References country.alpha2

phonestring
faxstring
companyIdstringrequired

References company.id

POSThttps://rest.carbon.ms/address
curl --request POST \
  --url https://rest.carbon.ms/address \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "addressLine1": "string",
  "addressLine2": "string",
  "city": "string",
  "stateProvince": "string",
  "postalCode": "string",
  "countryCode": "string"
}
PATCH/address

Update a address

Update an existing address, matched on `id`.

Body parameters

addressLine1string
addressLine2string
citystring
stateProvincestring
postalCodestring
countryCodestring

References country.alpha2

phonestring
faxstring
companyIdstringrequired

References company.id

PATCHhttps://rest.carbon.ms/address
curl --request PATCH \
  --url 'https://rest.carbon.ms/address?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"addressLine1":"string"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "addressLine1": "string",
  "addressLine2": "string",
  "city": "string",
  "stateProvince": "string",
  "postalCode": "string",
  "countryCode": "string"
}
DELETE/address

Delete a address

Delete a address, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the address to delete, e.g. `eq.{id}`.

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