Add Line Item
To add a new line item, submit a POST request with the data to be updated as a string of dictionary.
Add a new line item
PUT
https://api.photoncommerce.com/api/v4/line-items
This method can be used to add one new line item at a time. The line item keys whose values can be added are listed in the code block after the following API method block.
Path Parameters
Name | Type | Description |
---|---|---|
photon_key | string | Photon Key of the JSON file that needs to be updated |
Headers
Name | Type | Description |
---|---|---|
CLIENT-ID | string | Unique client-id provided upon user registration |
AUTHORIZATION | string | Pass your username and api key in the form 'apikey <username>:<api-key>' |
SECRET-KEY | string | Secret key provided as a string |
PASSWORD | string | Password used during user registration |
Content-Type | string | Set to "application/json" |
Request Body
Name | Type | Description |
---|---|---|
data | string | String of dictionary containing fields to be updated with their corresponding values e.g {'SKU': '003', 'Description': 'MacBook', 'Price': 1299, 'Amount': 1299} |
Line item keys that can be added:
Syntax for sending a POST request to add a new line item:
Last updated