# Configuring stock in your free trial

{% hint style="success" %}

#### Prerequisites

* Access to a free trial tenant (email with credentials)
* Read our [Free trial information](/documentation/using-our-free-trial/free-trial-information.md), [Setting up Postman for your free trial](/documentation/using-our-free-trial/free-trial-information/setting-up-postman-for-your-free-trial.md), [Facilities in your free trial](/documentation/using-our-free-trial/free-trial-information/facilities-in-your-free-trial.md), and [Listings in your free trial](/documentation/using-our-free-trial/free-trial-information/listings-in-your-free-trial.md) articles
* Access to Postman (you can use an HTTP tool of your choice, but for this article, we'll focus on working with Postman)
  {% endhint %}

## What's stock?

Stock is the total amount of goods or the amount of a particular type of goods available in a store or warehouse.

## Why does it matter for my free trial?

For this tutorial, we're assuming we're a shop with products to sell and a consumer[^1] wants to order those products. For that, we need to let the system know how many products (listings) we have to sell in our shop (facility).

Let's add a stock to the listings we created for our facility.

## Add stock to listing

{% stepper %}
{% step %}
**Open the stocks endpoint**

In Postman, find the `POST Create Stock` endpoint and click to open. You'll see the body is prefilled with some data. For example:

```json
{
    "facilityRef": "PUT-IN-YOUR-FACILITY-ID",
    "tenantFacilityId": "PUT-IN-YOUR-TENANT-FACILITY-ID",
    "tenantArticleId": "PUT-IN-YOUR-TENANT-ARTICLE-ID",
    "value": 100,
    "properties": {
        "batchNo": "9890"
    },
    "receiptDate": "2024-11-23T11:18:14.214Z",
    "traitConfig": [{
        "trait": "ACCESSIBLE",
        "enabled": false
    }, {
        "trait": "PICKABLE",
        "enabled": false
    }]
}
```

{% hint style="info" %}
We're only using the required fields in this example, and not all the available option. See [our stocks article](/documentation/by-pillar/global-inventory-hub/stock.md) for more details and the API specification.
{% endhint %}
{% endstep %}

{% step %}
**Get the facility ID**

Copy the `id` that was created from our [Facilities in your free trial](/documentation/using-our-free-trial/free-trial-information/facilities-in-your-free-trial.md) article and paste into the request body where it says `PUT-IN-YOUR-FACILITY-ID`
{% endstep %}

{% step %}
**Get the article ID**

Copy the `tenantArticleId` from one of the listings we created in [Listings in your free trial](/documentation/using-our-free-trial/free-trial-information/listings-in-your-free-trial.md) and paste into the request body where it says `PUT-IN-YOUR-TENANT-ARTICLE-ID`
{% endstep %}

{% step %}
**Delete tenant facility line**

As we didn't use a `tenantFacilityId` when we set up our facility, we need to remove this line from the request.

```json
    "tenantFacilityId": "PUT-IN-YOUR-TENANT-FACILITY-ID",
```

{% endstep %}

{% step %}
**Edit data**

You can edit the body in any other way you wish, or leave it as it is.
{% endstep %}

{% step %}
**Send the request**

Click **Send**.

{% hint style="info" %}
Ensure you've refreshed your `authToken` if it's been more than 60 minutes since your last refresh.
{% endhint %}

You should get a `201 Created` response. You'll notice some extra fields that are part of the response and have been automatically created.
{% endstep %}
{% endstepper %}

The stock will also be visible in Backoffice for other team members to use, but we'll go through that later in this section.

In the next article, we'll take you through orders. What they are, how to set them up, and how to edit them.

[^1]: The end user is making the purchase, whether online or offline.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fulfillmenttools.com/documentation/using-our-free-trial/free-trial-information/configuring-stock-in-your-free-trial.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
