Projects > Images


Image Type

Type Explain
1 project > header image
3 project > small image
4 project > slider banner image
5 project > static banner image
6 project > feature image

Index

GET : /api/designnest/v1/projects/{projectID}/images

projectID : the ID of the current project

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : [
        "image_type" : {
            {
                "id" => 0 ,
                "url" => "" ,
                "title" => "" ,
                "content" => "" ,
                "updated_time" => "" ,
                "sorting_order" => 0
            } ,
            ...
        } ,
        ...
    ]
}

Store

POST : /api/designnest/v1/projects/{projectID}/images

projectID : the ID of the current project

Request :

{
    "project" : {
        "image" : {
            "type" : 0 ,
            "url"  : "" ,
            "title"   : "" ,
            "content" : ""  ,
            "sort" : 0 - 99
        }
    }
}

Response :

{
    "code" : 1 ,
    "message" : "" ,
    "data" : [
        "id" => 0 , 
    ]
}

Update

Patch : /api/designnest/v1/projects/{projectID}/images/{imageID}

projectID : the ID of the current project

imageID : the ID of the current image

Request :

{
    "project" : {
        "image" : {
            "type" : 0 ,
            "url"  : "" ,
            "title"   : "" ,
            "content" : "" ,
            "sort" : 0 - 99
        }
    }
}

Response :

{
    "code" : 1 ,
    "message" : "" ,
}

Destroy

Delete : /api/designnest/v1/projects/{projectID}/images/{imageID}

projectID : the ID of the current project

imageID : the ID of the current image

Response :

{
    "code" : 1 ,
    "message" : "" ,
}