# CustomerLocationsByCustomerId
Gets a list of locations for the specified customer
Sample request:
GET /customers/10000/locations
## Documentation
Sample request:
GET /customers/10000/locations
- Catalog: `NgSalesOrders`
- Schema: `Customers`
This is a read-only table function. The Visma.net Financials API may not support changing the data or the Invantive UniversalSQL driver for Visma.net Financials does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Visma.net Financials API.
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `CustomerLocationsByCustomerId`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `customerId` | `` | ☑ | | The customer id (CustomerCd) to retrieve locations for |
## Columns of Table Function
The columns of the table function `CustomerLocationsByCustomerId` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `COMPANY_CODE` | `varchar2(30)` | Company Code | ☑ | Partition code, segmenting the data. |
| `COMPANY_NAME` | `varchar2(240)` | Company Name | ☑ | Name of the partition. |
| `address_city` | `varchar2` | City | ☐ | The city |
| `address_country_id` | `varchar2` | Country ID | ☐ | The id |
| `address_country_name` | `varchar2` | Country Name | ☐ | The name |
| `address_county_id` | `varchar2` | County ID | ☐ | The id |
| `address_county_name` | `varchar2` | County Name | ☐ | The name |
| `address_id` | `int32` | | ☐ | The address id |
| `address_line1` | `varchar2` | | ☐ | Address line 1 |
| `address_line2` | `varchar2` | | ☐ | Address line 2 |
| `address_line3` | `varchar2` | | ☐ | Address line 3 |
| `address_overridesDefault` | `char` | | ☐ | Whether this address overrides the default address |
| `address_postalCode` | `varchar2` | Postal Code | ☐ | The postal code |
| `contact_attention` | `varchar2` | | ☐ | Any attention for the contact |
| `contact_email` | `varchar2` | Contact Email | ☐ | The e-mail address of the contact |
| `contact_fax` | `varchar2` | Contact Fax | ☐ | The fax number of the contact |
| `contact_id` | `int32` | Contact ID | ☐ | The id of the contact |
| `contact_name` | `varchar2` | Contact Name | ☐ | The name of the contact |
| `contact_overridesDefault` | `char` | | ☐ | Whether this overrides the default contact |
| `contact_phone1` | `varchar2` | Contact Phone 1 | ☐ | The phone number of the contact |
| `contact_phone2` | `varchar2` | Contact Phone 2 | ☐ | The secondary phone number of the contact |
| `corporateId` | `varchar2` | Corporate ID | ☐ | The corporate id of the location |
| `countryId` | `varchar2` | | ☐ | The country code of the location |
| `exportType` | `varchar2` | | ☐ | |
| `fobPointId` | `varchar2` | | ☐ | Default FobPointId |
| `gln` | `varchar2` | GLN | ☐ | The global localization number of the location |
| `id` | `varchar2` | ID | ☐ | Location id |
| `insurance` | `char` | Insurance | ☐ | Default Insurance |
| `internalId` | `int32` | Internal ID | ☐ | An internal id of the customer location |
| `leadTime` | `int32` | | ☐ | The number of days required for the shipped goods to reach the customer.
Used in the calculation of the scheduled shipment date |
| `name` | `varchar2` | Name | ☐ | Location description |
| `preferredWarehouseId` | `varchar2` | | ☐ | The preferred shipping warehouse of the customer set default for the order |
| `priceClassId` | `varchar2` | | ☐ | Price class |
| `priority` | `int32` | Priority | ☐ | Default Priority |
| `residentialDelivery` | `char` | Residential Delivery | ☐ | Default ResidentialDelivery |
| `salesAccountId` | `varchar2` | | ☐ | Location sales account |
| `salesEuAccountId` | `varchar2` | | ☐ | Location EU Sales Account |
| `salesExportAccountId` | `varchar2` | | ☐ | Location export sales account |
| `salesNonTaxableAccountId` | `varchar2` | | ☐ | Location non taxable sales account |
| `saturdayDelivery` | `char` | Saturday Delivery | ☐ | Default SaturdayDelivery |
| `shipTermsId` | `varchar2` | | ☐ | Default ShipTermsId |
| `shipViaId` | `varchar2` | | ☐ | The ship via id that represents the carrier and its service to be used for shipping the ordered goods |
| `shipZoneId` | `varchar2` | | ☐ | Default ShipZoneId |
| `shippingRule` | `varchar2` | | ☐ | Shipping rule of the customer set default for the order
Is one of the following options:
<list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> |
| `taxRegistrationId` | `varchar2` | | ☐ | The tax registration id of the location |
| `taxZoneId` | `varchar2` | Tax Zone ID | ☐ | The location tax/VAT zone id |
| `warehouseId` | `varchar2` | Warehouse ID | ☐ | The site id of the location |