# Location Transactions

{% hint style="warning" %}
**Limited Support/End of Life Capabilities**

The Classic API has been replaced by the Alemba RestFul API.  While we will continue to support the Classic API for clients that are still using it, no further development will be done.

If you need to request a hotfix or support for these features, please contact [<mark style="color:blue;">**Alemba Support**</mark>](https://alemba.help/production/Portal.aspx)
{% endhint %}

### LocationCreate Transaction

The LocationCreate transaction can be used to create a new location and save its details.

#### Input Parameters: LocationCreateRequest

<table data-header-hidden><thead><tr><th></th><th width="126"></th><th></th><th width="95"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Ignored</td><td>-</td><td>Ignored on Create</td></tr><tr><td>sName</td><td>String</td><td>Yes</td><td>-</td><td>Location Name</td></tr><tr><td>sAddressLine1</td><td>String</td><td>No</td><td>“”</td><td>Location Address Line 1</td></tr><tr><td>sAddressLine2</td><td>String</td><td>No</td><td>“”</td><td>Location Address Line 2</td></tr><tr><td>sState</td><td>String</td><td>No</td><td>“”</td><td>Location State</td></tr><tr><td>sSuburb</td><td>String</td><td>No</td><td>“”</td><td>Location Suburb</td></tr><tr><td>sPostCode</td><td>String</td><td>No</td><td>“”</td><td>Location Postcode</td></tr><tr><td>sCountry</td><td>String</td><td>No</td><td>“”</td><td>Location Country</td></tr><tr><td>sTelephone</td><td>String</td><td>No</td><td>“”</td><td>Location Telephone number</td></tr><tr><td>sFacsimile</td><td>String</td><td>No</td><td>“”</td><td>Location Facsimile number</td></tr><tr><td>lOrganization</td><td>Lookup Field</td><td>No</td><td>0</td><td>Organization to link to this location. If locations are not linked to organizations, this parameter will be ignored.</td></tr><tr><td>lPartition</td><td>Lookup Field</td><td>No</td><td>Analyst’s default partition</td><td>Partition in which to create the location</td></tr><tr><td>sReason</td><td>String</td><td>No</td><td>“”</td><td>Audit reason</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values:LocationResponse <a href="#locationresponse" id="locationresponse"></a>

| Argument   | Type      | Description                                 |
| ---------- | --------- | ------------------------------------------- |
| nEntityRef | Integer   | Newly created location                      |
| sMessage   | String    | Error/Warning Message returned from the API |
| Ret        | APIReturn | Error/Warning number returned from the API  |

### LocationUpdate Transaction

The LocationUpdate transaction can be used to open and edit the details of a location record. This transaction updates the location record and saves the changes.

#### Input Parameters: LocationUpdateRequest

<table data-header-hidden><thead><tr><th></th><th width="74"></th><th></th><th width="90"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Yes</td><td>-</td><td>Reference number of the Location to update</td></tr><tr><td>sName</td><td>String</td><td>No</td><td>(As is)</td><td>Location Name</td></tr><tr><td>sAddressLine1</td><td>String</td><td>No</td><td>(As is)</td><td>Location Address Line 1</td></tr><tr><td>sAddressLine2</td><td>String</td><td>No</td><td>(As is)</td><td>Location Address Line 2</td></tr><tr><td>sState</td><td>String</td><td>No</td><td>(As is)</td><td>Location State</td></tr><tr><td>sSuburb</td><td>String</td><td>No</td><td>(As is)</td><td>Location Suburb</td></tr><tr><td>sPostCode</td><td>String</td><td>No</td><td>(As is)</td><td>Location Postcode</td></tr><tr><td>sCountry</td><td>String</td><td>No</td><td>(As is)</td><td>Location Country</td></tr><tr><td>sTelephone</td><td>String</td><td>No</td><td>(As is)</td><td>Location Telephone number</td></tr><tr><td>sFacsimile</td><td>String</td><td>No</td><td>(As is)</td><td>Location Facsimile number</td></tr><tr><td>lOrganization</td><td>Lookup Field</td><td>No</td><td>(As is)</td><td>Organization to link to this location. If locations are not linked to organizations, this parameter will be ignored.</td></tr><tr><td>lPartition</td><td>Lookup Field</td><td>No</td><td>(As is)</td><td>Partition in which to create the location</td></tr><tr><td>sReason</td><td>String</td><td>No</td><td>“”</td><td>Audit reason</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values: LocationResponse

See LocationResponse for more information.

### LocationRetrieve Transaction

The LocationRetrieve transaction can be used to view the details of a location record. This transaction does not update any of the record’s details.

#### Input Parameters: LocationEntityRequest

<table data-header-hidden><thead><tr><th></th><th width="139"></th><th></th><th width="88"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Yes</td><td>-</td><td>Reference number of the Location to update</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values: LocationRetrieveResponse

| Argument  | Type      | Description                                |
| --------- | --------- | ------------------------------------------ |
| Ret       | APIReturn | Error/Warning number returned from the API |
| sMessage  | String    | Error/Warning message                      |
| ResultSet | DataSet   | ResultSet containing attribute details     |

### LocationDelete Transaction

The LocationDelete transaction can be used to find and delete a location record. Only status and audit trail fields are updated when a LocationDelete transaction is executed.

#### Input Parameters: LocationDeleteRequest

<table data-header-hidden><thead><tr><th></th><th width="88"></th><th></th><th width="102"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Yes</td><td>-</td><td>Reference number of the Location to update</td></tr><tr><td>sReason</td><td>String</td><td>No</td><td>“”</td><td>Audit reason</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values: LocationResponse

See LocationResponse for more information.
