POST
/
addOutOfStockItem
curl --request POST \
  --url https://api.getjusto.com/api/v1/addOutOfStockItem \
  --header 'Content-Type: application/json' \
  --data '{
  "storeId": "Li4eEa3W2hiuGGCFa",
  "modifierId": "XS3wWdedwKRRYrZZt",
  "modifierOptionId": "Na4Ha7ShFbDsvcRKg",
  "untilDate": "Thu Jul 30 2020 10:11:45 GMT-0400 (hora estándar de Chile)",
  "type": "modifier"
}'
{
  "status": "ok",
  "data": {
    "_id": "erCB5SjdcopHCLTfk",
    "type": "modifier",
    "websiteId": "ErCkmcyCEovseJq5E",
    "store": {
      "_id": "Li4eEa3W2hiuGGCFa",
      "name": "Colón",
      "externalId": "pupi"
    },
    "modifier": {
      "_id": "XS3wWdedwKRRYrZZt",
      "name": "¿Necesitas ayuda para los palitos?",
      "externalId": "null"
    },
    "modifierOption": {
      "_id": "Na4Ha7ShFbDsvcRKg",
      "name": "Si",
      "externalId": "null"
    },
    "until": "tomorrow",
    "untilDate": "2020-07-30T10:00:00.000Z",
    "createAt": "2020-07-29T14:14:33.347Z"
  }
}

Descripcón

Este método permite marcar un producto o un modificador como no disponible en una tienda específica hasta una fecha determinada.

Ejemplo para agotar un producto

Llamada

{
  "storeId": "Li4eEa3W2hiuGGCFa",
  "productId": "XS3wWdedwKRRYrZZt",
  "untilDate": "Thu Jul 30 2020 10:11:45 GMT-0400 (hora estándar de Chile)",
  "type": "product"
}

Respuesta

Respuesta en la barra lateral “200”

{
  "status": "ok",
  "data": {
    <OutOfStockItem>
  }
}

Ejemplo para agotar un modificador

Llamada

Endpoint:
POST /addOutOfStockItem

{
  "storeId": "Li4eEa3W2hiuGGCFa",
  "modifierId": "XS3wWdedwKRRYrZZt",
  "modifierOptionId": "Na4Ha7ShFbDsvcRKg",
  "untilDate": "Thu Jul 30 2020 10:11:45 GMT-0400 (hora estándar de Chile)",
  "type": "modifier"
}

Respuesta

Respuesta en la barra lateral “200”

{
  "status": "ok",
  "data": {
     <OutOfStockItem>
  }
}

Body

application/json

Response

200
application/json

Operación exitosa

The response is of type object.