Konfigurace API

Vytvoření

Request

POST
https://phoenix.stg.webout.io/templates
curl --location 'https://phoenix.stg.webout.io/templates' \
--header 'Content-Type: application/json' \
--data '{
   "templateData": {
     "slug": "sablona",
     "scenes": [
       {
         "slug": "PACKSHOT",
         "content": [
           {
             "slug": "background",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/bg_datart.png"
               }
             }
           },
           {
             "slug": "pruh",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/bar_datart.png"
               }
             }
           },
           {
             "slug": "produkt",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/product_datart.png"
               }
             }
           },
           {
             "slug": "název",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#ffffff",
                 "fontSize": 100,
                 "align": "left",
                 "text": "Mobilní telefon Apple iPhone 13 128GB Starlight (MLPG3CN/A)"
               }
             }
           },
           {
             "slug": "cena",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#ffffff",
                 "fontSize": 100,
                 "align": "center",
                 "text": "16 990kč"
               }
             }
           },
           {
             "slug": "doprava",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#ffffff",
                 "fontSize": 100,
                 "align": "left",
                 "text": "Do dopravy zdarma zbývá 100 kč"
               }
             }
           },
           {
             "slug": "logo",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/logo_datart.png"
               }
             }
           },
           {
             "slug": "sleva-grafika",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/discount_datart.png"
               }
             }
           },
           {
             "slug": "sleva-cislo",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#000000",
                 "fontSize": 100,
                 "align": "center",
                 "text": "50%"
               }
             }
           },
           {
             "slug": "sleva-text",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#000000",
                 "fontSize": 100,
                 "align": "center",
                 "text": "sleva"
               }
             }
           }
         ]
       }
     ]
   }
 }'

Response

   {
       "_id": "66683b4a864c93f146c34a0e",
       "templateData": {
       ...
       }
       "updatedAt": "2024-06-11T11:55:54.860Z",
       "createdAt": "2024-06-11T11:55:54.860Z",
       "deletedAt": null,
       "__v": 0
   }

Payload:

  • Name
    _id
    Type
    string
    Description

    UUID konfigurace

  • Name
    templateData
    Type
    object
    Description

    Kompletní informace o nastavení konfigurace

  • Name
    slug
    Type
    string
    Description

    Slug projectu na základě, kterého je konfigurace vytvořena

  • Name
    scenes
    Type
    array
    Description

    Pole jednotlivých scén v konfiguraci

  • Name
    slug
    Type
    string
    Description

    Slug scény

  • Name
    content
    Type
    string
    Description

    Pole jednotlivých kontentů ve scéně

Response:

  • Name
    configuration_uuid
    Type
    string
    Description

    UUID konfigurace

  • Name
    templateData
    Type
    object
    Description

    Kompletní informace o nastavení konfigurace, která jsou uložena


Získání

Request

GET
https://phoenix.stg.webout.io/templates/:UUID
curl --location 'https://phoenix.stg.webout.io/templates/66683b4a864c93f146c34a0e' \
--header 'Content-Type: application/json' \
--data ''

Response

{
    "_id": "66683b4a864c93f146c34a0e",
    "templateData": {
        "slug": "sablona",
        "scenes": [
            {
                "slug": "PACKSHOT",
                "content": [
                    {
                        "slug": "background",
                        "source": {
                            "data": {
                                "src": "https://phoenix.dev.webout.io/uploads/templates/images/bg_datart.png"
                            }
                        }
                    },
                    {
                        "slug": "pruh",
                        "source": {
                            "data": {
                                "src": "https://phoenix.dev.webout.io/uploads/templates/images/bar_datart.png"
                            }
                        }
                    },
                    {
                        "slug": "produkt",
                        "source": {
                            "data": {
                                "src": "https://phoenix.dev.webout.io/uploads/templates/images/product_datart.png"
                            }
                        }
                    },
                    {
                        "slug": "název",
                        "source": {
                            "data": {
                                "fontFamily": "din_2014_bold",
                                "color": "#ffffff",
                                "fontSize": 100,
                                "align": "left",
                                "text": "Mobilní telefon Apple iPhone 13 128GB Starlight (MLPG3CN/A)"
                            }
                        }
                    },
                    {
                        "slug": "cena",
                        "source": {
                            "data": {
                                "fontFamily": "din_2014_bold",
                                "color": "#ffffff",
                                "fontSize": 100,
                                "align": "center",
                                "text": "16 990kč"
                            }
                        }
                    },
                    {
                        "slug": "doprava",
                        "source": {
                            "data": {
                                "fontFamily": "din_2014_bold",
                                "color": "#ffffff",
                                "fontSize": 100,
                                "align": "left",
                                "text": "Do dopravy zdarma zbývá 100 kč"
                            }
                        }
                    },
                    {
                        "slug": "logo",
                        "source": {
                            "data": {
                                "src": "https://phoenix.dev.webout.io/uploads/templates/images/logo_datart.png"
                            }
                        }
                    },
                    {
                        "slug": "sleva-grafika",
                        "source": {
                            "data": {
                                "src": "https://phoenix.dev.webout.io/uploads/templates/images/discount_datart.png"
                            }
                        }
                    },
                    {
                        "slug": "sleva-cislo",
                        "source": {
                            "data": {
                                "fontFamily": "din_2014_bold",
                                "color": "#000000",
                                "fontSize": 100,
                                "align": "center",
                                "text": "50%"
                            }
                        }
                    },
                    {
                        "slug": "sleva-text",
                        "source": {
                            "data": {
                                "fontFamily": "din_2014_bold",
                                "color": "#000000",
                                "fontSize": 100,
                                "align": "center",
                                "text": "sleva"
                            }
                        }
                    }
                ]
            }
        ]
    },
    "deletedAt": null,
    "updatedAt": "2024-06-11T11:55:54.860Z",
    "createdAt": "2024-06-11T11:55:54.860Z",
    "__v": 0
}

Query:

  • Name
    configuration_uuid
    Type
    string
    Description

    UUID konfigurace

Response:

  • Name
    _id
    Type
    string
    Description

    UUID konfigurace

  • Name
    templateData
    Type
    object
    Description

    Kompletní informace o nastavení konfigurace

  • Name
    slug
    Type
    string
    Description

    Slug projectu na základě, kterého je konfigurace vytvořena

  • Name
    scenes
    Type
    array
    Description

    Pole jednotlivých scén v konfiguraci

  • Name
    slug
    Type
    string
    Description

    Slug scény

  • Name
    content
    Type
    string
    Description

    Pole jednotlivých kontentů ve scéně


Aktualizace

Request

PUT
https://phoenix.stg.webout.io/templates/:UUID
curl --location 'https://phoenix.stg.webout.io/templates/66683b4a864c93f146c34a0e' \
--header 'Content-Type: application/json' \
--data '{
   "templateData": {
     "slug": "sablona",
     "scenes": [
       {
         "slug": "PACKSHOT",
         "content": [
           {
             "slug": "background",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/bg_datart.png"
               }
             }
           },
           {
             "slug": "pruh",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/bar_datart.png"
               }
             }
           },
           {
             "slug": "produkt",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/product_datart.png"
               }
             }
           },
           {
             "slug": "název",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#ffffff",
                 "fontSize": 100,
                 "align": "left",
                 "text": "Mobilní telefon Apple iPhone 13 128GB Starlight (MLPG3CN/A)"
               }
             }
           },
           {
             "slug": "cena",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#ffffff",
                 "fontSize": 100,
                 "align": "center",
                 "text": "16 990kč"
               }
             }
           },
           {
             "slug": "doprava",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#ffffff",
                 "fontSize": 100,
                 "align": "left",
                 "text": "Do dopravy zdarma zbývá 100 kč"
               }
             }
           },
           {
             "slug": "logo",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/logo_datart.png"
               }
             }
           },
           {
             "slug": "sleva-grafika",
             "source": {
               "data": {
                 "src": "https://phoenix.dev.webout.io/uploads/templates/images/discount_datart.png"
               }
             }
           },
           {
             "slug": "sleva-cislo",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#000000",
                 "fontSize": 100,
                 "align": "center",
                 "text": "50%"
               }
             }
           },
           {
             "slug": "sleva-text",
             "source": {
               "data": {
                 "fontFamily": "din_2014_bold",
                 "color": "#000000",
                 "fontSize": 100,
                 "align": "center",
                 "text": "sleva"
               }
             }
           }
         ]
       }
     ]
   }
 }'

Response

   {
       "_id": "66683b4a864c93f146c34a0e",
       "templateData": {
       ...
       }
       "updatedAt": "2024-06-12T11:55:54.860Z",
       "createdAt": "2024-06-11T11:55:54.860Z",
       "deletedAt": null,
       "__v": 0
   }

Payload:

  • Name
    _id
    Type
    string
    Description

    UUID konfigurace

  • Name
    templateData
    Type
    object
    Description

    Kompletní informace o nastavení konfigurace

  • Name
    slug
    Type
    string
    Description

    Slug projectu na základě, kterého je konfigurace vytvořena

  • Name
    scenes
    Type
    array
    Description

    Pole jednotlivých scén v konfiguraci

  • Name
    slug
    Type
    string
    Description

    Slug scény

  • Name
    content
    Type
    string
    Description

    Pole jednotlivých kontentů ve scéně

Response:

  • Name
    configuration_uuid
    Type
    string
    Description

    UUID konfigurace

  • Name
    templateData
    Type
    object
    Description

    Aktualizovaný data ke konfiguraci, která byla uložena


Mazání

Request

DELETE
https://phoenix.stg.webout.io/templates/:UUID
curl --location 'https://phoenix.stg.webout.io/templates/66683b4a864c93f146c34a0e' \
--header 'Content-Type: application/json' \
--data ''

Response

{}

Query:

  • Name
    configuration_uuid
    Type
    string
    Description

    UUID konfigurace

Response:

  • Name
    status
    Type
    number
    Description

    Status 204 potvrzuje úspěšné smazání konfigurace