Media
Create, update or remove media for inventory items.
Add or update a video to an existing inventory item
POST /v1/media/videos/{destination}/{inventoryIdentifier}
curl --location --request POST '{baseUrl}/v1/media/videos/{destination}/{inventoryIdentifier}' \
--header 'Content-Type: application/json' \
--header 'x-seller-identifier: {sellerIdentifier}' \
--data-raw '{video}'| Name | Required | Type | Description |
|---|---|---|---|
inventoryIdentifier | Yes | GUID | Identifier of the inventory item in AutoGate. The video will be added to this item. |
sellerIdentifier | Yes | GUID | Identifies the dealer the ad will be posted to within carsales. carsales provides this for each dealer. |
destination | Yes | string | Location (Destination) of where the inventory item is listed. Applicable values are: -oneautogate |
video | Yes | Video | CSN-DTO Video object. |
Spin
To add a Spin, send a video with Type set to SPIN and Url set to the absolute URL of the Spin. See the Spin example.
Permissions
You must have the Video permission in order to use this endpoint.
Returns
Returns 202 Accepted if the request succeeds. This call will return an error if something goes wrong. Error reasons can include the payload failing validation. If this occurs, the property that caused the validation to fail will be provided in the response. For example:
- Returns
400 Bad RequestifTypeis not one ofLESA,DEALERorSPIN. - Returns
400 Bad RequestifUrlis missing or is not a valid absolute URL.
Remove video on an existing inventory item
DELETE /v1/media/videos/{destination}/{inventoryIdentifier}
curl --location --request DELETE '{baseUrl}/v1/media/videos/{destination}/{inventoryIdentifier}' \
--header 'x-seller-identifier: {sellerIdentifier}' \
--header 'accept: */*'| Name | Required | Type | Description | | --------------------- | -------- | ------ | ---------------------------------------------------------------------------------------------------------- | --- | | inventoryIdentifier | Yes | GUID | Identifier of the inventory item in AutoGate. The video will be added to this item. | | | sellerIdentifier | Yes | GUID | Identifies the dealer the ad will be posted to within carsales. carsales provides this for each dealer. | | | destination | Yes | string | Location (Destination) of where the inventory item is listed. Applicable values are:
-oneautogate |
Permissions
You must have the Video permission in order to use this endpoint.
Returns
Returns 202 Accepted if the request succeeds. This call will return an error if something goes wrong. Error reasons can include an absence of an existing video feed for the specified inventory identifier. If you believe this is a mistake then please get in contact with us.
Add/Replace a collection of photos to an existing inventory item
POST /v1/media/photos/{destination}/{inventoryIdentifier}
curl --location --request POST '{baseUrl}/v1/media/photos/{destination}/{inventoryIdentifier}' \
--header 'Content-Type: application/json' \
--header 'x-seller-identifier: {sellerIdentifier}' \
--data-raw '{photos}'| Name | Required | Type | Description |
|---|---|---|---|
inventoryIdentifier | Yes | GUID | Identifier of the inventory item in AutoGate. The photos will be added to this item. |
sellerIdentifier | Yes | GUID | Identifies the dealer the ad will be posted to within carsales. carsales provides this for each dealer. |
destination | Yes | string | Location (Destination) of where the inventory item is listed. Applicable values are: -oneautogate |
photos | Yes | Photo[] | Array of CSN-DTO Photo objects. |
Photo Order
The position of the media within an inventory item's media collection. You can specify the photo order starting from either 0 or 1. If omitted, the order defaults to 0.
How Photo Order Processing Works
The backend processes photo orders using zero-based indexing and array position logic:
- Zero-based indexing: All photo orders are converted to start from 0.
- This means that the first photo in your media collection will always be assigned order 0 in the backend.
- If you specify an order starting from 1, it will be converted to 0 (e.g., order 1 becomes 0, order 2 becomes 1, etc.).
- Array position: If there are gaps in your order values, the backend will assign orders based on the position of photos in the array, starting from 0
- For example, if you provide photos with orders 1, 3, and 8, the backend will fill the gaps and assign them as 0, 1, and 2 based on their array position.
Photo Order Mapping Examples
The following table shows how different input scenarios are processed:
| Your Photo Order | Backend Processing Order | Explanation |
|---|---|---|
| 1, 2, 3 | 0, 1, 2 | Sequential order starting from 1, converted to 0-based |
| 0, 1, 2 | 0, 1, 2 | Already 0-based, no conversion needed |
| 1, 3, 8 | 0, 1, 2 | Gaps filled - ordered by array position |
Permissions
You must have the Photo permission in order to use this endpoint.
Returns
- Returns
202 Acceptedif the request has been successfully received for processing. - Returns
400 Bad Requestif the required fields are not provided in the request. - Returns
404 Not Foundif the vehicle identifier or seller identifier is not found in the Global Inventory system. - Returns
503 Service Unavailableif the Global Inventory system is down.
Update/Add a single photo, identified by its order number, in the collection of photos of an existing inventory item
PATCH /v1/media/photos/{destination}/{inventoryIdentifier}
curl --location --request POST '{baseUrl}/v1/media/photos/{destination}/{inventoryIdentifier}' \
--header 'Content-Type: application/json' \
--header 'x-seller-identifier: {sellerIdentifier}' \
--data-raw '{photo}'| Name | Required | Type | Description |
|---|---|---|---|
inventoryIdentifier | Yes | GUID | Identifier of the inventory item in AutoGate. The photos will be added to this item. |
sellerIdentifier | Yes | GUID | Identifies the dealer the ad will be posted to within carsales. carsales provides this for each dealer. |
destination | Yes | string | Location (Destination) of where the inventory item is listed. Applicable values are: -oneautogate |
photo | Yes | Photo | An single photo object of CSN-DTO Photo |
Photo Order
When updating a single photo, you must specify the Order field in the photo object. This specifies the position of the photo within the photo array that will be updated.
⚠️ Note: Since the backend uses zero-based indexing for photo order, specify the Order value starting from 0. Use Order: 0 to update the first photo, Order: 1 for the second photo, and so on.
Permissions
You must have the Photo permission in order to use this endpoint.
Returns
- Returns
202 Acceptedif the request has been successfully received for processing. - Returns
400 Bad Requestif the required fields are not provided in the request. - Returns
404 Not Foundif the vehicle identifier or seller identifier is not found in the Global Inventory system. - Returns
503 Service Unavailableif the Global Inventory system is down.
