Skip to content

dondyabla/api-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

This repo contains example scripts for using the Ordoro API. Check out the complete API documentation for more information. There's also a ruby gem available.


API Basics

Authentication

We use basic auth. Your username can be found under settings->users in your Ordoro account.

Format

JSON in, JSON out


Examples

Getting new orders

curl --user 'myusername:mypassword' --header 'Content-Type: application/json' https://api.ordoro.com/order/?status=new

Getting products

curl --user 'myusername:mypassword' https://api.ordoro.com/product/?status=active

Setting product inventory

NOTE When we import an order, we automatically decrease the available on hand so there's no need to change it manually based on orders.

  1. Setting inventory levels during initial setup
  2. Updating inventory levels regularly based on external feeds (for example, via supplier inventory feeds)
curl --user 'myusername:mypassword' --header 'Content-Type: application/json' --request PUT --data '{"on_hand":99}' https://api.ordoro.com/product/:sku/warehouse/:warehouse_id/

Save tracking number

You must first create a shipment. Using this endpoint, we’ll automatically put the order lines into the shipment that have enough inventory to be fulfilled. You can then modify the shipment lines if necessary. You can also create a shipment directly if that’s more convenient.

curl --user 'myusername:mypassword' --header 'Content-Type: application/json' --request POST https://api.ordoro.com/order/:order_id/create_shipment/
curl --user 'myusername:mypassword' --header 'Content-Type: application/json' --request PUT --data '{"quantity":99}' https://api.ordoro.com/shipment/:shipment_id/line/:line_id/
curl --user 'myusername:mypassword' --header 'Content-Type: application/json' --request POST --data '{"notify_cart":true, "tracking":{"shipping_method: "fast","tracking":91728387,"vendor":"UPS","cost":55}}' https://api.ordoro.com/shipment/:shipment_id/tracking/

Create order

curl --user 'myusername:mypassword' --header 'Content-Type: application/json' --request POST --data '{"order_id": "unique-order-id", "billing_address": {"name": "Frank"}, "shipping_address": {"name": "John"}}' https://api.ordoro.com/order/

Create product

curl --user 'myusername:mypassword' --header 'Content-Type: application/json' --request POST --data '{"sku": "unique-sku", "name": "displayme"}' https://api.ordoro.com/product/

Get tracking information

The tracking information is stored in the tracking field of the shipment

curl --user 'myusername:mypassword' https://api.ordoro.com/shipment/:shipment_id/

About

Example scripts for using the Ordoro API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%