Skip to content

OF24 - Create, update, or delete offers

Request

Description

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

You must send all offer fields. Offer fields that are not sent are reset to their default value.

Call Frequency
Maximum usage: Once per minute
Security
Operator-Bearer-Token or OAuth-2
Query
shopinteger, (int64)required

Shop ID

Bodyapplication/json
offersArray of objectsrequired

Offers list

curl -i -X POST \
  'https://your-instance.mirakl.net/api/offers?shop=0' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "offers": [
      {
        "all_prices": [
          {
            "channel_code": "US",
            "discount_end_date": "2019-04-29T22:00:00Z",
            "discount_start_date": "2019-04-01T22:00:00Z",
            "unit_discount_price": "49",
            "unit_origin_price": 50,
            "volume_prices": [
              {
                "quantity_threshold": 5,
                "unit_discount_price": 45,
                "unit_origin_price": 48
              }
            ]
          }
        ],
        "allow_quote_requests": false,
        "available_ended": "2019-05-29T22:00:00Z",
        "available_started": "2019-03-01T22:00:00Z",
        "description": "Offer for product MKP100000000154824",
        "discount": {
          "end_date": "2019-05-31T22:00:00Z",
          "price": 49,
          "ranges": [
            {
              "price": 45,
              "quantity_threshold": 5
            }
          ],
          "start_date": "2019-03-31T22:00:00Z"
        },
        "eco_contributions": [
          {
            "eco_contribution_amount": 3.59,
            "epr_category_code": "FR-DEA",
            "producer_id": "FR123456_89ABCD"
          },
          {
            "eco_contribution_amount": 0.99,
            "epr_category_code": "DE-WEEE",
            "producer_id": "ProducerID1"
          }
        ],
        "internal_description": "Offer for product MKP100000000154824",
        "leadtime_to_ship": 5,
        "logistic_class": "M",
        "max_order_quantity": 3,
        "min_order_quantity": 1,
        "min_quantity_alert": 2,
        "offer_additional_fields": [
          {
            "code": "ecotax",
            "value": "20"
          }
        ],
        "package_quantity": "2",
        "price": 50,
        "price_additional_info": "Apply Discount prices",
        "product_id": "9400016774345",
        "product_id_type": "EAN",
        "product_tax_code": "tax",
        "quantity": "5000",
        "shop_sku": "Offer_SKU_001",
        "state_code": "11",
        "update_delete": "update"
      }
    ]
  }'

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.

Response
{ "import_id": 2044 }