This forum is no longer active, and the posting feature has been disabled.

Please visit our new Community page to continue the ShipStation Community discussions at https://help.shipstation.com/hc/en-us/community/topics

This new Community page is integrated directly with our help center and knowledge base, which will provide better access to help resources and a direct post-to-support ticket pipeline for any users that need official technical support!

Please note: All topics are available to view for all, but you must be logged into your ShipStation account to post community forum content or comment on posts.
New? Watch our welcome video [here], which goes over the basics of logging in and participating in the forums. Then, check out the [Rules] and our [video] about the features of the forum.

Custom Store Test Connection

I am stuck adding my custom store. I created a PHP test file with the XML from the documentation:
https://app.shipstation.com/content/integration/ShipStationCustomStoreDevGuide.pdf

the test file is attached.

I have the correct path, and credientials.

I try to test and get this error:

"Store Configuration
We received an error testing the Custom store: The remote server returned an error: (500) Internal Server Error."


Is there something wrong with my test XML file?

Comments

  • aaronlaaronl Administrator, Moderator
    A Keeper of the Keys
    Hey Shaw@41C46

    A 500 internal server error usually means that something errored out on your host/server when ShipStation made the query to your XML endpoint for orders. Here is the exact call we make to your endpoint to poll for orders:

    [Your XML URL]?SS-UserName=********&SS-Password=*******&action=export&start_date=08%2f30%2f2015+20%3a48&end_date=08%2f31%2f2015+20%3a53&page=1

    Is your XML endpoint able to handle the action and included parameters?
    Aaron Lee
    Associate Software Engineer
    ShipStation
  • Brewhouse@4C1F4Brewhouse@4C1F4 Member
    An Apprentice
    I'm having problems getting my Custom Store connected as well. The error message I'm receiving is:

    Store Configuration
    We received an error testing the Custom store: An error was encountered while attempting to test the connection

    Per aaron's response above, the call is made via:
    [Your XML URL]?SS-UserName=********&SS-Password=*******&action=export&start_date=08%2f30%2f2015+20%3a48&end_date=08%2f31%2f2015+20%3a53&page=1

    Does that mean the basic authentication is not used? Should we be requesting and validating the UserName & Password from the request string as: SS-UserName and SS-Password? Rather than requesting the headers and decrypting the base64 value? i.e. Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l

    Also, is there a test area / sandbox that can be used to test that all calls and endpoints are working correctly?

    Any help would be appreciated!
  • aaronlaaronl Administrator, Moderator
    A Keeper of the Keys
    Hey Brendon,

    We actually use both. The GET and POST we send to your endpoint will contain the credentials in both the URL as a parameter and in the header as a base64 encoded value ie your example Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l

    It's up to you which set of credentials you want to use when you want us to authenticate with your endpoint. Either way, I hope that clears things up.

    As far as the test area, we do not have a sandbox area in ShipStation that allows you to verify the endpoint is working correctly. However, with the information provided in these posts, you could use a REST client like Postman simulate a test call to your endpoint and verify that XML is being returned. Here is an example I created in Postman:

    GET HTTP/1.1
    Host: [XML Endpoint]?SS-UserName=Test&SS-Password=Test&action=export&start_date=04%2f18%2f2016+00%3a00&end_date=04%2f19%2f2016+00%3a00&page=1
    Authorization: Basic VGVzdDpUZXN0
    Content-Type: application/xml

    Also, don't forget to set the endpoint to handle the shipment notifications. This will allow ShipStation to update the tracking information once you ship the label in our UI. Here is an example call for that:

    POST HTTP/1.1
    Host: [XML Endpoint]?SS-UserName=Test&SS-Password=Test&action=shipnotify&order_number=ABC123&carrier=USP S&service=USPS+Priority+Mail&tracking_number=9511343223432432432
    Authorization: Basic VGVzdDpUZXN0
    Content-Type: application/xml

    The body of that request will contain XML that we have outlined here: https://help.shipstation.com/hc/en-us/articles/205928478

    Hope this helps!
    Aaron Lee
    Associate Software Engineer
    ShipStation
  • Brewhouse@4C1F4Brewhouse@4C1F4 Member
    An Apprentice
    Thanks Aaron. So if our endpoint is not yet built out to receive shipment notifications, will the test connection fail?
  • aaronlaaronl Administrator, Moderator
    A Keeper of the Keys
    The Test Connection function in ShipStation only checks the endpoint for the GET request. So no it will not fail if the POST method isn't set up. Which is why I included the reminder about the POST as a lot of our custom store support tickets are about that very topic.
    Aaron Lee
    Associate Software Engineer
    ShipStation
  • Brewhouse@4C1F4Brewhouse@4C1F4 Member
    An Apprentice
    Hey Aaron - wanted to say thanks! Got it working, but I've got a couple more questions now.

    Whenever an order gets updated in our system, the entirety of the order will be sent again on the next request, correct?

    Is it possible to tell the system to request orders from a larger period? Say I wanted the system to go back and grab orders for the last 30/60/90 days for a new store setup?
  • aaronlaaronl Administrator, Moderator
    A Keeper of the Keys

    Hey Aaron - wanted to say thanks! Got it working, but I've got a couple more questions now.



    Whenever an order gets updated in our system, the entirety of the order will be sent again on the next request, correct?



    Is it possible to tell the system to request orders from a larger period? Say I wanted the system to go back and grab orders for the last 30/60/90 days for a new store setup?

    For this situation, you should send an update to the XML endpoint AND adjust the date. ShipStation will update orders based off that LastModified date so long as the order is in an open status in ShipStation ie Awaiting Payment, Awaiting Shipment or On Hold.

    Hey Aaron - wanted to say thanks! Got it working, but I've got a couple more questions now.



    Whenever an order gets updated in our system, the entirety of the order will be sent again on the next request, correct?



    Is it possible to tell the system to request orders from a larger period? Say I wanted the system to go back and grab orders for the last 30/60/90 days for a new store setup?

    This option is set automatically on ShipStation's end and cannot be adjusted. When you hit Update stores in ShipStation, we will look at the last successful refresh attempt and subtract 6 hours. Typically this means that we automatically go about 30 - 36 hours in the past.
    Aaron Lee
    Associate Software Engineer
    ShipStation
Sign In or Register to comment.