Adding listings to facilities

Now that our facilities are added into the fulfillmenttools platform, we need to add master data (listings) for that facilities.

What are listings?

Listings are the items we offer in a facilty. Even though they are optional, they are very helpful for several functionalities, especially the dynamic order routing. For more information on the entity, please see Listing.

Why has every facility its own listings?

An article that we offer in Lisbon might not run at all in Helsinki. That's why it makes more sense to not list that article in facilities which do not sell an item. In this tutorial the items offered are very similar. In Helsinki, LU.XY does not sell summer dresses and sandals. In Lissabon, they don't sell winter boots and parkas.

Adding listings to the facilities

After we decided which items to list in which facility, we can start to add them to the facilities. In this tutorial page, we start with the store in Frankfurt, where all items are sold. You need the ID of the facility you want to create a listing in. The ID can be received via the facility endpoint, which we used to create the facility.

For adding a listing, we send a PUT request to the listings endpoint containing a ListingsForCreation object:

curl --location --request PUT 'https://your.api.fulfillmenttools.com/api/facilities/<FACILITY-ID>/listings' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
    "listings": [
        {
            "tenantArticleId": "SNEAK-W-4891",
            "price": 119.00,
            "title": "White Sneakers",
            "imageUrl": "https://img.example.com/img/sneakw4891.jpg",
            "scannableCodes": ["738502847562", "SNEAK-W-4891"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "JEANS-B-2605",
            "price": 59.95,
            "title": "Washed Slim Fit Jeans",
            "imageUrl": "https://img.example.com/img/jeansb2605.jpg",
            "scannableCodes": ["73898484754", "JEANS-B-2605"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "TSHIRT-W-2468",
            "price": 19.9,
            "title": "Basic T-Shirt White",
            "imageUrl": "https://img.example.com/img/tshirtw2468.jpg",
            "scannableCodes": ["5558156789", "TSHIRT-W-2468"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "COAT-C-0304",
            "price": 394.5,
            "title": "Trenchcoat cream",
            "imageUrl": "https://img.example.com/img/coatc0304.jpg",
            "scannableCodes": ["48976451328", "COAT-C-0304"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "LOAFERS-B-1788",
            "price": 79.8,
            "title": "Brown Leather Loafers",
            "imageUrl": "https://img.example.com/img/loafersb1788.jpg",
            "scannableCodes": ["41986457228", "LOAFERS-B-1788"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "OXFORD-W-9766",
            "price": 64.9,
            "title": "White Oxford Button Down Shirt",
            "imageUrl": "https://img.example.com/img/oxfordw9766.jpg",
            "scannableCodes": ["41986457669", "OXFORD-W-9766"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "DRESS-B-5094",
            "price": 49.95,
            "title": "Blue Summer Dress",
            "imageUrl": "https://img.example.com/img/dressb5094.jpg",
            "scannableCodes": ["50986457664", "DRESS-B-5094"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "BLAZER-G-6354",
            "price": 39.99,
            "title": "Green Blazer",
            "imageUrl": "https://img.example.com/img/blazerg6354.jpg",
            "scannableCodes": ["6386457654", "BLAZER-G-6354"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "PANTS-G-4430",
            "price": 39.99,
            "title": "Green Pants",
            "imageUrl": "https://img.example.com/img/pants-g-4430.jpg",
            "scannableCodes": ["63864430654", "PANTS-G-4430"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "TNECK-GR-3277",
            "price": 34.99,
            "title": "Grey Turtleneck Sweater With Texture",
            "imageUrl": "https://img.example.com/img/tneckgr3277.jpg",
            "scannableCodes": ["32864770654", "TNECK-GR-3277"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "SANDALS-S-7318",
            "price": 69.99,
            "title": "Summer Sandals",
            "imageUrl": "https://img.example.com/img/sandalss7318.jpg",
            "scannableCodes": ["14864773654", "SANDALS-S-7318"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "BOOTS-B-8971",
            "price": 109.50,
            "title": "Beige Winter Boots",
            "imageUrl": "https://img.example.com/img/bootsb8971.jpg",
            "scannableCodes": ["89764773651", "BOOTS-B-8971"],
            "measurementUnitKey": "UNIT"
        },
        {
            "tenantArticleId": "PARKA-B-8822",
            "price": 94.50,
            "title": "Black Winter Parka",
            "imageUrl": "https://img.example.com/img/parkab8822.jpg",
            "scannableCodes": ["889722773651", "PARKA-B-8822"],
            "measurementUnitKey": "UNIT"
        }
    ]
}'

The response should be an empty 200 OK response, if the request was successful. Let's have a look at the properties:

tenantArticleId: The ID the article has in your systems, must be unique.

price: The price at which the article is sold.

title: The title that article has.

imageUrl: URL where an image is found of that article, will be shown in the clients we offer.

scannableCodes: List of scannable codes for that item. Used while picking. Might be the EAN or any other barcode.

mesaurementUnitKey: Unit in which that article is count, in this case we sell hole units of garments. In the food context, that might a weighing unit like kilograms.

With the facilities and the listings being set, we can start using the orders endpoint for testing.

Last updated