PHPackages                             shirtigo/cockpit-api-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. shirtigo/cockpit-api-client

ActiveLibrary[API Development](/categories/api)

shirtigo/cockpit-api-client
===========================

API Client for print-on-demand using the Shirtigo API

111652[1 PRs](https://github.com/Shirtigo/shirtigo-api-php/pulls)PHP

Since Apr 24Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Shirtigo/shirtigo-api-php)[ Packagist](https://packagist.org/packages/shirtigo/cockpit-api-client)[ RSS](/packages/shirtigo-cockpit-api-client/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

shirtigo-api-php
================

[](#shirtigo-api-php)

A PHP implementation of a client for the shirtigo print API. Check out our [REST-API documentation](https://cockpit.shirtigo.com/docs/rest-api/) for a full list of all features. Almost all features of the Shirtigo Cockpit can be accessed through our API, providing developers with a comprehensive interface to interact with and manage the platform's functionality programmatically. This enables seamless integration with various applications and platforms, ensuring a versatile and adaptable user experience.

In the following sections, we will showcase some examples that demonstrate the core functionality of the API, highlighting its key features and capabilities. These examples will provide a better understanding of how to interact with the API and leverage its potential to meet your specific requirements.

If you have any open questions or require further assistance, please don't hesitate to contact our technical support team at . Our experts will be more than happy to help you and provide guidance to ensure a smooth and efficient experience using our API.

Basic usage
===========

[](#basic-usage)

Client object initialization
----------------------------

[](#client-object-initialization)

```
use Shirtigo\ApiClient\ApiClient;

$BASE_URL = "https://cockpit.shirtigo.com/api/";
$API_TOKEN = "YOUR_API_TOKEN";

$client = new ApiClient($API_TOKEN, $BASE_URL);
```

Access your shirtigo account data
---------------------------------

[](#access-your-shirtigo-account-data)

```
$data = $client->get('user');
echo "{$data->firstname} {$data->lastname}";
```

Design
======

[](#design)

A "design" object represents a print motif that can be subsequently utilized for the creation of various products.

Uploading a design
------------------

[](#uploading-a-design)

The product creation reqires to upload a design first.

### From file:

[](#from-file)

```
$design_path = './test_design.png';

$design = $client->post('designs/file', [], [], [
    'file' => fopen($design_path, 'r'),
]);
```

### From URL:

[](#from-url)

```
$design = $client->post('designs/url', [
    'url' => "https:/my-web-storage/my-design.png",
]);
```

Get a list of your existing designs
-----------------------------------

[](#get-a-list-of-your-existing-designs)

```
$designs = $client->get('designs')->data;
```

BaseProducts
============

[](#baseproducts)

BaseProducts are blank products that can be combined with designs. A list of our assortment can also be downloaded as xlsx file in the Cockpit dashboard: [Download Catalog](https://cockpit.shirtigo.com/app/baseproducts/xlsxfile)

Get a list of all baseProducts
------------------------------

[](#get-a-list-of-all-baseproducts)

```
$baseProducts = $client->get('base-products')->data;
```

Create a product collection
===========================

[](#create-a-product-collection)

Products are organized into collections, with each baseProduct being assignable to a collection/ project only once. To create a new product, first create a project, and then, in a subsequent step, assign the desired products to that project.

Create a project
----------------

[](#create-a-project)

```
$data = [
    'name' => "My test project " + random_string(),
];

$project = $client->post('projects', $data);
```

Add a product to the project
----------------------------

[](#add-a-product-to-the-project)

In this example we will add a black Organic Shirt with a one-sided print to our project. The processing specifications define the design, its placement, dimensions, and other relevant details needed for customizing the BaseProduct. Please not, that you can add custom processings for each color.

```
$data = [
    "project_id" => $project->reference,
    "base_product_id" => 235,
    "processings" => [
        [
            "processingarea_type" => "front",
            "processingposition" => "chest-center",
            "processingmethod" => "dtg",
            "design_reference" => $design->reference,
            "offset_top" => 50,
            "offset_center" => 0,
            "width" => 250,
            "is_customizable" => false,
            "force_position" => false,
            "colors" => [
                [
                    "colorId" => 326,
                    "price" => 2195,
                    "sortPosition" => 1
                ]
            ]
        ]
    ]
];

$product = $client->post('customized-product', $data);
```

Create an order
===============

[](#create-an-order)

Depending on your usecase there a different ways to place an order

- Order a existing product
- Order a non-existing product (e.g. each of your products is customized)

Order an existing product from your account
-------------------------------------------

[](#order-an-existing-product-from-your-account)

In this szenario the sku for your existing product has the following pattern: productId + baseProductColorId + baseProductSizeId

```
$data = [
    'delivery' => [
      'title' => 'Dr.',
      'company' => 'Shirtigo GmbH',
      'firstname' => 'Max',
      'lastname' => 'Mustermann',
      'street' => 'Musterstraße 12',
      'postcode' => '12345',
      'city' => 'Köln',
      'country' => 'Deutschland'
    ],
    'sender' => [
      'title' => 'Dr.',
      'company' => 'Shirtigo GmbH',
      'firstname' => 'Max',
      'lastname' => 'Mustermann',
      'street' => 'Musterstraße 12',
      'postcode' => '12345',
      'city' => 'Köln',
      'country' => 'Deutschland'
    ],
    'products' => [
        'sku' => 'c123456.122.8',
        'amount' => 1
    ]
];

$order = $client->post('orders', $data);
```

Order a non-existing product
----------------------------

[](#order-a-non-existing-product)

In this scenario, the base\_product\_sku is utilized to specify the variant of the BaseProduct (e.g., STTU755C0021S for an Organic Shirt in Black, size S). Along with the SKU, it is necessary to provide the processing specifications for customization, which follow the same format as adding a product to a project.

```
$data = [
    'delivery' => [
      'title' => 'Dr.',
      'company' => 'Shirtigo GmbH',
      'firstname' => 'Max',
      'lastname' => 'Mustermann',
      'street' => 'Musterstraße 12',
      'postcode' => '12345',
      'city' => 'Köln',
      'country' => 'Deutschland'
    ],
    'sender' => [
      'title' => 'Dr.',
      'company' => 'Shirtigo GmbH',
      'firstname' => 'Max',
      'lastname' => 'Mustermann',
      'street' => 'Musterstraße 12',
      'postcode' => '12345',
      'city' => 'Köln',
      'country' => 'Deutschland'
    ],
    'products' => [
        'base_product_sku' => 'STTU755C0021S',
        'sales_price_gross' => '2199',
        'amount' => 1,
        'processings' => [
            [
                'design_url' => 'https://mydomain.com/myimage.png',
                'width' => 250,
                'height' => 350,
                'processingarea_type' => 'front',
                'processingposition' => 'chest-center',
                'processingmethod' => 'dtg',
                'offset_top' => 20,
                'offset_center' => 0,
                'force_position' => false,
            ],
        ],
    ],
];

$order = $client->post('orders', $data);
```

Check the current price for a planned order/ cart
-------------------------------------------------

[](#check-the-current-price-for-a-planned-order-cart)

```
$prices = $client->post('orders/predict-price', $order_data);
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/641300?v=4)[Valentin Manthei](/maintainers/valentinmanthei)[@valentinmanthei](https://github.com/valentinmanthei)

---

Top Contributors

[![tp-shirtigo](https://avatars.githubusercontent.com/u/33502472?v=4)](https://github.com/tp-shirtigo "tp-shirtigo (7 commits)")[![mb-shirtigo](https://avatars.githubusercontent.com/u/46360619?v=4)](https://github.com/mb-shirtigo "mb-shirtigo (3 commits)")[![chriskonnertz](https://avatars.githubusercontent.com/u/4319323?v=4)](https://github.com/chriskonnertz "chriskonnertz (2 commits)")[![chmacher](https://avatars.githubusercontent.com/u/43045609?v=4)](https://github.com/chmacher "chmacher (1 commits)")[![KarimGeiger](https://avatars.githubusercontent.com/u/2329930?v=4)](https://github.com/KarimGeiger "KarimGeiger (1 commits)")[![jojonas](https://avatars.githubusercontent.com/u/5059857?v=4)](https://github.com/jojonas "jojonas (1 commits)")[![fealXX](https://avatars.githubusercontent.com/u/7534146?v=4)](https://github.com/fealXX "fealXX (1 commits)")[![ghostzero](https://avatars.githubusercontent.com/u/6547306?v=4)](https://github.com/ghostzero "ghostzero (1 commits)")

---

Tags

api-clientprintshirtigo-apishirts

### Embed Badge

![Health badge](/badges/shirtigo-cockpit-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/shirtigo-cockpit-api-client/health.svg)](https://phpackages.com/packages/shirtigo-cockpit-api-client)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
