- Mirakl Platform
- Rest Seller APIs
- OF52 - Export offers CSV or JSON file asynchronously
Export status and files links can be retrieved by calling OF53.
Get a CSV or JSON file that includes the offers updated and deleted since the last request date.
Please adapt these values on PROD environments.
- Differential: every 5 minutes
- Full: once per day
- Differential: once per minute
- Full: once per day
List of the channel codes to filter with. If specified, only offers that can be sold on the specified channel(s) will be returned. If not, offers will be returned regardless of their channels.
Format of the generated files: CSV or JSON (value is either text/csv or application/json). Default to text/csv.
Enum: "text/csv", "application/json"
Specify which columns (CSV) or fields (JSON) will be returned. If specified, only the listed columns/fields will be returned, otherwise all will be returned. If combined with rename_fields, include_fields must use the original header/field names.
When calling the API in full mode (i.e. when no last_request_date is provided), inactive offers are not returned. To retrieve both active and inactive offers, set this field to true.
When calling the API in differential mode (i.e. when the last_request_date is provided), both active and inactive offers are returned. This field cannot be used in differential mode otherwise the call fails.
Date and time of your last request.
If provided, retrieves all offers updated since this date and time, including deleted and inactive offers.
If not provided, retrieves all active offers only, unless otherwise specified in the include_inactive_offers field.
List of discount campaign identifiers to filter with. If specified, only offers currently participating in the specified ongoing discount campaign(s) will be returned.
This is only supported for CSV export. Can be used to modify the name of the CSV headers. The expected format is a JSON object with the original fields as keys and the substitute as value.
{"offer-id": "offerId", "shop-name":"shopName"}If the setting Export shipping charges and delivery times has been enabled, list of the shipping zones codes to filter with. If specified, only shipping information linked to the given zones will be returned. Otherwise, all shipping information for all zones will be returned.
- URL to be replaced by your Mirakl instance URLhttps://your-instance.mirakl.net/api/offers/export/async
curl -i -X POST \
'https://your-instance.mirakl.net/api/offers/export/async?shop_id=0' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"channel_codes": [
"B2B"
],
"export_type": "text/csv",
"include_fields": [
"active",
"allow-quote-requests",
"available-end-date",
"available-start-date",
"channels",
"currency-iso-code",
"date-created",
"deleted",
"description",
"discount-end-date",
"discount-price",
"discount-ranges",
"discount-start-date",
"favorite-rank",
"fulfillment-center-code",
"leadtime-to-ship",
"logistic-class",
"measurement-units",
"min-shipping-price",
"min-shipping-price-additional",
"min-shipping-type",
"min-shipping-zone",
"offer-id",
"origin-price",
"premium",
"price",
"price[channel=B2B]",
"price-additional-info",
"price-ranges",
"product-sku",
"professional",
"quantity",
"shop-id",
"shop-name",
"shop-sku",
"state-code",
"total-price",
"ongoing-discount-campaigns"
],
"items_per_chunk": 10000,
"last_request_date": "2021-11-12T02:34:00Z",
"megabytes_per_chunk": 100,
"ongoing_discount_campaign_identifiers": [
"1_JANUARY_PROMOTION_CAMPAIGN",
"2_FEBRUARY_PROMOTION_CAMPAIGN"
],
"rename_fields": {
"active": "active",
"allow-quote-requests": "allowQuoteRequests",
"available-end-date": "availableEndDate",
"available-start-date": "availableStartDate",
"channels": "channels",
"currency-iso-code": "currencyIsoCode",
"date-created": "dateCreated",
"deleted": "deleted",
"description": "description",
"discount-end-date": "discountEndDate",
"discount-price": "discountPrice",
"discount-ranges": "discountRanges",
"discount-start-date": "discountStartDate",
"favorite-rank": "favoriteRank",
"fulfillment-center-code": "fulfillmentCenterCode",
"leadtime-to-ship": "leadtimeToShip",
"logistic-class": "logisticClass",
"measurement-units": "measurementUnits",
"min-shipping-price": "minShippingPrice",
"min-shipping-price-additional": "minShippingPriceAdditional",
"min-shipping-type": "minShippingType",
"min-shipping-zone": "minShippingZone",
"offer-id": "offerId",
"ongoing-discount-campaigns": "ongoingDiscountCampaigns",
"origin-price": "originPrice",
"premium": "premium",
"price": "price",
"price-additional-info": "priceAdditionalinfo",
"price-ranges": "priceRanges",
"product-sku": "productSku",
"professional": "professional",
"quantity": "quantity",
"shop-id": "shopId",
"shop-name": "shopName",
"state-code": "stateCode",
"total-price": "totalPrice"
},
"shipping_zones": [
"DOM1"
]
}'