To add items to your cart, you need to make a POST request to the Add Items to Cart API with the following requirements:
POST https://api.farnell.com/Auth/token
Request Headers
Name | Description |
api_key required * |
your_generated_api_key To generate your API key, follow the instructions on the Order API Registration page. |
authorization required * |
your_jwt_token To get your JWT token for authorization, use the Generate JWT Authentication Token API. |
Request Attributes
Name | Description |
quantity required * |
String Represents how many units of the product should be added to the cart. |
sku required * |
String Represents the product you wish to add. |
customerPartNumber optional |
String Represents your internal part number, which can be mapped to our SKU. |
lineNote optional |
String Provides additional notes or comments related to the line item. |
Sample Payload
{
"orderItem": [
{
"quantity": "10",
"sku": "1215561",
"customerPartNumber": "CPN121",
"lineNote": "Note 1"
},
{
"quantity": "5",
"sku": "1081212",
"customerPartNumber": "CPN108",
"lineNote": "Note 2"
}
]
}
Response
Code 200
{ “orderId”: “<Cart ID>”}