Per elencare un singolo articolo, è necessario utilizzare il metodo SellService.InsertArticle. Se si imposta StartDate = null, l'articolo sarà immediatamente disponibile. Altrimenti, viene creato un articolo pianificato. La data di inizio deve essere di almeno 30 minuti dopo. Questo metodo restituisce le spese per l'elenco e l'identificativo dell'articolo.
JSON Example
- POST https://ws.ricardo.ch/ricardoapi/SellService.Json.svc/CreateArticle HTTP/1.1
- Content-Type: application/json
- Ricardo-Username: [YOUR TokenCredential]
- Host: ws.betaqxl.com
{ "insertArticleParameter": { "AntiforgeryToken": "YOUR ANTIFORGERY TOKEN", "ArticleInformation": { "ArticleConditionId": 0, "ArticleDuration": 14400, "AvailabilityId": 0, "BuyNowPrice": null, "CategoryId": 38875, "Deliveries": [ { "DeliveryCost": 0.0, "DeliveryId": 0, "DeliveryPackageSizeId": 0, "IsDeliveryFree": false } ], "Increment": 1.0, "InitialQuantity": 1, "InternalReferences": [ { "InternalReferenceTypeId": 1, "InternalReferenceValue": "5" } ], "IsCustomerTemplate": false, "IsRelistSoldOut": false, "MainPictureId": 0, "MaxRelistCount": 0, "PaymentConditionIds": "BQ==", "PaymentMethodIds": [ 0 ], "PromotionIds": [ 1 ], "StartDate": null, "StartPrice": 10.0, "TemplateId": null, "WarrantyId": 0 }, "BrandingArticleDetails": null, "Descriptions": [ { "ArticleDescription": "Description of the article", "ArticleSubtitle": "Subtitle of the article", "ArticleTitle": "Title of the article", "DeliveryDescription": "Description of the delivery option", "LanguageId": 2, "PaymentDescription": "Description of the payment method", "WarrantyDescription": "Description of the warranty" } ], "Pictures": [ { "PictureBytes": "the binary content of your image", "PictureExtension": 2, "PictureIndex": 1 } ] } }
SOAP Example
- POST https://ws.ricardo.ch/RicardoApi/SellService.Soap.svc HTTP/1.1
- Content-Type: application/soap+xml; charset=utf-8
- Host: ws.betaqxl.com
- Accept-Encoding: gzip, deflate
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://ricardo.contracts/ISellService/CreateArticle</a:Action>
<a:MessageID>urn:uuid:04c2ebf2-5052-4739-88bf-549665764fc7</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<UsernameToken>
<Username>YOUR TOKEN</Username>
<Password></Password>
</UsernameToken>
</Security>
</s:Header>
<s:Body>
<CreateArticle xmlns="http://ricardo.contracts">
<insertArticleParameter xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AntiforgeryToken>YOUR ANTIFORGERY TOKEN</AntiforgeryToken>
<ArticleInformation>
<ArticleConditionId>0</ArticleConditionId>
<ArticleDuration>14400</ArticleDuration>
<AvailabilityId>0</AvailabilityId>
<BuyNowPrice i:nil="true" />
<CategoryId>38875</CategoryId>
<Deliveries>
<ArticleDeliveryParameter>
<DeliveryCost>0</DeliveryCost>
<DeliveryId>0</DeliveryId>
<DeliveryPackageSizeId>0</DeliveryPackageSizeId>
<IsDeliveryFree>false</IsDeliveryFree>
</ArticleDeliveryParameter>
</Deliveries>
<Increment>1</Increment>
<InitialQuantity>1</InitialQuantity>
<InternalReferences>
<ArticleInternalReferenceParameter>
<InternalReferenceTypeId>SellerSpecific</InternalReferenceTypeId>
<InternalReferenceValue>5</InternalReferenceValue>
</ArticleInternalReferenceParameter>
</InternalReferences>
<IsCustomerTemplate>false</IsCustomerTemplate>
<IsRelistSoldOut>false</IsRelistSoldOut>
<MainPictureId>0</MainPictureId>
<MaxRelistCount>0</MaxRelistCount>
<PaymentConditionIds>BQ==</PaymentConditionIds>
<PaymentMethodIds xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:int>0</d6p1:int>
</PaymentMethodIds>
<PromotionIds>
<PromotionCode>Subtitle</PromotionCode>
</PromotionIds>
<StartDate i:nil="true" />
<StartPrice>10</StartPrice>
<TemplateId i:nil="true" />
<WarrantyId>0</WarrantyId>
</ArticleInformation>
<BrandingArticleDetails xmlns:d5p1="http://schemas.datacontract.org/2004/07/Ricardo.Contracts.Models.Branding" i:nil="true" />
<Descriptions>
<ArticleDescriptionParameter>
<ArticleDescription>Description of the article</ArticleDescription>
<ArticleSubtitle>Subtitle of the article</ArticleSubtitle>
<ArticleTitle>Title of the article</ArticleTitle>
<DeliveryDescription>Description of the delivery option</DeliveryDescription>
<LanguageId>SwitzerlandDe</LanguageId>
<PaymentDescription>Description of the payment method</PaymentDescription>
<WarrantyDescription>Description of the warranty</WarrantyDescription>
</ArticleDescriptionParameter>
</Descriptions>
<Pictures>
<ArticlePictureParameter>
<PictureBytes>...</PictureBytes>
<PictureExtension>jpg</PictureExtension>
<PictureIndex>1</PictureIndex>
</ArticlePictureParameter>
</Pictures>
</insertArticleParameter>
</CreateArticle>
</s:Body>
</s:Envelope>