Merchrocket.Client 1.0.0

dotnet add package Merchrocket.Client --version 1.0.0
                    
NuGet\Install-Package Merchrocket.Client -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Merchrocket.Client" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Merchrocket.Client" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Merchrocket.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Merchrocket.Client --version 1.0.0
                    
#r "nuget: Merchrocket.Client, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Merchrocket.Client@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Merchrocket.Client&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Merchrocket.Client&version=1.0.0
                    
Install as a Cake Tool

Merchrocket Client

The Merchrocket Client is a comprehensive library designed to facilitate interaction with the Merchrocket API, providing a simplified way to access various endpoints such as Catalog Products, Catalog Product Variants, and Mockup Tasks.

Features

  • Easy Configuration: Configure the SDK with minimal setup using the MerchrocketConfig.
  • Comprehensive Endpoints: Access to Catalog Products, Catalog Product Variants, and Mockup Tasks through well-defined interfaces.
  • Extensible: Built with flexibility in mind, allowing for easy extension and customization.

Getting Started

To get started with the Merchrocket Client SDK, you need to configure it with your project's IServiceCollection. This setup involves providing a MerchrocketConfig instance and registering the necessary services and endpoints.

Prerequisites

Ensure you have a .NET project set up and ready to integrate with the Merchrocket Client SDK.

Installation

  1. First, add the Merchrocket Client SDK to your project. (This section will be updated with package installation instructions once available.)

  2. Configure the IServiceCollection in your startup class or wherever you configure services:

using Merchrocket.Client.Extensions;
using Merchrocket.Client.Models.Config;

public void ConfigureServices(IServiceCollection services)
{
    var merchrocketConfig = new MerchrocketConfig
    {
        // Configuration properties here
    };

    services.AddMerchrocketClient(merchrocketConfig);
}

This will register the MerchrocketClient along with its dependencies and the endpoints: CatalogProductEndpoint, CatalogProductVariantEndpoint, and MockupTaskEndpoint.

Creating a Mockup Task

To create a mockup task, you can use the IMerchrocketClient interface. Here's an example of how to create a mockup task:

using Merchrocket.Client.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

public class MockupTaskService
{
    private readonly IMerchrocketClient _merchrocketClient;

    public MockupTaskService(IMerchrocketClient merchrocketClient)
    {
        _merchrocketClient = merchrocketClient;
    }

    public async Task CreateMockupTaskAsync()
    {
        var mockupTaskRequest = new MockupTaskRequest
        {
            Format = "jpeg",
            RequestedProducts = new List<RequestedProduct>
            {
                new RequestedProduct
                {
                    CatalogProductId = "e2c2e18c-9626-4463-acfa-d5d5610f6c3a",
                    Placements = new List<Placement>
                    {
                        new Placement
                        {
                            Layers = new List<Layer>
                            {
                                new Layer
                                {
                                    Url = "https://d3r2wt7l0tcdny.cloudfront.net/products/mug_heart/print_source.jpg",
                                    Type = "file"
                                }
                            },
                            Technique = "direct_print",
                            Type = "main"
                        }
                    }
                }
            }
        };

        await _merchrocketClient.MockupTask.CreateMockupTaskAsync(mockupTaskRequest);
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 258 6/25/2025