Get Product
Request
GET:/{accountBookId}/product
Request Parameters
Parameter | Description | Type | |
---|---|---|---|
code | Product code. | string | required |
Example Request URL:
Parameters:accountBookId
= 1 code
= P-00001 URL:
GET: https://accounting-api.autocountcloud.com/1/product?code=P-00001
Response
Success Response
Status Code: 200
Response Body
object: Product View Model
Example Success Response Body
{
"product": {
"productId": 612,
"productCode": "P-00001",
"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-00001-Blue-Large",
"barCode": null,
"image": null
},
{
"productVariantId": 123,
"productVariant1OptionName": "Blue",
"productVariant2OptionName": "Medium",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Blue-Medium",
"barCode": null,
"image": null
},
{
"productVariantId": 124,
"productVariant1OptionName": "Blue",
"productVariant2OptionName": "Small",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Blue-Small",
"barCode": null,
"image": null
},
{
"productVariantId": 125,
"productVariant1OptionName": "Green",
"productVariant2OptionName": "Large",
"price": 400.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Green-Large",
"barCode": null,
"image": null
},
{
"productVariantId": 126,
"productVariant1OptionName": "Green",
"productVariant2OptionName": "Medium",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Green-Medium",
"barCode": null,
"image": null
},
{
"productVariantId": 127,
"productVariant1OptionName": "Green",
"productVariant2OptionName": "Small",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Green-Small",
"barCode": null,
"image": null
},
{
"productVariantId": 128,
"productVariant1OptionName": "Red",
"productVariant2OptionName": "Large",
"price": 400.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Red-Large",
"barCode": null,
"image": null
},
{
"productVariantId": 129,
"productVariant1OptionName": "Red",
"productVariant2OptionName": "Medium",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Red-Medium",
"barCode": null,
"image": null
},
{
"productVariantId": 130,
"productVariant1OptionName": "Red",
"productVariant2OptionName": "Small",
"price": 350.00000000,
"minPrice": 350.00000000,
"stockCode": "P-00001-Red-Small",
"barCode": null,
"image": null
}
]
}
Error Response
Response Body
object: Error Response Model
Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}