How to create multiple shipping address functionality using API


#1

Hello,

I am using Ordoro on my site already and that works fine for single shipping address orders.

Right now for multiple shipping address orders I need to split the order on ordoro site. Now, I want to import multiple shipping address orders using API to automate the process. I went through the documentation and having hard time to choose which API to use & understand the parameters(Because most of them do not have any description) to pass.

I found this API useful for me: http://docs.ordoro.apiary.io/#reference/order/orderorderidcreateshipment/post
But none of them have any description so I am not sure on it.

Can you please help me with that how can I create multiple shipping address orders using API?

Thanks,
Vidish


#2

Sorry for the delay in replying Vidish,

Because a shipment’s address is directly tied to an order’s address in Ordoro, you would want to split an order by shipping address before creating the order in Ordoro.

Steps would be:

    1. split your orders by shipping address external to ordoro
    1. for each order:
    • POST /order/
    • POST /order/:order_id/create_shipment/

If you use tracking writeback, be sure to associate the proper cart_order_id in each split order, and possibly cart_orderitem_id in the order.lines. These are the internal ids from the importing sales channel.

Feel free to reply if you have more questions about these endpoints.


And, as a heads up, we are working on an order split functionality in our Orders Beta tab, which is only available in the app at this time.

We’ll post upcoming API releases in the forum.


#3

Hi Sophie,

I’ve gone through API documentation provided for “Create Shipment” here: http://docs.ordoro.apiary.io/#reference/order/orderorderidcreateshipment/post?console=1

When I “Try” that example from console, I always get 501 as response. I’ve attached screenshot of request and response I tried making from there. Please find attachment.

Also, there is no documentation on what parameter values(i.e. what it refers to for e.g.option_price, cart_orderitem_id etc.) should we pass to API? Moreover, how many/which API shall we need to integrate to accomplish this functionality?

It would be a great help if you can get me a detailed reply.

Thanks in advance,
Vidish Purohit
Software Engineer

  Clarion Technologies 
  SEI CMMI Level 3 Company 
    
  5th Floor, 501-A, GNFC info Tower, 
  SG Highway, Ahmedabad - 380 054, 
  Gujarat, India.
  www.clariontechnologies.co.in  
    
  Email: vidish.purohit@clariontechnologies.co.in 
  Skype: vidishp_clarion 

  Mobile: +91 9979605795


#4

Hi Vidish,

Check out our api-examples repo on github for an example of order creation using POST /order/.

POST /order/:id/create_shipment/ does not take a request body.

You can also use your existing orders in Ordoro as reference for the cart_order_id, and option_price with regards to your order shape in the sales channel you have already set up.

You should be able to GET /order/:id/ and see what the order looks like that exists in Ordoro.


For our purposes, if you are importing an order from a cart or sales channel, in that sales channel there would be an order identifier that is likely going to be different from the order identifier in Ordoro. That is the cart_order_id, and we use that cart’s internal identifier to write back tracking to that cart if/when an order is shipped and tracking information is provided.
option_price is the price of the variant or option of the product on the order line, which can sometimes be different for various reasons like discounts, or add-ons.

I’m sorry, but i am confused as to the question

how many/which API shall we need to integrate to accomplish this functionality?

You should be able to follow the steps i outlined in my previous reply in order to create an order, and then create a shipment for that order.


Thank you for letting us know about the mock api, we will look into it to see if we can get it functional again.

Hope this helps,

Sophie


#5

Hi Sophie,

I’ve gone through the documentation provided on Git. There in the example, only 3 parameters are given, customer name in shipping & billing details and product name with SKU.

However, in realtime scenario, we have many more parameters to pass to Ordoro. If you can have a look at the attachment, there is no description provided on ANY of the parameters(the column of description is just empty - screenshot). The parameters which I’ve highlighted in screenshot are most crucial. If we are not able to understand the parameters, then we can not integrate it correctly and endup with messing it up.

Moreover, we work in UTC+5:30, and you are in some different time zone. So it takes 18-24 hours for us to get one mail thread responded from you. We’re approaching a tight deadline with this development. Can you please assist us on how should we develop our solution without documentation on any of the API parameters?

Awaiting for your quick response.

Thanks,
Vidish Purohit
Software Engineer

  Clarion Technologies 
  SEI CMMI Level 3 Company 
    
  5th Floor, 501-A, GNFC info Tower, 
  SG Highway, Ahmedabad - 380 054, 
  Gujarat, India.
  www.clariontechnologies.co.in  
    
  Email: vidish.purohit@clariontechnologies.co.in 
  Skype: vidishp_clarion 

  Mobile: +91 9979605795


#6

Hi Vidish,

I can offer you descriptions for the parameters highlighted. We are limited in the range of tools we can offer at this time for our API, so I hope this proves useful to you. Here is another article that may help you with your integration https://github.com/ordoro/api-examples/wiki/Building-a-custom-e-commerce-integration.

It may also help to know what you are intending to do with your integration. Would your integration with us be only to create orders and shipping labels in Ordoro, or do you intend to use Ordoro for inventory manager, as well as tracking writeback? Many of the internal fields that reference the cart are intended for inventory keeping with syncing back to the sales channel as well as having that reference in Ordoro, and tracking write back to the sales channel. When we write back tracking, some of the sales channels allow for partial fulfillment, and it is therefore important to include the cart_orderitem_id.


  • reference_number is the number or string value that the customer provides to you for a reference, this is generally the order_id but could be anything that would give the customer who purchased the order a reference for their shipment.
  • cart_address_id is similar to cart_order_id in that it is the address identifier in the cart or sales channel for reference purposes.
  • order_id is the identifier of the order that you are creating in Ordoro, it may or may not be the same as the order identifier from the cart.
  • cart_order_id is the internal identifier for the order in the cart. Often times the front-facing order id is not the same as the internal identifier, sometimes it is. You can find this information in your sales channel’s documentation.
  • cart is the cart or sales channel from which you have imported, or for which you have created orders. You must create a cart in Ordoro, you will receive the cart’s id, and can use that to associate the orders to the cart. This will either be for the sales channel, or you’ll use a manual cart type for your custom sales channel integration.
  • cart_shipment_id is the cart’s internal identifier for the shipment, this can be different based on different carts, for example: Bigcommerce uses the shipping_address resource id, 3dcart uses the ShipmentID.

Best,

Sophie