Results 1 to 3 of 3

Thread: PUT (update) success code but no changes made

  1. #1
    Join Date
    Jun 2014
    Posts
    3

    Default PUT (update) success code but no changes made

    Hi,

    I'm working with the API for the first time, and though I've successfully manged to retrieve data, I'm struggling to update.
    I have an order which I'm trying to update by setting the custom_status to {"id" : 4} which corresponds to "Processing" in our system.
    The code I'm sending looks like this:

    {
    'status': '{"id":1}',
    'custom_status': '{"id":4}',
    'order_number': bundle.inputData.order_number,
    'do_process': 'true'
    }

    with the order_number being populated by the user, and is a valid order number.

    The response would seem to indicate that I've been successful:

    {
    "updated": 1,
    "unchanged": 0,
    "payments_failed": 0,
    "emails_sent": 0,
    "processed": 0,
    "payments_taken": 0

    }

    However, when I look back at the admin orders dashboard the order is unchanged.

    Can anyone advise?

    Thanks in advance

    Catalina

  2. #2
    Join Date
    Jun 2012
    Location
    South West England
    Posts
    224

    Default

    If you are doing it onscreen here (https://www.bluepark.co.uk/api-specification.html) then it will not update BUT will show you that it has done. This is by design.
    If you have wrote code and you are getting that response check that you really are doing a PUT and check the HTTP response code too.

  3. #3
    Join Date
    Jun 2012
    Location
    South West England
    Posts
    224

    Default

    Here is some sample code taken from a live transaction that has worked today and not done through the https://www.bluepark.co.uk/api-specification.html interface.

    Try taking out the 'status': '{"id":1}', section of your code, that is not required and may be conflicting. You just need to tell the order number what the new custom status is...


    This is what works in my PUT call to the server (I don't want to finish processing or send emails so do_process is false.
    {
    "custom_status": {
    "name": "FTP Ready"
    },
    "do_process": false,
    "do_send_confirmation": false,
    "do_send_email": false,
    "order_number": "IN17181"
    }


    sending to https://www.yourdomainnamehere.com/api/v1/orders
    HTTP response is :200
    and here is the response...

    {
    "emails_sent": 0,
    "payments_failed": 0,
    "payments_taken": 0,
    "processed": 0,
    "unchanged": 0,
    "updated": 1

    The ability to change to a custom status that you can define is extremely useful. I hope this helps you....
    Rob

Similar Threads

  1. !"$%^&*( In Post code field - Update needed?
    By Wayne - SAF in forum Bluepark Technical Discussion
    Replies: 1
    Last Post: 20-01-2017, 10:27
  2. I want to put tracking code in to a category page, but where?
    By Setantaa in forum Bluepark Technical Discussion
    Replies: 1
    Last Post: 23-10-2014, 19:59
  3. Where to put the Trustpilot code?
    By Earthrise in forum Bluepark Technical Discussion
    Replies: 0
    Last Post: 30-10-2013, 09:59
  4. Navigation bar misaligned - Any recent updates or code changes?
    By ado in forum Bluepark Technical Discussion
    Replies: 2
    Last Post: 24-10-2011, 13:19
  5. Where to put this code
    By Gillf in forum Bluepark Technical Discussion
    Replies: 2
    Last Post: 15-05-2009, 13:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us

Bluepark's ecommerce software is developed, hosted and supported exclusively by ourselves, here in the UK, and has been so since the company was initially formed in 2004. Your brand new online shop will be hosted securely on our fast and reliable server network, using a domain name of your choice, providing the ability to build and maintain your ecommerce website, and manage your orders, from any location via your own secure online Administration Console.

A Bluepark ecommerce site is the perfect tool for selling online, whether you're selling physical products, digital downloads or services. You'll be in good company with over 1,000 UK customers who also form a friendly and helpful online community, further strengthening our highly acclaimed support network.

Find us on...