API
Docs and API's for Weasy.io
Customers
Manage all the customers in your website.Accepts GET POST PUT DELETE
All requests to the API must be authenticated with an API key on the HTTP Authorization header.
GET
Get all files from website filemanagerRequest example
~ curl -i -X GET \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/customers
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/customers
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| limit | integer | optional | define items per page |
| page | integer | optional | define page to display |
POST
Add a new customer to your website.Request example
~ curl -i -X POST \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"name":"John Smith","email":"myemail@weasy.io","customer_code":"ABC", ...}'\
https://api.weasy.io/v1/customers
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"name":"John Smith","email":"myemail@weasy.io","customer_code":"ABC", ...}'\
https://api.weasy.io/v1/customers
Body response example [ HTTP CODE: 200 ]
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| customer_code | string | required | customer code this field must be unique |
| status | integer | required | client status options: 0 for disabled, 1 for enabled |
| name | string | required | customer name |
| address | string | optional | customer address |
| zipcode | string | optional | customer zip address |
| city | string | optional | customer city |
| country | string | optional | country code options: all the iso country codes (ISO 3166-2) obtained from the Countries endpoint |
| string | required | customer email this field must be unique |
|
| phone | string | optional | customer contact number |
| password | string | required | customer default password |
| notes | text | optional | notes for the customer |
| lang | text | optional | customer default language options: all the iso country codes (ISO 3166-2) obtained from the Languages endpoint |
| price_table | integer | optional | customer default price table price table id's can be obtained from the price table endpoint |
| allowMarketing | integer | optional | customer is allowed to recieve campaigns and sms |
PUT
Change a url forward from your website.Request example
~ curl -i -X PUT \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"name":"John Smith","email":"myemail@weasy.io","customer_code":"ABC", ...}'\
https://api.weasy.io/v1/customers/1
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"name":"John Smith","email":"myemail@weasy.io","customer_code":"ABC", ...}'\
https://api.weasy.io/v1/customers/1
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| id | integer | required | url forward id |
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| customer_code | string | required | customer code this field must be unique |
| status | integer | required | client status options: 0 for disabled, 1 for enabled |
| name | string | required | customer name |
| address | string | optional | customer address |
| zipcode | string | optional | customer zip address |
| city | string | optional | customer city |
| country | string | optional | country code options: all the iso country codes (ISO 3166-2) obtained from the Countries endpoint |
| string | required | customer email this field must be unique |
|
| phone | string | optional | customer contact number |
| password | string | required | customer default password |
| notes | text | optional | notes for the customer |
| lang | text | optional | customer default language options: all the iso country codes (ISO 3166-2) obtained from the Languages endpoint |
| price_table | integer | optional | customer default price table price table id's can be obtained from the price table endpoint |
| allowMarketing | integer | optional | customer is allowed to recieve campaigns and sms |
DELETE
Delete a customer from your websiteRequest example
~ curl -i -X DELETE \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/customers
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/customers
Body response example [ HTTP CODE: 200 ]
Body attributes
| Attribute description |
|---|
| A json payload containing an array of id or ids. Use GET for collect all the ids. |