Http Method | Resource | Description |
---|---|---|
GET | /Customer_lists/{List_id} | Action to read an existing customerlist. |
POST | /Customer_lists/{List_id}/Customers | Action to create a new customer. The customer is created
using the specified credentials and customer information.This
action verifies the following:
|
GET | /Customer_lists/{List_id}/Customers/{Customer_no} | Action to get customer information. |
PATCH | /Customer_lists/{List_id}/Customers/{Customer_no} | Updates the customer with the specified information. The customer number is allowed to be updated but will result in a CustomerNumberAlreadyInUseException if there is already another customer with the same customer number existing. |
DELETE | /Customer_lists/{List_id}/Customers/{Customer_no} | Deletes the customer including all related information like the customer addresses. |
GET | /Customer_lists/{List_id}/Customers/{Customer_no}/Addresses | Action that returns a pageable list of all customer addresses. The default page size is 10 customer addresses. |
POST | /Customer_lists/{List_id}/Customers/{Customer_no}/Addresses | The action creates a new customer address with the given address information. |
GET | /Customer_lists/{List_id}/Customers/{Customer_no}/Addresses/{Address_id} | Action which returns an address of a customer. |
PATCH | /Customer_lists/{List_id}/Customers/{Customer_no}/Addresses/{Address_id} | Action which updates an address of a customer with the given address information. |
DELETE | /Customer_lists/{List_id}/Customers/{Customer_no}/Addresses/{Address_id} | Action which deletes a customer address. |
Action to read an existing customerlist.
Url
GET https://hostname:port/dw/data/v16_1/customer_lists/{list_id}
Formats
json, xml
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
list_id | String | the id of the customerlist | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that there was no customerlist found for the customerlist id. |
Sample
REQUEST:
GET /s/-/dw/data/v16_1/customer_lists/SiteGenesis HTTP/1.1
Host: example.com
Authorization:Bearer ac734607-c966-44fb-8739-8ea413a2c0a5
Content-Type: application/json; charset=UTF-8
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
{
"_v" : "16.1",
"_type" : "customer_list",
"id" : "SiteGenesis"
}
# in case of failure (SecureCommunicationRequired, i.e. no http):
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "16.1",
"fault" :
{
"type" : "SecureCommunicationRequiredException",
"message" : "Secure communication required."
}
}
# in case of failure (CustomerListNotFound, i.e. invalid customerlist id):
RESPONSE:
HTTP/1.1 404 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "16.1",
"fault" :
{
"type" : "CustomerListNotFoundException",
"message" : "No customer list with id 'foobar' found."
}
}
Action to create a new customer. The customer is created using the specified credentials and customer information.This action verifies the following:
Url
POST https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers
Formats
json, xml
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
list_id | String | The customer list id | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidLoginException
|
Indicates the login does not match the login acceptance criteria. | |
400 |
InvalidEmailException
|
email (String) |
Indicates the email has an invalid syntax. |
400 |
LoginAlreadyInUseException
|
Indicates the login is already in use. | |
400 |
CredentialsMissingException
|
Indicates that the mandatory credentials are missing in the input document. | |
400 |
LoginMissingException
|
Indicates that the mandatory login property is missing in the input document. | |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
Customization
This Resource supports server-side customization.
Extension Point | Method Detail |
---|---|
dw.ocapi.data.customer_list.customers.afterPOST
|
afterPost (customer : Customer , create : Customer , customerListId : String ) : Status The function is called after the new customer was created.
|
dw.ocapi.data.customer_list.customers.beforePOST
|
beforePost (create : Customer , customerListId : String ) : Status The function is called before the customer is created with the given document.
|
Sample
REQUEST:
POST /s/-/dw/data/v16_1/customer_lists/4711/customers HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
"email":"[email protected]",
"birthday":"2011-05-06",
"fax":"",
"first_name":"",
"gender":1,
"job_title":"",
"last_name":"",
"phone_business":"",
"phone_home":"",
"phone_mobile":"",
"preferred_locale":"en-US",
"salutation":"",
"second_name":"",
"suffix":"",
"title":"",
"company_name":"",
"credentials":
{
"password_question" : "Mother's maiden name",
"login":"foo"
}
}
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
"_v":"16.1",
"_type":"customer",
"customer_no":"0815"
"email":"[email protected]",
"birthday":"2011-05-06",
"fax":"",
"first_name":"",
"gender":1,
"job_title":"",
"last_name":"",
"phone_business":"",
"phone_home":"",
"phone_mobile":"",
"preferred_locale":"en-US",
"salutation":"",
"second_name":"",
"suffix":"",
"title":"",
"company_name":"",
"credentials":
{
"password_question" : "Mother's maiden name",
"login":"foo"
}
}
# in case of validation failure:
RESPONSE:
HTTP/1.1 400 BAD REQUEST
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"fault",
"fault":{
"type":"InvalidPasswordException",
"message":"Password doesn't match acceptance criteria."
}
}
Action to get customer information.
Url
GET https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}
Formats
json, xml
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
Sample
REQUEST:
GET /s/-/dw/data/v16_1/customer_lists/4711/customers/0815 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
{
"_v" : "16.1",
"_type":"customer",
"birthday" : "1970-01-31",
"company_name" : "Salesforce",
"creation_date" : "2013-09-17T09:20:31.000Z",
"credentials" : {
"enabled" : true,
"locked" : false,
"password_question" : "Mother's maiden name",
"login" : "dude"
},
"customer_no" : "0815",
"email" : "[email protected]",
"fax" : "001-444-4444",
"first_name" : "",
"job_title" : "",
"last_name" : "",
"phone_business" : "001-222-2222",
"phone_home" : "001-111-1111",
"phone_mobile" : "001-333-3333",
"preferred_locale" : "de_DE",
"salutation" : "Mr.",
"second_name" : "second",
"suffix" : "suffix",
"title" : "Dr."
}
# in case of failure:
RESPONSE:
HTTP/1.1 400 BAD REQUEST
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"fault",
"fault":{
"type":"CustomerListCustomerNotFoundException",
"message":"No customer with number '0815' for customer list '4711' found."
}
}
Updates the customer with the specified information. The customer number is allowed to be updated but will result in a CustomerNumberAlreadyInUseException if there is already another customer with the same customer number existing.
Url
PATCH https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}
Formats
json, xml
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
Header Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
If-Match | String | The ETag header value contained in the server response |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidLoginException
|
Indicates the login does not match the login acceptance criteria. | |
400 |
InvalidEmailException
|
email (String) |
Indicates the email has an invalid syntax. |
400 |
LoginAlreadyInUseException
|
Indicates the login is already in use. | |
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
Customization
This Resource supports server-side customization.
Extension Point | Method Detail |
---|---|
dw.ocapi.data.customer_list.customer.afterPATCH
|
afterPatch (customer : Customer , update : Customer , customerListId : String ) : Status The function is called after the customer is updated with update document.
|
dw.ocapi.data.customer_list.customer.beforePATCH
|
beforePatch (customer : Customer , update : Customer , customerListId : String ) : Status The function is called before the customer is updated with update document.
|
Sample
REQUEST:
PATCH /s/-/dw/data/v16_1/customer_lists/4711/customers/0815 HTTP/1.1
Host: example.com
If-Match: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
Cookie: dwsid=pATvWUO3KSdt-Kmcy-8-RsxKnoO4BMDwoec7ACVlW6tZNnhaOL7gt7mHqL-h7QYn5TyE61z0DeSMCqxngsWeHw==;
dwsecuretoken_9727b83e8e864fa4b6902a37bc70a12d=5Kx5-2P7jj5WoxeTiWwHNBJ6QV39Io5SNA==
{
"_delete":["fax","phone_mobile"], // delete values of properties "fax" and "phone_mobile"
"birthday":"2011-05-06", // update "birthday"
"email":"[email protected]" // update "email"
}
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
ETag: t9ccde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73b8h6 // the last known base-point that is used for PATCH update requests
{
"_v":"16.1",
"_type":"customer",
"birthday":"2011-05-06",
"customer_number":"0815",
"email":"[email protected]",
"fax":"",
"first_name":"Dude",
"gender":"m",
"job_title":"",
"last_name":"Lebowski",
"phone_business":"",
"phone_home":"",
"phone_mobile":"",
"preferred_locale":"en-US",
"salutation":"",
"second_name":"",
"suffix":"",
"title":""
}
# in case of validation failure:
RESPONSE:
HTTP/1.1 400 BAD REQUEST
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
ETag: 860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
Content-Length: 47
{
"_v":"16.1",
"_type":"fault",
"fault":{
"type":"InvalidEmailException",
"message":"The syntax of the email address is invalid."
}
}
Deletes the customer including all related information like the customer addresses.
Url
DELETE https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}
Formats
json, xml
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
Customization
This Resource supports server-side customization.
Extension Point | Method Detail |
---|---|
dw.ocapi.data.customer_list.customer.afterDELETE
|
afterDelete (customerListId : String ) : Status The function is called after the customer was deleted.
|
dw.ocapi.data.customer_list.customer.beforeDELETE
|
beforeDelete (customer : Customer , customerListId : String ) : Status The function is called before the customer is deleted.
|
Sample
REQUEST:
DELETE /s/-/dw/data/v16_1/customer_lists/4711/customers/0815 HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Requested resource not found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"fault",
"fault":{
"type":"CustomerListCustomerNotFoundException",
"message":"No customer with number '0815' for customer list '4711' found."
}
}
Action that returns a pageable list of all customer addresses. The default page size is 10 customer addresses.
Url
GET https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}/addresses?start={Integer}&count={Integer}
Formats
json, xml
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
Query Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
count | Integer | The maximum number of instances per request. Default value is 25. | maxIntegerValue=200, minIntegerValue=1 |
start | Integer | The result set index to return the first instance for. Default value is 0. | minIntegerValue=0 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
Sample
REQUEST:
GET /s/-/dw/data/v16_1/customer_lists/4711/customers/0815/addresses HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v" : "16.1",
"_type":"customer_address_result",
"count" : 10,
"data" : [ {
"address1" : "Lodyweg",
"address_id" : "my_home_address",
"city" : "Washingtonville",
"company_name" : "Salesforce",
"country_code" : "SH",
"etag" : "a5d0988c7a02c73c1b197d2cd25b21e052c401c02a421cae0ec3f70dda571770",
"first_name" : "Pit",
"full_name" : "Pit Snipes",
"job_title" : "",
"last_name" : "Snipes",
"phone" : "001-111-1111",
"postal_code" : "15361",
"state_code" : "DE"
},
...
} ],
"next" : "https://example.com/dw/data/v16_1/customer_lists/4711/customers/0815/addresses?count=10&start=10",
"start" : 0,
"total" : 151
}
The action creates a new customer address with the given address information.
Url
POST https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}/addresses
Formats
json, xml
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidAddressIdException
|
If the address id is null or empty. | |
400 |
AddressIdAlreadyInUseException
|
If the address id is already in use. | |
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
Customization
This Resource supports server-side customization.
Extension Point | Method Detail |
---|---|
dw.ocapi.data.customer_list.customer.addresses.afterPOST
|
afterPost (customer : Customer , customerAddress : CustomerAddress , create : CustomerAddress , customerListId : String ) : Status The function is called after the new customer address was created.
|
dw.ocapi.data.customer_list.customer.addresses.beforePOST
|
beforePost (customer : Customer , create : CustomerAddress , customerListId : String ) : Status The function is called before a customer address is created with the given document.
|
Sample
REQUEST:
POST /s/-/dw/data/v16_1/customer_lists/4711/customers/0815/addresses HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
"address_id":"my_home_address"
"salutation":"",
"title":"",
"company_name":"",
"first_name":"",
"second_name":"",
"last_name":"",
"postal_code":"",
"address1":"",
"address2":"",
"city":"",
"post_box":"",
"country_code":"",
"state_code":"",
"phone":"",
"suffix":""
}
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
ETag: 045f07bb655171dc37d8eb8bf4b0db7ac1fb3a160002eb96fbe6e2f95aa4b6cc
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"customer_address",
"address_id":"my_home_address"
"salutation":"",
"title":"",
"company_name":"",
"first_name":"",
"second_name":"",
"last_name":"",
"postal_code":"",
"address1":"",
"address2":"",
"city":"",
"post_box":"",
"country_code":"",
"state_code":"",
"phone":"",
"suffix":""
}
# in case of validation failure:
RESPONSE:
HTTP/1.1 400 BAD REQUEST
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"fault",
"fault":{
"type":"AddressIdAlreadyInUseException",
"message":"Customer address id is already in use."
}
}
Action which returns an address of a customer.
Url
GET https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id}
Formats
json, xml
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
address_id | String | The address id | minLength=1 |
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
404 |
CustomerListCustomerAddressNotFoundException
|
addressId (String) customerNo (String) customerListId (String) |
Indicates that the customer address id is unknown. |
Sample
REQUEST:
GET /s/-/dw/data/v16_1/customer_lists/4711/customers/dude/addresses/myaddress HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"customer_address",
"address1":"10 Somewhere St.",
"address2":"",
"address_id":"myaddress"
"city":"Boston",
"company_name":"",
"country_code":"",
"etag":"860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5"
"first_name":"Egon",
"full_name":"Egon Krenz",
"job_title":"",
"last_name":"Krenz",
"phone":"",
"postal_code":"",
"post_box":"",
"salutation":"",
"second_name":"",
"state_code":"",
"suffix":"",
"suite":"",
"title":""
}
Action which updates an address of a customer with the given address information.
Url
PATCH https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id}
Formats
json, xml
Request Document
Response Document
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
address_id | String | The address id | minLength=1 |
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
Header Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
If-Match | String | The ETag header value contained in the server response |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
400 |
InvalidAddressIdException
|
If the new address id is empty. | |
400 |
AddressIdAlreadyInUseException
|
If the new address id is already in use. | |
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
404 |
CustomerListCustomerAddressNotFoundException
|
addressId (String) customerNo (String) customerListId (String) |
Indicates that the customer address id is unknown. |
Customization
This Resource supports server-side customization.
Extension Point | Method Detail |
---|---|
dw.ocapi.data.customer_list.customer.address.afterPATCH
|
afterPatch (customer : Customer , customerAddress : CustomerAddress , update : CustomerAddress , customerListId : String ) : Status The function is called after the customer address is updated with update document.
|
dw.ocapi.data.customer_list.customer.address.beforePATCH
|
beforePatch (customer : Customer , customerAddress : CustomerAddress , update : CustomerAddress , customerListId : String ) : Status The function is called before the customer address is updated with update document.
|
Sample
REQUEST:
PATCH /s/-/dw/data/v16_1/customer_lists/4711/customers/0815/addresses/my_home_address HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
If-Match: t9ccde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73b8h6
{
"_delete":["first_name","phone"], // delete values of properties "first_name" and "phone"
"city":"Burlington", // update "city"
}
# in case of success:
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"customer_address",
"address1":"10 Somewhere St.",
"address2":"",
"address_id":"my_home_address"
"city":"Burlington",
"company_name":"",
"country_code":"",
"etag":"860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5"
"full_name":"Egon Krenz",
"job_title":"",
"last_name":"Krenz",
"postal_code":"",
"post_box":"",
"salutation":"",
"second_name":"",
"state_code":"",
"suffix":"",
"suite":"",
"title":""
}
# in case of failure:
RESPONSE:
HTTP/1.1 400 BAD REQUEST
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
Content-Length: 47
{
"_v":"16.1",
"_type":"fault",
"fault":{
"type":"CustomerListCustomerAddressNotFoundException",
"message":"No customer address 'my_home_address' for customer with number '0815' in customer list '4711' found."
}
}
Action which deletes a customer address.
Url
DELETE https://hostname:port/dw/data/v16_1/customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id}
Formats
json, xml
Path Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
address_id | String | The address id | minLength=1 |
customer_no | String | The customer number | minLength=1 |
list_id | String | The customer list id | minLength=1 |
In case of a failure Fault Document is returned.
Faults
Status | Type | Arguments | Description |
---|---|---|---|
404 |
CustomerListCustomerNotFoundException
|
customerNo (String) customerListId (String) |
Indicates that the customer with the given customer number is unknown. |
404 |
CustomerListNotFoundException
|
customerListId (String) |
Indicates that the customer list with the given customer list id is unknown. |
Customization
This Resource supports server-side customization.
Extension Point | Method Detail |
---|---|
dw.ocapi.data.customer_list.customer.address.afterDELETE
|
afterDelete (customer : Customer , customerListId : String ) : Status The function is called after the customer address was deleted.
|
dw.ocapi.data.customer_list.customer.address.beforeDELETE
|
beforeDelete (customer : Customer , customerAddress : CustomerAddress , customerListId : String ) : Status The function is called before the customer is deleted.
|
Sample
REQUEST:
DELETE /s/-/dw/data/v16_1/customer_lists/4711/customers/0815/addresses/my_home_address HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
# in case of success:
RESPONSE:
HTTP/1.1 204 No Content
# in case of failure:
RESPONSE:
HTTP/1.1 404 Requested resource not found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
"_v":"16.1",
"_type":"fault",
"fault":{
"type":"CustomerListCustomerAddressNotFoundException",
"message":"No customer address 'my_home_address' for customer with number '0815' in customer list '4711' found."
}
}