POST public-api/locations/create

This method creates a new location. The existing location is retrieved by calling one of the searches. It requires the Create Location permission and access to the Site where the Location is being created. It accepts a maximum of 500 records at a time. Response Information not display BatchNumber if it's null .



Request Information

URI Parameters

None.

Body Parameters

Collection of LocationModelInfo
NameDescriptionTypeAdditional information
RowNumber

Optional. It is the ordinal position of the record in the given record set.

integer

None.

SiteName

Required. It is the unique site name.

string

None.

ZoneName

Optional. Applicable to InventoryCloud only. Indicates the name of the zone the location is a part of.

string

None.

LocationCode

Required. It is unique within the specified site and location code.

string

None.

LocationDescription

Recommended. It is the description of the location.

string

None.

UsageTypeName

Applicable to InventoryCloud only. Indicates the primary usage of the location.

string

None.

LocationSaleable

Applicable to InventoryCloud Only. Indicates if the items in the location are for sale.

integer

None.

DefaultLocation

Unused at this time. Indicates if the location is the default location for the site it belongs to.

boolean

None.

LocationRecordStatus

Read-Only. Indicates whether or not the site is active.

RecordStatus

None.

LocationNotes

It is to add new note to a location.

string

None.

AllLocationNotes

Read Only. It is the list of notes for the location.

Collection of NoteInfo

None.

CustomFields

It retrieve or specify values for the custom fields.

Collection of DcfValueInfo

None.

LocationSequence

Unused at this time.

decimal number

None.

LocationWidth

Indicates the width of the location.

decimal number

None.

LocationHeight

Indicates the height of the location.

decimal number

None.

LocationDepth

Indicates the depth of the location.

decimal number

None.

DimensionUnit

Indicates how the width, height, and depth are measured, i.e. feet, yards, inches.

string

None.

LocationVolume

Indicates how much volume the location has.

decimal number

None.

LocationMaxWeight

Indicates the maximum weight the location can support.

decimal number

None.

WeightUnit

Indicates how the weight is measured, i.e. pounds, tons.

string

None.

LocationMaxVolume

Indicates the maximum volume the location can hold.

decimal number

None.

VolumeUnit

Indicates how the volume is measured.

string

None.

ParentLocation

Indicates the parent location where this location belongs within the same site.

string

None.

ChildrenLocations

Indicates the number of locations with this location as a parent.

integer

None.

Request Formats

application/json

Sample:
[
  {
    "RowNumber": 0,
    "SiteName": "Site8d9a872876bb80c",
    "LocationCode": "Location8d9a872876bb80c",
    "LocationRecordStatus": 0,
    "ChildrenLocations": 0
  }
]

application/json

Sample:
Locations
[
  {
    "RowNumber": 0,
    "SiteName": "New York Office test",
    "LocationCode": "Lobby",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample test",
    "ChildrenLocations": 0
  },
  {
    "RowNumber": 0,
    "SiteName": "New York Office",
    "LocationCode": "Supply Closet 1",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample",
    "ChildrenLocations": 0
  },
  {
    "RowNumber": 0,
    "SiteName": "New York Office",
    "LocationCode": "Meeting Room 1",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample",
    "ChildrenLocations": 0
  },
  {
    "RowNumber": 0,
    "SiteName": "New York Office",
    "LocationCode": "Office 101",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample",
    "ChildrenLocations": 0
  }
]

application/json

Sample:
Location - MandatoryField
[
  {
    "RowNumber": 0,
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample",
    "ChildrenLocations": 0
  }
]

application/json

Sample:
Location - AlreadyExists
[
  {
    "RowNumber": 0,
    "SiteName": "New York Office test",
    "LocationCode": "Lobby",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample test",
    "ChildrenLocations": 0
  },
  {
    "RowNumber": 0,
    "SiteName": "New York Office",
    "LocationCode": "Supply Closet 1",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample",
    "ChildrenLocations": 0
  },
  {
    "RowNumber": 0,
    "SiteName": "New York Office",
    "LocationCode": "Meeting Room 1",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample",
    "ChildrenLocations": 0
  },
  {
    "RowNumber": 0,
    "SiteName": "New York Office",
    "LocationCode": "Office 101",
    "LocationRecordStatus": 0,
    "LocationNotes": "Created during public api sample",
    "ChildrenLocations": 0
  }
]



Response Information

Resource Description

WaspResultOfResults
NameDescriptionTypeAdditional information
Data

Type specific result that always depends on the function called.

Results

None.

Messages

List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages.

Collection of WtResult

None.

BatchNumber

This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party.

integer

None.

HasError

True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available.

boolean

None.

HasHttpError

True if an API function call could not be fully posted to the server or the results could not be fully returned.

boolean

None.

HasMessage

True if any message is available.

boolean

None.

HasSuccessWithMoreDataRemaining

True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time.

boolean

None.

TotalRecordsLongCount

This is the total number of records available in the database based on the query and filer conditions provided. It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. This is used, for example, to set relative scroll bar sizes. When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation. To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster.

integer

None.

Response Formats

application/json

Sample:
{
  "Data": {
    "ResultList": [
      {
        "ResultCode": 0,
        "Message": "Success.",
        "HttpStatusCode": 200
      }
    ],
    "SuccessfullResults": 0,
    "TotalResults": 1
  },
  "Messages": [
    {
      "ResultCode": 0,
      "Message": "Success.",
      "HttpStatusCode": 200,
      "FieldName": ""
    }
  ],
  "HasSuccessWithMoreDataRemaining": false,
  "HasError": false,
  "HasMessage": true,
  "HasHttpError": false
}