API
Docs and API's for Weasy.io
Extra fields
Manage all the e-commerce extra fields.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 extra fieldsRequest example
~ curl -i -X GET \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/extrafields
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/extrafields
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 extrafields or a collection of extra fields to your website.Request example
~ curl -i -X POST \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"type":"select","values":"1,2","status":1,"visibility":1,"i18n":{ "pt":{ "title":"O meu campo extra 2" }, "en":{ "title":"My extra field 2" } }} \
https://api.weasy.io/v1/extrafields
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"type":"select","values":"1,2","status":1,"visibility":1,"i18n":{ "pt":{ "title":"O meu campo extra 2" }, "en":{ "title":"My extra field 2" } }} \
https://api.weasy.io/v1/extrafields
Body response example [ HTTP CODE: 200 ]
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| type | string | required | field type options: input for text field, select for select box |
| values | string | optional | field options (only for select box field type |
| status | integer | required | status of the extra field options: 0 for disabled, 1 for enabled |
| visibility | integer | optional | visibility of the extra field options: 0 for invisible, 1 for visible |
| i18n | object | required | i18n titles Language keys can be obtained from the Languages endpoint Example: "i18n":{ "pt":{ "title":"O meu campo extra 2" }, "en":{ "title":"My extra field 2" } } |
PUT
Change an extra field from your website.Request example
~ curl -i -X PUT \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"type":"select","values":"1,2","status":1,"visibility":1,"i18n":{ "pt":{ "title":"O meu campo extra 2" }, "en":{ "title":"My extra field 2" } }} \
https://api.weasy.io/v1/extrafields/1
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"type":"select","values":"1,2","status":1,"visibility":1,"i18n":{ "pt":{ "title":"O meu campo extra 2" }, "en":{ "title":"My extra field 2" } }} \
https://api.weasy.io/v1/extrafields/1
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| id | integer | required | if of the extra field |
Body parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| type | string | required | field type options: input for text field, select for select box |
| values | string | optional | field options (only for select box field type |
| status | integer | required | status of the extra field options: 0 for disabled, 1 for enabled |
| visibility | integer | optional | visibility of the extra field options: 0 for invisible, 1 for visible |
| i18n | object | required | i18n titles Language keys can be obtained from the Languages endpoint Example: "i18n":{ "pt":{ "title":"O meu campo extra 2" }, "en":{ "title":"My extra field 2" } } |
DELETE
Delete a extra field or a collection of extra fields your website.Request example
~ curl -i -X DELETE \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/extrafields
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/extrafields
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. |