Light Services

Publish a new version of an option's file

Publishes to the file one of the product's options hands over. The deliverable id comes from the deliverables endpoint, where an option's deliverable carries an option_id. The product's own file is published through the product route instead.

POST
/products/{product}/deliverables/{deliverable}/versions

Authorization

bearerAuth
AuthorizationBearer <token>

Personal access token generated in the admin dashboard.

In: header

Path Parameters

product*integer

The product ID

deliverable*integer

The deliverable ID

Request Body

multipart/form-data

version_name*string
Lengthlength <= 255
title*string
Lengthlength <= 255
changelog*string
changelog_format?string
Value in"markdown" | "html"
file*file
Formatbinary

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:8000/api/products/0/deliverables/0/versions" \  -F version_name="string" \  -F title="string" \  -F changelog="string" \  -F file="string"
{
  "data": {
    "id": 0,
    "product_id": "string",
    "option_id": 0,
    "deliverable_id": 0,
    "deliverable_name": "string",
    "version_number": "string",
    "title": "string",
    "changelog": "string",
    "download_url": "string",
    "file_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string"
}
{
  "message": "string",
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}