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 AddressesApiV2Controller

Class AddressesApiV2Controller

Provides a gateway to the AddressBookService which handles the shop address resources.

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

Methods summary

protected
# __initialize( )

Initializes API Controller

Initializes API Controller

public
# post( )

Api

{post} /addresses Create Address

Apierror

400-BadRequest Address data were not provided.

Apierrorexample

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


Apigroup

Addresses

Apiname

CreateAddress

Apiparam

{int} customerId The customer's record ID to whom the address belong.
{string} gender Provide either "m" or "f" for male and female.
{string} company The address company name.
{string} firstname The address firstname.
{string} lastname The address lastname.
{string} street The address street.
{string} suburb The address suburb.
{string} postcode The address postcode.
{string} city The address city.

{int} countryId Provide an existing "countryId", if it does not exist create it through the "countries" API methods.


{int} zoneId Provide an existing "countryId", if it does not exist create it through the "zones" API methods.


{string} class The address class can be any string used for distinguishing the address from other records.


{bool} b2bStatus Defines the Business-to-Business status of the address.

Apiparamexample

{json} Request-Body { "customerId": 1, "gender": "m", "company": "Test Company", "firstname": "John", "lastname": "Doe", "street": "Test Street 1", "suburb": "Test Suburb", "postcode": "23983", "city": "Test City", "countryId": 81, "zoneId": 84, "class": null, "b2bStatus": false }


Apisuccess

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


Apiversion

2.1.0
public
# put( )

Api

{put} /addresses/:id Update Address

Apidescription

Update an existing address record by providing new data. You do not have to provide the full presentation of the address in the JSON string of the request, rather just the fields to be updated. The address ID will be taken from the URI of the request so it is not required that it is included withing the request JSON.


Apiexample

{json} Request-Body { "company": "Test Company - UPDATED", "firstname": "John - UPDATED", "lastname": "Doe - UPDATED", "street": "Test Street - UPDATED", "suburb": "Test Suburb - UPDATED", "city": "Test City - UPDATED" }


Apigroup

Addresses

Apiname

UpdateAddress

Apisuccess

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

Apiversion

2.1.0
public
# delete( )

Api

{delete} /addresses/:id Delete Address

Apidescription

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


Apierror

400-BadRequest Address record ID was not provided in the resource URL.

Apierrorexample

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


Apiexample

{curl} Delete Address with ID = 811 curl -X DELETE --user admin@shop.de:12345 http://shop.de/api.php/v2/addresses/811


Apigroup

Addresses

Apiname

DeleteAddress

Apisuccessexample

{json} Success-Response { "code": 200, "status": "success", "action": "delete", "addressId": 811 }


Apiversion

2.1.0
public
# get( )

Api

{get} /addresses/:id Get Address

Apidescription

Get multiple or a single address records through a GET requets. This method supports all the GET parameters that are mentioned in the "Introduction" section of this documentation.


Apiexample

{curl} Delete Address with ID = 243 curl --user admin@shop.de:12345 http://shop.de/api.php/v2/addresses/243


Apigroup

Addresses

Apiname

GetAddress

Apisuccess

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

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 AddressBookServiceInterface $addressService
#
protected AddressJsonSerializer $addressSerializer
#

Properties inherited from AbstractApiV2Controller

$api, $uri

API documentation generated by ApiGen