Here you will find answers to frequently asked questions.
Recently, we detected the following bug: We allow to set the parameter "IsDeliveryFree" to TRUE when the shipping option chosen is "pick up by buyer". This leads to the problem that the article is promoted as "freeShipping" when it should not. Additionally it's now possible to set "freeShipping" for "delivery by seller".
To solve this without breaking client's applications, we had to re-implement some API methods with the correct business logic. After the 27.08.2015 the old method will not be available any more.
Old method | New method |
InsertArticle | CreateArticle |
InsertArticles | CreateArticles |
UpdatePlannedArticle | ModifyPlannedArticle |
RelistArticle | RepublishArticle |
RelistArticleWithoutModification | RepublishArticleWithoutModification |
RelistArticlesWithoutModification | RepublishArticlesWithoutModification |
RelistArticles | RepublishArticles |
InsertPreviewConvertedClassified | CreatePreviewConvertedClassified |
UpdateArticle | ModifyArticle |
Answer: This is because you referenced our Web services as “Web references” instead of “Service references”, and because your project targets .NET Framework 2.0 instead of at least .NET Framework 3.0, to which WCF has been added (see differences ). To be even more precise, the client you should generate inherits from System.ServiceModel.ClientBase, and thus will have the ClientCredential property.
Answer: This might be because of either a contract mismatch (mismatched action between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that the sender and the receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
SOAP Example
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ISecurityService" maxReceivedMessageSize="20971520">
<readerQuotas maxStringContentLength="5242880" maxArrayLength="20971520"/>
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" />
<message establishSecurityContext="False" clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://ws.ricardo.ch/RicardoApi/SecurityService.Soap.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISecurityService"
contract="SecurityServiceSoapReference.ISecurityService" name="WSHttpBinding_ISecurityService" />
</client>
</system.serviceModel>
... and the JSON string received looks like this:
{
"ErrorCodes": null,
"ErrorCodesType": "Technical",
"ErrorType": "System.NullReferenceException"
}
Answer: This is probably because you are omitting the “parent” parameter of the method you are trying to call. For example, with the Login method (in Security Service), the following JSON content is incorrect:
{"Login":"YOUR_LOGIN","Password":"YOUR_PASSWORD"}
The correct syntax is:
{"loginParameter":{"Login":"YOUR_LOGIN","Password":"YOUR_PASSWORD"}}
Answer: The extensive list of methods with this comment is:
- SellService.InsertArticles
- SellService.InsertClassifieds
- SellService.RelistArticlesWithoutModification
- SellService.RelistClassifiedsWithoutModification
- SellService.RelistArticles
- SellService.RelistClassifieds
These methods have been implemented slightly quickly for internal usage. Hence they have not been optimised for our third-party users. These methods will probably evolve with breaking changes (modification of the expected parameter object), and thus we strongly discourage you from using them. But if you really want (or need) to use them, you will have to generate an antiforgery token for each article of the array (and not just one antiforgery token for the whole request, as it should be).
Since it is not possible to list C&B Articles using the ricardo.ch API (except Accessories, which is possible in another category), we strongly recommend to exclude C&B categories.
In ISystemService the method GetCategories allows to filter for
- all categories
- only C&B categories
- all categories except C&B categories
To filter, use the CategoryBrandingFilter.