Skip to main content

Get Product

Getting Product Details​

Contents​

Overview​

  • Call name: get-product
  • Endpoint URL: https://{API hostname}/internal/get-product
  • Request methods: GET
  • Request Content-Type: application/x-www-form-urlencoded
  • Response Content-Type: application/json
  • Auth required: yes

This endpoint retrieves detailed information about a specific product, including its variants, pricing, and metadata. The response includes basic product information, associated product variants, and timestamps.

Version-specific information​

The following version-specific changes apply to this endpoint. See the versioning page for more details.

VersionChange details
1.4.4New response format introduced with additional fields and restructured product variant information

Permissions and Authentication​

This API call requires admin authentication:

  • The performing user must be logged in and have READ access to the chain that owns the product
  • User and privileged authentication methods are not permitted for this endpoint

Headers​

Standard headers are used for this endpoint. No special headers are required.

HTTP Parameters​

The following HTTP parameters can be passed to the API:

ParameterDescription
id(integer, mandatory) The unique identifier of the product to retrieve
chain_id(integer, mandatory) The ID of the chain that owns the product

Sample request​

GET /internal/get-product?id=5&chain_id=1 HTTP/1.1

Sample response​

{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"product": {
"id": 5,
"owner_code": "00024003",
"entity": {
"entity_type": "chain",
"entity_id": 1,
"entity_name": "FOO Chain, inc.",
"entity_email_address": null,
"entity_phone_number": null
},
"name": "Men's Merino Aran Jumper",
"description": "The Aran Jumper is a style of jumper that takes its name from the Aran Islands off the west coast of Ireland.",
"price": 99.95,
"cost_price": 79.95,
"manufacturer": "Aran Knitwear Co.",
"private_label": false,
"listing_source": null,
"brand": "Aran Brands Inc.",
"season": null,
"category": null,
"webshop_url": "https://www.shop.spaaza.com/images/arran.jpg",
"unit": "item",
"image_url": "https://www.spaaza.com/images/arran.jpg",
"product_variants": [
{
"id": 3,
"condition": "new",
"colour": "blue",
"barcode": [
{
"id": 3,
"barcode": "2000042436020",
"deleted": false
}
],
"size": "M",
"price": 99.95,
"cost_price": 79.95,
"image_url": "https://www.spaaza.com/images/blue_arran.jpg",
"web_url": "https://www.shop.spaaza.com/images/blue_arran.jpg",
"last_modified_date": "2025-01-24T12:00:00+00:00",
"created_date": "2025-01-24T12:00:00+00:00"
}
],
"last_modified_date": "2025-01-24T12:00:00+00:00",
"created_date": "2025-01-24T12:00:00+00:00"
},
"result_type": "get-product"
}
}

Possible error responses​

CodeName and DescriptionHTTP Status Code
3parameter_missing
The required id parameter is missing
400
6no_valid_session
The user needs to be logged in and a valid session key needs to be sent
401
68permission_denied_or_non_existent
This user has insufficient permissions for this object or the object does not exist
403
90product_not_found
No record has been found for that product_id
404
330server_error
Unexpected server error
500