OrdersItemsAttributesApiV2Controller

Extends \HttpApiV2Controller

Class OrdersItemsAttributesApiV2Controller

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

category

System

package

ApiV2Controllers

Methods

AbstractApiV2Controller Constructor

__construct(\Slim\Slim $api, array $uri) 
inherited

Call this constructor from every child controller class in order to set the Slim instance and the request routes arguments to the class.

deprecated

The "__initialize" method will is deprecated and will be removed in a future version. Please use the new "init" for bootstrapping your child API controllers.

Throws
\HttpApiV2Exception

Through _validateRequest

Arguments

$api

\Slim\Slim

Slim framework instance, used for request/response manipulation.

$uri

array

This array contains all the segments of the current request, starting from the resource.

delete

delete() 
api
apiVersion

2.1.0

apiName

DeleteOrderItemAttribute

apiGroup

Orders

apiDescription

Removes a single order item attribute/property entry from an existing order item record.

apiExample

{curl} Delete Attribute with ID = 3 curl -X DELETE --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400953/items/1/attributes/3

{curl} Delete Property with ID = 84 curl -X DELETE --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400953/items/1/properties/84

apiSuccessExample

{json} Success-Response { "code": 200, "status": "success", "action": "delete", "resource": "Order", "orderId": 400953, "orderItemId": 1, "orderItemAttributeId": 3 }

apiError

400-BadRequest The order item attribute ID in the URI was not provided or is invalid.

404-NotFound The order item attribute was not found.

apiErrorExample

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

Error-Response (Not found) HTTP/1.1 404 Not Found { "code": 404, "status": "error", "message": "The order item attribute was not found." }

get

get() 
api
apiVersion

2.1.0

apiName

GetOrderItemAttribute

apiGroup

Orders

apiDescription

Returns multiple or a single order item attribute/property records through a GET request. This method supports all the GET parameters that are mentioned in the "Introduction" section of this documentation.

apiExample

{curl} Get All Order Item Attributes curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400210/items/3/attributes

{curl} Get All Order Item Properties curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400210/items/3/properties

{curl} Get Attribute With ID = 2 curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400210/items/3/attributes/2

{curl} Get Property With ID = 54 curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/orders/400210/items/3/properties/54

getCallableResource

getCallableResource( $controller, array $mappedURI, \Slim\Slim $api) 
inherited static

Arguments

$controller

$mappedURI

array

$api

\Slim\Slim

post

post() 
api
apiVersion

2.1.0

apiName

CreateOrderItemAttribute

apiGroup

Orders

apiDescription

Use this method to create a new order item attribute to an existing order item. The order item attribute JSON object is the same as the one included in the full order representation. There are two different order item variation systems in the shop, the "attributes" and the "properties". Both of them define a variation of an order item (e.g. color, size etc). You must always use only one of them for a single order item.

apiParamExample

{json} Request-Example { "name": "Color", "value": "blue", "price": 0.00, "priceType": "+", "optionId": 1, "optionValueId": 1, "combisId": null }

apiParam

{String} name Attribute Name.

{String} value Attribute Value.

{Number} price Attribute Price as float.

{String} priceType Must contain one of the existing price types of the shop.

{Number} optionId Only attribute-records need this value.

{Number} optionValueId Only attribute-records need this value.

{Number} combisId Only property-records need this value.

apiSuccess

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

apiError

400-BadRequest The request body is empty.

apiErrorExample

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

put

put() 
api
apiVersion

2.1.0

apiName

UpdateOrderIteAttribute

apiGroup

Orders

apiDescription

Use this method to update an existing order item attribute record. It uses the same attribute JSON format as in the "Create Order Item Attribute" method.

apiSuccess

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

apiError

400-BadRequest The request body was empty or the order item attribute record ID was not provided or is invalid.

apiErrorExample

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

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

Constants

Defines the default page offset for responses that return multiple items.

DEFAULT_PAGE_ITEMS
inherited
var

Default controller to be loaded when no resource was selected.

DEFAULT_CONTROLLER_NAME
inherited
var

Defines the maximum request limit for an authorized client.

DEFAULT_RATE_LIMIT
inherited
var

Defines the duration of an API session in minutes.

DEFAULT_RATE_RESET_PERIOD
inherited
var

Properties