Show product
get
/api/v1/products/{id}
Security
Parameters
| Name | In | Type | Details | |
|---|---|---|---|---|
id |
path |
integer
|
required | Resource ID |
Responses
200
Product detail
application/json
{
"allOf": [
{
"title": "API envelope",
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string",
"nullable": true
},
"errors": {
"nullable": true
},
"meta": {
"type": "object",
"nullable": true,
"additionalProperties": true
}
}
},
{
"type": "object",
"properties": {
"data": {
"title": "Product",
"type": "object",
"description": "Product in list/show/create/update responses.",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"categories_id": {
"type": "integer",
"nullable": true
},
"description": {
"type": "string",
"nullable": true
},
"storage_location": {
"type": "string",
"nullable": true
},
"ean": {
"type": "string",
"nullable": true
},
"manufacturer_number": {
"type": "string",
"nullable": true
},
"article_number": {
"type": "string",
"nullable": true
},
"assembly_instructions": {
"type": "string",
"nullable": true
},
"avg_bought_price": {
"type": "number",
"nullable": true
},
"selling_price": {
"type": "number",
"nullable": true
},
"gross_profit": {
"type": "number",
"nullable": true
},
"stock": {
"type": "integer",
"nullable": true
},
"tax_percentage": {
"type": "number",
"nullable": true
},
"unit_id": {
"type": "integer",
"nullable": true
},
"created_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"category": {
"oneOf": [
{
"title": "Category",
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
{
"type": "null"
}
]
},
"unit": {
"oneOf": [
{
"title": "Unit",
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"abbreviation": {
"type": "string",
"nullable": true
},
"german_unit_name": {
"type": "string",
"nullable": true
}
}
},
{
"type": "null"
}
]
},
"image": {
"oneOf": [
{
"title": "Product file",
"type": "object",
"required": [
"id",
"name",
"url"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string",
"nullable": true
},
"size": {
"type": "integer",
"nullable": true
}
}
},
{
"type": "null"
}
]
},
"files": {
"type": "array",
"items": {
"title": "Product file",
"type": "object",
"required": [
"id",
"name",
"url"
],
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"type": {
"type": "string",
"nullable": true
},
"size": {
"type": "integer",
"nullable": true
}
}
}
}
}
}
}
}
]
}
401
Missing or invalid API key
application/json
{
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string",
"example": "Missing API key (X-Api-Key)"
}
}
}
404
Resource not found
application/json
{
"title": "API envelope",
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string",
"nullable": true
},
"errors": {
"nullable": true
},
"meta": {
"type": "object",
"nullable": true,
"additionalProperties": true
}
}
}