Vesica API - Adding a Piece

To create or add a new piece, you need to send the name of the piece to Vesica. Following is the sample form for creating new piece. All the requests must be sent to https://vesica.ws/api/index.php. The demand for requesting piece lists must be "PIECE_CREATE".

Following is the sample form for creating a new piece. All the fields in the form are mandatory and must be filled in with correct values.

<form method="post" action="https://vesica.ws/api/index.php">
     <input type="hidden" name="user_api" value="your-user-api-key" />
     <input type="hidden" name="account_api" value="your-account-api-key" />
     <input type="hidden" name="demand" value="PIECE_CREATE" />
     <input type="hidden" name="name" value="name-of-piece" />
</form>

If the submitted values are correct, the Vesica API will return the following XML.

<?xml version="1.0" encoding="iso-8859-1"?>
<response>
     <result>SUCCESS</result>
     <message>Piece Added Successfully!</message>
     <piece>
          <id></id>
          <name></name>
     </piece>
</response>

If the "name" variable is empty, the Vesica API will return the following XML.

<?xml version="1.0" encoding="iso-8859-1"?>
<response>
     <result>FAILURE</result>
     <message>Piece name can't be empty!</message>
</response>

Browse Documenation

Introduction to the API

Requesting Piece Lists

Requesting Piece Details

Adding a Piece

Requesting Collections

Requesting Collection Details

Download Sample Templates

Home    •    Blog    •    Contact Us    •    Developers    •    Education    •    Partners    •    About    •    Help & Support    •    News    •    Privacy Policy    •    Terms of Use

Follow us on Twitterk Join Vesica on Facebook