Toggle A Collection's Published Status

Publish Collection

PATCH {{URL}}/api/v1/collections/:collection_id/publish

This endpoint allows an admin user to publish or archive a specific collection.

Path Parameters

Name
Type
Description

collection_id

string

The ID of the collection to be published

Headers

Name
Type
Description

Authentication

string

Authentication token of the admin user.

{
    "status": "success",
    "message": "Collection has been successfully published",
    "results": 1,
    "data": {
        "looks": [
            "61320f1dfcfe461f74c88184",
            "6132112fff2fad355444e231",
            "61321156ff2fad355444e23a",
            "61321a5bdf3f2b259429d773",
            "61321a5ddf3f2b259429d778",
            "61321a5fdf3f2b259429d77d",
            "61321a60df3f2b259429d782",
            "61321a62df3f2b259429d787"
        ],
        "published": false,
        "createdAt": "2021-08-28T20:49:12.603Z",
        "coverPhoto": "https://auragallery.s3.amazonaws.com/collections/pexels-pixabay-247376-1630700817373.jpg",
        "_id": "612aa3583796d6002360b54b",
        "name": "collection 1",
        "designer": "612a1ff44089de0023703c33",
        "description": "Lions are the most Social Big cats, the African Lion",
        "slug": "collection-1",
        "__v": 0,
        "updatedAt": "2021-09-03T20:25:06.459Z"
    }
}

Last updated

Was this helpful?