Create Movie

Create Movie

To create the data in the specified collection with the specified parameters. When a JSON object is saved, the object properties are automatically added to the collection you specified.

Method : POST

URL : /api/movie

Body : JSON

{
	"name": "New Movie",
	"description": "Description New Movie",
	"image_url": "https://www.themoviedb.org/t/p/w300_and_h450_bestv2/AkJQpZp9WoNdj7pLYSj1L0RcMMN.jpg",
	"video_url": "https://youtu.be/wb49-oV0F78",
	"release_date": "2023-02-13",
	"language": "English",
	"status": 2,
	"director_id": 1,
	"studio_id": 1,
	"actors": [
		{
			"value": 1,
			"label": "Tom Cruise"
		}
	],
	"categories": [
		{
			"value": 1,
			"label": "Action"
		}
	]
}
nameRequired
string

Name of movie.

description
string

Description of movie.

image_url
string

Image URL of movie poster.

video_url
string

Video URL of movie trailer.

release_date
string (date)

Release Date of movie.

language
string

Language of movie.

status
integer

Status of movie. 1 (Production) | 2 (Released)

director_id
integer

Director ID of movie.

studio_id
integer

Studio ID of movie.

actors
array of object

Movie actors.

[
	{
		"value": "ID of Actor"
	},
	{
		"value": "ID of Actor"
	}
]
categories
array of object

Movie categories

[
	{
		"value": "ID of Category"
	},
	{
		"value": "ID of Category"
	}
]

Response : 200 - OK

{
	"message": "Success add movies"
}

Response : 422 - Unprocessable Content

{
	"error": "Name required"
}

Response : 500 - Server Error

Internal Server Error