Documentation SOAP to REST

  • klaus_schneider

    289 messaggi

    Germania

    Hello,
    we don't use PHP.
    In order to carry out the API conversion, we need the structure of the URLs for the request.
    Please add this information to the documentation.
    Regards Klaus
  • @thomas
    Amministratore

    348 messaggi

    Belgio

    Hello Klaus,

    You can find all URLs here: Link (https)

    You can find the structure of the URLs by clicking on them.

    Unfortunately we don't have examples with languages other than PHP. Which one do you use?

    Kind Regards,
    --
    Thomas
    Delcampe Team
  • klaus_schneider

    289 messaggi

    Germania

    Hello,
    Yes, this list is known, but that's not enough, I need examples with data / the parameters of how the URLs are structured. So what comes out of PHP and what is exactly transferred to the server.
    Regard Klaus
  • @thomas
    Amministratore

    348 messaggi

    Belgio

    Hello,
    Yes, this list is known, but that's not enough, I need examples with data / the parameters of how the URLs are structured. So what comes out of PHP and what is exactly transferred to the server.
    Regard Klaus
    Hello Klaus,

    For example to add an item Link (https) :

    ** with HTTP:

    POST /item?token=***your seller token*** HTTP/1.1
    Host: Link (https)
    Content-Type: application/x-www-form-urlencoded

    type=fixedPrice&item[id_country]=3&item[id_category]=1242&item[fixed_price]=15.00&item[currency]=EUR&item[title]=My title&item[personal_reference]=My personal Ref8&item[qty]=1&item[duration]=28&item[description]=My description&item[renew]=0&item[option_lastminutebidding]=&item[option_privatebidding]=&item[option_subtitle]=&item[subtitle]=&item[option_boldtitle]=&item[option_highlight]=&item[option_coloredborder]=&item[option_toplisting]=&item[option_topcategory]=&item[option_topmain]=&item[option_keepoptionsonrenewal]=&item[prefered_end_day]=mon&item[prefered_end_hour]=15:00&item[images][0]= Link (https)

    ** with cURL:

    curl --location --request POST ' Link (https) seller token***' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'type=fixedPrice' \
    --data-urlencode 'item[id_country]=3' \
    --data-urlencode 'item[id_category]=1242' \
    --data-urlencode 'item[fixed_price]=15.00' \
    --data-urlencode 'item[currency]=EUR' \
    --data-urlencode 'item[title]=My title' \
    --data-urlencode 'item[personal_reference]=My personal Ref' \
    --data-urlencode 'item[qty]=1' \
    --data-urlencode 'item[duration]=28' \
    --data-urlencode 'item[description]=My description' \
    --data-urlencode 'item[renew]=0' \
    --data-urlencode 'item[option_lastminutebidding]=' \
    --data-urlencode 'item[option_privatebidding]=' \
    --data-urlencode 'item[option_subtitle]=' \
    --data-urlencode 'item[subtitle]=' \
    --data-urlencode 'item[option_boldtitle]=' \
    --data-urlencode 'item[option_highlight]=' \
    --data-urlencode 'item[option_coloredborder]=' \
    --data-urlencode 'item[option_toplisting]=' \
    --data-urlencode 'item[option_topcategory]=' \
    --data-urlencode 'item[option_topmain]=' \
    --data-urlencode 'item[option_keepoptionsonrenewal]=' \
    --data-urlencode 'item[prefered_end_day]=mon' \
    --data-urlencode 'item[prefered_end_hour]=15:00' \
    --data-urlencode 'item[images][0]= Link (https) '\
    --data-urlencode 'item[images][1]= Link (https) '\

    I hope it's clear enough, otherwise tell me.
    --
    Thomas
    Delcampe Team
  • klaus_schneider

    289 messaggi

    Germania

    OK Thanks, i think we can start with this, can you send me a example for the compleed authentification procedure in this structure.
  • @thomas
    Amministratore

    348 messaggi

    Belgio

    To authenticate, the behavior is pretty much the same as on SOAP. You make a call with your API key and you will receive a connection token in XML.

    **HTTP

    POST /seller HTTP/1.1
    Host: Link (https)
    Content-Type: application/x-www-form-urlencoded

    apikey=***your_api_key***

    **cURL

    curl --location --request POST ' Link (https) ' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'apikey=***your_api_key***'

    --
    Thomas
    Delcampe Team
  • postcarddatabase

    65 messaggi

    Belgio

    just a small question concerning the migration from soap to rest:

    i figure that i don't need to change anything to my notification handler, right? as this doesn't do requests towards delcampe

    just making sure at least this will keep working :)
  • @thomas
    Amministratore

    348 messaggi

    Belgio

    just a small question concerning the migration from soap to rest:

    i figure that i don't need to change anything to my notification handler, right? as this doesn't do requests towards delcampe

    just making sure at least this will keep working :)
    Hello postcarddatabase,

    Indeed you don't need to change anything as the notifications remain the same.

    Best Regards,
    --
    Thomas
    Delcampe Team
  • klaus_schneider

    289 messaggi

    Germania

    Hello,
    please can you give me the exact link structure for the array POSTs (/item/rating and /item) for example like this

    DELETE /item/110540589700?token=xxx&reason=NotAvailableItem&priority=1 HTTP/1.1

    best wishes
  • klaus_schneider

    289 messaggi

    Germania

    Hello Klaus,

    For example to add an item Link (https) :

    ** with HTTP:

    POST /item?token=***your seller token*** HTTP/1.1
    Host: Link (https)
    Content-Type: application/x-www-form-urlencoded

    type=fixedPrice&item[id_country]=3&item[id_category]=1242&item[fixed_price]=15.00&item[currency]=EUR&item[title]=My title&item[personal_reference]=My personal Ref8&item[qty]=1&item[duration]=28&item[description]=My description&item[renew]=0&item[option_lastminutebidding]=&item[option_privatebidding]=&item[option_subtitle]=&item[subtitle]=&item[option_boldtitle]=&item[option_highlight]=&item[option_coloredborder]=&item[option_toplisting]=&item[option_topcategory]=&item[option_topmain]=&item[option_keepoptionsonrenewal]=&item[prefered_end_day]=mon&item[prefered_end_hour]=15:00&item[images][0]= Link (https)

    ** with cURL:

    curl --location --request POST ' Link (https) seller token***' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'type=fixedPrice' \
    --data-urlencode 'item[id_country]=3' \
    --data-urlencode 'item[id_category]=1242' \
    --data-urlencode 'item[fixed_price]=15.00' \
    --data-urlencode 'item[currency]=EUR' \
    --data-urlencode 'item[title]=My title' \
    --data-urlencode 'item[personal_reference]=My personal Ref' \
    --data-urlencode 'item[qty]=1' \
    --data-urlencode 'item[duration]=28' \
    --data-urlencode 'item[description]=My description' \
    --data-urlencode 'item[renew]=0' \
    --data-urlencode 'item[option_lastminutebidding]=' \
    --data-urlencode 'item[option_privatebidding]=' \
    --data-urlencode 'item[option_subtitle]=' \
    --data-urlencode 'item[subtitle]=' \
    --data-urlencode 'item[option_boldtitle]=' \
    --data-urlencode 'item[option_highlight]=' \
    --data-urlencode 'item[option_coloredborder]=' \
    --data-urlencode 'item[option_toplisting]=' \
    --data-urlencode 'item[option_topcategory]=' \
    --data-urlencode 'item[option_topmain]=' \
    --data-urlencode 'item[option_keepoptionsonrenewal]=' \
    --data-urlencode 'item[prefered_end_day]=mon' \
    --data-urlencode 'item[prefered_end_hour]=15:00' \
    --data-urlencode 'item[images][0]= Link (https) '\
    --data-urlencode 'item[images][1]= Link (https) '\

    I hope it's clear enough, otherwise tell me.
    --
    Thomas
    Delcampe Team
    Hello,

    please, what ist the type for auction format ?

    bw
  • klaus_schneider

    289 messaggi

    Germania

    Hello Klaus,

    For example to add an item Link (https) :

    ** with HTTP:

    POST /item?token=***your seller token*** HTTP/1.1
    Host: Link (https)
    Content-Type: application/x-www-form-urlencoded

    type=fixedPrice&item[id_country]=3&item[id_category]=1242&item[fixed_price]=15.00&item[currency]=EUR&item[title]=My title&item[personal_reference]=My personal Ref8&item[qty]=1&item[duration]=28&item[description]=My description&item[renew]=0&item[option_lastminutebidding]=&item[option_privatebidding]=&item[option_subtitle]=&item[subtitle]=&item[option_boldtitle]=&item[option_highlight]=&item[option_coloredborder]=&item[option_toplisting]=&item[option_topcategory]=&item[option_topmain]=&item[option_keepoptionsonrenewal]=&item[prefered_end_day]=mon&item[prefered_end_hour]=15:00&item[images][0]= Link (https)

    ** with cURL:

    curl --location --request POST ' Link (https) seller token***' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'type=fixedPrice' \
    --data-urlencode 'item[id_country]=3' \
    --data-urlencode 'item[id_category]=1242' \
    --data-urlencode 'item[fixed_price]=15.00' \
    --data-urlencode 'item[currency]=EUR' \
    --data-urlencode 'item[title]=My title' \
    --data-urlencode 'item[personal_reference]=My personal Ref' \
    --data-urlencode 'item[qty]=1' \
    --data-urlencode 'item[duration]=28' \
    --data-urlencode 'item[description]=My description' \
    --data-urlencode 'item[renew]=0' \
    --data-urlencode 'item[option_lastminutebidding]=' \
    --data-urlencode 'item[option_privatebidding]=' \
    --data-urlencode 'item[option_subtitle]=' \
    --data-urlencode 'item[subtitle]=' \
    --data-urlencode 'item[option_boldtitle]=' \
    --data-urlencode 'item[option_highlight]=' \
    --data-urlencode 'item[option_coloredborder]=' \
    --data-urlencode 'item[option_toplisting]=' \
    --data-urlencode 'item[option_topcategory]=' \
    --data-urlencode 'item[option_topmain]=' \
    --data-urlencode 'item[option_keepoptionsonrenewal]=' \
    --data-urlencode 'item[prefered_end_day]=mon' \
    --data-urlencode 'item[prefered_end_hour]=15:00' \
    --data-urlencode 'item[images][0]= Link (https) '\
    --data-urlencode 'item[images][1]= Link (https) '\

    I hope it's clear enough, otherwise tell me.
    --
    Thomas
    Delcampe Team
    Hello,
    OK, we try this for setFeedback

    POST /item/1133270464/buyer/rating?token=xxx&item[ratingValue]=100&item[comment]=Alles%20OK%20%2D%20Vielen%20Dank HTTP/1.1

    but it doesn´t work, response is

    You must send a comment for ratings under 100%

    so we think parameters are not right for array structure.

    bw
  • @thomas
    Amministratore

    348 messaggi

    Belgio

    Hello,
    please can you give me the exact link structure for the array POSTs (/item/rating and /item) for example like this

    DELETE /item/110540589700?token=xxx&reason=NotAvailableItem&priority=1 HTTP/1.1

    best wishes
    Hello klaus_schneider,

    1) The structure of your link is correct. Just pay attention that the id of your item is 1105405897 (without the 00 at the end).

    2) The type of auction is 'auction'. Link (https)

    3) Indeed, there are several errors in your call. As the call uses the POST HTTP method, you cannot pass the data through the URL. Then the data should not be passed as an 'item' array.
    Use the multipart/form-data Content-Type: Link (https)

    Best Regards,
    --
    Thomas
    Delcampe Team
  • klaus_schneider

    289 messaggi

    Germania

    Hello klaus_schneider,

    1) The structure of your link is correct. Just pay attention that the id of your item is 1105405897 (without the 00 at the end).

    2) The type of auction is 'auction'. Link (https)

    3) Indeed, there are several errors in your call. As the call uses the POST HTTP method, you cannot pass the data through the URL. Then the data should not be passed as an 'item' array.
    Use the multipart/form-data Content-Type: Link (https)

    Best Regards,
    --
    Thomas
    Delcampe Team
    Hi there,
    the function setFeedback needs 1 sec with SOAP, with REST it takes 1 minute until the function comes back with the answer or the error message. Where is the problem ?
    Kind regards
  • klaus_schneider

    289 messaggi

    Germania

    Hello klaus_schneider,

    1) The structure of your link is correct. Just pay attention that the id of your item is 1105405897 (without the 00 at the end).

    2) The type of auction is 'auction'. Link (https)

    3) Indeed, there are several errors in your call. As the call uses the POST HTTP method, you cannot pass the data through the URL. Then the data should not be passed as an 'item' array.
    Use the multipart/form-data Content-Type: Link (https)

    Best Regards,
    --
    Thomas
    Delcampe Team
    Hello,
    by the REST funktion

    itemFixedPriceClosedSold

    are the wrong parameter names in the dokumentation (from auction type).

    best wishes
  • @fred
    Amministratore

    149 messaggi

    Belgio

    Hello,
    by the REST funktion

    itemFixedPriceClosedSold

    are the wrong parameter names in the dokumentation (from auction type).

    best wishes
    Hi @klaus_schneider,

    Thank you, we'll fix the documentation as soon as possible.

    Regards,
    --
    Fred
    Delcampe Team
  • postcarddatabase

    65 messaggi

    Belgio

    It all seems to work. I have a question which I never bothered to solve with the Soap API either, but I guess now is the time.

    How should I, in PHP, encode strings so " and ' are represented correctly? In the past I always escaped them in order to not break my code, but it is shown on Delcampe as e. g. \".

    I tried now to do stripslashes() and add urldecode() but a " then shows on Delcampe as %22 :).

    Thing is, I can encode it any way I want but it depends on how Delcampe decodes it, I think.

    What should I do?
  • klaus_schneider

    289 messaggi

    Germania

    Hi there,
    the function setFeedback needs 1 sec with SOAP, with REST POST it takes 1 minute until the function comes back with the answer or the error message, also with add item. Where is the problem ? This is a big problem...
    Kind regards
  • klaus_schneider

    289 messaggi

    Germania

    It all seems to work. I have a question which I never bothered to solve with the Soap API either, but I guess now is the time.

    How should I, in PHP, encode strings so " and ' are represented correctly? In the past I always escaped them in order to not break my code, but it is shown on Delcampe as e. g. \".

    I tried now to do stripslashes() and add urldecode() but a " then shows on Delcampe as %22 :).

    Thing is, I can encode it any way I want but it depends on how Delcampe decodes it, I think.

    What should I do?
    Hi,

    for special characters you must use the numeric entitys, for exampe:

    ASCII="ä" :"ö" :"ü" :"Ä" :"Ö" :"Ü" :"ß" :"ï" :"ë" :"ÿ" :"Ï" :"Ë"
    DELC="ä" :"ö" :"ü" :"Ä" :"Ö" :"Ü" :"ß" :"ï" :"ë" :"ÿ" :"Ï" :"Ë"

    ASCII="á" :"ó" :"ú" :"é" :"Á" :"Ó" :"Ú" :"É" :"í" :"Í" :"ý" :"Ý"
    DELC="á" :"ó" :"ú" :"é" :"Á" :"Ó" :"Ú" :"É" :"í" :"Í" :"ý" :"Ý"

    best wishes
  • klaus_schneider

    289 messaggi

    Germania

    It all seems to work. I have a question which I never bothered to solve with the Soap API either, but I guess now is the time.

    How should I, in PHP, encode strings so " and ' are represented correctly? In the past I always escaped them in order to not break my code, but it is shown on Delcampe as e. g. \".

    I tried now to do stripslashes() and add urldecode() but a " then shows on Delcampe as %22 :).

    Thing is, I can encode it any way I want but it depends on how Delcampe decodes it, I think.

    What should I do?
    OK, ist is not visible in this forum, format is

    & # xxxx;

    without blanks for example xxxx = 228 für ä, 246 for ö and so on, you can find the compleed table in the web (Unicode Decimal Code)... Wikipedia aso...

    best wishes
  • klaus_schneider

    289 messaggi

    Germania

    Hello,

    Have a good new year....

    All functions now switched from SOAP to REST

    but

    POST-Types (PUT is not testet by now, but i think it is the same) for feedback and item have a Time (timeout) Problem, all POSTs need 60 seconds before the OK Response comes back. Failure response comes promptly. So it is not usable. Please do not switch off the SOAP System before this problem is fixed/cleared. This functions we have not switched yet.

    best wishes
  • postcarddatabase

    65 messaggi

    Belgio

    I solved my little issue by doing stripslashes() only as I noticed in the PHP documentation the http_build_query() performs the url encoding by itself.

    Best wishes!
  • @thomas
    Amministratore

    348 messaggi

    Belgio

    I solved my little issue by doing stripslashes() only as I noticed in the PHP documentation the http_build_query() performs the url encoding by itself.

    Best wishes!
    Hello postcarddatabase,

    Glad to read that you were able to solve your problem.

    Best wishes,
    --
    Thomas
    Delcampe Team
  • postcarddatabase

    65 messaggi

    Belgio

    Hi Delcampe, I notice auctions put online with REST that have ended yesterday at 20:30 are still in my 'ongoing with bids' list. I cannot invoice the clients. However when I go to the auction it says it ended. Example:

    Link (https)

    Also see screenshot in attach of the 'ongoing with bids' list. Screenshot made now, auctions in the list that ended yesterday.

    Is this an issue with the api or is there something else going on?
  • @thomas
    Amministratore

    348 messaggi

    Belgio

    Hi Delcampe, I notice auctions put online with REST that have ended yesterday at 20:30 are still in my 'ongoing with bids' list. I cannot invoice the clients. However when I go to the auction it says it ended. Example:

    Link (https)

    Also see screenshot in attach of the 'ongoing with bids' list. Screenshot made now, auctions in the list that ended yesterday.

    Is this an issue with the api or is there something else going on?
    Hello postcarddatabase,

    We have indeed encountered problems with a server last night. This resulted in processing delays. The issue has been identified and corrected, the delays are being reduced.

    Everything should be back to normal in a couple of hours.

    We're sorry for the inconvenience,
    Kind Regards,
    --
    Thomas
    Delcampe Team
  • postcarddatabase

    65 messaggi

    Belgio

Unisciti alla community di collezionisti!

Registrati Login