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
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • 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 OrdersItemsApiV2Controller

Class OrdersItemsApiV2Controller

Notice: This controller is a sub-resource of the OrdersApiV2Controller.

AbstractApiV2Controller
Extended by HttpApiV2Controller
Extended by OrdersItemsApiV2Controller
Package: ApiV2Controllers
Category: System
Located at Controllers/Api/v2/OrdersItemsApiV2Controller.inc.php

Methods summary

protected
# __initialize( )

Initializes API Controller

Initializes API Controller

Throws

HttpApiV2Exception
On missing order ID.
public
# post( )

Api

{post} /orders/:id/items Create Order Item

Apidescription

Use this method to create a new order item to an existing order. The order item JSON format must be the same with the "items" entries in the original order item.


Apierror

400-BadRequest The request body was empty.
(Error 5xx) 500-InternalError One of the given properties has an invalid value type.

Apierrorexample

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


Apiexample

{json} Request-Body { "model": "12345-s-black", "name": "Ein Artikel", "quantity": 1, "price": 11, "finalPrice": 11, "tax": 19, "isTaxAllowed": true, "discount": 0, "shippingTimeInformation": "", "checkoutInformation": "Checkout information goes here ...", "quantityUnitName": "Liter", "attributes": [ { "id": 1, "name": "Farbe", "value": "rot", "price": 0, "priceType": "+", "optionId": 1, "optionValueId": 1, "combisId": null } ], "downloadInformation": { "filename": "Dokument.pdf", "maxDaysAllowed": 5, "countAvailable": 14 }, "addonValues": { "productId": "2", "quantityUnitId": "1" } }


Apigroup

Orders

Apiname

CreateOrderItem

Apisuccess

(Success 201) Response-Body If successful, this method returns a complete Order Item resource in the response body.


Apiversion

2.1.0
public
# put( )

Api

{put} /orders/:id/items/:id Update Order Item

Apidescription

Use this method to update an existing order item. Use the same order item JSON format as in the POST method.

Apierror

400-BadRequest The request body is empty or the order item ID in the URI was not provided or is invalid.
404-NotFound The provided order item was not found in the given order.

Apierrorexample

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


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


Error-Response (Not found in order) HTTP/1.1 404 Not Found { "code": 404, "status": "error", "message": "The provided order item ID does not exist in the given order!" }


Apigroup

Orders

Apiname

UpdateOrderItem

Apisuccess

Response-Body If successful, this method returns the updated Order Item resource in the response body.

Apiversion

2.1.0
public
# delete( )

Api

{delete} /orders/:id/items/:id Delete Order Item

Apidescription

Use this method to remove an order item from an existing order.

Apierror

400-BadRequest The order item ID in the URI was not provided or is invalid.
404-NotFound The provided order item was not found in the given order.

Apierrorexample

Error-Response (Missing ID) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Order item record ID was not provided in the resource URL." }


Error-Response (Not found in order) HTTP/1.1 404 Not Found { "code": 404, "status": "error", "message": "The provided order item ID does not exist in the given order!" }


Apigroup

Orders

Apiname

DeleteOrderItem

Apisuccessexample

{json} Success-Response { "code": 200, "status": "success", "action" :"delete", "resource": "OrderItem", "orderId": 400883, "orderItemId": 1 }


Apiversion

2.1.0
public
# get( )

Api

{get} /orders/:id/items/:id Get Order Item

Apidescription

Get all or just a single order item from an existing orders. All the GET manipulation parameters are applied with this method (search, sort, minimize, paginate etc).


Apiexample

{curl} Get All Entries curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400785/items


{curl} Get Entry With ID=8 curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400242/items/8


{curl} Minimize Responses curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400871/items?fields=id,model,name,quanity


Apigroup

Orders

Apiname

GetOrderItem

Apiparam

{Number} [id] Record ID of resource to be returned. If omitted all records will be included in the response.


Apiversion

2.1.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 OrderWriteService $orderWriteService

Order write service.

Order write service.

#
protected OrderReadService $orderReadService

Order read service.

Order read service.

#
protected OrderJsonSerializer $orderJsonSerializer

Order JSON serializer.

Order JSON serializer.

#
protected array $subresource

Sub resources.

Sub resources.

#

Properties inherited from AbstractApiV2Controller

$api, $uri

API documentation generated by ApiGen