API Reference

Address Types

The kinds of address a person can hold, such as billing and shipping.

Address Types in Postman

List address types#

GET /cdna-api/users/person-address-types

Lists address types. Without limit every match comes back.

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 compare totalCount with the unfiltered list's to confirm a filter applied.
orderByquery
string
field:ASC or field: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 a message.

Parameters

typebody
string
What the address is for: billing, shipping or other.
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 a message.

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