• Home
  • Kundenlogin
    • This section is currently only available in english.

Backend API reference

The endpoint for all API calls is:

http://layoutbuddy.com/api


GET /index

Gives general information about the API and the version.

Parameters:

NONE

Authentication:

NO

Example response:

{
    "version": "1.0"
}


GET /config

Gives information of a configuration.

Parameters:

  • id (required): Id of the configuration

Authentication:

YES (more information)

Example response:

{
    "id": "67125",
    "name": "My default banner",
    "base": "banner",
    "created": "2012-09-26 21:49:31"
}


GET /listConfigs

Returns all available configurations.

Parameters:

NONE

Authentication:

YES (more information)

Example response:

[
    {
        "id": "67125",
        "name": "My default banner",
        "base": "banner",
        "created": "2012-09-26 21:49:31"
    },
    {
        "id": "67126",
        "name": "My default sticker",
        "base": "sticker",
        "created": "2012-09-26 21:49:31"
    }
]


GET /details

Gives information for a layout.

Parameters:

  • id (required): Id of the layout

Authentication:

YES (more information)

Example response:

{
    "id": "68652b61bd",
    "price": 22.95,
    "width": 200,
    "height": 50,
    "unit": "cm",
    "options": [
        {
            "qty": 1,
            "label": "Banner Heavy (700g/qm)",
            "price": 22.95
        }
    ]
}


GET /downloadPdf

Returns the PDF for printing.

Parameters:

  • id (required): Id of the layout
  • fotolia_license (optional): Defines if an extended license for fotolia images should be bought (either "standard" or "extended")
  • order_code (optional): A custom code to indicate the order. Can be used for PDF filename and additional information like barcodes
  • item_code (optional): A custom code to indicate the item. Can be used for PDF filename and additional information like barcodes
  • item_number (optional): A custom code to indicate the item position. Can be used for PDF filename and additional information like barcodes
  • item_qty (optional): A custom code to indicate the ordered quantity of an item. Can be used for PDF filename and additional information like barcodes

Authentication:

YES (more information)

Example response:

// Binary PDF data


POST /updateMarker

Sets custom information for a layout.

Parameters:

  • id (required): Id of the layout
  • value (required): Value of information marker to be stored

Authentication:

YES (more information)

Example response:

{
    "result": "success"
}


GET /widget

Returns HTML-page for widget.

Parameters:

  • id (required): Id of the layout
  • show_options (optional): Defines wether customer defined options of the layout should be shown
  • order_code (required): A custom code to indicate the order. Can be used for PDF filename and additional information like barcodes
  • item_code (optional): A custom code to indicate the item. Can be used for PDF filename and additional information like barcodes
  • item_number (optional): A custom code to indicate the item position. Can be used for PDF filename and additional information like barcodes
  • item_qty (optional): A custom code to indicate the ordered quantity of an item. Can be used for PDF filename and additional information like barcodes

Authentication:

YES (more information)

Example response:

// HTML page