MIRAKL CODE : OF24

 

DESCRIPTION: Créer, mettre à jour ou supprimer une offre

 

URL STRUCTURE : {{URL}}/offers?api_key={{SHOP_KEY}}
METHOD : POST
QUERY PARAMETERS : shop_id - This parameter should be used when your user has access to multiple shops. If not mentioned, the shop_id from your default shop will be used.

INPUT : OffersBean - [required] List of representation of offers

 

JSONXML
{
  "offers": [{     "available_ended": Date,     "available_started": Date,     "description": String,     
"discount": {       
"end_date": Date,       
"price": Number,       
"start_date": Date     },     
"internal_description": String,     
"logistic_class": String,     
"min_quantity_alert": Number,     
"offer_additional_fields": [{       
"code": String,       
"value": String     }],     
"price": Number,     
"price_additional_info": String,     
"product_id": String,     
"product_id_type": String,     
"quantity": Number,     
"shop_sku": String,     
"state_code": String,     
"update_delete": String   }]
 }
<body>
  <offers>
    <offer> [zero or N]       
<available_ended>xsd:datetime</available_ended>       
<available_started>xsd:datetime</available_started>       
<description>xsd:string</description>       
<discount>         
<end_date>xsd:datetime</end_date>         
<price>xsd:decimal</price>         
<start_date>xsd:datetime</start_date>       
</discount>       
<internal_description>xsd:string</internal_description>       
<logistic_class>xsd:string</logistic_class>       
<min_quantity_alert>xsd:int</min_quantity_alert>       
<offer_additional_fields>         
<offer_additional_field> [zero or N]           
<code>xsd:string</code>           
<value>xsd:string</value>         
</offer_additional_field>       
</offer_additional_fields>       
<price>xsd:decimal</price>       
<price_additional_info>xsd:string</price_additional_info>       
<product_id>xsd:string</product_id>       
<product_id_type>xsd:string</product_id_type>       
<quantity>xsd:int</quantity>       
<shop_sku>xsd:string</shop_sku>       
<state_code>xsd:string</state_code>       
<update_delete>xsd:string</update_delete>     
</offer>
  </offers>
</body>

 

Attributes details

NameTypeRequiredNillableDescription
offersoffer [zero or N]truefalse 

 

available_endedxsd:datetimetruetrueEnd date of the period of availability

 

available_startedxsd:datetimetruetrueStarted date of the period of availability

 

descriptionxsd:stringtruetrueDescription of the offer

 

discountdiscountfalsetrueDiscount of an offer

 

end_datexsd:datetimefalsetrueDiscount end date

 

pricexsd:decimalfalsetrueDiscount price

 

start_datexsd:datetimefalsetrueDiscount start date

 

internal_descriptionxsd:stringtruetrueInternal description of the offer

 

logistic_classxsd:stringfalsefalse 

 

min_quantity_alertxsd:inttruetrueMinimum quantity of the offer

 

offer_additional_fieldsoffer_additional_field[zero or N]falsefalseAdditional fields of the offer

 

codexsd:stringtruefalseCode of the additional field

 

valuexsd:stringtruefalseValue of the additional field

 

pricexsd:decimaltruefalsePrice of the offer

 

price_additional_infoxsd:stringfalsetruePrice additional information of the offer

 

product_idxsd:stringtruetrueReference of the product associated with the offer

 

product_id_typexsd:stringtruetrueReference type of the product associated with the offer

 

quantityxsd:inttruefalseQuantity available of the offer

 

shop_skuxsd:stringtruefalseSku of the offer

 

state_codexsd:stringtruefalseState of the offer

 

update_deletexsd:stringtruetrueUpdate delete flag. Could be empty (means "update"), "update" or "delete".

 

OUTPUT : Offer import tracking information
JSON
XML
{
  "import_id": Number,
  "product_import_id": Number
 }
<offer_import_tracking>
  <import_id>xsd:long</import_id>
  <product_import_id>xsd:long</product_import_id>
</offer_import_tracking>

 

PRODUCES : application/json
                     application/xml

CONSUMES : application/json
                     application/xml



HTTP RETURN CODES : 201 - Success

HTTP RESPONSE HEADERS : Location - URL of the new import