This guide applies to standalone Curbside Delivery implementations. Order Management users integrating Curbside as an additional fulfillment type can use the standard Location API calls.
Before orders are created and fulfilled through Curbside, fulfillment locations should be configured. These locations are enabled for Curbside Delivery by indicating Curbside as their supported fulfillment type, and information such as the address and hours of operation should be set up so that it can be communicated with the customer later. This creation and configuration is done through POST calls to the Locations API, which also supports PUT calls to edit existing locations. A GET call can be made at any point to retrieve the information about a location.
Each of these POST, PUT, and GET calls are explained in this guide. Ask the Kibo team for additional examples and Postman samples if desired.
Create Fulfillment Location
To create a new fulfillment location record, a POST call should be made to the Locations API.
Call Attribute | Description |
Endpoint | https://t{tenantId}.{host}/api/commerce/admin/locations/ |
Supported Formats | JSON |
HTTP Method | POST |
The following parameters should be included to define the location:
Parameter | Type | Description |
code | string | A unique alphanumeric code to identify the location. |
locationTypes | array | A list of the supported location type objects. Each object in the array contains two string parameters for “code” and “name” to identify the location type. |
name | string | A descriptive name for the location. |
address | object | The address of the location. See below for the parameters included in this object. |
geo | object | Includes two integers as parameters, lat and lng to denote latitude and longitude. |
phone | string | The primary phone number to contact the location with. |
fulfillmentTypes | array | An array of objects, each entry containing a pair of strings for code and name to define the fulfillment types supported by this location. For Curbside, this array should only have one entry with a code of “CS” and name of “Curbside.” |
regularHours | object | The hours during which the fulfillment location is operating for pick-up. See the example for how this is laid out. |
shippingOriginContact | object | The contact information for the primary person to contact about shipping. See below for the parameters included in this object. |
allowFulfillmentWithNoStock | boolean | Whether items are allowed to be fulfilled even if no inventory stock is indicated at the location. |
The parameters used to define addresses include:
Parameter | Type | Description |
address1 | string | The first line of the street address. Maximum length is 200 characters. |
address2 | string | An optional second line for the street address. Maximum length is 200 characters. |
address3 | string | An optional third line for the street address. Maximum length is 200 characters. |
address4 | string | An optional fourth line for the street address. Maximum length is 200 characters. |
cityOrTown | string | The city that the billing address is located in. |
stateOrProvince | string | The state or province that the billing address is located in. |
postalOrZipCode | string | The postal/zip code that the billing address is located in. |
countryCode | string | The ISO code of the country that the billing address is located in. |
addressType | string | The type of address, which is commercial or residential. |
isValidated | boolean | Whether or not the address has been validated. |
The shipping origin contact is defined with the following information:
Parameter | Type | Description |
firstName | string | The first name of the shipping contact. |
middleNameOrInitial | string | The middle name or initial of the shipping contact. |
lastNameOrSurname | string | The last name of the shipping contact. |
companyOrOrganization | string | If applicable, the company that the shipping contact represents. |
phoneNumber | string | A phone number for the shipping contact. |
string | The email address of the shipping contact. |
The following example shows how the location information would be laid out in the request body.
{ "name": "R-1", "code": "R-1", "locationTypes": [ { "code": "storelocationtype1", "name": "Store Location Type1" } ], "address": { "address1": "717 N Harwood St", "cityOrTown": "Dallas", "stateOrProvince": "TX", "postalOrZipCode": "75201", "countryCode": "US", "addressType": "Commercial", "isValidated": false }, "geo": { "lat": 32.7767, "lng": -96.797 }, "phone": "15125551212", "fulfillmentTypes": [ { "code": "CS", "name": "Curbside" } ], "regularHours": { "sunday": { "isClosed": true }, "monday": { "openTime": "00:00", "closeTime": "17:00", "isClosed": false }, "tuesday": { "openTime": "09:00", "closeTime": "21:00", "isClosed": false }, "wednesday": { "openTime": "09:00", "closeTime": "21:00", "isClosed": false }, "thursday": { "openTime": "00:00", "closeTime": "21:00", "isClosed": false }, "friday": { "openTime": "09:00", "closeTime": "22:30", "isClosed": false }, "saturday": { "openTime": "08:00", "closeTime": "22:30", "isClosed": false }, "timeZone": "Central Standard Time" }, "shippingOriginContact": { "firstName": "Retail1", "middleNameOrInitial": "", "lastNameOrSurname": "Mgr", "companyOrOrganization": "Kibo", "phoneNumber": "15125551212", "email": "manager@some.store" }, "allowFulfillmentWithNoStock": true }
If the creation is successful, a 200 OK response code will be returned by the API along with a response body repeating all of the configured location information.
Get Location Information
To retrieve the data for a particular location, the location code should be indicated in the endpoint while making a GET call.
Call Attribute | Description |
Endpoint | https://t{tenantId}.{host}/api/commerce/admin/locations/{locationCode} |
Supported Formats | JSON |
HTTP Method | GET |
For example, the following call would be made to retrieve the data of the location set up in the above Create Location example:
https://integration.exampleURL.com/api/commerce/admin/locations/R-1/
The response would include all of the detailed location data that has been defined.
{ "name": "R-1", "code": "R-1", "locationTypes": [ { "code": "storelocationtype1", "name": "Store Location Type1" } ], "address": { "address1": "717 N Harwood St", "cityOrTown": "Dallas", "stateOrProvince": "TX", "postalOrZipCode": "75201", "countryCode": "US", "addressType": "Commercial", "isValidated": false }, "geo": { "lat": 32.7767, "lng": -96.797 }, "phone": "15125551212", "fulfillmentTypes": [ { "code": "CS", "name": "Curbside" } ], "regularHours": { "sunday": { "isClosed": true }, "monday": { "openTime": "00:00", "closeTime": "17:00", "isClosed": false }, "tuesday": { "openTime": "09:00", "closeTime": "21:00", "isClosed": false }, "wednesday": { "openTime": "09:00", "closeTime": "21:00", "isClosed": false }, "thursday": { "openTime": "00:00", "closeTime": "21:00", "isClosed": false }, "friday": { "openTime": "09:00", "closeTime": "22:30", "isClosed": false }, "saturday": { "openTime": "08:00", "closeTime": "22:30", "isClosed": false }, "timeZone": "Central Standard Time" }, "shippingOriginContact": { "firstName": "Retail1", "middleNameOrInitial": "", "lastNameOrSurname": "Mgr", "companyOrOrganization": "Kibo", "phoneNumber": "15125551212", "email": "manager@some.store" }, "allowFulfillmentWithNoStock": true }
Update Location Information
To edit a location record after it has been created, make a PUT call to the Locations API with the appropriate location code indicated in the endpoint. This call supports exactly the same datapoints as used for location creation, so refer to the table under Create Fulfillment Location above for a list of parameters.
Note that all of the data received from the Get Location Information call should be provided as the request body, even the parameters that are not being altered. It is best to make the GET call, copy the response, and then change the values you want for the PUT request. This is because the location record in the database will be replaced by this input, so it must retain all of the existing location data.
Call Attribute | Description |
Endpoint | https://t{tenantId}.{host}/api/commerce/admin/locations/{locationCode} |
Supported Formats | JSON |
HTTP Method | PUT |
For example, the following call would be made to edit the location record that was used as an example previously in this guide.
https://integration.exampleURL.com/api/commerce/admin/locations/R-1/
The request body changes the location’s name and updates its hours of operation to indicate that it is now open on Sundays.
{ "name": "R-1 Updated Location", "code": "R-1", "locationTypes": [ { "code": "storelocationtype1", "name": "Store Location Type1" } ], "address": { "address1": "717 N Harwood St", "cityOrTown": "Dallas", "stateOrProvince": "TX", "postalOrZipCode": "75201", "countryCode": "US", "addressType": "Commercial", "isValidated": false }, "geo": { "lat": 32.7767, "lng": -96.797 }, "phone": "15125551212", "fulfillmentTypes": [ { "code": "CS", "name": "Curbside" } ], "regularHours": { "sunday": { "openTime": "09:00", "closeTime": "17:00", "isClosed": false }, "monday": { "openTime": "00:00", "closeTime": "17:00", "isClosed": false }, "tuesday": { "openTime": "09:00", "closeTime": "21:00", "isClosed": false }, "wednesday": { "openTime": "09:00", "closeTime": "21:00", "isClosed": false }, "thursday": { "openTime": "00:00", "closeTime": "21:00", "isClosed": false }, "friday": { "openTime": "09:00", "closeTime": "22:30", "isClosed": false }, "saturday": { "openTime": "08:00", "closeTime": "22:30", "isClosed": false }, "timeZone": "Central Standard Time" }, "shippingOriginContact": { "firstName": "Retail1", "middleNameOrInitial": "", "lastNameOrSurname": "Mgr", "companyOrOrganization": "Kibo", "phoneNumber": "15125551212", "email": "manager@some.store" }, "allowFulfillmentWithNoStock": true }
If successful, a 200 OK response code will be received.