Skip to content

OF01 - Import a file to create, update or delete offers

Request

Description

Returns the import identifier to track the status of the import.

Call Frequency
Maximum usage: Once per minute with offers only, once every 15 minutes with offers and products, for each seller
Read More
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_OFFER_WRITE)
Query
shop_idinteger, (int64)

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

Bodymultipart/form-data
filestring, (binary)required

Import file (CSV or XML or XLSX) to upload. Use multipart/form-data with name file.
Csv format:

"sku";"product-id";"product-id-type";"description";"internal-description";"price";"price-additional-info";"quantity";"min-quantity-alert";"state";"available-start-date";"available-end-date";"discount-price";"discount-start-date";"discount-end-date";"discount-ranges";"allow-quote-requests";"leadtime-to-ship";"min-order-quantity";"max-order-quantity";"package-quantity";"update-delete";"price-ranges";"ecotax";"gift-wrap";"min-quantity-ordered"


If you use specific sales channels, use:
"price[channel=channel code]";"discount-price[channel=channel code]";"discount-start-date[channel=channel code]";"discount-end-date[channel=channel code]";"discount-ranges[channel=channel code]";"price-ranges[channel=channel code]"

If you use the price per measurement unit feature, use pricing-unit to specify the unit corresponding to the submitted price.

If US Tax options are activated on the platform, use: product-tax-code to facilitate tax calculations.

If Data collection related to circular economy regulations is enabled, use:
"producer-id[EPR category code]"; "eco-contribution-amount[EPR category code]"
EPR category code must be one of:
FR-AGROPACK, FR-ASL, FR-DASRIPAT, FR-DBPS, FR-DDS, FR-DEA, FR-DEEE, FR-DISPMED, FR-DIY, FR-EMBM, FR-GF, FR-JOUETS, FR-LUB, FR-MH, FR-MNU, FR-PA, FR-PAP, FR-PCHIM, FR-PMCB, FR-PNEU, FR-TABAC, FR-TLC, FR-VEHICULE, FR-VHU, DE-BATTG, DE-PACK, DE-WEEE, ES-PACK, ES-GPACK, ES-WEEE

import_modestringrequired

Enum: "NORMAL", "REPLACE"

See deprecated values

Deprecated values: "PARTIAL_UPDATE"

operator_formatboolean

Force the use of the operator product format

Default:false
with_productsboolean

This file also contains product information

Default:false
curl -i -X POST \
  https://your-instance.mirakl.net/api/offers/imports \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@path/to/file' \
  -F 'import_mode="\"NORMAL\"";type=application/json' \
  -F 'operator_format="true";type=application/json' \
  -F 'with_products="true";type=application/json'

Responses

Created

Headers
Locationany

Pre-calculated URL to call to get the import status

Bodyapplication/json
import_idinteger, (int64)required

Offer import identifier. If Mirakl detects a duplicate import request, the API will return the import_id of the existing import rather than creating a new one.

product_import_idinteger, (int64)

Product import identifier

Response
{ "import_id": 2035, "product_import_id": 2036 }