Add your first listing

Learn how to add your first facility listing.

After you created your first facility, you can (but don't have to) add some listings (articles) for this facility.

Placeholders

PlaceholderReplace withExample

{TOKEN}

JWT from Identity provider

eyJhbGciOX49.eyJzdWV9.dyt0CoI

{facilityId}

the ID of the facility the listing is for

5d174533-29b9-464b-9325-94bfacefe335

Add the listing

For adding the listing to your facility, you don't need much information. The article ID of your system and a title is enough. To learn more, please look at our REST API documentation.

Let's add our first listing.

curl -sSL -X PUT 'https://your.api.fulfillmenttools.com/api/facilities/{facilityId}/listings' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "listings": [
    {
      "imageUrl": "https://upload.wikimedia.org/wikipedia/en/3/35/Wonka_Bar%2C_packaging.jpg",
      "price": 2.99,
      "stockinformation": {
        "stock": 42
      },
      "tenantArticleId": "4892",
      "title": "Wonkas Chocolate Bar"
    }
  ]
}'

If your request was successful, you'll receive a 200 OK response without a body.

To check whether the listing was added successfully, you can use the GET endpoint to find all listings:

curl -sSL 'https://your.api.fulfillmenttools.com/api/facilities/{facilityId}/listings' \
  --header 'Authorization: Bearer <TOKEN>' \
  --header 'Content-Type: application/json' \

This will respond with a 200 OK containing all listings for that facility:

{
    "total": 1,
    "listings": [
        {
            "id": "5d174533-29b9-464b-9325-94bfacefe335_4892",
            "version": 1,
            "status": "ACTIVE",
            "tenantArticleId": "4892",
            "created": "2023-08-22T12:19:14.129Z"
        }
    ]
}

Alternatively, you can use the GET endpoint to find the listing by your own article ID (tenantArticleId):

curl -sSL 'https://your.api.fulfillmenttools.com/api/facilities/{facilityId}/listings/{tenantArticleId}' \
  --header 'Authorization: Bearer <TOKEN>' \
  --header 'Content-Type: application/json' \

This will result in a 200 OK response containing a more detailed view of that listing:

{
    "imageUrl": "https://upload.wikimedia.org/wikipedia/en/3/35/Wonka_Bar%2C_packaging.jpg",
    "price": 2.99,
    "tenantArticleId": "4892",
    "title": "Wonkas Chocolate Bar",
    "attributes": null,
    "status": "ACTIVE",
    "facilityId": "5d174533-29b9-464b-9325-94bfacefe335",
    "id": "5d174533-29b9-464b-9325-94bfacefe335_4892",
    "partialStocks": null,
    "stockinformation": {
        "stock": 42,
        "reserved": 0,
        "available": 42
    },
    "version": 1,
    "created": "2023-08-22T12:19:14.129Z",
    "lastModified": "2023-08-22T12:19:14.129Z",
    "scannableCodes": []
}

Last updated