Use SOAP Services
A WSDL file is generated only for services that you request. This means that different clients may use different services and therefore use different WSDLs.
The Magento web API uses WSDL 1.2, which complies with WS-I 2.0 Basic Profile.
Each Magento service interface that is part of a service contract is represented as a separate service in the WSDL.
To consume several services, you must specify them in the WSDL endpoint URL.
|Service||WSDL endpoint URL||Available services|
|customer, catalogProduct||http://magentohost/soap/custom_store?wsdl&services=customerCustomerAccountServiceV1,catalogProductV2||\Magento\Customer\Service\V1\CustomerAccountServiceInterface, \Magento\Catalog\Service\V2\ProductInterface|
The WSDL URL follows the following pattern:
You must specify each service version in the endpoint URL.
This way, you can have a strict contract between your application and the service provider.
Service class-to-service name conversion rules
Service names use the following conventions:
- CamelCase is used for service naming.
- The string
Magentoprefix is omitted.
Interfacesuffix is omitted.
- If the service name is the same as the module name, the module name is omitted. For example, if there is a customer service interface in the customer module, the word
customerwill be used in the service name only once.
|Original Service Interface Name||Service Name|
Protected SOAP resources can be accessed using bearer tokens (OAuth access tokens) over HTTP. Access tokens are strings representing an access authorization issued to the client. For more information, see OAuth-based authentication
The following PHP script illustrates how to get an access token: