Some PEAK Connect resources, for example, the Quote resource for obtaining carrier rates, require an Ascent assigned customer number as part of the inputs. The Customer Access resource allows you to retrieve the set of customer numbers that your PEAK Connect account is allowed to access. This is an HTTP POST resource
QA: http(s)://qa-connect.ascentgl.com/v1/customerAccess.{xml , json}
Production: http(s)://connect.ascentgl.com/v1/customerAccess.{xml , json}
Property Name | Required | Format | Definition |
---|---|---|---|
accesstoken | Yes | String | accessToken value returned from a call to the Authenticate API |
Property Name | Date Type | Description |
---|---|---|
customers | A collection of customers for those customers visible for the accessToken in the request. See below for customer details | |
errors | A collection of error messages. See below for error message details |
Property Name | Date Type | Description |
---|---|---|
number | String | Ascent customer number – used where needed in other API requests |
name | String | Display name for the customer |
Property Name | Date Type | Description |
---|---|---|
code | String | Internal Ascent error code |
Message | String | Display message for the error |
{
“accessToken”:”str1234″
}
JSON Response
{
“customers”:
[
{ “number”:”005825C”, “name”:”JOHNS MANUFACTURING COMPANY LLC” },
{ “number”:”AF6DA94B”, “name”:”JOHNS MANUFACTURING COMPANY LLC – HOUSTON” },
{ “number”:”043542B6″, “name”:”JOHNS MANUFACTURING COMPANY LLC – CHARLOTTE, NC” }
]
“errors”:
[
{ “code”:”0″, “message”:No Errors” }
]
}
<?xml version=”1.0″ encoding=”utf-8″?>
<CustomerAccessRequest xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=””>
<accessToken>str1234</accessToken>
</CustomerAccessRequest>
XML Response
<?xml version=”1.0″ encoding=”utf-8″?>
<CustomerAccessResponse xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns=””>
<customers>
<customer>
<number>005825C</number>
<name>JOHNS MANUFACTURING COMPANY LLC</name>
</customer>
<customer>
<number>AF6DA94B</number>
<name>JOHNS MANUFACTURING COMPANY LLC</name>
</customer>
<customer>
<number>043542B6</number>
<name>JOHNS MANUFACTURING COMPANY LLC – CHARLOTTE, NC</name>
</customer>
</customers>
<errors>
<error>
<code>0</code>
<message>No Errors</message>
</error>
</errors>
</CustomerAccessResponse>