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 | Guid | Yes |
| Field | code | Code[10] | |
| Field | displayName | Text[100] | |
| Field | contact | Text[100] | |
| Field | addressLine1 | Text[100] | |
| Field | addressLine2 | Text[50] | |
| Field | city | Text[30] | |
| Field | state | Text[30] | |
| Field | country | Code[10] | |
| Field | postalCode | Code[20] | |
| Field | phoneNumber | Text[30] | |
| Field | Text[80] | ||
| Field | website | Text[255] | |
| Field | lastModifiedDateTime | DateTime | 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.1