Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractApiV2Controller
  • AbstractImagesApiV2Controller
  • AddressesApiV2Controller
  • AttachmentsApiV2Controller
  • CategoriesApiV2Controller
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CountriesApiV2Controller
  • CustomersApiV2Controller
  • DefaultApiV2Controller
  • EmailsApiV2Controller
  • HttpApiV2Controller
  • OrdersApiV2Controller
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrdersTotalsApiV2Controller
  • ProductImagesApiV2Controller
  • ProductsApiV2Controller
  • ProductsLinksApiV2Controller
  • ZonesApiV2Controller

Class ProductImagesApiV2Controller

Class ProductImagesApiV2Controller

Provides an API interface for managing product images through the ProductWriteService.

Notice: This controller IS NOT a subresource of the ProductsApiV2Controller.

This controller can be reached by using one of the following URIs:

  • http://shop.de/api.php/v2/product_images

or

  • http://shop.de/api.php/v2/ProductImages

Using "productimages" as a resource name will not resolve to this controller.

AbstractApiV2Controller
Extended by HttpApiV2Controller
Extended by AbstractImagesApiV2Controller
Extended by ProductImagesApiV2Controller
Package: ApiV2Controllers
Category: System
Located at v2/ProductImagesApiV2Controller.inc.php

Methods summary

protected
# __initialize( )

Initializes API Controller

Initializes API Controller

protected string
# _getImageFolderName( )

Returns the absolute path where the image files are located.

Returns the absolute path where the image files are located.

Returns

string
public
# post( )

Api

{post} /product_images Upload Product Image

Apidescription

Uploads an image file for the products. Make this request without the "Content-Type: application/json". Except from the file the POST request must also contain a "filename" value with the final file name.


Apierror

400-BadRequest No image file was provided.

Apierrorexample

Error-Response HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "No image file was provided." }


Apigroup

Products

Apiname

UploadProductImage

Apisuccess

(Success 201) Response-Body Contains information about the uploaded file.

Apisuccessexample

{json} Success-Response { "code": 201, "status": "success", "action": "upload", "filename": "my-image-file.png" }


Apiversion

2.1.0
public
# put( )

Api

{put} /product_images Rename Image File

Apidescription

Use this method to rename an existing image file.

Apierror

400-BadRequest This operation requires a JSON object with "oldFilename" and "newFilename" properties set.

Apierrorexample

Error-Response HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "This operation requires a JSON object with "oldFilename" and "newFilename" properties set. Check the documentation on how to properly use the API." }


Apiexample

{json} Request-Body { "oldFilename": "my-old-image.png", "newFilename": "my-new-image.png" }


Apigroup

Products

Apiname

RenameImageFile

Apisuccess

Response-Body Contains information about the executed operation.

Apisuccessexample

{json} Response-Body { "code": 200, "status": "success", "action": "rename", "oldFilename": "my-old-image.png", "newFilename": "my-new-image.png" }


Apiversion

2.1.0
public
# delete( )

Api

{delete} /product_images Delete Product Image

Apidescription

Remove the product image file from the server. This method will always provide a successful response even if the image file was not found.


Apierror

400-BadRequest This operation requires a JSON object with "filename" properties set.

Apierrorexample

Error-Response HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "This operation requires a JSON object with "filename" properties set. Check the documentation on how to properly use the API." }


Apiexample

{json} Delete Image { "filename": "file-to-be-deleted.png" }


Apigroup

Products

Apiname

DeleteProductImage

Apisuccessexample

{json} Success-Response { "code": 200, "status": "success", "action": "delete", "filename": "file-to-be-deleted.png" }


Apiversion

2.1.0
public
# get( )

Api

{get} /product_images

Apidescription

Get a list of all product image files which exists in the server's filesystem through a GET request.

Apiexample

{curl} Get All Product Images curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/product_images


Apigroup

Products

Apiname

GetProductImages

Apiversion

2.1.0

Overrides

AbstractImagesApiV2Controller::get

Methods inherited from HttpApiV2Controller

_linkResponse(), _locateResource(), _mapResponse(), _minimizeResponse(), _paginateResponse(), _searchResponse(), _setJsonValue(), _sortResponse(), _writeResponse()

Methods inherited from AbstractApiV2Controller

__construct()

Constants summary

Constants inherited from AbstractApiV2Controller

DEFAULT_CONTROLLER_NAME, DEFAULT_PAGE_ITEMS, DEFAULT_RATE_LIMIT, DEFAULT_RATE_RESET_PERIOD

Properties summary

Properties inherited from AbstractImagesApiV2Controller

$writeService

Properties inherited from AbstractApiV2Controller

$api, $uri

API documentation generated by ApiGen