createMarketplaceCollection

This mutation allows the creation of a marketplace collection.

Sample Mutation

Create a collection within a marketplace with a name Collection_2:

mutation{
  createMarketplaceCollection(marketplaceID:"d15b1b02-3c87-434d-a7fb-004b27415fbc" data:{
    name:"collection_2"
    description:"testing-collection"
    startDate:"2022-02-22T12:50:02Z"
    endDate:"2023-01-20T15:51:02Z"
    status:Active
  }){
    id
    marketplaceID
    name
    slug
    description
    status
    startDate
    endDate
  }
}

Sample Response

{
  "data": {
    "createMarketplaceCollection": {
      "id": "e94ff1c3-d865-4d7a-b126-389eb1a1a551",
      "marketplaceID": "d15b1b02-3c87-434d-a7fb-004b27415fbc",
      "name": "collection_2",
      "slug": "collection2",
      "description": "testing-collection",
      "status": "Active",
      "startDate": "2022-02-22T12:50:02Z",
      "endDate": "2023-01-20T15:51:02Z"
    }
  }
}

Result

727727

Arguments

Name

Type

Description

Required

marketplaceID

String

The marketplace ID.

Yes

data

Object

Contains information from MarketplaceCollectionCreateInput that is required for creating the collection.

Yes

Return

Name

Type

Description

MarketplaceCollection

Object

Contains information from MarketplaceCollection such as ID, marketplace ID, name, slug, description, status, etc.

Example

Create a collection in a specific marketplace using Marketplace ID and data input: