Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminAccess
    • Collections
    • Deleters
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Managers
    • Readers
    • Writers
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • CustomerGroup
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Serializers
    • Services
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Geschaeftskundenversand
    • Helpers
    • Invoices
    • Orders
    • ParcelShopFinder
    • QuickEdit
    • Serializers
    • Templates
  • Geschaeftskundenversand
    • Exceptions
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Manufacturer
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • OrderStatus
    • Collections
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Repositories
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • QuantityUnit
    • Entities
    • Factories
    • Repositories
  • QuickEdit
    • Interfaces
    • Repositories
  • Review
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Services
    • ValueObjects
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Smarty
    • plugins
  • StaticSeoUrl
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • StaticSeoUrls
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository
  • VersionInfo
    • Factories
    • Reader
    • ValueObjects
  • VPE
    • Entities
    • Factories
    • Repositories
  • Withdrawal
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Services
    • ValueObjects

Classes

  • AbstractApiV2Controller
  • AbstractImagesApiV2Controller
  • AddressesApiV2Controller
  • AddressFormatsApiV2Controller
  • AttachmentsApiV2Controller
  • CategoriesApiV2Controller
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CountriesApiV2Controller
  • CustomerGroupsApiV2Controller
  • CustomersApiV2Controller
  • DefaultApiV2Controller
  • EmailsApiV2Controller
  • HttpApiV2Controller
  • ManufacturersApiV2Controller
  • OrdersApiV2Controller
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrderStatusesApiV2Controller
  • OrdersTotalsApiV2Controller
  • ProductImagesApiV2Controller
  • ProductReviewsApiV2Controller
  • ProductsApiV2Controller
  • ProductsLinksApiV2Controller
  • QuantityUnitsApiV2Controller
  • ReviewsApiV2Controller
  • ShopInformationApiV2Controller
  • TaxClassesApiV2Controller
  • TaxRatesApiV2Controller
  • TaxZonesApiV2Controller
  • TrackingCodeApiV2Controller
  • VpeApiV2Controller
  • WithdrawalsApiV2Controller
  • ZonesApiV2Controller

Class ManufacturersApiV2Controller

Class HttpApiV2Controller

Contains common functionality for all the GX2 APIv2 controllers. You can use the $api instance in the child-controllers in order to gain access to request and response information. The $uri variable is an array that contains the requested resource path.

You can use a protected "__initialize" method in your child controllers for performing common operations without overriding the parent constructor method.

This class contains some private methods that define the core operations of each controller and should not be called from a child-controller (like validation, authorization, rate limiting). The only way to disable the execution of these methods is to override the controller.

AbstractApiV2Controller
Extended by HttpApiV2Controller
Extended by ManufacturersApiV2Controller
Package: ApiV2Controllers
Category: System
See: AbstractApiV2Controller
Todo:

Add _cacheResponse() helper function which will cache request data and it will provide the required headers.


Located at Controllers/Api/v2/ManufacturersApiV2Controller.inc.php

Methods summary

protected
# __initialize( )

Initializes the manufacturers api controller.

Initializes the manufacturers api controller.

public
# get( )

Api

{get} /manufacturers/:id Get manufacturers

Apidescription

Get multiple or a single manufacturers record through the GET method

Apierror

400-BadRequest Manufacturers data were not provided or manufacturers record ID was not provided or is invalid.


404-NotFound Manufacturers record could not be found.

Apierrorexample

Error-Response (Missing or invalid ID) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Manufacturers record ID was not provided or is invalid." }


Error-Response (Manufacturers Not Found) HTTP/1.1 404 Not Found { "code": 404, "status": "error", "message": "Manufacturers record could not be found." }


Apiexample

{curl} Get All Manufacturers records curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/manufacturers


{curl} Get Manufacturers record With ID = 982 curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/manufacturers/982


Apigroup

Manufacturers

Apiname

GetManufacturers

Apiversion

2.5.0
public
# post( )

Api

{post} /manufacturers Create Manufacturers

Apidescription

This method enables the creation of a new Manufacturers into the system.

Apierror

400-BadRequest The body of the request was empty.

Apierrorexample

Error-Response HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Manufacturers data were not provided." }


Apigroup

Manufacturers

Apiname

CreateManufacturers

Apiparam

{String} name Name of manufacturer.
{String} image Path to manufacturers image.
{Object} urls Object with language code as key and the language specific url as value.

Apiparamexample

{json} Manufacturers entity { "name": "Breitling", "image": "manufacturers/breitling-logo.png", "urls": { "EN": "https://breitling.com", "DE": "https://breitling.de" } }


Apisuccess

(201) Request-Body If successful, this method returns the complete manufacturers resource in the response body.


Apisuccessexample

{json} Success-Response { "id": 2, "name": "Breitling", "image": "manufacturers/breitling-logo.png", "dateAdded": "2017-09-29 13:42:46", "lastModified": "2017-09-29 13:42:46", "urls": { "EN": "https://breitling.com", "DE": "https://breitling.de" } }


Apiversion

2.6.0
public
# patch( )

Api

{patch} /manufacturers/:id Updates Manufacturers

Apidescription

Use this method if you want to update an existing manufacturers record.

Apierror

400-BadRequest Manufacturers data were not provided or manufacturers record ID was not provided or is invalid.


404-NotFoundRequest Manufacturers data were not provided or manufacturers record ID was not provided or is invalid.


Apierrorexample

Error-Response (Empty request body) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Manufacturers data were not provided." }


Error-Response (Missing or invalid ID) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Manufacturers record ID was not provided or is invalid." }


Error-Response (Entity not found) HTTP/1.1 400 Bad Request { "code": 404, "status": "error", "message": "Manufacturer entity was not found with provided id [ID]" }


Apigroup

Manufacturers

Apiname

UpdateManufacturers

Apiparam

{String} name Name of manufacturer.
{String} image Path to manufacturers image.
{Object} urls Object with language code as key and the language specific url as value.

Apiparamexample

{json} Manufacturers entity { "name": "Breitling", "image": "manufacturers/breitling-logo.png", "urls": { "EN": "https://breitling.com", "DE": "https://breitling.de" } }


Apisuccess

(200) Request-Body If successful, this method returns the complete manufacturers resource in the response body.


Apisuccessexample

{json} Success-Response { "id": 2, "name": "Breitling", "image": "manufacturers/breitling-logo.png", "dateAdded": "2017-09-29 13:42:46", "lastModified": "2017-09-29 13:42:46", "urls": { "EN": "https://breitling.com", "DE": "https://breitling.de" } }


Apiversion

2.6.0
public
# delete( )

Api

{delete} /manufacturers/:id Delete Manufacturers

Apidescription

Removes a manufacturers record from the system. This method will always return success even if the manufacturers does not exist (due to internal ManufacturersWriteService architecture decisions, which strive to avoid unnecessary failures).


Apiexample

{curl} Delete Manufacturers with ID = 84 curl -X DELETE --user admin@shop.de:12345 http://shop.de/api.php/v2/manufacturers/84


Apigroup

Manufacturers

Apiname

DeleteManufacturers

Apisuccessexample

{json} Success-Response { "code": 200, "status": "success", "action": "delete", "manufacturersId": 84 }


Apiversion

2.5.0
protected array
# _serializeManufacturer( ManufacturerInterface $manufacturer )

Serializes manufacturer entities.

Serializes manufacturer entities.

Parameters

$manufacturer
Manufacturer entity to be serialized.

Returns

array
Serialized manufacturer array.
protected Manufacturer
# _deserializeManufacturer( string $manufacturerJson, $id = null )

Deserialize manufacturer entities.

Deserialize manufacturer entities.

Parameters

$manufacturerJson
Manufacturer entity as json string.
$id

Returns

Manufacturer
Deserialize manufacturer entity.
protected array
# _serializeManufacturerCollection( ManufacturerCollection $manufacturerCollection )

Serializes manufacturer collections.

Serializes manufacturer collections.

Parameters

$manufacturerCollection
Manufacturer collection to be serialized.

Returns

array
Serialized manufacturer collection array.

Methods inherited from HttpApiV2Controller

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

Methods inherited from AbstractApiV2Controller

__construct(), _prepareResponse(), _setRateLimitHeader(), _validateRequest()

Constants summary

Constants inherited from AbstractApiV2Controller

DEFAULT_CONTROLLER_NAME, DEFAULT_PAGE_ITEMS, DEFAULT_RATE_LIMIT, DEFAULT_RATE_RESET_PERIOD

Properties summary

protected ManufacturerReadServiceInterface $readService
#
protected ManufacturerWriteServiceInterface $writeService
#

Properties inherited from AbstractApiV2Controller

$api, $uri

API documentation generated by ApiGen