# STO01 - Import a stock file

Description

Import a .csv file to update stock for offers, either globally or per warehouse.
Returns an import identifier to track the status of the import and retrieve an error report if applicable.



Call Frequency

Recommended usage: Every 5 minutes when stock needs updating
Maximum usage: Once per minute
Read More

More contextAbout the stock import file format

Endpoint: POST /api/offers/stock/imports

## Query parameters:

  - `shop_id` (integer)
    Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

## Request fields (multipart/form-data):

  - `file` (string, required)
    Import CSV file to upload. Use multipart/form-data with name file.
Csv format:

"offer-sku";"quantity";"warehouse-code";"update-delete"

    1 line = 1 offer quantity
    List quantities per warehouse for the same offer together
    If warehouse-code is not provided, the quantity provided for the offer-sku will be considered as a global one

## Response 201 fields (application/json):

  - `import_id` (string)
    Offer stock import identifier


