API - Locations
This is a fork of page 30076 "APIV2 - Locations" from version 27.0.38460.40573. Added support for Extra Fields.
Object Definition
| Object Type | Page |
| Object ID | 70314157 |
| Object Name | QWESR API - Locations |
| Source Table | Location |
API Definition
| APIPublisher | smartApps |
| APIGroup | spider |
| APIVersion | v1.0 |
| EntitySetName | locations |
| EntityName | location |
Events
| Name | Description |
|---|---|
| OnBeforeInsert(Record Location; Text; Text; Text; Text; Text; Text; Text; Text; Text; Text; List of [Integer]) | Raised before a record is inserted. |
| OnBeforeModify(Record Location; Text; Text; Text; Text; Text; Text; Text; Text; Text; Text; List of [Integer]) | Raised before a record is modified. |
| OnGetExtraValues(Record Location; Text; Text; Text; Text; Text; Text; Text; Text; Text; Text) | Raised after a record is read from the database. Makes it possible to set the ExtraValues 1..10, to be returned to the client. |
Example
Read
Get a list of Locations.
GET businesscentralPrefix/companies({id})/locations?$schemaversion=2.0
Get a single Location.
GET businesscentralPrefix/companies({id})/locations({id})?$schemaversion=2.0
Create
Create a new Location.
POST businesscentralPrefix/companies({id})/locations?$schemaversion=2.0
Content-type: application/json
{
"code": "SOUTH",
"displayName": "South Warehouse"
}
Controls
| Type | Name | Data Type | Read-only |
|---|---|---|---|
| Field | id | Yes | |
| Field | code | ||
| Field | displayName | ||
| Field | contact | ||
| Field | addressLine1 | ||
| Field | addressLine2 | ||
| Field | city | ||
| Field | state | ||
| Field | country | ||
| Field | postalCode | ||
| Field | phoneNumber | ||
| Field | |||
| Field | website | ||
| Field | lastModifiedDateTime | Yes | |
| Field | extraValue1 | Text | |
| Field | extraValue2 | Text | |
| Field | extraValue3 | Text | |
| Field | extraValue4 | Text | |
| Field | extraValue5 | Text | |
| Field | extraValue6 | Text | |
| Field | extraValue7 | Text | |
| Field | extraValue8 | Text | |
| Field | extraValue9 | Text | |
| Field | extraValue10 | Text |
This documentation is generated from Spider v27.4