Addresses

Retrieving a customer's addresses

get

Retrieves a list of addresses for a specified customer.


Required scopes

  • customer.customer_read

Authorizations
Path parameters
customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Responses
200
OK
application/json
get
GET /customer/{tenant}/customers/{customerNumber}/addresses HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "contactName": "John Doe",
    "companyName": "Emporix",
    "street": "Platz der Republik",
    "streetNumber": "1",
    "streetAppendix": "",
    "extraLine1": "",
    "extraLine2": "",
    "extraLine3": "",
    "extraLine4": "",
    "zipCode": "11011",
    "city": "Berlin",
    "country": "DE",
    "state": "Berlin",
    "contactPhone": "123456789",
    "tags": [
      "BILLING",
      "SHIPPING"
    ],
    "id": "b05c20e034",
    "isDefault": true
  }
]

Adding a customer address

post

Adds an address to a specified customer's profile.


Required scopes

  • customer.customer_manage

Authorizations
Path parameters
customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Body
idstringOptional

Custom customer's address identifier. If not provided, it is automatically generated.

contactNamestringRequired
companyNamestringOptional
streetstringOptional
streetNumberstringOptional
streetAppendixstringOptional
extraLine1stringOptional
extraLine2stringOptional
extraLine3stringOptional
extraLine4stringOptional
zipCodestringOptional
citystringOptional
countrystring · min: 2 · max: 2Optional
statestringOptional
contactPhonestringOptional
isDefaultbooleanOptional

Flag indicating whether the address is the customer's default address.

Default: false
tagsstring[]Optional
Responses
201
Created
application/json
post
POST /customer/{tenant}/customers/{customerNumber}/addresses HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 323

{
  "contactName": "John Doe",
  "companyName": "Emporix",
  "street": "Platz der Republik",
  "streetNumber": "1",
  "streetAppendix": "",
  "extraLine1": "",
  "extraLine2": "",
  "extraLine3": "",
  "extraLine4": "",
  "zipCode": "11011",
  "city": "Berlin",
  "country": "DE",
  "state": "Berlin",
  "contactPhone": "123456789",
  "tags": [
    "BILLING",
    "SHIPPING"
  ],
  "isDefault": true
}
{
  "id": "e6eae2c789"
}

Retrieving a customer address

get

Retrieves a specified customer address and its details.


Required scopes

  • customer.customer_read

Authorizations
Path parameters
addressIdstringRequired

Address' unique identifier generated when the address is added to a customer's profile.

customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Responses
200
OK
application/json
get
GET /customer/{tenant}/customers/{customerNumber}/addresses/{addressId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "contactName": "John Doe",
  "companyName": "Emporix",
  "street": "Platz der Republik",
  "streetNumber": "1",
  "streetAppendix": "",
  "extraLine1": "",
  "extraLine2": "",
  "extraLine3": "",
  "extraLine4": "",
  "zipCode": "11011",
  "city": "Berlin",
  "country": "DE",
  "state": "Berlin",
  "contactPhone": "123456789",
  "tags": [
    "BILLING",
    "SHIPPING"
  ],
  "id": "b05c20e034",
  "isDefault": true
}

Upserting a customer address

put

Updates a specified customer's address or creates a new one if it doesn't exist yet.


Required scopes

  • customer.customer_manage

Authorizations
Path parameters
addressIdstringRequired

Address' unique identifier generated when the address is added to a customer's profile.

customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Body
all ofOptional
Responses
201
Created
application/json
put
PUT /customer/{tenant}/customers/{customerNumber}/addresses/{addressId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 323

{
  "contactName": "John Doe",
  "companyName": "Emporix",
  "street": "Platz der Republik",
  "streetNumber": "1",
  "streetAppendix": "",
  "extraLine1": "",
  "extraLine2": "",
  "extraLine3": "",
  "extraLine4": "",
  "zipCode": "11011",
  "city": "Berlin",
  "country": "DE",
  "state": "Berlin",
  "contactPhone": "123456789",
  "tags": [
    "BILLING",
    "SHIPPING"
  ],
  "isDefault": true
}
{
  "id": "e6eae2c789"
}

Deleting a customer address

delete

Deletes a specified customer address.


Required scopes

  • customer.customer_manage

Authorizations
Path parameters
addressIdstringRequired

Address' unique identifier generated when the address is added to a customer's profile.

customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Responses
204
No Content
delete
DELETE /customer/{tenant}/customers/{customerNumber}/addresses/{addressId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Partially updating a customer address

patch

Updates a specified customer address.


Required scopes

  • customer.customer_manage

Authorizations
Path parameters
addressIdstringRequired

Address' unique identifier generated when the address is added to a customer's profile.

customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Body
all ofOptional
Responses
200
OK
patch
PATCH /customer/{tenant}/customers/{customerNumber}/addresses/{addressId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 323

{
  "contactName": "John Doe",
  "companyName": "Emporix",
  "street": "Platz der Republik",
  "streetNumber": "1",
  "streetAppendix": "",
  "extraLine1": "",
  "extraLine2": "",
  "extraLine3": "",
  "extraLine4": "",
  "zipCode": "11011",
  "city": "Berlin",
  "country": "DE",
  "state": "Berlin",
  "contactPhone": "123456789",
  "tags": [
    "BILLING",
    "SHIPPING"
  ],
  "isDefault": true
}

No content

Adding tags to a customer address

post

Adds tags to a specified customer address.


Required scopes

  • customer.customer_manage

Authorizations
Path parameters
addressIdstringRequired

Address' unique identifier generated when the address is added to a customer's profile.

customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Query parameters
tagsstringRequired

List of address tags, separated by commas.

Example: BILLING,SHIPPING
Responses
204
No Content
post
POST /customer/{tenant}/customers/{customerNumber}/addresses/{addressId}/tags HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Deleting tags from a customer address

delete

Deletes tags from a specified customer address.


Required scopes

  • customer.customer_manage

Authorizations
Path parameters
addressIdstringRequired

Address' unique identifier generated when the address is added to a customer's profile.

customerNumberstringRequired

Customer's unique identifier generated when the customer's profile is created.

tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Query parameters
tagsstringRequired

List of address tags, separated by commas.

Example: BILLING,SHIPPING
Responses
204
No Content
delete
DELETE /customer/{tenant}/customers/{customerNumber}/addresses/{addressId}/tags HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Was this helpful?