version 0.2 (beta)
18.01.2012
Welcome to the API documentation service transcript BaCAD barlists! This service offers a simple interface to extract data from a BaCAD barlist quickly, thanks to the translation of Barcode 2D.
BaCAD uses standard exchange data format BVBS.
…
The service is protected by HTTP Basic authentication (user / password pair) system. This identification is required to use each of the features described in this document.
The API returns barlist data detecting / decoding barcodes inside. You send the barlist in various formats:
This document describes the required format of the URLs and parameters available.
A URL request to the service must be in the following form:
http://cloud.bacad.ch/steellist.php?parameters ou https://cloud.bacad.ch/steellist.php?parameters (secure SSL connection)
Except for the document, each parameter can be specified either in the URL (method GET) and then posted as given (method POST). The parameters are:
format: output formatuploadedfile: document
Output format is specified by the parameter 'format'. The API actually support the following output formats:
The document must be sent to the site according to the method POST of the HTTP protocol, identified by 'uploadedfile'.
Output options allow to enable/disable generation of additional data within the result:
'posBvbs' equals '1' indicates that the service should include BVBS data (for each bar)'barXml' equals '1' indicates that the service should include XML data (for each bar)
For each valid request, the service returns a response 'SteelListResponse' in the format specified in the request URL. Each response contains the following:
OK indicating that the request was successfulAUTH_FAILED indicating that the user ID has failed (pair user/password)INVALID_REQUEST indicating that the request was not well-formattedINVALID_API_KEY indicating that the key to use the API is incorrectINVALID_FILE_TYPE indicating the type of the posted file is supportedFILE_OVER_SIZE_LIMIT indicating that the posted file is too large (oversized)FILE_UPLOAD_ERROR indicating a download errorINTERNAL_ERROR indicating an internal error of the serviceUNKNOWN_ERROR indicating an unknown errordocument containing the items describing the project propertiesproject indicating the project's namedivision indicating the division's namenum indiquant le numéro de la pagethumbnail indiquant l'URL (partiel) vers l'aperçu (image) de la pagenum indicating the number of the positionbvbs indicating the BVBS code of the positionbar containing the items describing the characteristics of the bartype indicating the type of the bar 2D, 3D, etc. Values could be the followings:BF2D indicating une bar 2DBF3D indicating une bar 3DBFWE indicating une barh helixdimension containing the items describing each bar's segement (according to its type)length indicating the length of the segmentradius indicating the radius of an arc segment (0 if straght segment)angle indicating the angle value between the segement and the previous segmentx indicating the first component of the vector of the segmenty indicating the second component of the vector of the segmentz indicating the third component of the vector of the segmentradius indicating the radius of the circle described by the helixnumber indicating the number of loops described by the helixspacing indicating the spacing between each rotations described by the helixHere an example of an Xml reply:
<SteelListResponse> <status>OK</status> <document> <project>MyProject</project> <division>MyDivision</division> <language>FR</language> </document> <page> <num>1</num> <thumbnail>/foo/bar.png</thumbnail> <pos> <bvbs>BF2D@Hj00@r001@ia@p1@l3280@n6@e2.912@d12@gB500B@s72@v@Gl160@w90@l2960@w90@l160@w0@C69@CRLF</bvbs> <project>MyProject</project> <list>MyList</list> <revision>Revision</revision> <num>8</num> <count>42</count> <length>1000</length> <weight>1.2<weight> <steel>B500B</steel> <diameter>12</diameter> <bending>46</bending> <bar> <type>BF2D</type> <dimensions> <dimension> <length>500</length> <radius>250</radius> <angle>45</angle> </dimension> </dimensions> </bar> </pos> </page> </SteelListResponse>
The format of the bar's dimensions depends on the type of the bar: Here an example for standard bar in 2D (type BF2D):
<dimension> <length>500</length> <radius>250</radius> <angle>45</angle> </dimension>
Here an example for standard bar in 3D (type BF3D):
<dimension> <x>0</x> <y>0</y> <z>300</z> </dimension>
Here an example for helix (type BFWE):
<dimension> <radius>200</radius> <number>6</number> <spacing>200</spacing> </dimension>
ABS example:
BF2D@Hj00@r001@ia@p1@l3280@n6@e2.912@d12@gB500B@s72@v@Gl160@w90@l2960@w90@l160@w0@C69@ BF2D@Hj00@r001@ia@p2@l5280@n6@e4.688@d12@gB500B@s72@v@Gl160@w90@l4960@w90@l160@w0@C84@ BF2D@Hj00@r001@ia@p3@l2370@n11@e1.461@d10@gB500B@s60@v@Gl140@w90@l2230@w0@C71@ BF2D@Hj00@r001@ia@p4@l1960@n6@e1.208@d10@gB500B@s60@v@Gl1960@w0@C96@
A Html page is available for service tests: clic here.