Manage Fulfillment Locations

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 AttributeDescription
Endpointhttps://t{tenantId}.{host}/api/commerce/admin/locations/
Supported FormatsJSON
HTTP MethodPOST

The following parameters should be included to define the location:

ParameterTypeDescription
codestringA unique alphanumeric code to identify the location.
locationTypesarrayA 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.
namestringA descriptive name for the location.
addressobjectThe address of the location. See below for the parameters included in this object.
geoobjectIncludes two integers as parameters, lat and lng to denote latitude and longitude.
phonestringThe primary phone number to contact the location with.
fulfillmentTypesarrayAn 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.”
regularHoursobjectThe hours during which the fulfillment location is operating for pick-up. See the example for how this is laid out.
shippingOriginContactobjectThe contact information for the primary person to contact about shipping. See below for the parameters included in this object.
allowFulfillmentWithNoStockbooleanWhether items are allowed to be fulfilled even if no inventory stock is indicated at the location.

The parameters used to define addresses include:

ParameterTypeDescription
address1stringThe first line of the street address. Maximum length is 200 characters.
address2stringAn optional second line for the street address. Maximum length is 200 characters.
address3stringAn optional third line for the street address. Maximum length is 200 characters.
address4stringAn optional fourth line for the street address. Maximum length is 200 characters.
cityOrTownstringThe city that the billing address is located in.
stateOrProvincestringThe state or province that the billing address is located in.
postalOrZipCodestringThe postal/zip code that the billing address is located in.
countryCodestringThe ISO code of the country that the billing address is located in.
addressTypestringThe type of address, which is commercial or residential.
isValidatedbooleanWhether or not the address has been validated.

The shipping origin contact is defined with the following information:

ParameterTypeDescription
firstNamestringThe first name of the shipping contact.
middleNameOrInitialstringThe middle name or initial of the shipping contact.
lastNameOrSurnamestringThe last name of the shipping contact.
companyOrOrganizationstringIf applicable, the company that the shipping contact represents.
phoneNumberstringA phone number for the shipping contact.
emailstringThe 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 AttributeDescription
Endpointhttps://t{tenantId}.{host}/api/commerce/admin/locations/{locationCode}
Supported FormatsJSON
HTTP MethodGET

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 AttributeDescription
Endpointhttps://t{tenantId}.{host}/api/commerce/admin/locations/{locationCode}
Supported FormatsJSON
HTTP MethodPUT

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.