OfficeGest
Stocks/Articles/{article}/Lots

Create article lot

Creates a new lot for the selected article and initializes stock records for the selected warehouse.

POST
/stocks/articles/{article}/lots
AuthorizationBearer <token>

In: header

Path Parameters

articlestring
idstring

Lot identifier

Length3 <= length
descriptionstring

Lot description

Length3 <= length
entry_date?string

Lot entry date (Y-m-d)

Formatdate
expiration_date?string

Lot expiration date (Y-m-d)

Formatdate
warehouse_id?integer

Warehouse id where the lot will be initialized

Response Body

curl -X POST "https://og-tenant1.test:8003/api/v2/stocks/articles/string/lots" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "description": "string"
  }'
{
  "data": {
    "id": "string",
    "description": "string",
    "entry_date": "2019-08-24",
    "expiration_date": "2019-08-24",
    "warehouse_id": "string",
    "stock": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}