Created
October 17, 2012 23:33
-
-
Save pzurek/3909011 to your computer and use it in GitHub Desktop.
Vend API docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you find any errors or discrepancies please notify [email protected]__. Also if you have any brilliant ideas on how we can make it better, let us know. __:)__ | |
Also, __don’t be evil__. | |
# Introduction | |
The Vend API is implemented as JSON over HTTPS using the verbs GET, PUT, POST and DELETE. | |
## Authentication | |
Authentication is managed using HTTP authentication (only "Basic" is supported right now). Every request must include the Authorization HTTP header. Use the properties username and password to authenticate. Example with Curl: | |
```curl | |
curl -u [email protected]:mysekretpassword | |
-d '{"data"...}' \ | |
https://myvenddomain.vendhq.com/api/products | |
``` | |
## Making requests | |
The Vend API currently only supports JSON encoded data as requests and responses. | |
Be sure to set both the 'Content-Type' and 'Accept' headers to 'application/json' to identify the request and response format. | |
Here is an example with Curl: | |
```curl | |
curl -H 'Accept: application/json' -H 'Content-Type: application/json' \ | |
-u "[email protected]:mysekretpassword" \ | |
-d ‘{“data”:...}’ \ | |
https://myvenddomain.vendhq.com/api/products | |
``` | |
## Conventions used in this documentation | |
To make things easier to understand, the following notation is used: | |
- `#{text}` Indicates text that should be replaced by your own data | |
- `...` Indicates content from the response has been elided for brevity in documentation. | |
## Pagination | |
Large data sets are returned as paginated data. When this occurs a pagination section will be returned in the result set. | |
The first page of data will be returned in the response also. | |
```json | |
{ | |
"pagination": | |
{ | |
"results": 7461, | |
"page": 1, | |
"page_size": 100, | |
"pages": 75 | |
}, | |
"customers": [{ ... }] | |
} | |
``` | |
## Requesting pages | |
``` | |
GET /api/customers/page/3 | |
``` | |
```json | |
{ | |
"pagination": | |
{ | |
"results": 7461, | |
"page": 3, | |
"page_size": 100, | |
"pages": 75 | |
}, | |
"customers": [{ ... }] | |
} | |
``` | |
## Dates and Times | |
All dates and times via the API are in UTC (Coordinated Universal Time). | |
# API Calls | |
## Customers | |
- [Get All Customers](wiki/GetAllCustomers) | |
- [Get Customers Since](wiki/GetCustomersSince) | |
- [Lookup Customers](wiki/LookupCustomers) | |
- [Create Customer](wiki/CreateCustomer) | |
## Taxes | |
- [Get Taxes](wiki/GetTaxes) | |
- [Create Tax](wiki/CreateTax) | |
## Products | |
- [Get All Products](wiki/GetAllProducts) | |
- [Get Products Since](wiki/GetProductsSince) | |
- [Get Active Products](wiki/GetActiveProducts) | |
- [Get Active Products Since](wiki/GetActiveProductsSince) | |
- [Create Products](wiki/CreateProducts) | |
- [Delete Products](wiki/DeleteProducts) | |
## Payment types | |
- [Get Payment Types](wiki/GetPaymentTypes) | |
## Outlets | |
- [Get Outlets](wiki/GetOutlets) | |
## Registers | |
- [Get Registers](wiki/GetRegisters) | |
- [Open Register](wiki/OpenRegister) | |
- [Close Register](wiki/CloseRegister) | |
## Register sales | |
- [Get All Register Sales](wiki/GetAllRegisterSales) | |
- [Get Register Sales Since](wiki/GetRegisterSalesSince) | |
- [Get Register Sales for Outlet](wiki/GetRegisterSalesForOutlet) | |
- [Get Register Sales for Product Tag](wiki/GetRegisterSalesForProductTag) | |
- [Get Register Sales By State](wiki/GetRegisterSalesByState) | |
- [Get Register Sale By Id](wiki/GetRegisterSaleById) | |
- [Create Register Sale](wiki/CreateRegisterSale) | |
- [Open Register In Sell Screen](wiki/OpenRegisterInSellScreen) | |
## Users | |
- [Get Users](wiki/GetUsers) | |
## Stock transfers | |
- [Get Stock Transfer By State](wiki/GetStockTransferByState) | |
- [Create Stock Transfer](wiki/CreateStockTransfer) | |
- [Receive Stock Transfer](wiki/ReceiveStockTransfer) | |
- [Delete Stock Transfer](wiki/DeleteStockTransfer) | |
## Stock orders | |
Not supported yet. | |
## Stock takes | |
Not supported yet. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment