Welcome to the ReadySum API documentation!

Authentication and Human Readable JSON

The API request methods are fully RESTful: The actions to be taken are defined in the URL. All requests require the authentication API Key, available within the user's account, to be transmitted to the API via either GET or POST methods:

  • ?key=YourApiKey

Note: Sending the key via GET should only be used for testing purposes.

You can enable human readability for testing purposes by passing the variable read set to a true value:

  • ?read=1

Permissions and Errors

Access to information is restricted via two methods: User permissions and account type. If the API KEY provided is not able to access the requested resource, a top-level error or warning response will be returned.

Example error messages:

  • /customers/23
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/customers/23",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Customer ID (23) does not exist"
    
    	}
    
    }
    
    					
  • /account/
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/account/?key=",
    
    	"error": {
    
    		"status": 401,
    
    		"code": "unauthorized",
    
    		"message": "Invalid API Key"
    
    	}
    
    }
    
    					
  • /account/me/edit
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/account/me/edit",
    
    	"error": {
    
    		"status": 403,
    
    		"code": "forbidden",
    
    		"message": "User does not have admin permissions for this account"
    
    	}
    
    }					
    
    					
  • /orders
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/orders",
    
    	"warning": {
    
    		"message": "No current orders found (past order access restricted by account type)."
    
    	},
    
    	"output": {
    
    		
    
    	}
    
    }					
  • /inventory
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/inventory",
    
    	"warning": {
    
    		"message": "No items found in Inventory."
    
    	},
    
    	"output": {
    
    		
    
    	}
    
    }
    
    					

API Resource URLs

  • http://readysum.com/api/1/{section}/{id}/{action}
  • Inventory
  • inventory
  • inventory/me/active
  • inventory/me/add
  • inventory/{id}
  • inventory/{id}/edit
  • inventory/{id}/add
  • inventory/{id}/remove
  • inventory/{id}/delete
  • Customers
  • customers
  • customers/me/add
  • customers/{id}
  • customers/{id}/edit
  • customers/{id}/delete
  • Orders
  • orders
  • orders/me/current
  • orders/me/add
  • orders/me/quick
  • orders/{id}
  • orders/{id}/verbose
  • orders/{id}/edit
  • orders/{id}/delete
  • orders/{id}/invoiced
  • orders/{id}/paid
  • orders/{id}/delivered
  • Account
  • account
  • account/me/edit

Inventory Item Fields:

  • itemid: [integer] Item ID
  • name: [string, 100] Item name
  • stock: [integer] Quantity in stock
  • active: [boolean (1 or 0)] Available or Unavailable Item
  • location: [string,100] Storage location
  • barcode: [string, 13] UPC/EAN Barcode
  • wholesale: [float] Wholesale price
  • retail: [float] Retail price

 

API Requests: Inventory

  • readysum.com/api/1/inventory

Summary:

Returns all items in inventory with full details.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory",
    
    	"output": {
    
    		"1": {
    
    			"name": "organic",
    
    			"wholesale": 4.5,
    
    			"retail": 9.99,
    
    			"barcode": "855291004035",
    
    			"location": "kitchen",
    
    			"stock": 29,
    
    			"active": 1,
    
    			"itemid": 1
    
    		},
    
    		"2": {
    
    			"name": "white",
    
    			"wholesale": 3.8,
    
    			"retail": 7.99,
    
    			"barcode": "",
    
    			"location": "",
    
    			"stock": 0,
    
    			"active": 0,
    
    			"itemid": 2
    
    		}
    
    	}
    
    }
    
    					

  • readysum.com/api/1/inventory/me/active

Summary:

Returns all active items in inventory with full details.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory/me/active",
    
    	"output": {
    
    		"1": {
    
    			"name": "60% Cacao Chocolate Dice Set",
    
    			"wholesale": 3.8,
    
    			"retail": 7.99,
    
    			"barcode": "855291004004",
    
    			"location": "",
    
    			"stock": 13,
    
    			"active": 1,
    
    			"itemid": 1
    
    		},
    
    		"3": {
    
    			"name": "Organic Dark Chocolate Dice Set",
    
    			"wholesale": 4.7,
    
    			"retail": 9.99,
    
    			"barcode": "855291004035",
    
    			"location": "closet",
    
    			"stock": 72,
    
    			"active": 1,
    
    			"itemid": 3
    
    		}
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/inventory/me/active",
    
    	"warning": {
    
    		"message": "No active items found in Inventory."
    
    	},
    
    	"output": {
    
    		
    
    	}
    
    }
    
    					

  • readysum.com/api/1/inventory/me/add

Summary:

Adds a new item to inventory. The itemid is auto-assigned and is ignored if passed.

Required Fields:

name

Default Values

stock: 0

active: 1

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory/me/add",
    
    	"post": {
    
    		"name": "test item",
    
    		"stock": "10",
    
    		"barcode": "123456677"
    
    	},
    
    	"output": {
    
    		"name": "test item",
    
    		"barcode": "123456677",
    
    		"stock": 10,
    
    		"location": "",
    
    		"active": 1,
    
    		"wholesale": 0,
    
    		"retail": 0,
    
    		"itemid": 5
    
    	}
    
    }
    
    					

  • readysum.com/api/1/inventory/{id}

Summary:

Returns details about a particular item specified in the URL by itemid.

Returns an error upon invalid itemid.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory/5",
    
    	"output": {
    
    		"name": "Sample Product",
    
    		"wholesale": 0,
    
    		"retail": 8,
    
    		"barcode": "",
    
    		"location": "",
    
    		"stock": 20,
    
    		"active": 1,
    
    		"itemid": 5
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/inventory/57",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Item ID (57) does not exist"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/inventory/{id}/edit

Summary:

Edit existing inventory item, specified by the URL's itemid. All item fields passed will overwrite existing values, and any excluded fields in the POST will retain the original value.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory/5/edit",
    
    	"post": {
    
    		"name": "test",
    
    	},
    
    	"output": {
    
    		"name": "test",
    
    		"barcode": "123456677",
    
    		"stock": 10,
    
    		"location": "",
    
    		"active": 1,
    
    		"wholesale": 0,
    
    		"retail": 0,
    
    		"itemid": 5
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/inventory/5/edit",
    
    	"warning": "No data POSTed; No changes made",
    
    	"output": {
    
    		"name": "test",
    
    		"barcode": "123456677",
    
    		"stock": 20,
    
    		"location": "",
    
    		"active": 1,
    
    		"wholesale": 0,
    
    		"retail": 0,
    
    		"itemid": 5
    
    	}
    
    }
    
    					

  • readysum.com/api/1/inventory/{id}/add

Summary:

Add stock for an existing inventory item, specified by the URL's itemid. The stock value passed in POST will be added to the current item's stock value.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory/5/add",
    
    	"post": {
    
    		"stock": 10,
    
    	},
    
    	"output": {
    
    		"name": "test",
    
    		"barcode": "123456677",
    
    		"stock": 20,
    
    		"location": "",
    
    		"active": 1,
    
    		"wholesale": 0,
    
    		"retail": 0,
    
    		"itemid": 5
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/inventory/5/add",
    
    	"warning": "No data POSTed; No changes made",
    
    	"output": {
    
    		"name": "test",
    
    		"barcode": "123456677",
    
    		"stock": 10,
    
    		"location": "",
    
    		"active": 1,
    
    		"wholesale": 0,
    
    		"retail": 0,
    
    		"itemid": 5
    
    	}
    
    }
    
    					

  • readysum.com/api/1/inventory/{id}/remove

Summary:

Remove stock for an existing inventory item, specified by the URL's itemid. The stock value passed in POST will be subtracted to the current item's stock value. Passing a negative stock value will be treated as a positive number.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory/5/remove",
    
    	"post": {
    
    		"stock": 10
    
    	},
    
    	"output": {
    
    		"name": "test",
    
    		"barcode": "123456677",
    
    		"stock": 15,
    
    		"location": "",
    
    		"active": 1,
    
    		"wholesale": 0,
    
    		"retail": 0,
    
    		"itemid": 5
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/inventory/5/remove",
    
    	"warning": "No data POSTed; No changes made",
    
    	"output": {
    
    		"name": "test",
    
    		"barcode": "123456677",
    
    		"stock": 25,
    
    		"location": "",
    
    		"active": 1,
    
    		"wholesale": 0,
    
    		"retail": 0,
    
    		"itemid": 5
    
    	}
    
    }
    
    					

  • readysum.com/api/1/inventory/{id}/delete

Summary:

Deletes existing item from account, specified in URL by the itemid.

Returns an error on invalid itemid or item existing in order history.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/inventory/5"
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/inventory/1",
    
    	"error": {
    
    		"status": 403,
    
    		"code": "forbidden",
    
    		"message": "Cannot be deleted: Item ID (1) exists in order (3)"
    
    	}
    
    }
    
    					

API Requests: Customers

Customer Fields:

  • customerid: [integer] Customer ID
  • wholesale: [string, ENUM] wholesale, retail
  • name: [string, 100] Customer name
  • address: [string, 150] Street address
  • city: [string, 50] City
  • state: [string, 50] State/Province
  • zipcode: [string, 20] Postal code
  • country: [string, 50] Country
  • contact: [string, 100] Contact person's name
  • email: [string,100] Email address
  • phone: [string, 25] Phone number
  • notes: [string,150] Notes

 

  • readysum.com/api/1/customers

Summary:

Returns all customers with full details.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/customers",
    
    	"output": {
    
    		"3": {
    
    			"notes": "",
    
    			"name": "Bob the Builder",
    
    			"address": "",
    
    			"city": "",
    
    			"state": "",
    
    			"zipcode": "",
    
    			"country": "",
    
    			"contact": "",
    
    			"email": "",
    
    			"phone": "",
    
    			"wholesale": "retail",
    
    			"customerid": 3
    
    		},
    
    		"1": {
    
    			"notes": "He's awesome",
    
    			"name": "Mario Lurig",
    
    			"address": "",
    
    			"city": "",
    
    			"state": "",
    
    			"zipcode": "",
    
    			"country": "USA",
    
    			"contact": "Mario Lurig",
    
    			"email": "mlurig@readysum.com",
    
    			"phone": "7203105687",
    
    			"wholesale": "wholesale",
    
    			"customerid": 1
    
    		}
    
    	}
    
    }
    
    					

  • readysum.com/api/1/customers/me/add

Summary:

Adds a new customer record. The customerid is auto-assigned and is ignored if passed.

Required Fields:

name

Default Values

wholesale: {determined by account settings}

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/customers/me/add",
    
    	"post": {
    
    		"name": "Delete Me Please",
    
    		"country": "USA"
    
    	},
    
    	"output": {
    
    		"name": "Delete Me Please",
    
    		"address": "",
    
    		"city": "",
    
    		"state": "",
    
    		"zipcode": "",
    
    		"country": "USA",
    
    		"contact": "",
    
    		"email": "",
    
    		"phone": "",
    
    		"wholesale": "wholesale",
    
    		"notes": "",
    
    		"customerid": 8
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/customers/me/add",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "No 'name' provided for Customer"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/customers/{id}

Summary:

Returns details about a customer specified in the URL by customerid. Returns an error upon invalid customerid.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/customers/1",
    
    	"output": {
    
    		"1": {
    
    			"notes": "He's awesome",
    
    			"name": "Mario Lurig",
    
    			"address": "",
    
    			"city": "",
    
    			"state": "",
    
    			"zipcode": "",
    
    			"country": "USA",
    
    			"contact": "Mario Lurig",
    
    			"email": "mlurig@readysum.com",
    
    			"phone": "7203105687",
    
    			"wholesale": "wholesale",
    
    			"customerid": 1
    
    		}
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/customers/7",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Customer ID (7) does not exist"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/customers/{id}/edit

Summary:

Edit existing customer, specified by the URL's customerid. All item fields passed will overwrite existing values, and any excluded fields in the POST will retain the original value.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/customers/5/edit",
    
    	"post": {
    
    		"state": "FL"
    
    	},
    
    	"output": {
    
    		"wholesale": "wholesale",
    
    		"name": "Tester",
    
    		"address": "",
    
    		"city": "",
    
    		"state": "FL",
    
    		"zipcode": "",
    
    		"country": "USA",
    
    		"contact": "",
    
    		"email": "",
    
    		"phone": "",
    
    		"notes": "",
    
    		"customerid": 5
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/customers/5/edit",
    
    	"warning": "No data POSTed; No changes made",
    
    	"output": {
    
    		"wholesale": "wholesale",
    
    		"name": "Tester",
    
    		"address": "",
    
    		"city": "",
    
    		"state": "florida",
    
    		"zipcode": "",
    
    		"country": "USA",
    
    		"contact": "",
    
    		"email": "",
    
    		"phone": "",
    
    		"notes": "",
    
    		"customerid": 5
    
    	}
    
    }
    
    					

  • readysum.com/api/1/customers/{id}/delete

Summary:

Deletes existing customer from account, specified in the URL by the customerid.

Returns an error on invalid customerid or if order history contains an order linked to customer record.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/customers/7/delete"
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/customers/3/delete",
    
    	"error": {
    
    		"status": 403,
    
    		"code": "forbidden",
    
    		"message": "Cannot be deleted: Customer ID (3) exists in order (6)"
    
    	}
    
    }
    
    					

API Requests: Orders

Order Fields:

  • orderid: [integer] Order ID
  • customerid: [integer] Customer ID

    Customer ID of -1 is an anonymous quick order

    In the orders/{id}/verbose request, customerid will return [string] "Customer Name"

  • deliveryfee: [float] Cost for shipment/delivery
  • discount: [float] Discount provided, fixed value
  • total: [float] Total price
  • notes: [string,150] Notes
  • order: [string, JSON [string:integer]] "Item ID : Quantity"

    In the orders/{id}/verbose request, JSON will return "Item Title : Quantity"

  • deliverydate: [date, YYYY-MM-DD]

    Date of expected delivery/shipment

  • orderts: [datetime, YYYY-MM-DD hh:ii:ss]

    Date/Time order was created (matches Account Timezone)

  • invoicets: [datetime, YYYY-MM-DD hh:ii:ss]

    Date/Time invoice was sent (matches Account Timezone)

  • paidts: [datetime, YYYY-MM-DD hh:ii:ss]

    Date/Time order was paid (matches Account Timezone)

  • deliveryts: [datetime, YYYY-MM-DD hh:ii:ss]

    Date/Time order was delivered/shipped (matches Account Timezone)

 

  • readysum.com/api/1/orders

Summary:

Returns all orders with full details.

Note: Free accounts will not see past orders; orders that have been delivered and paid.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders",
    
    	"output": {
    
    		"124": {
    
    			"customerid": 1,
    
    			"deliverydate": "2014-02-10",
    
    			"notes": "",
    
    			"deliveryfee": 0,
    
    			"discount": 0,
    
    			"total": 38,
    
    			"order": {
    
    				"2": 10,
    
    				"4": 5
    
    			},
    
    			"invoicets": "0000-00-00 00:00:00",
    
    			"paidts": "2014-02-09 10:38:59",
    
    			"deliveryts": "0000-00-00 00:00:00",
    
    			"orderts": "2014-02-09 10:20:03",
    
    			"orderid": 124
    
    		},
    
    		"125": {
    
    			"customerid": 2,
    
    			"deliverydate": "0000-00-00",
    
    			"notes": "",
    
    			"deliveryfee": 10,
    
    			"discount": 0,
    
    			"total": 35.97,
    
    			"order": {
    
    				"1": 1,
    
    				"2": 1,
    
    				"3": 1
    
    			},
    
    			"invoicets": "2014-02-09 10:39:09",
    
    			"paidts": "0000-00-00 00:00:00",
    
    			"deliveryts": "0000-00-00 00:00:00",
    
    			"orderts": "2014-02-09 10:28:57",
    
    			"orderid": 125
    
    		}
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/orders",
    
    	"warning": {
    
    		"message": "No current orders found (past order access restricted by account type)."
    
    	},
    
    	"output": {
    
    		
    
    	}
    
    }
    
    				

  • readysum.com/api/1/orders/me/current

Summary:

Returns all current orders with full details.

Current orders: Orders that have not yet been delivered and paid. This returns the same results for Free accounts as /api/1/orders.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/me/current",
    
    	"output": {
    
    		"124": {
    
    			"customerid": 1,
    
    			"deliverydate": "2014-02-10",
    
    			"notes": "",
    
    			"deliveryfee": 0,
    
    			"discount": 0,
    
    			"total": 38,
    
    			"order": {
    
    				"2": 10,
    
    				"4": 5
    
    			},
    
    			"invoicets": "0000-00-00 00:00:00",
    
    			"paidts": "2014-02-09 10:38:59",
    
    			"deliveryts": "0000-00-00 00:00:00",
    
    			"orderts": "2014-02-09 10:20:03",
    
    			"orderid": 124
    
    		},
    
    		"125": {
    
    			"customerid": 2,
    
    			"deliverydate": "0000-00-00",
    
    			"notes": "",
    
    			"deliveryfee": 10,
    
    			"discount": 0,
    
    			"total": 35.97,
    
    			"order": {
    
    				"1": 1,
    
    				"2": 1,
    
    				"3": 1
    
    			},
    
    			"invoicets": "2014-02-09 10:39:09",
    
    			"paidts": "0000-00-00 00:00:00",
    
    			"deliveryts": "0000-00-00 00:00:00",
    
    			"orderts": "2014-02-09 10:28:57",
    
    			"orderid": 125
    
    		}
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/orders/me/current",
    
    	"warning": {
    
    		"message": "No current orders found."
    
    	},
    
    	"output": {
    
    		
    
    	}
    
    }
    
    				

  • readysum.com/api/1/orders/me/add

Summary:

Adds a new order record. The orderid is auto-assigned unless it is passed.

Required Fields:

customerid, total, order

Default Values

invoicets: Current date/time

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/me/add",
    
    	"post": {
    
    		"customerid": 2,
    
    		"order": {
    
    			"2": 20
    
    		},
    
    		"total": 34.56
    
    	},
    
    		"output": {
    
    			"customerid": 2,
    
    			"deliverydate": "0000-00-00",
    
    			"notes": "",
    
    			"deliveryfee": 0,
    
    			"discount": 0,
    
    			"total": 34.56,
    
    			"order": {
    
    				"2": 20
    
    			},
    
    			"invoicets": "2015-06-09 10:39:09",
    
    			"paidts": "0000-00-00 00:00:00",
    
    			"deliveryts": "0000-00-00 00:00:00",
    
    			"orderts": "0000-00-00 00:00:00",
    
    			"orderid": 126
    
    		}
    
    }
    
    
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/me/add",
    
    	"post": {
    
    		"order": ""
    
    	},
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "No 'customerid', 'order', or 'total' provided for Order"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/orders/me/quick

Summary:

Adds a new order record. The orderid is auto-assigned unless it is passed.

The customerid is ignored if passed.

Required Fields:

order, total

Default Values

customerid: -1

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/me/quick",
    
    	"post": {
    
    		"order": {
    
    			"4": 5
    
    		},
    
    		"total": 24.56
    
    	},
    
    		"output": {
    
    			"customerid": -1,
    
    			"deliverydate": "0000-00-00",
    
    			"notes": "",
    
    			"deliveryfee": 0,
    
    			"discount": 0,
    
    			"total": 24.56,
    
    			"order": {
    
    				"2": 20
    
    			},
    
    			"invoicets": "2015-06-09 10:39:09",
    
    			"paidts": "0000-00-00 00:00:00",
    
    			"deliveryts": "0000-00-00 00:00:00",
    
    			"orderts": "0000-00-00 00:00:00",
    
    			"orderid": 127
    
    		}
    
    }
    
    
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/me/quick",
    
    	"post": {
    
    		"order": ""
    
    	},
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "No 'order', or 'total' provided for Order"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/orders/{id}

Summary:

Returns details about an order specified in the URL by orderid. Returns an error upon invalid orderid.

Note: Free accounts will receive a warning if the order is not currently active: it has been delivered and paid.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/125",
    
    	"output": {
    
    		"customerid": 2,
    
    		"deliverydate": "0000-00-00",
    
    		"notes": "",
    
    		"deliveryfee": 10,
    
    		"discount": 0,
    
    		"total": 35.97,
    
    		"order": {
    
    			"1": 1,
    
    			"2": 1,
    
    			"3": 1
    
    		},
    
    		"invoicets": "2014-02-09 10:39:09",
    
    		"paidts": "0000-00-00 00:00:00",
    
    		"deliveryts": "0000-00-00 00:00:00",
    
    		"orderts": "2014-02-09 10:28:57",
    
    		"orderid": 125
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/12",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Order ID (12) does not exist"
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/orders/127",
    
    	"warning": {
    
    		"message": "Order ID (127) unavailable due to account type restrictions."
    
    	}
    
    }
    
    					

  • readysum.com/api/1/orders/{id}/verbose

Summary:

This request shows a human-readable display of order data without secondary API calls. Returns details about an order specified in the URL by orderid.

customerid displays Customer Name and order returns Item Name rather than Item ID.

Note: Free accounts will receive a warning if the order is not active: it has not been delivered and paid.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/126/verbose",
    
    	"output": {
    
    		"customerid": "Bob the Builder",
    
    		"deliverydate": "2014-02-09",
    
    		"notes": "",
    
    		"deliveryfee": 10,
    
    		"discount": 0,
    
    		"total": 25.98,
    
    		"order": {
    
    			"Dark Chocolate Casino Dice Set": 2
    
    		},
    
    		"invoicets": "0000-00-00 00:00:00",
    
    		"paidts": "0000-00-00 00:00:00",
    
    		"deliveryts": "2014-02-09 10:40:24",
    
    		"orderts": "2014-02-09 10:40:19",
    
    		"orderid": 126
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/12/verbose",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Order ID (12) does not exist"
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/orders/127/verbose",
    
    	"warning": {
    
    		"message": "Order ID (127) unavailable due to account type restrictions."
    
    	}
    
    }
    
    					

  • readysum.com/api/1/orders/{id}/edit

Summary:

Edit existing order, specified by the URL's orderid. All item fields passed will overwrite existing values (except orderid) and any excluded fields will retain their original value.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/126/edit",
    
    	"post": {
    
    		"order": {
    
    			"4": 5
    
    		},
    
    		"total": 24.56
    
    	},
    
    	"output": {
    
    		"customerid": "3",
    
    		"deliverydate": "2014-02-09",
    
    		"notes": "",
    
    		"deliveryfee": 10,
    
    		"discount": 0,
    
    		"total": 24.56,
    
    		"order": {
    
    			"4": 5
    
    		},
    
    		"invoicets": "0000-00-00 00:00:00",
    
    		"paidts": "0000-00-00 00:00:00",
    
    		"deliveryts": "2014-02-09 10:40:24",
    
    		"orderts": "2014-02-09 10:40:19",
    
    		"orderid": 126
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/12/edit",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Order ID (12) does not exist"
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/orders/128/edit",
    
    	"warning": "No data POSTed; No changes made",
    
    	"output": {
    
    		"customerid": 5,
    
    		"deliverydate": "2014-02-09",
    
    		"notes": "",
    
    		"deliveryfee": 10,
    
    		"discount": 0,
    
    		"total": 63,
    
    		"order": {
    
    			"1": 7,
    
    			"2": 2,
    
    			"3": 4
    
    		},
    
    		"invoicets": "0000-00-00 00:00:00",
    
    		"paidts": "0000-00-00 00:00:00",
    
    		"deliveryts": "0000-00-00 00:00:00",
    
    		"orderts": "2014-02-09 21:53:53",
    
    		"orderid": 128
    
    	}
    
    }
    
    					

  • readysum.com/api/1/orders/{id}/delete

Summary:

Deletes existing order from account, specified in the URL by the orderid.

Returns an error on invalid orderid or if order has been paid and delivered.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/128/delete"
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/15/delete",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Order ID (15) does not exist"
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/127/delete",
    
    	"error": {
    
    		"status": 403,
    
    		"code": "forbidden",
    
    		"message": "Cannot be deleted: Order ID (127) has already been paid and delivered"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/orders/{id}/invoiced

Summary:

Mark the order, specified in the URL by the orderid, as invoiced using the current timestamp (overrides any existing timestamp).

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/128/invoiced",
    
    	"output": {
    
    		"customerid": 5,
    
    		"deliverydate": "2014-02-09",
    
    		"notes": "",
    
    		"deliveryfee": 10,
    
    		"discount": 0,
    
    		"total": 63,
    
    		"order": {
    
    			"1": 7,
    
    			"2": 2,
    
    			"3": 4
    
    		},
    
    		"invoicets": "2015-07-01 21:58:43",
    
    		"paidts": "0000-00-00 00:00:00",
    
    		"deliveryts": "0000-00-00 00:00:00",
    
    		"orderts": "2014-02-09 21:53:53",
    
    		"orderid": 128
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/15/invoiced",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Order ID (15) does not exist"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/orders/{id}/paid

Summary:

Mark the order, specified in the URL by the orderid, as paid using the current timestamp (overrides any existing timestamp).

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/128/paid",
    
    	"output": {
    
    		"customerid": 5,
    
    		"deliverydate": "2014-02-09",
    
    		"notes": "",
    
    		"deliveryfee": 10,
    
    		"discount": 0,
    
    		"total": 63,
    
    		"order": {
    
    			"1": 7,
    
    			"2": 2,
    
    			"3": 4
    
    		},
    
    		"invoicets": "2015-07-01 21:58:43",
    
    		"paidts": "2015-07-01 21:58:48",
    
    		"deliveryts": "0000-00-00 00:00:00",
    
    		"orderts": "2014-02-09 21:53:53",
    
    		"orderid": 128
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/15/paid",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Order ID (15) does not exist"
    
    	}
    
    }
    
    
    
    					

  • readysum.com/api/1/orders/{id}/delivered

Summary:

Mark the order, specified in the URL by the orderid, as delivered using the current timestamp (overrides any existing timestamp).

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/orders/128/delivered",
    
    	"output": {
    
    		"customerid": 5,
    
    		"deliverydate": "2014-02-09",
    
    		"notes": "",
    
    		"deliveryfee": 10,
    
    		"discount": 0,
    
    		"total": 63,
    
    		"order": {
    
    			"1": 7,
    
    			"2": 2,
    
    			"3": 4
    
    		},
    
    		"invoicets": "2015-07-01 21:58:43",
    
    		"paidts": "2015-07-01 21:58:48",
    
    		"deliveryts": "2015-07-01 21:58:52",
    
    		"orderts": "2014-02-09 21:53:53",
    
    		"orderid": 128
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/orders/15/delivered",
    
    	"error": {
    
    		"status": 400,
    
    		"code": "bad_request",
    
    		"message": "Order ID (15) does not exist"
    
    	}
    
    }
    
    
    
    					

API Requests: Account

Account Fields:

  • timezone: [string, ENUM]

    -12, -11, -10, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 9.5, 10, 11, 12

  • delivery: [string, ENUM] local, ship

    i.e. Most of the time, do they deliver locally or ship inventory?

  • wholesale: [string, ENUM] wholesale, retail

    i.e. Most of the time, are their customers wholesale or retail customers?

  • currency: [string, ENUM]

    USD, EUR, BRL, CAD, GBP, CNY, KRW, JPY, SGD, TWD, AUD, NZD, ZAR

  • type: [string,ENUM] Free, Pro, Enterprise

 

  • readysum.com/api/1/account

Summary:

Returns all account information. Non-admin users can view this information.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/account",
    
    	"output": {
    
    		"timezone": "-7",
    
    		"currency": "USD",
    
    		"wholesale": "wholesale",
    
    		"delivery": "ship",
    
    		"type": "Free"
    
    	}
    
    }
    
    					

  • readysum.com/api/1/account/me/edit

Summary:

Edit account information. This request is restricted to administrators of the account. Type cannot be altered via the API.

Invalid timezone or currency values will be ignored.

Invalid wholesale or delivery values will default to retail and local, respectively.

Sample Output

  • 
    {
    
    	"result": "success",
    
    	"request": "/api/1/account/me/edit",
    
    	"post": {
    
    		"timezone": "-6",
    
    		"wholesale": "retail"
    
    	},
    
    	"output": {
    
    		"timezone": "-6",
    
    		"currency": "USD",
    
    		"wholesale": "retail",
    
    		"delivery": "ship",
    
    		"type": "Pro"
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "warning",
    
    	"request": "/api/1/account/me/edit",
    
    	"post": {
    
    		"timezone": "-66"
    
    	},
    
    	"warning": "Invalid timezone or currency provided",
    
    	"output": {
    
    		"timezone": "-7",
    
    		"currency": "USD",
    
    		"wholesale": "wholesale",
    
    		"delivery": "ship",
    
    		"type": "Pro"
    
    	}
    
    }
    
    					
  • 
    {
    
    	"result": "error",
    
    	"request": "/api/1/account/me/edit",
    
    	"error": {
    
    		"status": 403,
    
    		"code": "forbidden",
    
    		"message": "User does not have admin permissions for this account"
    
    	}
    
    }