Update Location
The Location API also allows the details of a location to be updated. This includes the address, primary contact information, and fulfillment options such as whether the location is enabled for pickup or has a storefront.
Version 2.0 Call https://integration.shopatron.com/api/v2/location/[locationID] Supported Formats JSON HTTP Method PUT Schema https://integration.shopatron.com/api/v2/schema/location.json
The .json address above can be used to access the schema within Postman. An example use of the Location API follows below, or view the schema or the sample Postman Collection .
Example
This example case creates a call that will edit an existing location. The important properties and new edits are:
Location name is “TEST LOCATION” Taxable shipping location in Dallas
This guide will demonstrate how to put together each section of the request to edit this item.
Required Parameters
The following are required for all instances of this call:
Parameter Type Description name string The name of the location. The minimum length is 1 and the maximum length is 50. addressLine1 string The first line of the street address. The minimum length is 1 and the maximum length is 50. city string The city that the street address is located in. The minimum length is 1 and the maximum length is 50. countryCode enum The code indicating the country that the address is location in (e.g. US, AD, etc.). phone string The phone number of the location. The minimum length is 1 and the maximum length is 20. localSalesTax number The local sales tax of the location. active boolean Indicates whether the location is active or not within the Kibo network. shippingLocation boolean Indicates whether the location can ship shipments. taxableLocation boolean Indicates whether the location is taxable.
Optional Parameters
These are the other details that can be used to edit a location:
Parameter Type Description locationID integer A unique identifier for the fulfillment location. The minimum value is “1”. externalStoreID string A client-generated unique identifier for the location. retailerID integer A unique identifier for the retailer. manufacturerID integer A unique identifier for a manufacturer. The minimum value is “1”. fulfillerID integer A unique identifier for a fulfiller. The minimum value is “1”. addressLine2 string The second line of the street address. The maximum length is 50. addressLine3 string The third line of the street address. The maximum length is 50. state enum The state that the street address is located in (e.g. TX, CO). postalCode string The postal code or zip code of the address. The minimum length is 1 and the maximum length is 35. latitude number The latitudinal value of the location. longitude number The longitudinal value of the location. contact string The name of the location’s primary contact person. contactPhone string The phone number of the location’s primary contact person. The minimum length is 1 and the maximum length is 20. fax string The location’s preferred fax number. The maximum length is 20. email string The location’s desired contact email address. The maximum length is 50. restockEnabled boolean Indicates whether the location can be restocked by its distribution center. pickupEnabled boolean Indicates whether shipments can be picked up at the location. showInAggregateReport boolean Indicates whether the location shows up in the aggregate report. hasStorefront boolean Indicates whether the location has a storefront that customers can walk into. assembly boolean Indicates if the location offers assembly services, in which items are put together for the client on request. delivery boolean Indicates if the location offers employee delivery of an order to the customer’s address. mainLocation boolean Indicates whether the location is the fulfiller’s primary location. express boolean Indicates whether the requesting retailer is able to express ship for the given catalog. lastUpdated string (date-time) The date that this location was last updated.
The Full Request
This is the entire request that will update a location. The parameters that are not being specifically edited are left unchanged from the original data values.
Recall that the locationID should be appended to the endpoint, as well as listed in the body of the request.
{
"locationID":012345,
"name":"TEST LOCATION",
"addressLine1": "000 Test St",
"city": "Dallas",
"countryCode": "US",
"phone": "000-000-0000",
"localSalesTax": 0.06075,
"active": true,
"shippingLocation": true,
"taxableLocation": true
}
The Full Response
This is the entire response returned by the API.
{
"locationID": 012345,
"manufacturerID": 11111,
"fulfillerID": 22222,
"name": "TEST LOCATION",
"addressLine1": "000 Test St",
"city": "Dallas",
"countryCode": "US",
"contact": " ",
"phone": "000-000-0000",
"localSalesTax": 0.06075,
"active": true,
"shippingLocation": true,
"restockEnabled": false,
"pickupEnabled": false,
"showInAggregateReport": false,
"taxableLocation": true,
"mainLocation": false,
"lastUpdated": "2018-01-03T16:14:21+0000"
}