Update a Collection

Update by ID

GET https://api.moltin.com/v2/collections/:id

Path Parameters

NameTypeDescription

id

string

The ID for the collection to update

Headers

NameTypeDescription

Authorization

string

The Bearer token to grant access to the API

Request Body

NameTypeDescription

type

string

Represents the type of object being returned

name

string

The name of the collection

slug

string

A unique slug identifier for the collection

description

string

Any description for this collection

status

string

live or draft depending on the collection status

{
    "data": {
        "id": "645f97aa-ae63-4ee9-9259-062e570ba064",
        "type": "collection",
        "status": "draft",
        "name": "Collection #1 Updated",
        "slug": "collection-1-update",
        "description": "First collection updated",
        "meta": {
            "timestamps": {
                "created_at": "2018-05-10T14:23:18+00:00",
                "updated_at": "2018-05-10T14:23:18+00:00"
            }
        },
        "relationships": {}
    }
}
curl -X PUT https://api.moltin.com/v2/collections/:id \
    -H "Authorization: Bearer XXXX" \
    -H "Content-Type: application/json" \
    -d $'{
        "data": {
            "type": "collection",
            "id": "645f97aa-ae63-4ee9-9259-062e570ba064",
            "name": "Collection #1 Updated",
            "slug": "collection-1-update",
            "description": "First collection updated",
            "status": "live"
        }
    }'

Last updated