Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • 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
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • 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
  • QuickEdit
    • Interfaces
    • Repositories
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository
  • VersionInfo
    • Factories
    • Reader
    • ValueObjects

Classes

  • AbstractApiV2Controller
  • AbstractImagesApiV2Controller
  • AddressesApiV2Controller
  • AddressFormatsApiV2Controller
  • AttachmentsApiV2Controller
  • CategoriesApiV2Controller
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CountriesApiV2Controller
  • CustomersApiV2Controller
  • DefaultApiV2Controller
  • EmailsApiV2Controller
  • HttpApiV2Controller
  • OrdersApiV2Controller
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrderStatusesApiV2Controller
  • OrdersTotalsApiV2Controller
  • ProductImagesApiV2Controller
  • ProductsApiV2Controller
  • ProductsLinksApiV2Controller
  • ShopInformationApiV2Controller
  • TaxClassesApiV2Controller
  • TaxRatesApiV2Controller
  • TaxZonesApiV2Controller
  • ZonesApiV2Controller

Class OrderStatusesApiV2Controller

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 OrderStatusesApiV2Controller
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/OrderStatusesApiV2Controller.inc.php

Methods summary

public
# __initialize( )

Initialize Controller

Initialize Controller

public
# get( )

Api

{get} /order_statuses/:id Get order statuses

Apidescription

Get a single order status entry. This method is currently limited to only fetching a single order status resource so make sure that you provide the order status ID in the request URI.


Apierror

(Error 5xx) 500-InternalError If the record is not found or something else goes wrong the API will return a 500 error status. Read the message for more info.


(Error 4xx) 400-Bad Request If the ID is not numeric in the request URI then the API will return a 400 error status because it cannot return the order status resource.


Apiexample

{curl} Get all order statuses curl --user admin@shop.de:12345 http://shop.de/api.php/v2/order_statuses


{curl} Get order status with ID = 2 curl --user admin@shop.de:12345 http://shop.de/api.php/v2/order_statuses/2


Apigroup

OrderStatus

Apiname

GetOrderStatus

Apisuccess

Response-Body If successful, this method will return the order status resource in JSON format.

Apiversion

2.4.0
public
# post( )

Api

{post} /order_statuses Create Order Status

Apidescription

This method creates a new order status in the database.

Apierror

400-Bad Request The API will return this status code if the order status data was not provided.

Apiexample

{curl} Creates New Order Status curl -X POST --user admin@shop.de:12345 http://shop.de/api.php/v2/order_statuses


Apigroup

OrderStatus

Apiname

CreateOrderStatus

Apiparam

{object} names Language related order status names. Provide the language id as object key.
{string} color Label color of order status.

Apiparamexample

{json} Create new order status { "names": { "EN": "new order status name", "DE": "neuer order status name" }, "color": "adad1313" }


Apisuccess

(Success 201) Response-Body If successful, this method returns the created order status resource in the response body.


Apiversion

2.4.0
public
# put( )

Api

{put} /order_statuses/:id Update Order Status

Apidescription

This method updates a order status in the database.

Apierror

400-Bad Request The API will return this status code if the order status data or order status id was not provided.


Apiexample

{curl} Update Order Status with ID = 2 curl -X PUT --user admin@shop.de:12345 http://shop.de/api.php/v2/order_statuses/2


Apigroup

OrderStatus

Apiname

UpdateOrderStatus

Apiparam

{object} names Language related order status names. Provide the language id as object key.
{string} color Label color of order status.

Apiparamexample

{json} Create new order status { "names": { "EN": "updated order status name", "DE": "aktualisierter order status name" }, "color": "adad1313" }


Apisuccess

(Success 201) Response-Body If successful, this method returns the updated order status resource in the response body.


Apiversion

2.4.0
public
# delete( )

Api

{delete} /order_statuses/:id Delete Order Status

Apidescription

Removes a order status record from the system. This method will always return success.

Apiexample

{curl} Delete Order Status with ID = 2 curl -X DELETE --user admin@shop.de:12345 http://shop.de/api.php/v2/order_statuses/2


Apigroup

OrderStatus

Apiname

DeleteOrderStatus

Apisuccessexample

{json} Success-Response { "code": 200, "status": "success", "action": "delete", "orderStatusId": 2 }


Apiversion

2.4.0

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

protected OrderStatusServiceInterface $orderStatusService
#

Properties inherited from AbstractApiV2Controller

$api, $uri

API documentation generated by ApiGen