URL | https://www10.versaccounts.com/v1/product |
Supported Methods | GET |
Description | Returns a firm's Products |
Accepted Query Formats
GET /product[.format] | retrieve all products |
GET /product/1[.format] | retrieve product with ID = 1 |
GET /product[.format]?part_number=1 | retrieve all products with related part_number=1 |
GET /product[.format]?product_name=Test | retrieve all products with name=Test |
POST/product[.format] | create a product, post example below |
Examples
Create a single product in JSON format:
curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" -d '{product: {"name": "Test", "product_comment":"Comment","firm_id":1802,"product_category_id":28572 "product_service_flag":true,"measurement_unit_id":14410}}' -X POST https://www10.versaccounts.com/v1/product
Create a single product with part in JSON format:
curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" -d '{ part: { :part_number => "ACT-009", :description => "Test", :notes => "Test", :measurement_unit_id => 14410, :firm_id => 1802, :gl_account_id => 60190, :batch_measurement_unit_id => 14410, :batch_quantity => 1, :products_attributes => [ { :name => "Test", :product_comment => "Comment", :firm_id => 1802, :product_category_id => 28572, :product_service_flag => true, :measurement_unit_id => 14410 } ] } }' -X POST https://www10.versaccounts.com/v1/product
Create a single product with part and approved vendor in JSON format:
curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" -d '{ part: { :part_number => "ACT-009", :description => "Test", :notes => "Test", :measurement_unit_id => 14410, :firm_id => 1802, :gl_account_id => 60190, :batch_measurement_unit_id => 14410, :batch_quantity => 1, :products_attributes => [ { :name => "Test", :product_comment => "Comment", :firm_id => 1802, :product_category_id => 28572, :product_service_flag => true, :measurement_unit_id => 14410 } ], :approved_vendors_attributes => [ { :supplier_id => 508, :currency_id => 1, :supplier_part_number => "VOES-101", :mpq_measurement_unit_id => 1358, :minimum_order_quantity => 1001, :lead_time => 30, :lead_time_unit_id => 1362, :mpq_cost => 10.00, :avl_comment => "Test", :firm_id => 182, :internal_organization_id => 182 } ] } }' -X POST https://www10.versaccounts.com/v1/product
Retrieve a single product in JSON format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://www10.versaccounts.com/v1/product/1300.xml
Retrieve a single product in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://www10.versaccounts.com/v1/product/1300.xml
Retrieve all products from specific part number in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://www10.versaccounts.com/v1/product.xml?part_number=1
Retrieve all products from specific name in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://www1.versaccounts.com/v1/product.xml?part_number=1
Retrieve quantity on hand and quantity available from a single product in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://www10.versaccounts.com/v1/product/1300/quantities.xml
Retrieve all products in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://www10.versaccounts.com/v1/product.xml
<?xml version="1.0" encoding="UTF-8"?> <products type="array"> <product> <id type="integer">1300</id> <name>CBL-215-08.0</name> <practical-name>CBL-215-08.0 / Corbel - 8"H x 6"D x 17.5"L</practical-name> <comment>Corbel - 8"H x 6"D x 17.5"L</comment> <default-measurement-unit>EA</default-measurement-unit> <offering-type>product</offering-type> <inventoried type="boolean">false</inventoried> <related-part nil="true"></related-part> <pricing-policies type="array"> <pricing-policy> <measurement-unit-id type="integer">1191</measurement-unit-id> <break-quantity type="integer">1</break-quantity> <currency-id type="integer">2</currency-id> <measurement-unit-name>EA</measurement-unit-name> <currency-name>United States dollar</currency-name> <price>18.58</price> </pricing-policy> <pricing-policy> <measurement-unit-id type="integer">1191</measurement-unit-id> <break-quantity type="integer">1</break-quantity> <currency-id type="integer">1</currency-id> <measurement-unit-name>EA</measurement-unit-name> <currency-name>Canadian dollar</currency-name> <price>34.37</price> </pricing-policy> </pricing-policies> </product> ... <product> <id type="integer">1301</id> <name>CBL-014-04.4</name> <practical-name>CBL-014-04.4 / Corbel - 4"H X 4"D X 13"L</practical-name> <comment>Corbel - 4"H X 4"D X 13"L</comment> <default-measurement-unit>EA</default-measurement-unit> <offering-type>product</offering-type> <inventoried type="boolean">false</inventoried> <related-part nil="true"></related-part> <pricing-policies type="array"> <pricing-policy> <measurement-unit-id type="integer">1191</measurement-unit-id> <break-quantity type="integer">1</break-quantity> <currency-id type="integer">1</currency-id> <measurement-unit-name>EA</measurement-unit-name> <currency-name>Canadian dollar</currency-name> <price>15.24</price> </pricing-policy> <pricing-policy> <measurement-unit-id type="integer">1191</measurement-unit-id> <break-quantity type="integer">1</break-quantity> <currency-id type="integer">2</currency-id> <measurement-unit-name>EA</measurement-unit-name> <currency-name>United States dollar</currency-name> <price>8.24</price> </pricing-policy> </pricing-policies> </product> </products>
Comments and Suggestions
0 comments
Please sign in to leave a comment.
Related articles