Retrieve a given product by id
  • 06 Sep 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Retrieve a given product by id

  • Dark
    Light

Article summary

Get
/products/{id}

Retrieve a given product by id

Security
HTTP
Type bearer
Path parameters
id
stringRequired

The id of the product to retrieve

Responses
200

Product with matching id

Expand All
object
id
string

The unique identifier for the product

title
string

The title of the product

description
string

The description of the product

thumbnail
object (1.0.0_Image)
url
string

The URL to the image

altText
string

The alt text for the image

listPrice
integer

The price of the product, in the currency of the merchant's account and in minor denomination (e.g. pence, cents, etc.)

sku
string

The Stock Keeping Unit (SKU) for the product

createdAt
string

The date and time the product was created, in ISO 8601 format

updatedAt
string

The date and time the product was last updated, in ISO 8601 format

meta
object (1.0.0_MetadataBlock)

Block that allows for the arbitary passing of metadata alongside an entity

property*

Can be any value - string, number, boolean, array or object

400

Invalid request

Expand All
object

Response body, based upon RFC-9457 specification, for 400 error codes

type
string
Valid values[ "\"http://bento-gousto.com/api-docs/invalid-request\"" ]
title
string
status
number
Valid values[ "\"401\"" ]
errors
Array of object

Array contain the reason(s) for why the request being invalid

object
title
string

Short human readable explaination for the violation

detail
string

JSON string containing a human-readable explanation specific to this occurrence of the problem.

Consumers should not parse this property to extract information, but instead should rely on extension properties.

401

Invalid authentication token

object

Response body, based upon RFC-9457 specification, for 401 error codes

type
string
Valid values[ "\"http://bento-gousto.com/api-docs/unauthorised\"" ]
title
string
Valid values[ "\"No authorisation token provided\"", "\"Unauthorised token provided\"" ]
status
number
Valid values[ "\"401\"" ]
403

Invalid authorization permissions

object

Response body, based upon RFC-9457 specification, for 403 error codes

type
string
Valid values[ "\"http://bento-gousto.com/api-docs/forbidden\"" ]
title
string
Valid values[ "\"Invalid permissions for request\"" ]
status
number
Valid values[ "\"403\"" ]
404

Product not found

object

Response body, based upon RFC-9457 specification, for 404 error codes

type
string
Valid values[ "\"http://bento-gousto.com/api-docs/entity-not-found\"" ]
title
string
Valid values[ "\"Entity not found\"" ]
status
number
Valid values[ "\"404\"" ]
500

Internal server error

object

Error response body, as defined in RFC-9457. Please refer to the specification for more detail on each of the properties.

Other properties can be provided, Extensions, to provide more detailed information for consumers, such as balance in a credit based error.

type
string (uri)

URI reference that identifies the problem type, which consumer must use as the problem type's primrary identifier.

Relative URI's can be used; however, fully qualified URI's are preferred to avoid confusion, as implementations may not handle relative URIs correctly.

status
number

HTTP status code generated by the origin server.

This value, if provided, should match the HTTP status code sent by the server. But this disagree on the consumer, due to intermediaries such as proxies and caches.

title
string

Short, human-readable summary of the problem type

detail
string

JSON string containing a human-readable explanation specific to this occurrence of the problem.

Consumers should not parse this property to extract information, but instead should rely on extension properties.

instance
string (uri)

JSON string containing a URI reference that identifies the specific occurrence of the problem.


Was this article helpful?