Get list of addresses for a specific group customer by groupCustomer Id
get
/PASService/rest/services/v1/groupCustomers/{groupCustomerId}/addresses
Gets addresses for a group customer based on the specified groupCustomer Id.
Request
Path Parameters
-
groupCustomerId(required): string(guid)
GroupCustomerId
Query Parameters
-
expand: string
When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "the name of the child resource". More than one child can be specified using comma as a separator. Example:?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers). More than one child can be specified using comma as a separator. For example: "?expand=Employees,Localizations". Nested children can also be provided following the format: "Child.NestedChild" For example:"?expand=Employees.Managers" If a nested child is provided (Example:Employees.Managers), the missing children will be processed implicitly i.e.,"?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers", which will expand both Employees and Managers.
-
limit: integer(int32)
This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
-
offset: integer(int32)
Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
-
q: string
This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;loc!="NY.=>
There's no request body for this operation.
Back to TopResponse
200 Response
This operation fetches list of addresses for a specific group customer by groupCustomer Id successfully.
Examples
This example describes how to get addresses for a group customer based on the specified client Id.
Example cURL Command
Use the following cURL command to submit a request on the REST resource:
curl \
-X GET \
-H "Content-Type: application/json" \
-u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-L "http://server:port/PASService/rest/services/v1/groupCustomers/9B6E4F84-CD02-4D78-AD5B-239EA7A32AFC/addresses" Example Response Body
The following shows an example of the response body in JSON format:
{
"count": 1,
"addresses": [
{
"links": [
{
"href": "http://server:port/PASService/rest/services/v1/groupCustomers/9B6E4F84-CD02-4D78-AD5B-239EA7A32AFC/addresses/ABDA1F51-441A-4FB0-8AE9-01850184C237",
"rel": "self",
"mediaType": "application/json",
"method": "GET"
},
{
"href": "http://server:port/PASService/rest/services/v1/codes?codeName=AddressRole&codeValue=04",
"rel": "codes/addressType",
"mediaType": "application/json",
"method": "GET"
},
{
"href": "http://server:port/PASService/rest/services/v1/codes?codeName=State&codeValue=01",
"rel": "codes/state",
"mediaType": "application/json",
"method": "GET"
}
],
"defaultFlag": "1",
"effectiveDate": "2015-08-04T00:00:00Z",
"addressLine1": "fegREF",
"city": "EWFWF",
"postalID": "4354135",
"addressType": "04",
"clientId": "9B6E4F84-CD02-4D78-AD5B-239EA7A32AFC",
"addressId": "ABDA1F51-441A-4FB0-8AE9-01850184C237",
"state": "01",
"country": "CA",
"ReturnMailIndicator": "CHECKED",
"SystemDateGSM": "2015-08-04T00:00:00Z",
"CostOfStamp": {
"value": 0,
"currency": "USD"
},
"TestInteger": 0,
"ClientGUID": {
"textValue": "9B6E4F84-CD02-4D78-AD5B-239EA7A32AFC",
"optionText": " "
},
"TestDecimal": 0
}
]
}