This is the documentation for 2022-02-01.

Texts

The endpoint lists all available texts.

List

Returns a collection of texts.

Filtering

You can filter your results as follows:

List texts for specified id(s)

  • /texts?filter[id]=1
  • /texts?filter[id]=1,2,3

List texts for specified collection names(s)

  • /texts?filter[collection_name]=ordered
  • /texts?filter[collection_name]=custom

See: Pagination, Filtering

Example

Request

GET /texts HTTP/1.1

Response

{
    "data": [
        {
            "id": 1,
            "collection_name": "custom",
            "production_method": {
                "id": 1,
                "collection_name": "dtg",
                "handle": "dtg",
                "name": "Direct to garmin",
                "description": "Digital print",
                "created_at": "2022-02-21T11:08:37+00:00",
                "updated_at": "2022-02-21T11:08:37+00:00"
            },
            "media": [
                {
                    "id": 240,
                    "is_test": 0,
                    "collection_name": "preview",
                    "file_name": "preview.png",
                    "size": 1218,
                    "mime_type": "image/png",
                    "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/e1fd546508dd484b908c5fc653f65818/preview.png",
                    "state": "completed",
                    "requested": null,
                    "failure_message": null,
                    "created_at": "2022-05-12T11:17:09+00:00",
                    "updated_at": "2022-05-12T11:17:09+00:00"
                }
            ],
            "lines": [
                {
                    "id": 1,
                    "value": "Example 1",
                    "font": {
                        "id": 1,
                        "family_name": "Roboto",
                        "style": "Bold"
                    },
                    "font_size": 13,
                    "padding_bottom": 18,
                    "horizontal_alignment": "left",
                    "bending_radius": "178.00",
                    "created_at": "2022-05-12T11:17:09+00:00",
                    "updated_at": "2022-05-12T11:17:09+00:00"
                },
            ],
            "width": 76,
            "height": 15,
            "created_at": "2022-05-12T11:17:09+00:00",
            "updated_at": "2022-05-12T11:17:09+00:00"
        },
        ...
    ],
    "links": {
        "first": "https://api.smake.io/v2/texts?page=1",
        "last": null,
        "prev": null,
        "next": "https://api.smake.io/v2/texts?page=2",
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "https://api.smake.io/v2/texts",
        "per_page": 15,
        "to": 15
    }
}

Get

Returns the product variant with the id = x.

Example

Request

GET /texts/1 HTTP/1.1

Response

{
    "id": 1,
    "collection_name": "custom",
    "production_method": {
        "id": 1,
        "collection_name": "dtg",
        "handle": "dtg",
        "name": "Direct to garmin",
        "description": "Digital print",
        "created_at": "2022-02-21T11:08:37+00:00",
        "updated_at": "2022-02-21T11:08:37+00:00"
    },
    "media": [
        {
            "id": 240,
            "is_test": 0,
            "collection_name": "preview",
            "file_name": "preview.png",
            "size": 1218,
            "mime_type": "image/png",
            "download_url": "https://smake-public.s3.eu-west-1.amazonaws.com/files/e1fd546508dd484b908c5fc653f65818/preview.png",
            "state": "completed",
            "requested": null,
            "failure_message": null,
            "created_at": "2022-05-12T11:17:09+00:00",
            "updated_at": "2022-05-12T11:17:09+00:00"
        }
    ],
    "lines": [
        {
            "id": 1,
            "value": "Example 1",
            "font": {
                "id": 1,
                "family_name": "Roboto",
                "style": "Bold"
            },
            "font_size": 13,
            "padding_bottom": 18,
            "horizontal_alignment": "left",
            "bending_radius": "178.00",
            "created_at": "2022-05-12T11:17:09+00:00",
            "updated_at": "2022-05-12T11:17:09+00:00"
        },
    ],
    "width": 76,
    "height": 15,
    "created_at": "2022-05-12T11:17:09+00:00",
    "updated_at": "2022-05-12T11:17:09+00:00"
}