Table of Contents
BaCAD Steel List Barcodes Transcription API
version 0.2 (beta)
18.01.2012
Introduction
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.
Usage Restrictions
…
Authentication
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.
Requests
The API returns barlist data detecting / decoding barcodes inside. You send the barlist in various formats:
- Pdf (Portable Document Format)
- Images
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)
Parameters
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 options
Output format
Output format is specified by the parameter 'format'. The API actually support the following output formats:
- xml returns the results in XML form in a content node <SteelListResponse>
- abs (Allgemeine-Bewehrungs-Schnittstelle) returns the results as ASCII (according the standard BVBS)
Document
The document must be sent to the site according to the method POST of the HTTP protocol, identified by 'uploadedfile'.
Output options
Output options allow to enable/disable generation of additional data within the result:
- Parameter
'posBvbs' equals '1' indicates that the service should include BVBS data (for each bar) - Parameter
'barXml' equals '1' indicates that the service should include XML data (for each bar)
Replies
XML
For each valid request, the service returns a response 'SteelListResponse' in the format specified in the request URL. Each response contains the following:
- A status code status, which could be:
OKindicating that the request was successfulAUTH_FAILEDindicating that the user ID has failed (pair user/password)INVALID_REQUESTindicating that the request was not well-formattedINVALID_API_KEYindicating that the key to use the API is incorrectINVALID_FILE_TYPEindicating the type of the posted file is supportedFILE_OVER_SIZE_LIMITindicating that the posted file is too large (oversized)FILE_UPLOAD_ERRORindicating a download errorINTERNAL_ERRORindicating an internal error of the serviceUNKNOWN_ERRORindicating an unknown error
- An item
documentcontaining the items describing the project properties- An item
projectindicating the project's name - An item
divisionindicating the division's name
- A table of results (pages) containing:
- An item
numindiquant le numéro de la page - An item
thumbnailindiquant l'URL (partiel) vers l'aperçu (image) de la page - A table of positions (pos) containing:
- An item
numindicating the number of the position - An item
bvbsindicating the BVBS code of the position - An item
barcontaining the items describing the characteristics of the bar- An item
typeindicating the type of the bar 2D, 3D, etc. Values could be the followings:BF2Dindicating une bar 2DBF3Dindicating une bar 3DBFWEindicating une barh helix
- A table of items
dimensioncontaining the items describing each bar's segement (according to its type)- Bar 2D
- An item
lengthindicating the length of the segment - An item
radiusindicating the radius of an arc segment (0 if straght segment) - An item
angleindicating the angle value between the segement and the previous segment
- Bar 3D
- An item
xindicating the first component of the vector of the segment - An item
yindicating the second component of the vector of the segment - An item
zindicating the third component of the vector of the segment
- Bar helix
- An item
radiusindicating the radius of the circle described by the helix - An item
numberindicating the number of loops described by the helix - An item
spacingindicating the spacing between each rotations described by the helix
Examples
Here 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@
Test
A Html page is available for service tests: clic here.
