| URL | https://api_url/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 -H 'Content-Type: application/json' \
-H "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://api_url/v1/product
Create a single product with part in JSON format:
curl -i -H 'Content-Type: application/json' \
-H "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://api_url/v1/product
Create a single product with part and approved vendor in JSON format:
curl -i -H "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" \
-H 'Content-Type: application/json' \
-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://api_url/v1/product
Retrieve a single product in JSON format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://api_url/v1/product/1300.json
Response
[
{
"product": {
"id": 215794,
"name": "",
"practical_name": "5858 / Grey Weathered Side Table",
"hidden": false,
"notes": null,
"created_at": "2021-05-14 22:24:42 UTC",
"updated_at": "2021-07-01 15:21:02 UTC",
"default_measurement_unit": "EA",
"offering_type": "product",
"inventoried": true,
"custom_field_values": {
"Excursions": " ",
"Accomodation/Boat": " "
},
"quantities": [
{
"facility_id": 1213,
"facility_code": "COP",
"quantity_on_hand": "0.0",
"quantity_available": "0.0"
},
{
"facility_id": 1509,
"facility_code": "Dropship",
"quantity_on_hand": "0.0",
"quantity_available": "0.0"
},
{
"facility_id": 1214,
"facility_code": "NMP",
"quantity_on_hand": "0.0",
"quantity_available": "0.0"
},
{
"facility_id": 1308,
"facility_code": "OVT",
"quantity_on_hand": "0.0",
"quantity_available": "0.0"
},
{
"facility_id": 1369,
"facility_code": "Trolley",
"quantity_on_hand": "0.0",
"quantity_available": "0.0"
},
{
"facility_id": 1150,
"facility_code": "TX",
"quantity_on_hand": "0.0",
"quantity_available": "0.0"
},
{
"facility_id": 1149,
"facility_code": "WHS",
"quantity_on_hand": "3.0",
"quantity_available": "3.0"
}
],
"product_category": {
"id": 4344,
"name": "Casual",
"for_purchase": true,
"for_sale": true,
"created_at": "2020-01-24 00:27:13 UTC",
"updated_at": "2021-09-29 23:24:24 UTC",
"gl_account": {
"name": "Purchases/cost of materials",
"description": null,
"currency_id": null
}
},
"pricing_basis_type": {
"name": "List Pricing",
"description": "Prices are based on an explicit price list."
},
"related_part": {
"part_number": "5858",
"description": "Grey Weathered Side Table",
"created_at": "2021-05-14 22:24:42 UTC",
"updated_at": "2021-05-17 22:54:09 UTC",
"custom_field_values": {
"Cable Type Custom Field": " ",
"cable type custom field": " ",
"Size": " ",
"Color": " ",
"Ean": " ",
"Hts Code": " ",
"Msrp": " ",
"Vendor": " ",
"option1": "Grey Weathered Side Table",
"option2": " ",
"option3": " "
},
"custom_fields": [
{
"custom_field": {
"field_name": "Cable Type Custom Field",
"enable": true,
"private": true,
"required": false
}
},
{
"custom_field": {
"field_name": "cable type custom field",
"enable": true,
"private": false,
"required": false
}
},
{
"custom_field": {
"field_name": "Size",
"enable": true,
"private": true,
"required": false
}
},
{
"custom_field": {
"field_name": "Color",
"enable": true,
"private": true,
"required": false
}
},
{
"custom_field": {
"field_name": "Ean",
"enable": true,
"private": true,
"required": false
}
},
{
"custom_field": {
"field_name": "Hts Code",
"enable": true,
"private": true,
"required": false
}
},
{
"custom_field": {
"field_name": "Msrp",
"enable": true,
"private": false,
"required": false
}
},
{
"custom_field": {
"field_name": "Vendor",
"enable": true,
"private": false,
"required": false
}
},
{
"custom_field": {
"field_name": "option1",
"enable": true,
"private": false,
"required": false
}
},
{
"custom_field": {
"field_name": "option2",
"enable": true,
"private": false,
"required": false
}
},
{
"custom_field": {
"field_name": "option3",
"enable": true,
"private": false,
"required": false
}
}
]
},
"pricing_policies": [
{
"pricing_policy": {
"measurement_unit_id": 4641,
"break_quantity": 5,
"currency_id": 2,
"comment": null,
"measurement_unit_name": "EA",
"currency_name": "United States dollar",
"currency_code": "USD",
"price": "800.0000",
"customer_bill_to": null,
"supplier": {
"id": 12993,
"active": true,
"created_on": "2020-01-24 06:12:19 UTC",
"updated_on": "2021-08-10 22:52:08 UTC",
"party": {
"id": 395884,
"created_on": "2020-01-24 06:12:18 UTC",
"updated_on": "2021-07-06 17:56:16 UTC",
"company_name": "Across Country Transport",
"surname": "",
"given_name": "",
"address_line_1": "Division of 891015 Ontario Limited",
"address_line_2": "4641 Falletta Court",
"address_line_3": "",
"postal_zip_code": "L0R 1B4",
"contact_number_1": "800-565-3634",
"contact_number_2": "",
"email": "katie@act.com",
"province_state": "Ontario",
"city": "BEAMSVILLE",
"country": "Canada",
"practical_name": "Across Country Transport"
}
},
"dimension_taggings": [
]
}
},
{
"pricing_policy": {
"measurement_unit_id": 4641,
"break_quantity": 1,
"currency_id": 2,
"comment": "",
"measurement_unit_name": "EA",
"currency_name": "United States dollar",
"currency_code": "USD",
"price": "1200.0000",
"customer_bill_to": null,
"supplier": null,
"dimension_taggings": [
]
}
}
],
"dimension_taggings": [
],
"custom_fields": [
{
"custom_field": {
"field_name": "Excursions",
"enable": true,
"private": false,
"required": false
}
},
{
"custom_field": {
"field_name": "Accomodation/Boat",
"enable": true,
"private": false,
"required": false
}
}
]
}
}
]
Retrieve a single product in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://api_url/v1/product/1300.xml
<?xml version="1.0" encoding="UTF-8"?>
<products type="array">
<product>
<id type="integer">215794</id>
<name></name>
<practical-name>5858 / Grey Weathered Side Table</practical-name>
<hidden type="boolean">false</hidden>
<notes nil="true"/>
<created-at type="dateTime">2021-05-14T22:24:42Z</created-at>
<updated-at type="dateTime">2021-07-01T15:21:02Z</updated-at>
<default-measurement-unit>EA</default-measurement-unit>
<offering-type>product</offering-type>
<inventoried type="boolean">true</inventoried>
<custom-field-values>
<Excursions> </Excursions>
<Accomodation/Boat> </Accomodation/Boat>
</custom-field-values>
<quantities type="array">
<quantity>
<facility-id type="integer">1213</facility-id>
<facility-code>COP</facility-code>
<quantity-on-hand type="decimal">0.0</quantity-on-hand>
<quantity-available type="decimal">0.0</quantity-available>
</quantity>
<quantity>
<facility-id type="integer">1509</facility-id>
<facility-code>Dropship</facility-code>
<quantity-on-hand type="decimal">0.0</quantity-on-hand>
<quantity-available type="decimal">0.0</quantity-available>
</quantity>
<quantity>
<facility-id type="integer">1214</facility-id>
<facility-code>NMP</facility-code>
<quantity-on-hand type="decimal">0.0</quantity-on-hand>
<quantity-available type="decimal">0.0</quantity-available>
</quantity>
<quantity>
<facility-id type="integer">1308</facility-id>
<facility-code>OVT</facility-code>
<quantity-on-hand type="decimal">0.0</quantity-on-hand>
<quantity-available type="decimal">0.0</quantity-available>
</quantity>
<quantity>
<facility-id type="integer">1369</facility-id>
<facility-code>Trolley</facility-code>
<quantity-on-hand type="decimal">0.0</quantity-on-hand>
<quantity-available type="decimal">0.0</quantity-available>
</quantity>
<quantity>
<facility-id type="integer">1150</facility-id>
<facility-code>TX</facility-code>
<quantity-on-hand type="decimal">0.0</quantity-on-hand>
<quantity-available type="decimal">0.0</quantity-available>
</quantity>
<quantity>
<facility-id type="integer">1149</facility-id>
<facility-code>WHS</facility-code>
<quantity-on-hand type="decimal">3.0</quantity-on-hand>
<quantity-available type="decimal">3.0</quantity-available>
</quantity>
</quantities>
<product-category>
<id type="integer">4344</id>
<name>Casual</name>
<for-purchase type="boolean">true</for-purchase>
<for-sale type="boolean">true</for-sale>
<created-at type="dateTime">2020-01-24T00:27:13Z</created-at>
<updated-at type="dateTime">2021-09-29T23:24:24Z</updated-at>
<gl-account>
<name>Purchases/cost of materials</name>
<description nil="true"/>
<currency-id nil="true"/>
</gl-account>
</product-category>
<pricing-basis-type>
<name>List Pricing</name>
<description>Prices are based on an explicit price list.</description>
</pricing-basis-type>
<related-part>
<part-number>5858</part-number>
<description>Grey Weathered Side Table</description>
<created-at type="dateTime">2021-05-14T22:24:42Z</created-at>
<updated-at type="dateTime">2021-05-17T22:54:09Z</updated-at>
<custom-field-values>
<Cable-Type-Custom-Field> </Cable-Type-Custom-Field>
<cable-type-custom-field> </cable-type-custom-field>
<Size> </Size>
<Color> </Color>
<Ean> </Ean>
<Hts-Code> </Hts-Code>
<Msrp> </Msrp>
<Vendor> </Vendor>
<option1>Grey Weathered Side Table</option1>
<option2> </option2>
<option3> </option3>
</custom-field-values>
<custom-fields type="array">
<custom-field>
<field-name>Cable Type Custom Field</field-name>
<enable type="boolean">true</enable>
<private type="boolean">true</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>cable type custom field</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>Size</field-name>
<enable type="boolean">true</enable>
<private type="boolean">true</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>Color</field-name>
<enable type="boolean">true</enable>
<private type="boolean">true</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>Ean</field-name>
<enable type="boolean">true</enable>
<private type="boolean">true</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>Hts Code</field-name>
<enable type="boolean">true</enable>
<private type="boolean">true</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>Msrp</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>Vendor</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>option1</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>option2</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>option3</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
</custom-fields>
</related-part>
<pricing-policies type="array">
<pricing-policy>
<measurement-unit-id type="integer">4641</measurement-unit-id>
<break-quantity type="integer">5</break-quantity>
<currency-id type="integer">2</currency-id>
<comment nil="true"/>
<measurement-unit-name>EA</measurement-unit-name>
<currency-name>United States dollar</currency-name>
<currency-code>USD</currency-code>
<price>800.0000</price>
<customer-bill-to nil="true"/>
<supplier>
<id type="integer">12993</id>
<active type="boolean">true</active>
<created-on type="dateTime">2020-01-24T06:12:19Z</created-on>
<updated-on type="dateTime">2021-08-10T22:52:08Z</updated-on>
<party>
<id type="integer">395884</id>
<created-on type="dateTime">2020-01-24T06:12:18Z</created-on>
<updated-on type="dateTime">2021-07-06T17:56:16Z</updated-on>
<company-name>Across Country Transport</company-name>
<surname></surname>
<given-name></given-name>
<address-line-1>Division of 891015 Ontario Limited</address-line-1>
<address-line-2>4641 Falletta Court</address-line-2>
<address-line-3></address-line-3>
<postal-zip-code>L0R 1B4</postal-zip-code>
<contact-number-1>800-565-3634</contact-number-1>
<contact-number-2></contact-number-2>
<email>katie@act.com</email>
<province-state>Ontario</province-state>
<city>BEAMSVILLE</city>
<country>Canada</country>
<practical-name>Across Country Transport</practical-name>
</party>
</supplier>
<dimension-taggings type="array"/>
</pricing-policy>
<pricing-policy>
<measurement-unit-id type="integer">4641</measurement-unit-id>
<break-quantity type="integer">1</break-quantity>
<currency-id type="integer">2</currency-id>
<comment></comment>
<measurement-unit-name>EA</measurement-unit-name>
<currency-name>United States dollar</currency-name>
<currency-code>USD</currency-code>
<price>1200.0000</price>
<customer-bill-to nil="true"/>
<supplier nil="true"/>
<dimension-taggings type="array"/>
</pricing-policy>
</pricing-policies>
<dimension-taggings type="array"/>
<custom-fields type="array">
<custom-field>
<field-name>Excursions</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
<custom-field>
<field-name>Accomodation/Boat</field-name>
<enable type="boolean">true</enable>
<private type="boolean">false</private>
<required type="boolean">false</required>
</custom-field>
</custom-fields>
</product>
</products>
Retrieve all products from specific part number in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://api_url/v1/product.xml?part_number=1
Retrieve all products from specific name in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://api_url/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://api_url/v1/product/1300/quantities.xml
Retrieve all products in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:409696900e0b3f5a4297e3cd5823f734f0095e66" https://api_url/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