Lists address types. Without limit every match comes back.
Address Types
The kinds of address a person can hold, such as billing and shipping.
List address types#
GET
/cdna-api/users/person-address-types
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- PersonAddressType, in the Reference
Parameters
propertiesquery- selector
- The fields and relations to return, such as
{id,name}. filtersquery- name=value
- Any stored field, or a relation with a dot, such as
parent.id=12. Prefix the name with!,>,<,%or|. Use stored field names exactly as in the model, and comparetotalCountwith the unfiltered list's to confirm a filter applied. orderByquery- string
field:ASCorfield:DESC, comma-separated. Stored fields only.limitquery- integer
- Records per response. There is no default.
offsetquery- integer
- Records to skip.
Example
List address types
GET /cdna-api/users/person-address-types?limit=2&properties={id,name} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response
200 OK
{
"result": "success",
"totalCount": 3,
"data": [
{
"id": 1,
"name": "Billing address"
},
{
"id": 2,
"name": "Shipping address"
}
]
}
Open in Postman docs Real response from this documentation site
Create an address type#
POST
/cdna-api/users/person-address-type
Creates an address type.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Returns
- The new address type under
data.personAddressType, and amessage.
Parameters
typebody- string
- What the address is for:
billing,shippingorother. namebody- string
- The name editors and members see.
Example
Create an address type
POST /cdna-api/users/person-address-type HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"type": "other",
"name": "Work Address"
}Edit an address type#
PUT
/cdna-api/users/person-address-type/{id}
Changes an address type. Fields left out keep their values.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Returns
- The saved address type under
data.personAddressType, and amessage.
Parameters
idpathrequired- integer
- The address type id.
namebody- string
- The name editors and members see.
Example
Edit an address type
PUT /cdna-api/users/person-address-type/4 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"name": "Business address"
}Show an address type#
GET
/cdna-api/users/person-address-type/{id}
Reads one address type by its id.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- PersonAddressType, in the Reference
Parameters
idpathrequired- integer
- The address type id.
propertiesquery- selector
- The fields and relations to return, such as
{id,name}.
Example
Show an address type
GET /cdna-api/users/person-address-type/1?properties={id,name} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response
200 OK
{
"result": "success",
"data": {
"id": 1,
"name": "Billing address"
}
}
Open in Postman docs Real response from this documentation site
Delete an address type#
DELETE
/cdna-api/users/person-address-type/{id}
Deletes an address type.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The address type id.
Example
Delete an address type
DELETE /cdna-api/users/person-address-type/4 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json