Get Product Listing
Request
POST:/{accountBookId}/product/listing
Request Body
object: Product Listing Input Model
Example Request Body
Get product listing using a string filter
Available string filters for product records are productCategories
.
Add string filters in product listing filter input model according to your needs.
Example: Get product records with product category of type "Apparel".
{
"page": 1,
"filter": {
"productCategories": {
"multiSelect": [
"Apparel"
]
}
}
}
Get product listing using a product-specific filter
Available product-specific filters include productTypes
and statuses
.
Add these product-specific filters in product listing filter input model according to your needs.
Example: Get product records with "Inventory" product type only.
{
"page": 1,
"filter": {
"productTypes": {
"inventoryProduct": true,
"nonInventoryProduct": false,
"serviceProduct": false
}
}
}
Composite example:
{
"page": 1,
"filter": {
"productCategories": {
"multiSelect": [
"Apparel"
]
},
"productTypes": {
"inventoryProduct": true,
"nonInventoryProduct": false,
"serviceProduct": false
}
}
}
Example Request URL:
Parameters:accountBookId
= 1 URL:
POST: https://accounting-api.autocountcloud.com/1/product/listing
Response
Success Response
Status Code: 200
Response Body
Field | Description | Type |
---|---|---|
data | Response data. | array[Product View Model] |
totalCount | Number of records retrieved. | number |
Example Success Response Body
{
"data": [
{
"product": {
"productId": 5,
"productCode": "P-00001",
"productName": "Shirt",
"productName2": "",
"productType": "I",
"unit": "hoodies",
"price": 350.00000000,
"minPrice": 350.00000000,
"cost": 200.00000000,
"productCategoryName": "Apparel",
"postingGroup": "Default",
"supplyTaxCode": "S-5",
"purchaseTaxCode": "P-5",
"tariffCode": "40159000",
"status": "A",
"image": null,
"furtherDescription": "",
"note": "",
"stockCode": "P-00001",
"supplier": "400-0001",
"variant1Name": "",
"variant2Name": "",
"barCode": "",
"classificationCode": null,
"unitType": null,
"cannotConsolidateInvoice": false
},
"productVariant1Options": [],
"productVariant2Options": [],
"productVariants": []
},
{
"product": {
"productId": 11,
"productCode": "P-00002",
"productName": "Pants",
"productName2": "",
"productType": "I",
"unit": "pairs",
"price": 450.00000000,
"minPrice": 450.00000000,
"cost": 300.00000000,
"productCategoryName": "Apparel",
"postingGroup": "Default",
"supplyTaxCode": "S-5",
"purchaseTaxCode": "P-5",
"tariffCode": "40159000",
"status": "A",
"image": null,
"furtherDescription": "",
"note": "",
"stockCode": "P-00002",
"supplier": "400-0001",
"variant1Name": "",
"variant2Name": "",
"barCode": "",
"classificationCode": null,
"unitType": null,
"cannotConsolidateInvoice": false
},
"productVariant1Options": [],
"productVariant2Options": [],
"productVariants": []
},
{
"product": {
"productId": 542,
"productCode": "P-00003",
"productName": "Coat",
"productName2": "",
"productType": "I",
"unit": "coats",
"price": 300.00000000,
"minPrice": 300.00000000,
"cost": 100.00000000,
"productCategoryName": "Apparel",
"postingGroup": "Default",
"supplyTaxCode": "S-5",
"purchaseTaxCode": "P-5",
"tariffCode": "40159000",
"status": "A",
"image": null,
"furtherDescription": "",
"note": "",
"stockCode": "P-00003",
"supplier": null,
"variant1Name": "",
"variant2Name": "",
"barCode": "",
"classificationCode": null,
"unitType": null,
"cannotConsolidateInvoice": false
},
"productVariant1Options": [],
"productVariant2Options": [],
"productVariants": []
},
{
"product": {
"productId": 612,
"productCode": "P-00009",
"productName": "Hoodie",
"productName2": "",
"productType": "I",
"unit": "hoodies",
"price": 350.00000000,
"minPrice": 350.00000000,
"cost": 200.00000000,
"productCategoryName": "Apparel",
"postingGroup": "Default",
"supplyTaxCode": "S-5",
"purchaseTaxCode": "P-5",
"tariffCode": "40159000",
"status": "A",
"image": null,
"furtherDescription": "",
"note": "",
"stockCode": null,
"supplier": "400-0001",
"variant1Name": "Colour",
"variant2Name": "Size",
"barCode": null,
"classificationCode": null,
"unitType": null,
"cannotConsolidateInvoice": false
},
"productVariant1Options": [
{
"productVariantOptionId": 113,
"variantIndex": 1,
"variantOption": "Blue",
"image": null
},
{
"productVariantOptionId": 114,
"variantIndex": 1,
"variantOption": "Green",
"image": null
},
{
"productVariantOptionId": 115,
"variantIndex": 1,
"variantOption": "Red",
"image": null
}
],
"productVariant2Options": [
{
"productVariantOptionId": 116,
"variantIndex": 2,
"variantOption": "Large",
"image": null
},
{
"productVariantOptionId": 117,
"variantIndex": 2,
"variantOption": "Medium",
"image": null
},
{
"productVariantOptionId": 118,
"variantIndex": 2,
"variantOption": "Small",
"image": null
}
],
"productVariants": [
{
"productVariantId": 122,
"productVariant1OptionName": "Blue",
"productVariant2OptionName": "Large",
"price": 400.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Blue-Large",
"barCode": null,
"image": null
},
{
"productVariantId": 123,
"productVariant1OptionName": "Blue",
"productVariant2OptionName": "Medium",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Blue-Medium",
"barCode": null,
"image": null
},
{
"productVariantId": 124,
"productVariant1OptionName": "Blue",
"productVariant2OptionName": "Small",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Blue-Small",
"barCode": null,
"image": null
},
{
"productVariantId": 125,
"productVariant1OptionName": "Green",
"productVariant2OptionName": "Large",
"price": 400.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Green-Large",
"barCode": null,
"image": null
},
{
"productVariantId": 126,
"productVariant1OptionName": "Green",
"productVariant2OptionName": "Medium",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Green-Medium",
"barCode": null,
"image": null
},
{
"productVariantId": 127,
"productVariant1OptionName": "Green",
"productVariant2OptionName": "Small",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Green-Small",
"barCode": null,
"image": null
},
{
"productVariantId": 128,
"productVariant1OptionName": "Red",
"productVariant2OptionName": "Large",
"price": 400.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Red-Large",
"barCode": null,
"image": null
},
{
"productVariantId": 129,
"productVariant1OptionName": "Red",
"productVariant2OptionName": "Medium",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Red-Medium",
"barCode": null,
"image": null
},
{
"productVariantId": 130,
"productVariant1OptionName": "Red",
"productVariant2OptionName": "Small",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00009-Red-Small",
"barCode": null,
"image": null
}
]
}
],
"totalCount": 4
}
Error Response
Response Body
object: Error Response Model
Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}