V1 and V2Products (V1)

Update a related product

PATCH
/api/v1/products/{product_id}/relationships/{relationship_id}/product/{related_product_id}

Modify selected relationship attributes

Current version of the API only allows the modification of the 'quantity' attribute. A 200 OK status code will be returned upon successful call

Request format

fieldtypedescription
quantitynumbernew value, must be a positive integer

Response format

Successful responses will be returned in "data" array and will be in the form:

fieldtypedescription
product_idstringrelated product identifier
quantitynumbercurrent quantity
last_modifieddatelast modification date

Example Request and Response:

Request:{	"quantity":11}Response{  "data": [    {      "last_modified": "2019-09-27T06:50:07.851682+00:00",       "product_id": "5d8cf911bde76bea4e2eff13",       "quantity": 11    }  ]}

Authorization

bearerAuth
AuthorizationBearer <token>

Obtain a token via POST /auth/api/get-token (15 minute lifetime), then send it as Authorization: Bearer <token>.

In: header

Path Parameters

product_id*string
relationship_id*string
related_product_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH 'https://example.com/api/v1/products/string/relationships/string/product/string' \  -H 'Content-Type: application/json' \  --data-raw '{  "quantity": 10}'
{  "data": [    {      "last_modified": "2019-09-27T05:57:45.865974+00:00",      "product_id": "5d8cf911bde76bea4e2eff13",      "quantity": 10    }  ]}