BrickControl API


What is BrickControl API?


BrickControl has an API so that it can be integrated easily with other products. With BrickControl API you can read, insert, update and delete BrickControl data from other programs in a simple way. BrickControl uses REST Web Services.


Samples BrickControl API Samples

This url returns 10 clients:

https://brickcontrol.com/api/v1/BrickControlRest.svc/Clients/getList?searchText=|NULL|&begin=1&end=10&apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


This url returns client with Id="2":

https://brickcontrol.com/api/v1/BrickControlRest.svc/Clients/get?id=2&apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


This url returns project with Id="00001":

https://brickcontrol.com/api/v1/BrickControlRest.svc/Projects/get?id=00001&apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Companies Web Service

This method returns companies number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Companies/count?searchText=<searchText>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <apiKey>: This is your BrickControl API Key.


This method returns a list of companies

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Companies/getList?searchText=<searchText>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a company

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Companies/get?companyCode=<companyCode>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Company code that you want to get.

  • <apiKey>:This is your BrickControl API Key.


This method saves a company in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/Companies/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.

This is the xml sample to save a company:

<Company z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<CompanyCode></CompanyCode>

<Description>Empresa Prueba API</Description>

<Address>Gran vía 69</Address>

<PostalCodeId>2</PostalCodeId>

<CompanyId>B12398765</CompanyId>

<Telephone>915254854</Telephone>

<Fax>915234587</Fax>

<Email>mail@empresaapi.com</Email>

<Red>251</Red>

<Green>251</Green>

<Blue>8</Blue>

<CompanyCountry>ES</CompanyCountry>

<LegalCurrency>EUR</LegalCurrency>

<ManualCode></ManualCode>

<Webpage>www.empresaapi.com</Webpage>

<PaymentMethodDefault>P30</PaymentMethodDefault>

<Active>true</Active>

</Company>


This method deletes a company of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Companies/delete?companyCode=<companyCode>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Company code that you want to delete.

  • <apiKey>:This is your BrickControl API Key.



Customers Web Service

This method returns customers number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Clients/count?searchText=<searchText>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.



This method returns a list of clients

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Clients/getList?searchText=<searchText>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a customer

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Clients/get?id=<id>&apiKey=<apiKey>

- Parameters:

  • <id>: Code of the register that you want to get.

  • <apiKey>:This is your BrickControl API Key.


This method saves a customer in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/Clients/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.

This is the xml sample to save a customer:

<Client z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<Id>0</Id>

<TaxID></TaxID>

<ClientCompany>Cliente Prueba API</ClientCompany>

<ClientName></ClientName>

<ClientFirstName></ClientFirstName>

<ClientLastName></ClientLastName>

<Address>Serrano 43</Address>

<PostalCodeId>2</PostalCodeId>

<Telephone>91 432 33 55</Telephone>

<Fax>91 687 88 99</Fax>

<WebPage>www.clientepruebaapi1.com</WebPage>

<Email>admin@clientepruebaapi1.com</Email>

<DefaultTax>18</DefaultTax>

<Currency>EUR</Currency>

<PaymentMethodCode>EFE</PaymentMethodCode>

<Tradename>Nombre comercial cliente API</Tradename>

<ManualCode></ManualCode>

<Active>true</Active>

</Client>


This method deletes a customer of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Clients/delete?id=<id>&apiKey=<apiKey>

- Parameters:

  • <id>: Code of the register that you want to delete.

  • <apiKey>:This is your BrickControl API Key.


Suppliers Web Service

This method returns suppliers number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Suppliers/count?searchText=<searchText>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.



This method returns a list of suppliers

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Suppliers/getList?searchText=<searchText>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a supplier

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Suppliers/get?id=<id>&apiKey=<apiKey>

- Parameters:

  • <id>: Code of the register that you want to get.

  • <apiKey>:This is your BrickControl API Key.


This method saves a supplier in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/Suppliers/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.


This is the xml sample to save a supplier:

<Supplier z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<Id>0</Id>

<TaxID></TaxID>

<SupplierCompany>Proveedor Prueba API</SupplierCompany>

<SupplierName></SupplierName>

<SuppliertFirstName></SuppliertFirstName>

<SupplierLastName></SupplierLastName>

<Address>c/ St. Lluís, 61 - Pral. 2ª</Address>

<PostalCodeId>22</PostalCodeId>

<Telephone>932196151</Telephone>

<Fax></Fax>

<Email>proveedorapi@api.com</Email>

<WebSite>www.proveedorapi.com</WebSite>

<DefaultTax></DefaultTax>

<PaymentMethodCode></PaymentMethodCode>

<Currency></Currency>

<Tradename></Tradename>

<ExternalCode></ExternalCode>

<ManualCode></ManualCode>

<Active>true</Active>

</Supplier>


This method deletes a supplier of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Suppliers/delete?id=<id>&apiKey=<apiKey>

- Parameters:

  • <id>: Code of the register that you want to delete.

  • <apiKey>:This is your BrickControl API Key.


Employees Web Service

This method returns employees number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Employees/count?searchText=<searchText>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.



This method returns a list of employees

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Employees/getList?searchText=<searchText>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a employee

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Employees/get?employeeCode=<employeeCode>&apiKey=<apiKey>

- Parameters:

  • <employeeCode>: Código del registro que se quiere obtener.

  • <apiKey>:This is your BrickControl API Key.


This method saves a employee in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/Employees/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.


This is the xml sample to save a employee:

<Employee z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<EmployeeId>0</EmployeeId>

<Name>Prueba</Name>

<FirstName>Empleado</FirstName>

<LastName>API</LastName>

<Address>Calle del Príncipe 32</Address>

<PostalCode>22</PostalCode>

<Telephone>915656549</Telephone>

<BirthDate>1980-04-01T00:00:00</BirthDate>

<NationalIdentityDocument>10976447A</NationalIdentityDocument>

<SocialSecurityNumber>201545498356546</SocialSecurityNumber>

<Email>empleado.api@api.com</Email>

<CategoryId>PEO1</CategoryId>

<DietCost>0</DietCost>

<HalfDietCost>0</HalfDietCost>

<OtherExpensesCost>0</OtherExpensesCost>

<KilometerCost>0</KilometerCost>

<ForeignDiet>0</ForeignDiet>

<Children>2</Children>

<MaritalStatusId>2</MaritalStatusId>

<EducationId>2</EducationId>

<Currency>EUR</Currency>

<ManualCode></ManualCode>

<ValidAccess>true</ValidAccess>

</Employee>


This method deletes a employee of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Employees/delete?employeeCode=<employeeCode>&apiKey=<apiKey>

- Parameters:

  • <employeeCode>: Code of the register that you want to delete.

  • <apiKey>:This is your BrickControl API Key.


Projects Web Service

This method returns projects number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Projects/count?searchText=<searchText>&status=<status>&user=<user>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <status>: Filter by this status (OPEN, ACTIVE o FINISHED)

  • <user>: Filter by this user.

  • <apiKey>:This is your BrickControl API Key.


This method returns a list of projects

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Projects/getList?searchText=<searchText>&status=<status>&user=<user>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <status>: Filter by this status (OPEN, ACTIVE o FINISHED)

  • <user>: Filter by this user.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a project

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Projects/get?id=<id>&apiKey=<apiKey>

- Parameters:

  • <id>: Code of the register that you want to get.

  • <apiKey>:This is your BrickControl API Key.


This method saves a project in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/Projects/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.


This is the xml sample to save a project:

<Project z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<ProjectCode></ProjectCode>

<DbPriceId></DbPriceId>

<CompanyId>000</CompanyId>

<CompanyOffice>0</CompanyOffice>

<Name>Proyecto Prueba API</Name>

<Description></Description>

<Address></Address>

<PostcodeId>2</PostcodeId>

<PhoneNumber></PhoneNumber>

<Fax></Fax>

<Email></Email>

<Website></Website>

<AllocationLevel></AllocationLevel>

<ClientId>0</ClientId>

<ClientOffice></ClientOffice>

<PaymentMethodId></PaymentMethodId>

<ContractNumber></ContractNumber>

<IsSequential>true</IsSequential>

<StartedDate>0001-01-01T00:00:00</StartedDate>

<FilingDate>0001-01-01T00:00:00</FilingDate>

<AwardedDate>0001-01-01T00:00:00</AwardedDate>

<FinishedDate>0001-01-01T00:00:00</FinishedDate>

<RejectedDate>0001-01-01T00:00:00</RejectedDate>

<EstimateCostAnalysisTotal>100.00</EstimateCostAnalysisTotal>

<CostCurrency>EUR</CostCurrency>

<EstimateCertificationTotal>150.00</EstimateCertificationTotal>

<CertificationCurrency>EUR</CertificationCurrency>

<EstimateCode>1</EstimateCode>

<VersionId>0</VersionId>

<PlanningStartDate>0001-01-01T00:00:00</PlanningStartDate>

<PlanningEndDate>0001-01-01T00:00:00</PlanningEndDate>

</Project>

Purchase Invoices Web Service

This method returns purchase invoice number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PurchaseInvoices/count?companyCode=<companyCode>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&startDate=<startDate>&endDate=<endDate>&currencyCode=<currencyCode>&documentType=<documentType>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <currencyCode>: Filter by currency.

  • <documentType>: Filter by Document Type.

  • <apiKey>:This is your BrickControl API Key.


This method returns a list of purchase invoices

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PurchaseInvoices/getList?companyCode=<companyCode>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&startDate=<startDate>&endDate=<endDate>&currencyCode=<currencyCode>&documentType=<documentType>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <currencyCode>: Filter by currency.

  • <documentType>: Filter by Document Type.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a purchase invoice

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PurchaseInvoices/get?companyCode=<companyCode>&documentType=<documentType>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&invoiceDate=<invoiceDate>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <documentType>: Filter by Document Type.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <invoiceDate>: Filter by Invoice Date.

  • <apiKey>:This is your BrickControl API Key.


This method saves a purchase invoice in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/PurchaseInvoices/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.


This is the xml sample to save a purchase invoice:

<PurchaseInvoice z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<Company>000</Company>

<DocumentType>F</DocumentType>

<Supplier>19</Supplier>

<InvoiceNumber>F-201</InvoiceNumber>

<InvoiceDate>2013-08-02T00:00:00Z</InvoiceDate>

<InvoiceType>O</InvoiceType>

<LegalAmount>141.60</LegalAmount>

<Address></Address>

<PostalCodeId>11</PostalCodeId>

<PaymentMethod>P36</PaymentMethod>

<DateExchangeRate>2013-08-05T00:00:00</DateExchangeRate>

<CurrencyCodeOri>EUR</CurrencyCodeOri>

<ExchangeRate>1.000000</ExchangeRate>

<AmountOri>141.60</AmountOri>

<VATRate></VATRate>

<LocationCode>1</LocationCode>

<InvoiceLines z:Id="i16">

<PurchaseInvoiceLine z:Id="i17">

<PersistenceState>Unchanged</PersistenceState>

<FechaCopiaAsiento>0001-01-01T00:00:00</FechaCopiaAsiento>

<Company>000</Company>

<DocumentType>F</DocumentType>

<Supplier>19</Supplier>

<InvoiceNumber>F-201</InvoiceNumber>

<InvoiceDate>2013-08-02T00:00:00Z</InvoiceDate>

<LineId>1</LineId>

<ItemId></ItemId>

<ItemName></ItemName>

<Units>1.000</Units>

<Price>100.000000</Price>

<Discount>0</Discount>

<VATCode>18</VATCode>

<Taxable>100.00</Taxable>

<Concept>linea 1</Concept>

<ProjectId></ProjectId>

<DivisionId></DivisionId>

<TaskId></TaskId>

<ContractNum>0</ContractNum>

<CostCenterCode>OB</CostCenterCode>

<CostCenterDescription></CostCenterDescription>

<TaxableOrigin>100.00</TaxableOrigin>

<SalePrice>0</SalePrice>

<ResourceId></ResourceId>

<EmplooyeSE>0</EmplooyeSE>

<WarehouseId></WarehouseId>

<ItemCod>0</ItemCod>

<OriginCurrencyPrice>0</OriginCurrencyPrice>

<InvoiceType>O</InvoiceType>

<LegalCurrency>EUR</LegalCurrency>

</PurchaseInvoiceLine>

<PurchaseInvoiceLine z:Id="i18">

<PersistenceState>Unchanged</PersistenceState>

<FechaCopiaAsiento>0001-01-01T00:00:00</FechaCopiaAsiento>

<Company>000</Company>

<DocumentType>F</DocumentType>

<Supplier>19</Supplier>

<InvoiceNumber>F-201</InvoiceNumber>

<InvoiceDate>2013-08-02T00:00:00Z</InvoiceDate>

<LineId>2</LineId>

<ItemId></ItemId>

<ItemName></ItemName>

<Units>1.000</Units>

<Price>20.000000</Price>

<Discount>0</Discount>

<VATCode>18</VATCode>

<Taxable>20.00</Taxable>

<Concept>linea 2</Concept>

<ProjectId></ProjectId>

<DivisionId></DivisionId>

<TaskId></TaskId>

<ContractNum>0</ContractNum>

<CostCenterCode>OB</CostCenterCode>

<CostCenterDescription></CostCenterDescription>

<TaxableOrigin>20.00</TaxableOrigin>

<SalePrice>0</SalePrice>

<ResourceId></ResourceId>

<EmplooyeSE>0</EmplooyeSE>

<WarehouseId></WarehouseId>

<ItemCod>0</ItemCod>

<OriginCurrencyPrice>0</OriginCurrencyPrice>

<InvoiceType>O</InvoiceType>

<LegalCurrency>EUR</LegalCurrency>

</PurchaseInvoiceLine>

</InvoiceLines>

<IsPaymentDue>false</IsPaymentDue>

</PurchaseInvoice>


This method deletes a purchase invoice of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PurchaseInvoices/delete?companyCode=<companyCode>&documentType=<documentType>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&invoiceDate=<invoiceDate>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <documentType>: Filter by Document Type.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <invoiceDate>: Filter by Invoice Date.

  • <apiKey>:This is your BrickControl API Key.


Sales Invoices Web Service

This method returns sales invoices number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/SalesInvoices/count?companyCode=<companyCode>&series=<series>&invoiceNumber=<invoiceNumber>&clientId=<clientId>&startDate=<startDate>&endDate=<endDate>&currencyCode=<currencyCode>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <series>: Filter by Serie.

  • <clientId>: Filter by Client Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <currencyCode>: Filter by currency.

  • <apiKey>:This is your BrickControl API Key.


This method returns a list of sales invoices

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/SalesInvoices/getList?companyCode=<companyCode>&clientId=<clientId>&series=<series>&invoiceNumber=<invoiceNumber>&currencyCode=<currencyCode>&startDate=<startDate>&endDate=<endDate>&registerNumber=<registerNumber>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <clientId>: Filter by Client Id.

  • <series>: Filter by Serie.

  • <invoiceNumber>: Filter by Invoice Number.

  • <currencyCode>: Filter by currency.

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <registerNumber>: Number of registers.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a sales invoice

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/SalesInvoices/get?companyCode=<companyCode>&series=<series>&invoiceNumber=<invoiceNumber>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <series>: Filter by Serie.

  • <invoiceNumber>: Filter by Invoice Number.

  • <apiKey>:This is your BrickControl API Key.


This method saves a sales invoice in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/PurchaseInvoices/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.


This method deletes a sales invoice of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/SalesInvoices/delete?companyCode=<companyCode>&series=<series>&invoiceNumber=<invoiceNumber>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <series>: Filter by Serie.

  • <invoiceNumber>: Filter by Invoice Number.

  • <apiKey>:This is your BrickControl API Key.


Materials Reception Web Service

This method returns materials reception number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ReceiptOfMaterials/count?companyCode=<companyCode>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&startDate=<startDate>&endDate=<endDate>&currencyCode=<currencyCode>&documentType=<documentType>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <currencyCode>: Filter by currency.

  • <documentType>: Filter by Document Type.

  • <apiKey>:This is your BrickControl API Key.


This method returns a list of materials reception

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ReceiptOfMaterials/getList?companyCode=<companyCode>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&startDate=<startDate>&endDate=<endDate>&currencyCode=<currencyCode>&documentType=<documentType>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <currencyCode>: Filter by currency.

  • <documentType>: Filter by Document Type.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a materials reception

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ReceiptOfMaterials/get?companyCode=<companyCode>&documentType=<documentType>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&invoiceDate=<invoiceDate>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <documentType>: Filter by Document Type.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <invoiceDate>: Filter by Invoice Date.

  • <apiKey>:This is your BrickControl API Key.


This method saves a materials reception in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/ReceiptOfMaterials/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.


This is the xml sample to save a materials reception:


<PurchaseInvoice z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<Company>003</Company>

<DocumentType>A</DocumentType>

<Supplier>25</Supplier>

<InvoiceNumber>1001-A</InvoiceNumber>

<InvoiceDate>2013-05-30T00:00:00Z</InvoiceDate>

<InvoiceType>AO</InvoiceType>

<LegalAmount>1482.25</LegalAmount>

<Address></Address>

<PostalCodeId>8</PostalCodeId>

<PaymentMethod></PaymentMethod>

<DateExchangeRate>2013-05-30T00:00:00</DateExchangeRate>

<CurrencyCodeOri>EUR</CurrencyCodeOri>

<ExchangeRate>1.000000</ExchangeRate>

<AmountOri>1482.25</AmountOri>

<VATRate></VATRate>

<LocationCode>1</LocationCode>

<InvoiceLines z:Id="i16">

<PurchaseInvoiceLine z:Id="i17">

<PersistenceState>Unchanged</PersistenceState>

<FechaCopiaAsiento>0001-01-01T00:00:00</FechaCopiaAsiento>

<Company>003</Company>

<DocumentType>A</DocumentType>

<Supplier>25</Supplier>

<InvoiceNumber>1001-A</InvoiceNumber>

<InvoiceDate>2013-05-30T00:00:00Z</InvoiceDate>

<LineId>1</LineId>

<ItemId></ItemId>

<ItemName></ItemName>

<Units>10.000</Units>

<Price>100.000000</Price>

<Discount>0</Discount>

<VATCode>21</VATCode>

<Taxable>1000.00</Taxable>

<Concept></Concept>

<ProjectId>00001</ProjectId>

<DivisionId></DivisionId>

<TaskId></TaskId>

<ContractNum>0</ContractNum>

<CostCenterCode>OB</CostCenterCode>

<CostCenterDescription>00001 1 0</CostCenterDescription>

<TaxableOrigin>1000.00</TaxableOrigin>

<SalePrice>0</SalePrice>

<ResourceId></ResourceId>

<EmplooyeSE>0</EmplooyeSE>

<WarehouseId></WarehouseId>

<ItemCod>2</ItemCod>

<OriginCurrencyPrice>100.000000</OriginCurrencyPrice>

<InvoiceType>AO</InvoiceType>

<ItemCode>ART_MAT</ItemCode>

<LegalCurrency>EUR</LegalCurrency>

<UmCode>ud</UmCode>

</PurchaseInvoiceLine>

<PurchaseInvoiceLine z:Id="i18">

<PersistenceState>Unchanged</PersistenceState>

<FechaCopiaAsiento>0001-01-01T00:00:00</FechaCopiaAsiento>

<Company>003</Company>

<DocumentType>A</DocumentType>

<Supplier>25</Supplier>

<InvoiceNumber>1001-A</InvoiceNumber>

<InvoiceDate>2013-05-30T00:00:00Z</InvoiceDate>

<LineId>2</LineId>

<ItemId></ItemId>

<ItemName></ItemName>

<Units>10.000</Units>

<Price>25.000000</Price>

<Discount>10.00</Discount>

<VATCode>21</VATCode>

<Taxable>225.00</Taxable>

<Concept></Concept>

<ProjectId>00002</ProjectId>

<DivisionId></DivisionId>

<TaskId></TaskId>

<ContractNum>0</ContractNum>

<CostCenterCode>OB</CostCenterCode>

<CostCenterDescription>PLANNING 1 0</CostCenterDescription>

<TaxableOrigin>225.00</TaxableOrigin>

<SalePrice>0</SalePrice>

<ResourceId></ResourceId>

<EmplooyeSE>0</EmplooyeSE>

<WarehouseId></WarehouseId>

<ItemCod>3</ItemCod>

<OriginCurrencyPrice>25.000000</OriginCurrencyPrice>

<InvoiceType>AO</InvoiceType>

<ItemCode>ART_MAO</ItemCode>

<LegalCurrency>EUR</LegalCurrency>

<UmCode>hr</UmCode>

</PurchaseInvoiceLine>

</InvoiceLines>

<IsPaymentDue>false</IsPaymentDue>

</PurchaseInvoice>


This method deletes a materials reception of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ReceiptOfMaterials/delete?companyCode=<companyCode>&documentType=<documentType>&supplierId=<supplierId>&invoiceNumber=<invoiceNumber>&invoiceDate=<invoiceDate>&apiKey=<apiKey>

- Parameters:

  • <companyCode>: Filter by Company Code.

  • <documentType>: Filter by Document Type.

  • <supplierId>: Filter by Supplier Id.

  • <invoiceNumber>: Filter by Invoice Number.

  • <invoiceDate>: Filter by Invoice Date.

  • <apiKey>:This is your BrickControl API Key.


Timesheets Web Service

This method returns timesheets number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Timesheet/count?startDate=<startDate>&endDate=<endDate>&employeeCode=<employeeCode>&costCenter=<costCenter>&apiKey=<apiKey>

- Parameters:

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <employeeCode>: Filter by Employee Code.

  • <costCenter>: Filter by Cost Center (Project, Staff)

  • <apiKey>:This is your BrickControl API Key.


This method returns a list of timesheets

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Timesheet/startDate=<startDate>&endDate=<endDate>&employeeCode=<employeeCode>&costCenter=<costCenter>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <startDate>: Filter from date.

  • <endDate>: Filter to date.

  • <employeeCode>: Filter by Employee Code.

  • <costCenter>: Filter by Cost Center (Project, Staff)

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method saves a timesheet in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/Timesheet/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.

This is the xml sample to save a timesheet:

<TimesheetNode  z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<TimesheetDate>2013-04-23T00:00:00Z</TimesheetDate>

<EmployeeId>1</EmployeeId>

<Comment>Anterior</Comment>

<CostCenter>OB</CostCenter>

<StandardWorkHours>8.00</StandardWorkHours>

<HolidayWorkHours>0</HolidayWorkHours>

<OvertimeWorkHours>2.00</OvertimeWorkHours>

<NightWorkHours>0</NightWorkHours>

<Kilometers>0</Kilometers>

<IsDiet>true</IsDiet>

<IsAverageDiet>true</IsAverageDiet>

<IsForeignDiet>true</IsForeignDiet>

<IsExpenses>false</IsExpenses>

<EmplooyeSE>0</EmplooyeSE>

<ProjectId>00001</ProjectId>

<EstimateId>1</EstimateId>

<DivisionId></DivisionId>

<TaskId></TaskId>

<ContractNum>0</ContractNum>

<ResourceId></ResourceId>

</TimesheetNode>


Estimate Web Service


This method returns a list of estimates

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Estimates/getList?projectId=<projectId>&searchText=<searchText>&apiKey=<apiKey>

- Parameters:

  • <projectId>: Filter by Project Id.

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.


This method returns the first level of the estimate

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Estimates/getRootNodes?projectId=<projectId>&estimateId=<estimateId>&apiKey=<apiKey>

- Parameters:

  • <projectId>: Filter by Project Id.

  • <estimateId>: Filter by Estimate Id.

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.


This method returns the following levels of the estimate

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Estimates/getNodes?type=<type>&projectId=<projectId>&estimateId=<estimateId>&divisionId=<divisionId>&taskId=<taskId>&taskType=<taskType>&apiKey=<apiKey>

- Parameters:

  • <type>: Filter by Type (DIVISION, TASK).

  • <projectId>: Filter by Project Id.

  • <estimateId>: Filter by Estimate Id.

  • <divisionId>: Filter by Division Id.

  • <taskId>: Filter by Task Id.

  • <taskType>: Filter by Task Type.

  • <apiKey>:This is your BrickControl API Key.


Project Progress Web Service

This method returns a list of project progress

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ProjectProgress/getList?projectId=<projectId>&apiKey=<apiKey>

- Parameters:

  • <projectId>: Filter by Project Id.

  • <apiKey>:This is your BrickControl API Key.


This method returns the first level of the project progress

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ProjectProgress/getRootNode?projectId=<projectId>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Filter by Project Id.

  • <apiKey>:This is your BrickControl API Key.


This method returns the following levels of the project progress

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ProjectProgress/getNodes?projectId=<projectId>&lastProjectProgress=<lastProjectProgress>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Filter by Project Id.

  • <lastProjectProgress>: Filter by Last Project Progress.

  • <apiKey>:This is your BrickControl API Key.


This method returns the child level of the project progress

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ProjectProgress/getChildrenNodes?type=<type>&projectId=<projectId>&estimateId=<estimateId>&divisionId=<divisionId>&taskId=<taskId>&taskType=<taskType>&lastProjectProgress=<lastProjectProgress>&apiKey=<apiKey>

- Parameters:

  • <type>: Filter by Node Type (DIVISION, TASK).

  • <projectId>: Filter by Estimate Id.

  • <estimateId>: Filter by Estimate Id.

  • <divisionId>: Filter by Division Id.

  • <taskId>: Filter by Task Id.

  • <taskType>: Filter by Task Type.

  • <lastProjectProgress>: Filter by Last Project Progress.

  • <apiKey>:This is your BrickControl API Key.


Price Database Web Service

This method returns a price database


- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PriceDatabase/get?id=<priceDbCode>&apiKey=<apiKey>


- Parameters:

  • <priceDbCode>: Price Database Code.

  • <apiKey>:This is your BrickControl API Key.

This method returns price database nodes

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PriceDatabase/getNodes?id=<priceDbCode>&apiKey=<apiKey>


- Parameters:

  • <priceDbCode>: Price Database Code.

  • <apiKey>:This is your BrickControl API Key.

This method returns price database child nodes

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PriceDatabase/getChildNodes?type=<type>&priceDbCode=<priceDbCode>&levelCode=<levelCode>&apiKey=<apiKey>


- Parameters:

  • <type>: Filter by Type (LEVEL / RESOURCE)

  • <priceDbCode>: Price Database Code.

  • <levelCode>: Level Code.

  • <apiKey>:This is your BrickControl API Key.

This method returns price database number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PriceDatabase/count?searchText=<searchText>&apiKey=<apiKey>


- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.

This method returns a list of price database

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PriceDatabase/getList?searchText=<searchText>&begin=<begin>&end=<end>&apiKey=<apiKey>


- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


Project Certifications Web Service

This method returns a list of project certifications

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ProjectCertification/getList?projectId=<projectId>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <apiKey>:This is your BrickControl API Key.

This method returns project certification nodes

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ProjectCertification/getNodes?projectId=<projectId>&certificationId=<certificationId>&date=<date>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <certificationId>: Certificaction Id.

  • <date>: Date of Project Certification. If date==|NULL|, select the last date of project certification.

  • <apiKey>:This is your BrickControl API Key.

This method returns project certification child nodes

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ProjectCertification/getChildrenNodes?type=<type>&projectId=<projectId>&certificationId=<certificationId>&date=<date>&divisionId=<divisionId>&taskId=<taskId>&taskType=<taskType>&apiKey=<apiKey>


- Parameters:

  • <type>: Filter by type (DIVISION / TASK)

  • <projectId>: Project Id.

  • <certificationId>: Certificaction Id.

  • <date>: Date of Project Certification. If date==|NULL|, select the last date of project certification.

  • <divisionId>: Filter by Division Id (only for type = DIVISION)

  • <taskId>: Filter by Task Id (only for type = TASK)


  • <apiKey>:This is your BrickControl API Key.


Resource Analysis Web Service

This method returns the first level of resource analysis

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ResourceAnalysis/getNodes?projectId=<projectId>&level=<level>&type=<type>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <level>: Filter by Level (PROJECT / DIVISION / TASK)

  • <type>: Filter by type of resource (ALL, MATERIAL, EQUIPMENT, LABOR, GENERALEXPENSES, TASK).

  • <apiKey>:This is your BrickControl API Key.

This method returns level nodes of a resource

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ResourceAnalysis/getDivisionNodes?projectId=<projectId>&resource=<resourceId>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <resourceId>: Resource Id.

  • <apiKey>:This is your BrickControl API Key.

This method returns child nodes of a level

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/ResourceAnalysis/getTaskNodes?projectId=<projectId>&resource=<resourceId>&division=<divisionId>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <resourceId>: Resource Id.

  • <divisionId>: Division Id.

  • <apiKey>:This is your BrickControl API Key.


Cost Analysis Web Service

This method returns cost analysis nodes

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/CostAnalysis/getNodes?companyId=<companyId>&status=<status>&dateIni=<fromDate>&dateEnd=<toDate>&apiKey=<apiKey>


- Parameters:

  • <companyId>: Company Id.

  • <status>: Filter by this status (OPEN, ACTIVE o FINISHED)

  • <fromDate>: Start date.

  • <toDate>: End date.

  • <apiKey>:This is your BrickControl API Key.

This method returns details of cost analysis

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/CostAnalysis/getNodeDetails?projectId=<projectId>&fromDate=<fromDate>&toDate=<toDate>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <fromDate>: Start date.

  • <toDate>: End date.

  • <apiKey>:This is your BrickControl API Key.

This method returns cost report

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/CostAnalysis/getActualCostReport?projectId=<projectId>&type=<type>&fromDate=<fromDate>&toDate=<toDate>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <type>: Type of resource: MAQ (Equipment), MAO (Labor), GGE (General Expenses), MAT (Materials), SUB (Subcontract), PAR (Manual Price)

  • <fromDate>: Start date.

  • <toDate>: End date.

  • <apiKey>:This is your BrickControl API Key.

This method returns variance report

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/CostAnalysis/getVarianceReport?projectId=<projectId>&divisionId=<divisionId>&taskId=<taskId>&type=<type>&fromDate=<fromDate>&toDate=<toDate>&apiKey=<apiKey>


- Parameters:

  • <projectId>: Project Id.

  • <divisionId>: Division Id.

  • <taskId>: Task Id.

  • <type>: Type of resource: MAQ (Equipment), MAO (Labor), GGE (General Expenses), MAT (Materials), SUB (Subcontract), PAR (Manual Price)

  • <fromDate>: Start date.

  • <toDate>: End date.

  • <apiKey>:This is your BrickControl API Key.


Items Web Service

This method returns items number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/countItems?searchText=<searchText>&active=<active>&type=<type>&apiKey=<apiKey>


- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <active>: Filter by active items (true / false).

  • <type>: Filter by type of items (PRODUCT / SERVICE / |NULL|).

  • <apiKey>:This is your BrickControl API Key.

This method returns a list of items

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getItems?searchText=<searchText>&active=<active>&type=<type>&begin=<begin>&end=<end>&apiKey=<apiKey>


- Parameters:

  • <searchText>: Filter the results by this parameter..

  • <active>: Filter by active items (true / false).

  • <type>: Filter by type of items (PRODUCT / SERVICE / |NULL|).

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.

This method returns a item

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getItem?itemCode=<itemCode>&apiKey=<apiKey>


- Parameters:

  • <itemCode>: Item Code.

  • <apiKey>:This is your BrickControl API Key.

This method saves a item in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.


This is the xml sample to save a item:


<WarehouseItem  z:Id="i1" xmlns="Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

<PersistenceState>Unchanged</PersistenceState>

<ItemId>0</ItemId>

<Code>ITEM API</Code>

<Name>Item Api de Prueba</Name>

<Description>Item Api de Prueba</Description>

<UnitOfMeasurementId>to</UnitOfMeasurementId>

<TaxId>18</TaxId>

<IsStock>true</IsStock>

<ControlledStock>true</ControlledStock>

<ItemFamilyId>1</ItemFamilyId>

<ItemFamilySubId>1</ItemFamilySubId>

<ItemClass1Id>0</ItemClass1Id>

<ItemClass1SubId>0</ItemClass1SubId>

<GeneralClassId>0</GeneralClassId>

<GeneralClassSubId>0</GeneralClassSubId>

<Active>true</Active>

<User>sl5@brickcontrol.com</User>

<CreationDate>2012-10-11T16:18:19</CreationDate>

</WarehouseItem>


This method deletes a item of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/delete?itemCode=<itemCode>&apiKey=<apiKey>

- Parameters:

  • <itemCode>: Item Code

  • <apiKey>:This is your BrickControl API Key.

Warehouse Web Service

This method returns warehouse number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/count?searchText=<searchText>&onlyWithMovement=<onlyWithMovement>&companyId=<companyId>&type=<type>&apiKey=<apiKey>


- Parameters:

  • <searchText>: Filter the results by this parameter..

  • <onlyWithMovement>: Filter by warehouse with movement.

  • <companyId>: Company Id.

  • <type>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project)

  • <apiKey>:This is your BrickControl API Key.

This method returns a list of warehouse

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getAll?searchText=<searchText>&onlyWithMovement=<onlyWithMovement>&companyId=<companyId>&type=<type>&begin=<begin>&end=<end>&apiKey=<apiKey>


- Parameters:

  • <searchText>: Filter the results by this parameter..

  • <onlyWithMovement>: Filter by warehouse with movement.

  • <companyId>: Company Id.

  • <type>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project)

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.

Stock Web Service

This method returns items number with stock

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/countStock?searchText=<searchText>&warehouseType=<warehouseType>&warehouseId=<warehouseId>&companyId=<companyId>&stockType=<stockType>&fromDate=<fromDate>&toDate=<toDate>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter..

  • <warehouseType>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project).

  • <warehouseId>: Warehouse Id.

  • <companyId>: Company Id.

  • <stockType>: Type of stock (ALL / WITH_STOCK / WITH_POSITIVE_STOCK / WITH_NEGATIVE_STOCK).

  • <fromDate>: Filter from date.

  • <toDate>: Filter to date.

  • <apiKey>:This is your BrickControl API Key.

This method returns items with stock

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getStock?searchText=<searchText>&warehouseType=<warehouseType>&warehouseId=<warehouseId>&companyId=<companyId>&stockType=<stockType>&fromDate=<fromDate>&toDate=<toDate>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter..

  • <warehouseType>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project).

  • <warehouseId>: Warehouse Id.

  • <companyId>: Company Id.

  • <stockType>: Type of stock (ALL / WITH_STOCK / WITH_POSITIVE_STOCK / WITH_NEGATIVE_STOCK).

  • <fromDate>: Filter from date.

  • <toDate>: Filter to date.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.

This method returns stock of a item

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getItemStock?itemId=<itemId>&toDate=<toDate>&stockZero=<stockZero>&apiKey=<apiKey>

- Parameters:

  • <itemId>: Item Code.

  • <toDate>: Filter to date.

  • <stockZero>: Show registers with Stock Zero.

  • <apiKey>:This is your BrickControl API Key.

This method returns transfers number of a item in a warehouse

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/countItemMovements?itemId=<itemId>&warehouseType=<warehouseType>&warehouseId=<warehouseId>&companyId=<companyId>&fromDate=<fromDate>&toDate=<toDate>&movementType=<movementType>&transactionType=<transactionType>&apiKey=<apiKey>


- Parameters:

  • <itemId>: Item Code.

  • <warehouseType>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project).

  • <warehouseId>: Warehouse Id.

  • <companyId>: Company Id.

  • <fromDate>: Filter from date.

  • <toDate>: Filter to date.

  • <movementType>: Type of transfer (ALL, INCOMING, OUTGOING, |NULL|)s.

  • <transactionType>: Type of transaction: FAC (Invoice), REM (Reception of materials), TRA (Material transfer), INV (Inventory), |NULL| (All).

  • <apiKey>:This is your BrickControl API Key.

This method returns transfers of a item in a warehouse

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getItemMovements?itemId=<itemId>&warehouseType=<warehouseType>&warehouseId=<warehouseId>&companyId=<companyId>&fromDate=<fromDate>&toDate=<toDate>&movementType=<movementType>&transactionType=<transactionType>&begin=<begin>&end=<end>&apiKey=<apiKey>


- Parameters:

  • <itemId>: Item Code.

  • <warehouseType>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project).

  • <warehouseId>: Warehouse Id.

  • <companyId>: Company Id.

  • <fromDate>: Filter from date.

  • <toDate>: Filter to date.

  • <movementType>: Type of transfer (ALL, INCOMING, OUTGOING, |NULL|)s.

  • <transactionType>: Type of transaction: FAC (Invoice), REM (Reception of materials), TRA (Material transfer), INV (Inventory), |NULL| (All).

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.

Inventory Web Service

This method returns inventories number in a warehouse

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/countInventories?warehouseType=<warehouseType>&warehouseId=<warehouseId>&companyId=<companyId>&searchText=<searchText>&fromDate=<fromDate>&toDate=<toDate>&inventoryType=<inventoryType>&apiKey=<apiKey>


- Parameters:

  • <warehouseType>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project).

  • <warehouseId>: Warehouse Id.

  • <companyId>: Company Id.

  • <searchText>: Filter the results by this parameter.

  • <fromDate>: Filter from date.

  • <toDate>: Filter to date.

  • <inventoryType>: Type of inventory: PAR (Partial), TOT (Total), |NULL| (All).

  • <apiKey>:This is your BrickControl API Key.


This method returns a list of inventories

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getInventories?warehouseType=<warehouseType>&warehouseId=<warehouseId>&companyId=<companyId>&searchText=<searchText>&fromDate=<fromDate>&toDate=<toDate>&inventoryType=<inventoryType>&begin=<begin>&end=<end>&apiKey=<apiKey>


- Parameters:

  • <warehouseType>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project).

  • <warehouseId>: Warehouse Id.

  • <companyId>: Company Id.

  • <searchText>: Filter the results by this parameter.

  • <fromDate>: Filter from date.

  • <toDate>: Filter to date.

  • <inventoryType>: Type of inventory: PAR (Partial), TOT (Total), |NULL| (All).

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.

This method returns a inventory

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/Warehouses/getInventory?warehouseType=<warehouseType>&warehouseId=<warehouseId>&companyId=<companyId>&date=<date>&inventoryId=<inventoryId>&apiKey=<apiKey>


- Parameters:

  • <warehouseType>: Type of warehouse: EMP (Company) / DEL (Location) / PRO (Project).

  • <warehouseId>: Warehouse Id.

  • <companyId>: Company Id.

  • <date>: Inventory Date.

  • <inventoryId>: Inventory Code.

  • <apiKey>:This is your BrickControl API Key.


Tax Web Service

This method returns tax regime number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/TaxRegime/count?searchText=<searchText>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.



This method returns a list of tax regime

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/TaxRegime/getList?searchText=<searchText>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a tax regime

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/TaxRegime/get?taxId=<taxId>&apiKey=<apiKey>

- Parameters:

  • <taxId>: Tax Id.

  • <apiKey>:This is your BrickControl API Key.


This method saves a tax regime in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/TaxRegime/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.



This method deletes a tax regime of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/TaxRegime/delete?taxId=<taxId>&apiKey=<apiKey>

- Parameters:

  • <taxId>: Tax Id.

  • <apiKey>:This is your BrickControl API Key.


Payment Methods Web Service

This method returns payment methods number of your BrickControl account

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PaymentMethod/count?searchText=<searchText>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <apiKey>:This is your BrickControl API Key.



This method returns a list of payment methods

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PaymentMethod/getList?searchText=<searchText>&begin=<begin>&end=<end>&apiKey=<apiKey>

- Parameters:

  • <searchText>: Filter the results by this parameter.

  • <begin>: Paging from this number.

  • <end>: Paging to this number (sample: if you put <begin>=1 and <end>=5, the method returns the first 5 registers).

  • <apiKey>:This is your BrickControl API Key.


This method returns a payment method

- Method: GET

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PaymentMethod/get?paymentMethodId=<paymentMethodId>&apiKey=<apiKey>

- Parameters:

  • <paymentMethodId>: Payment Method Id.

  • <apiKey>:This is your BrickControl API Key.


This method saves a payment method in BrickControl

- Method: POST

- URL:  https://brickcontrol.com/api/v1/BrickControlRest.svc/PaymentMethod/save?apiKey=<apiKey>

- Parameters:

  • <apiKey>:This is your BrickControl API Key.

- Content-Type: "application/xml"

- Body: Here you can insert an xml with the register data you want to save.



This method deletes a payment method of BrickControl

- Method: DELETE

- URL: https://brickcontrol.com/api/v1/BrickControlRest.svc/PaymentMethod/delete?paymentMethodId=<paymentMethodId>&apiKey=<apiKey>

- Parameters:

  • <paymentMethodId>: Payment Method Id.

  • <apiKey>:This is your BrickControl API Key.



Comments