Add a stock to a product
Creates a Product Stock resource.
Authorizations:Token, JWT
Query Parameters
product_id required | integer>= 1Example: 73 |
Request Body Schema:
The new Product Stock resource location_id | integer>= 1Example: 2 |
type | stringEnum: "available" Example: "available" |
amount | numberExample: 105 |
Responses
201Product Stock resource created
Response schema:
Product Stock resource created location_id | integer>= 1Example: 2 |
type | stringEnum: "available" Example: "available" |
amount | numberExample: 105 |
id | integer or null>= 1 |
400Invalid input
401Unauthorized
Response schema:
Unauthorized type | stringExample: "https://tools.ietf.org/html/rfc2616#section-10" |
title | stringExample: "An error occurred" |
detail | string or nullExample: "Cannot find entity" |
instance | string or null |
422Unprocessable entity
500Internal error
Response schema:
Internal error type | stringExample: "https://tools.ietf.org/html/rfc2616#section-10" |
title | stringExample: "An error occurred" |
detail | string or nullExample: "Cannot find entity" |
instance | string or null |