### Get Product Request Example
Source: https://dashboard.gelato.com/docs/ecommerce/products/get
Use this cURL command to make a GET request to retrieve product information. Replace {{storeId}}, {{productId}}, and {{apiKey}} with your actual store ID, product ID, and API key.
```bash
$ curl -X GET \
https://ecommerce.gelatoapis.com/v1/stores/6ada0d2f-73f4-41f4-af92-91911c22171d/products/2e856a12-2f83-4a1f-ac50-4d63c57bc233 \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {{apiKey}}'
```
--------------------------------
### Create Order Request Example
Source: https://dashboard.gelato.com/docs/orders/v4/create
Use this example to create an order via the Gelato Order create API. Ensure you replace placeholder values like {{apiKey}}, {{myOrderId}}, etc., with your actual data.
```bash
$ curl -X POST \
https://order.gelato.com/v4/orders \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {{apiKey}}' \
-d '{
"orderType": "order",
"orderReferenceId": "{{myOrderId}}",
"customerReferenceId": "{{myCustomerId}}",
"currency": "USD",
"items": [
{
"itemReferenceId": "{{myItemId1}}",
"productUid": "apparel_product_gca_t-shirt_gsc_crewneck_gcu_unisex_gqa_classic_gsi_s_gco_white_gpr_4-4",
"files": [
{
"type": "default",
"url": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/logo.png"
},
{
"type":"back",
"url": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/logo.png"
}
],
"quantity": 1
}
],
"shipmentMethodUid": "express",
"shippingAddress": {
"companyName": "Example",
"firstName": "Paul",
"lastName": "Smith",
"addressLine1": "451 Clarkson Ave",
"addressLine2": "Brooklyn",
"state": "NY",
"city": "New York",
"postCode": "11203",
"country": "US",
"email": "apisupport@gelato.com",
"phone": "123456789"
},
"returnAddress": {
"companyName": "My company",
"addressLine1": "3333 Saint Marys Avenue",
"addressLine2": "Brooklyn",
"state": "NY",
"city": "New York",
"postCode": "13202",
"country": "US",
"email": "apisupport@gelato.com",
"phone": "123456789"
},
"metadata": [
{
"key":"keyIdentifier1",
"value":"keyValue1"
},
{
"key":"keyIdentifier2",
"value":"keyValue2"
}
]
}'
```
--------------------------------
### Product Price Response Example
Source: https://dashboard.gelato.com/docs/products/prices
This is an example of the JSON response you will receive when querying for product prices. It lists prices for different quantities and includes currency and country information.
```json
[
{
"productUid": "{{productUid}}",
"country": "US",
"quantity": 700,
"price": 2151.28277,
"currency": "USD",
"pageCount": null
},
{
"productUid": "{{productUid}}",
"country": "US",
"quantity": 20,
"price": 87.883871,
"currency": "USD",
"pageCount": null
},
{
"productUid": "{{productUid}}",
"country": "US",
"quantity": 400,
"price": 1365.982879,
"currency": "USD",
"pageCount": null
}
]
```
--------------------------------
### ProductAttributes object example
Source: https://dashboard.gelato.com/docs/products/product/get
Example of the associative array structure for product attributes.
```json
{
"CoatingType": "none",
"ColorType": "4-4",
"FoldingType": "8pp-accordion-fold-ver"
}
```
--------------------------------
### GET /v3/catalogs
Source: https://dashboard.gelato.com/docs/products/catalog/list
Retrieves a list of all available product catalogs.
```APIDOC
## GET https://product.gelatoapis.com/v3/catalogs
### Description
Gives a list of available catalogs.
### Method
GET
### Endpoint
https://product.gelatoapis.com/v3/catalogs
### Request Example
curl -X GET https://product.gelatoapis.com/v3/catalogs \
-H 'X-API-KEY: {{apiKey}}'
### Response
#### Success Response (200)
- **catalogUid** (string) - Catalog unique identifier.
- **title** (string) - Title of the catalog.
#### Response Example
[
{
"catalogUid": "cards",
"title": "cards"
},
{
"catalogUid": "posters",
"title": "Posters"
},
{
"catalogUid": "multipage-brochures",
"title": "Multipage Brochures"
}
]
```
--------------------------------
### Get Specific Catalog - cURL Example
Source: https://dashboard.gelato.com/docs/products/catalog/get
Use this cURL command to make a GET request to retrieve information about a specific catalog. Replace {{apiKey}} with your actual API key and 'posters' with the desired catalog UID.
```bash
$ curl -X GET "https://product.gelatoapis.com/v3/catalogs/posters" \
-H 'X-API-KEY: {{apiKey}}'
```
--------------------------------
### Search Orders Response
Source: https://dashboard.gelato.com/docs/orders/v4/search
Example JSON response containing a list of orders matching the search criteria.
```json
{
"orders": [
{
"channel": "shopify",
"connectedOrderIds": [],
"country": "US",
"createdAt": "2024-04-04T20:59:55+00:00",
"currency": "USD",
"customerReferenceId": "{{myCustomerId}}",
"financialStatus": "paid",
"firstName": "Paul",
"fulfillmentStatus": "shipped",
"id": "c85ea826-5259-4866-998c-7c56129d575c",
"itemsCount": 3,
"lastName": "Smith",
"orderReferenceId": "{{myOrderId}}",
"orderType": "draft",
"orderedAt": "2024-01-15T12:32:03+00:00",
"storeId": "a6bf6ec0-28cb-43a5-92b0-2550f007aac5",
"totalInclVat": "49.12",
"updatedAt": "2024-01-15T12:32:03+00:00"
},
{
"channel": null,
"connectedOrderIds": [],
"country": "DE",
"createdAt": "2024-02-04T20:59:55+00:00",
"currency": "EUR",
"customerReferenceId": "{{myCustomerId2}}",
"financialStatus": "draft",
"firstName": "Paul",
"fulfillmentStatus": "draft",
"id": "e575556f-1daa-46dd-a4cc-84bcfc0a4f36",
"itemsCount": 1,
"lastName": "Smith",
"orderReferenceId": "{{myOrderId2}}",
"orderType": "draft",
"orderedAt": null,
"storeId": null,
"totalInclVat": "0.00",
"updatedAt": "2024-02-05T12:32:03+00:00"
}
]
}
```
--------------------------------
### Get Product Prices
Source: https://dashboard.gelato.com/docs/products/prices
Use this cURL command to retrieve pricing details for a given product UID. Ensure you replace {{productUid}} and {{apiKey}} with your actual values.
```bash
$ curl -X GET "https://product.gelatoapis.com/v3/products/{{productUid}}/prices" \
-H 'X-API-KEY: {{apiKey}}'
```
--------------------------------
### Retrieve Product UID Example
Source: https://dashboard.gelato.com/docs/get-started
Represents the structure of a product identifier string used within the Gelato API.
```json
{
"productUid": "cards_pf_a5_pt_350-gsm-coated-silk_cl_4-4_ver"
}
```
--------------------------------
### GET /products
Source: https://dashboard.gelato.com/docs/products/product/search
Retrieves a list of products and their associated filter hits.
```APIDOC
## GET /products
### Description
Retrieves a list of products and filter hits for product attributes.
### Method
GET
### Endpoint
/products
### Response
#### Success Response (200)
- **products** (Product[]) - List of the products.
- **hits** (FilterHits) - List of the attributes with their possible values and number of hits for each value.
#### Response Example
{
"products": [
{
"productUid": "string",
"attributes": {
"CoatingType": "none",
"ColorType": "4-4",
"FoldingType": "8pp-accordion-fold-ver"
},
"weight": {
"value": 10.5,
"measureUnit": "grams"
},
"dimensions": [
{
"value": 210.0,
"measureUnit": "mm"
}
],
"supportedCountries": ["US", "GB"]
}
],
"hits": {
"attributeHits": {
"CoverColorType": {
"none": 106,
"4-4": 3041
}
}
}
}
```
--------------------------------
### GET Product Details
Source: https://dashboard.gelato.com/docs/ecommerce/templates/get
Retrieves the details of a specific product, including its variants and metadata.
```APIDOC
## GET /products/{id}
### Description
Retrieves detailed information about a specific product, including its template name, description, preview URL, and a list of available variants.
### Method
GET
### Endpoint
/products/{id}
### Response
#### Success Response (200)
- **id** (string) - Unique identifier for the product
- **templateName** (string) - Name of the product template
- **title** (string) - Display title of the product
- **description** (string) - HTML formatted description of the product
- **previewUrl** (string) - URL to the product preview image
- **variants** (array) - List of available product variants
- **productType** (string) - The category or type of product
- **vendor** (string) - The vendor name
- **createdAt** (string) - ISO 8601 timestamp of creation
- **updatedAt** (string) - ISO 8601 timestamp of last update
#### Response Example
{
"id": "c12a363e-0d4e-4d96-be4b-bf4138eb8743",
"templateName": "Template For Unisex Crewneck T-shirt",
"title": "Classic Unisex Crewneck T-shirt",
"description": "
A classic unisex t-shirt that works well with any outfit...
",
"previewUrl": "https://gelato-api-test.s3.eu-west-1.amazonaws.com/...",
"variants": [
{
"id": "83e30e31-0aee-4eca-8a8f-dceb2455cdc1",
"title": "White - M",
"productUid": "apparel_product_gca_t-shirt_gsc_crewneck_gcu_unisex_gqa_classic_gsi_m_gco_white_gpr_4-0",
"variantOptions": [{"name": "Size", "value": "M"}],
"imagePlaceholders": [{"name": "ImageFront", "printArea": "front", "height": 137.25, "width": 244}]
}
],
"productType": "Printable Matrial",
"vendor": "Gelato",
"createdAt": "2023-06-13T11:02:47+0000",
"updatedAt": "2023-06-13T11:02:47+0000"
}
```
--------------------------------
### Product API response structure
Source: https://dashboard.gelato.com/docs/products/product/get
Example of a successful JSON response containing product attributes, weight, and supported country lists.
```json
{
"productUid": "8pp-accordion-fold_pf_dl_pt_100-lb-text-coated-silk_cl_4-4_ft_8pp-accordion-fold-ver_ver",
"attributes": {
"CoatingType": "none",
"ColorType": "4-4",
"FoldingType": "8pp-accordion-fold-ver",
"Orientation": "ver",
"PaperFormat": "DL",
"PaperType": "100-lb-text-coated-silk",
"ProductStatus": "activated",
"ProtectionType": "none",
"SpotFinishingType": "none",
"Variable": "no"
},
"weight": {
"value": 1.341,
"measureUnit": "grams"
},
"supportedCountries": [
"US",
"CA"
],
"notSupportedCountries": [
"BD",
"BM",
"BR",
"AI",
"DO",
"IS"
],
"isStockable": false,
"isPrintable": true,
"validPageCounts": [5,10,20,30]
}
```
--------------------------------
### GET /products/{productUid}
Source: https://dashboard.gelato.com/docs/products/product/get
Retrieves detailed information about a single product using its unique identifier.
```APIDOC
## GET https://product.gelatoapis.com/v3/products/{productUid}
### Description
Use this endpoint to get information about a single product.
### Method
GET
### Endpoint
https://product.gelatoapis.com/v3/products/{productUid}
### Parameters
#### Path Parameters
- **productUid** (string) - Required - Unique product identifier.
### Request Example
```
$ curl -X GET "https://product.gelatoapis.com/v3/products/cards_pf_bb_pt_110-lb-cover-uncoated_cl_4-0_hor" \
-H 'X-API-KEY: {{apiKey}}'
```
### Response
#### Success Response (200)
- **productUid** (string) - Unique product identifier.
- **attributes** (ProductAttributes) - Associative array of product attributes.
- **weight** (WeightObject) - Weight of the product.
- **supportedCountries** (string[]) - Codes array of supported countries (ISO 3166-1).
- **notSupportedCountries** (string[]) - Code array of countries that are not supported (ISO 3166-1).
- **isStockable** (boolean) - Describes if the product is a stockable item.
- **isPrintable** (boolean) - Describes if the product is a printable item.
- **validPageCounts** (int[]) - The list of page counts which are supported for multi-page products.
#### Response Example
{
"productUid": "8pp-accordion-fold_pf_dl_pt_100-lb-text-coated-silk_cl_4-4_ft_8pp-accordion-fold-ver_ver",
"attributes": {
"CoatingType": "none",
"ColorType": "4-4",
"FoldingType": "8pp-accordion-fold-ver",
"Orientation": "ver",
"PaperFormat": "DL",
"PaperType": "100-lb-text-coated-silk",
"ProductStatus": "activated",
"ProtectionType": "none",
"SpotFinishingType": "none",
"Variable": "no"
},
"weight": {
"value": 1.341,
"measureUnit": "grams"
},
"supportedCountries": ["US", "CA"],
"notSupportedCountries": ["BD", "BM", "BR", "AI", "DO", "IS"],
"isStockable": false,
"isPrintable": true,
"validPageCounts": [5, 10, 20, 30]
}
```
--------------------------------
### Order Creation API Response
Source: https://dashboard.gelato.com/docs/orders/order_details
Example response returned after successfully creating an order, containing order IDs and item details.
```json
{
"id": "c3c8f7f5-a0e8-4014-a3fb-38a5375d2af8",
"clientId": "74bda7b0-779e-49c6-811d-c2e180222adc",
"orderReferenceId": "83831IAKD2",
"customerReferenceId": "913818322",
"fulfillmentStatus": "created",
"financialStatus": "pending",
"currency": "USD",
"shippingAddress": {
"id": "e55ad1c4-b06b-4bfb-8edb-49c256819d07",
"orderId": "c3c8f7f5-a0e8-4014-a3fb-38a5375d2af8",
"country": "US",
"firstName": "Paul",
"lastName": "Smith",
"companyName": "Paul's company",
"addressLine1": "451 Clarkson Ave",
"addressLine2": "Brooklyn",
"city": "New York",
"postCode": "11203",
"state": "NY",
"email": "paul.smith@email.com",
"phone": "123456789",
"isBusiness": false,
"federalTaxId": null,
"stateTaxId": null,
"registrationState": null
},
"items": [
{
"id": "03fb1150-74db-45c7-ab08-e582cdd29817",
"itemReferenceId": "poster-13x18",
"productUid": "flat_130x180-mm-5r_170-gsm-65lb-uncoated_4-0_ver",
"storeProductVariantId": null,
"storeProductId": null,
"files": [
{
"type": "default",
"url": "https://www.dropbox.com/s/u9zyzxqhnzhwrea/sea-green-girl.png?dl=1"
}
],
"processedFileUrl": null,
"quantity": 1,
"options": [],
"category": "Posters",
"productCategoryUid": "wall-art",
"productTypeUid": "poster",
"productNameUid": "classic-matte-poster",
"productName": "Classic Matte Poster",
"fulfillmentStatus": "created",
"pageCount": null,
"printJobs": [],
"eventLog": [],
"previews": [],
"designId": null,
"productFileMimeType": "",
"finalProductUid": "flat_product_pf_5r_pt_65-lb-cover-uncoated_cl_4-0_ct_none_prt_none_sft_none_set_none_ver",
"metadata": [],
"retailPriceInclVat": null,
"attributes": [
{
"name": "size",
"title": "Size",
"value": "130x180-mm-5R"
}
```
--------------------------------
### GET /v1/stores/{storeId}/products/{productId}
Source: https://dashboard.gelato.com/docs/ecommerce/products/get
Retrieves detailed information for a specific product within a given store.
```APIDOC
## GET /v1/stores/{storeId}/products/{productId}
### Description
Use the Product Get API to retrieve product information.
### Method
GET
### Endpoint
https://ecommerce.gelatoapis.com/v1/stores/{storeId}/products/{productId}
### Parameters
#### Path Parameters
- **storeId** (string) - Required - The unique identifier of the store.
- **productId** (string) - Required - The unique identifier of the product.
### Request Example
```
$ curl -X GET \
https://ecommerce.gelatoapis.com/v1/stores/6ada0d2f-73f4-41f4-af92-91911c22171d/products/2e856a12-2f83-4a1f-ac50-4d63c57bc233 \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {{apiKey}}'
```
```
--------------------------------
### Create product from template request
Source: https://dashboard.gelato.com/docs/ecommerce/products/create-from-template
Use this cURL command to send a POST request to the product creation endpoint. Ensure the X-API-KEY header is set with your valid API key.
```bash
$ curl -X POST "https://ecommerce.gelatoapis.com/v1/stores/{{storeId}}/products:create-from-template" \
-H 'X-API-KEY: {{apiKey}}' \
-H 'Content-Type: application/json' \
-d '{
"templateId": "c12a363e-0d4e-4d96-be4b-bf4138eb8743",
"title": "Classic Unisex Crewneck T-shirt",
"description": "A classic unisex t-shirt that works well with any outfit. Made of a heavier cotton with a double-stitched neckline and sleeves.
- Rolled-forward shoulders for a better fit
- Stylish fitted sleeve
- Seamless double-needle collar
- Taped neck and shoulders for durability
- Tubular fit for minimal torque
This product is made on demand. No minimums.
",
"isVisibleInTheOnlineStore": true,
"salesChannels": [
"web"
],
"tags": [
"tshirt",
"unisex"
],
"variants": [
{
"templateVariantId": "83e30e31-0aee-4eca-8a8f-dceb2455cdc1",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
},
{
"templateVariantId": "d7c3241e-db88-40f1-9862-3d145b29dfef",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
},
{
"templateVariantId": "582fe1ea-7f4e-4507-9e3d-7f49a38aa2d7",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
},
{
"templateVariantId": "49f54e49-2ac5-466b-9938-473b1cc82a8b",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
}
],
"productType": "Printable Matrial",
"vendor": "Gelato"
}'
```
--------------------------------
### GET /v1/shipment-methods
Source: https://dashboard.gelato.com/docs/shipment/methods
Use this endpoint to get information on each shipment method that Gelato provides. The shipping methods can be filtered on shipment destination country.
```APIDOC
## GET /v1/shipment-methods
### Description
Retrieve information about available shipment methods provided by Gelato, with the option to filter by destination country.
### Method
GET
### Endpoint
https://shipment.gelatoapis.com/v1/shipment-methods
### Query Parameters
- **country** (string) - Optional - Destination country ISO code
### Request Example
```bash
curl -X GET https://shipment.gelatoapis.com/v1/shipment-methods \
-H 'X-API-KEY: {{apiKey}}'
```
### Response
#### Success Response (200)
- **shipmentMethods** (Method[]) - Array of Method objects.
`MethodObject`
- **shipmentMethodUid** (string) - Required - Unique Shipment method identifier.
- **type** (string) - Required - Shipping service type. Can be: normal, express or pallet.
- **name** (string) - Required - The name of the Shipment method.
- **isBusiness** (bool) - Required - Indicates if the shipment method is suitable for shipping to business addresses.
- **isPrivate** (bool) - Required - Indicates if the shipment method is suitable for shipping to residential addresses.
- **hasTracking** (bool) - Required - Defines if the shipment method is tracked, i.e. you will receive a tracking code and URL when the order is shipped with the shipment method.
- **supportedCountries** (string[]) - Required - List of destination country ISO codes where the method is available as a delivery option.
### Response Example
```json
{
"shipmentMethods": [
{
"shipmentMethodUid": "dhl_global_parcel",
"type": "normal",
"name": "DHL Global Parcel",
"isBusiness": true,
"isPrivate": true,
"hasTracking": true,
"supportedCountries": [
"AT",
"BE",
"BG",
"CH",
"CY",
"CZ",
"DK",
"EE",
"FI",
"FO",
"FR",
"GB",
"GI",
"GL",
"GR",
"HR",
"HU",
"IE",
"IT",
"LT",
"LU",
"LV",
"MT",
"NG",
"NL",
"NO",
"PL",
"PT",
"RO",
"SE",
"SI",
"SK"
]
},
{
"shipmentMethodUid": "dhl_parcel",
"type": "normal",
"name": "DHL Parcel",
"isBusiness": true,
"isPrivate": true,
"hasTracking": true,
"supportedCountries": [
"DE"
]
},
{
"shipmentMethodUid": "tnt_parcel",
"type": "normal",
"name": "PostNL Standard",
"isBusiness": true,
"isPrivate": true,
"hasTracking": true,
"supportedCountries": [
"NL"
]
},
{
"shipmentMethodUid": "tnt_global_pack",
"type": "normal",
"name": "PostNL Global Pack",
"isBusiness": true,
"isPrivate": true,
"hasTracking": true,
"supportedCountries": [
"AT",
"AU",
"AX",
"BE",
"BG",
"BR",
"CA",
"CH",
"CN",
"CY",
"CZ",
"DE",
"DK",
"EE",
"ES",
"FI",
"FR",
"GR",
"HK",
"HR",
"HU",
"IE",
"IN",
"IT",
"JP",
"LT",
"LU",
"LV",
"MT",
"NO",
"NZ",
"PL",
"PT",
"RO",
"RU",
"SE",
"SI",
"SK",
"TR",
"US",
"ZA"
]
}
]
}
```
```
--------------------------------
### Product Search Response Example
Source: https://dashboard.gelato.com/docs/products/product/search
This is a sample JSON response when searching for products. It includes details about the found products, their attributes, weight, and dimensions, as well as attribute-specific hit counts.
```json
{
"products": [
{
"productUid": "8pp-accordion-fold_pf_dl_pt_100-lb-text-coated-silk_cl_4-4_ft_8pp-accordion-fold-ver_ver",
"attributes": {
"CoatingType": "none",
"ColorType": "4-4",
"FoldingType": "8pp-accordion-fold-ver",
"Orientation": "ver",
"PaperFormat": "DL",
"PaperType": "100-lb-text-coated-silk",
"ProductStatus": "activated",
"ProtectionType": "none",
"SpotFinishingType": "none",
"Variable": "no"
},
"weight": {
"value": 12.308,
"measureUnit": "grams"
},
"dimensions": {
"Thickness": {
"value": 0.14629,
"measureUnit": "mm"
},
"Width": {
"value": 99,
"measureUnit": "mm"
},
"Height": {
"value": 210,
"measureUnit": "mm"
}
}
}
],
"hits": {
"attributeHits": {
"CoverColorType": {
"none": 106,
"4-4": 3041
},
"ProtectionType": {
"1-1": 1590,
"1-0": 1971,
"none": 2137
},
"CoatingType": {
"glossy-protection": 1765,
"matt-protection": 1592,
"glossy-coating": 102,
"glossy-lamination": 43,
"matt-lamination": 44,
"matt-coating": 10,
"soft-touch-lamination": 5,
"none": 2137
},
"CustomPaperFormat": {
"custom": 13,
"custom-flyers": 1
},
"BannerMaterial": {
"polyester-fabric": 2
},
"ClosingType": {
"tape-doublesided": 12
},
"BaseArea": {
"80mm": 6
}
}
}
}
```
--------------------------------
### POST /v1/stores/{{storeId}}/products:create-from-template
Source: https://dashboard.gelato.com/docs/ecommerce/products/create-from-template
Creates a new product in your store using a specified template. You can customize the product's title, description, visibility, sales channels, tags, and variant details.
```APIDOC
## POST /v1/stores/{{storeId}}/products:create-from-template
### Description
Use this endpoint to create a product from a template. You can customize various aspects of the product, including its title, description, sales channels, tags, and variant-specific information.
### Method
POST
### Endpoint
`https://ecommerce.gelatoapis.com/v1/stores/{{storeId}}/products:create-from-template`
### Parameters
#### Request Body
- **templateId** (string) - Required - The ID of the template to use for creating the product.
- **title** (string) - Required - The title of the product.
- **description** (string) - Optional - The description of the product. Supports HTML.
- **isVisibleInTheOnlineStore** (boolean) - Optional - Whether the product should be visible in the online store. Defaults to true.
- **salesChannels** (array of strings) - Optional - The sales channels where the product will be available (e.g., "web").
- **tags** (array of strings) - Optional - Tags to categorize the product.
- **variants** (array of objects) - Required - An array of variant objects, each specifying a `templateVariantId` and `imagePlaceholders`.
- **templateVariantId** (string) - Required - The ID of the variant within the template.
- **imagePlaceholders** (array of objects) - Optional - Placeholders for images associated with the variant.
- **name** (string) - Required - The name of the image placeholder.
- **fileUrl** (string) - Required - The URL of the image file.
- **productType** (string) - Optional - The type of the product (e.g., "Printable Material").
- **vendor** (string) - Optional - The vendor of the product.
### Request Example
```json
{
"templateId": "c12a363e-0d4e-4d96-be4b-bf4138eb8743",
"title": "Classic Unisex Crewneck T-shirt",
"description": "A classic unisex t-shirt that works well with any outfit. Made of a heavier cotton with a double-stitched neckline and sleeves.
- Rolled-forward shoulders for a better fit
- Stylish fitted sleeve
- Seamless double-needle collar
- Taped neck and shoulders for durability
- Tubular fit for minimal torque
This product is made on demand. No minimums.
",
"isVisibleInTheOnlineStore": true,
"salesChannels": [
"web"
],
"tags": [
"tshirt",
"unisex"
],
"variants": [
{
"templateVariantId": "83e30e31-0aee-4eca-8a8f-dceb2455cdc1",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
},
{
"templateVariantId": "d7c3241e-db88-40f1-9862-3d145b29dfef",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
},
{
"templateVariantId": "582fe1ea-7f4e-4507-9e3d-7f49a38aa2d7",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
},
{
"templateVariantId": "49f54e49-2ac5-466b-9938-473b1cc82a8b",
"imagePlaceholders": [
{
"name": "ImageFront",
"fileUrl": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/business_card_empty.pdf"
}
]
}
],
"productType": "Printable Matrial",
"vendor": "Gelato"
}
```
### Response
#### Success Response (200)
- **id** (string) - The unique identifier for the created product.
- **storeId** (string) - The ID of the store where the product was created.
- **externalId** (string or null) - An external identifier for the product, if applicable.
- **title** (string) - The title of the product.
- **description** (string) - The description of the product.
- **previewUrl** (string) - A URL to preview the product image.
- **status** (string) - The current status of the product (e.g., "created").
- **tags** (array of strings) - Tags associated with the product.
- **productType** (string) - The type of the product.
- **vendor** (string) - The vendor of the product.
- **publishedAt** (string) - The date and time the product was published.
- **createdAt** (string) - The date and time the product was created.
- **updatedAt** (string) - The date and time the product was last updated.
#### Response Example
```json
{
"id": "2e856a12-2f83-4a1f-ac50-4d63c57bc233",
"storeId": "6ada0d2f-73f4-41f4-af92-91911c22171d",
"externalId": null,
"title": "Classic Unisex Crewneck T-shirt",
"description": "A classic unisex t-shirt that works well with any outfit. Made of a heavier cotton with a double-stitched neckline and sleeves.
- Rolled-forward shoulders for a better fit
- Stylish fitted sleeve
- Seamless double-needle collar
- Taped neck and shoulders for durability
- Tubular fit for minimal torque
This product is made on demand. No minimums.
",
"previewUrl": "https://gelato-api-test.s3.eu-west-1.amazonaws.com/ecommerce/store_product_image/448b66a9-b7bb-410f-a6ae-50ba2474fcf8/preview?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIATQZMBOFCESNXH67O%2F20230613%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230613T123555Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=d3a39af4fc89cf2e1c63d0292bf963fabfad77a370d5c76678bf55f81a35ff80",
"status": "created",
"tags": [
"tshirt",
"unisex"
],
"productType": "Printable Matrial",
"vendor": "Gelato",
"publishedAt": "2023-06-14T11:02:47+0000",
"createdAt": "2023-06-13T11:02:47+0000",
"updatedAt": "2023-06-13T11:02:47+0000"
}
```
```
--------------------------------
### Order Status Updated Event Example
Source: https://dashboard.gelato.com/docs/webhooks
This JSON object represents an example of the 'order_status_updated' webhook event. It includes details about the order, its items, and fulfillment status, including tracking information if available. This event is triggered when an order's status changes.
```json
{
"id": "os_5e5680ce494f6",
"event": "order_status_updated",
"orderId": "a6a1f9ce-2bdd-4a9e-9f8d-0009df0e24d9",
"storeId": null,
"orderReferenceId": "{{MyOrderId}}",
"fulfillmentStatus": "shipped",
"items": [
{
"itemReferenceId": "{{MyItemId}}",
"fulfillmentStatus": "shipped",
"fulfillments": [
{
"trackingCode": "code123",
"trackingUrl": "http://example.com/tracking?code=code123",
"shipmentMethodName":"DHL Express Domestic BR",
"shipmentMethodUid":"dhl_express_domestic_br",
"fulfillmentCountry":"BR",
"fulfillmentStateProvince":"SP",
"fulfillmentFacilityId": "940fec84-54bc-44fc-a8a3-7d6f02cf8f14"
},
{
"trackingCode": "code234",
"trackingUrl": "http://example.com/tracking?code=code234",
"shipmentMethodName":"DHL Express Domestic BR",
"shipmentMethodUid":"dhl_express_domestic_br",
"fulfillmentCountry":"BR",
"fulfillmentStateProvince":"SP",
"fulfillmentFacilityId": "940fec84-54bc-44fc-a8a3-7d6f02cf8f14"
}
]
}
]
}
```
--------------------------------
### Create an order with Node.js
Source: https://dashboard.gelato.com/docs/get-started
Uses the request library to define headers, construct the order JSON, and execute a POST request.
```javascript
let request = require('request');
// === Define headers ===
let headers = {
'Content-Type' : 'application/json',
'X-API-KEY' : '{{apiKey}}'
};
// === Set-up quote request ===
let orderUrl = 'https://order.gelatoapis.com/v4/orders';
let orderJson = {
"orderType": "order",
"orderReferenceId": "{{myOrderId}}",
"customerReferenceId": "{{myCustomerId}}",
"currency": "USD",
"items": [
{
"itemReferenceId": "{{myItemId1}}",
"productUid": "apparel_product_gca_t-shirt_gsc_crewneck_gcu_unisex_gqa_classic_gsi_s_gco_white_gpr_4-4",
"files": [
{
"type": "default",
"url": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/logo.png"
},
{
"type":"back",
"url": "https://cdn-origin.gelato-api-dashboard.ie.live.gelato.tech/docs/sample-print-files/logo.png"
}
],
"quantity": 1
}
],
"shipmentMethodUid": "express",
"shippingAddress": {
"companyName": "Example",
"firstName": "Paul",
"lastName": "Smith",
"addressLine1": "451 Clarkson Ave",
"addressLine2": "Brooklyn",
"state": "NY",
"city": "New York",
"postCode": "11203",
"country": "US",
"email": "apisupport@gelato.com",
"phone": "123456789"
}
};
// === Send order request ===
request.post({
url: orderUrl,
headers: headers,
body: JSON.stringify(orderJson)
}, function(error, response, body){
console.log(body);
});
```
--------------------------------
### Retrieve product list via cURL
Source: https://dashboard.gelato.com/docs/ecommerce/products/list
Use this cURL command to fetch a paginated list of products. Ensure the storeId and apiKey placeholders are replaced with valid credentials.
```bash
$ curl -X GET \
https://ecommerce.gelatoapis.com/v1/stores/{{storeId}}/products \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {{apiKey}}' \
-d '{
"order": "desc",
"orderBy": "createdAt",
"offset": 0,
"limit": 100
}'
```