Address
The address resource.
Basehttps://rest.carbon.ms/address
GET
/addressList addresss
Retrieve a paginated list of addresss. 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/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
/addressRetrieve a address
Fetch a single address by filtering on `id`.
Query parameters
idstringMatch 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
/addressCreate a address
Create a new address.
Body parameters
addressLine1stringaddressLine2stringcitystringstateProvincestringpostalCodestringcountryCodestringReferences country.alpha2
phonestringfaxstringcompanyIdstringrequiredReferences 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
/addressUpdate a address
Update an existing address, matched on `id`.
Body parameters
addressLine1stringaddressLine2stringcitystringstateProvincestringpostalCodestringcountryCodestringReferences country.alpha2
phonestringfaxstringcompanyIdstringrequiredReferences 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
/addressDelete a address
Delete a address, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `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