Salesforce

Collection APIs

« Go Back
Information
Collection APIs
000004194
Public
Product Selection
aiWare - aiWare
Article Details

Use these APIs to create and manage collections.

Create a collection

Creates a collection.

Example

mutation newCollection {
  createCollection(input:{
    name:"Test Collection",
    image:"https://edit.co.uk/uploads/2016/12/Image-1-Alternatives-to-stock-photography-Thinkstock.jpg"
    folderDescription:"Interesting Folder"
  }) {
    id
  }
}

Response

{
  "data": {
    "createCollection": {
      "id": "10570"
    }
  }
}

Get collections

Retrieves collections.

Example

query getCollections {
  collections {
    records {
      id
    }
  }

Response

{
  "data": {
    "collections": {
      "records": [
        {
          "id": "10566"
        },
        {
          "id": "10570"
        },
        {
          "id": "10569"
        }
      ]
    }
  }
}

Update a collection

Updates a collection.

Example

mutation {
  updateCollection(input: {folderId: "10566", name: "First Collection", folderDescription: "Folder description of first collection"}) {
    id
    name
  }
}

Response

{
  "data": {
    "updateCollection": {
      "id": "10566",
      "name": "First Collection"
    }
  }
}

Delete a collection

Deletes a collection.

Example

mutation removeCollection {
  deleteCollection(id: "10566") {
    id
  }
}

More API examples

Additional Technical Documentation Information
Properties
8/26/2024 9:35 PM
8/26/2024 9:36 PM
8/26/2024 9:36 PM
Documentation
Documentation
000004194
Translation Information
English

Powered by