curl -X PATCH 'https://api.weir.ai/org/talent/license/lic_123456789/image' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console' \
-F 'images=@image3.jpg' \
-F 'images=@image4.jpg'
{
"data": {
"licenseId": "lic_123456789",
"imagesAdded": 2,
"totalImages": 12
},
"message": "Images added to license successfully",
"status": "success"
}
Console APIs - Talent
Add License Images
Add images to an existing license
PATCH
/
org
/
talent
/
license
/
:licenseId
/
image
curl -X PATCH 'https://api.weir.ai/org/talent/license/lic_123456789/image' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console' \
-F 'images=@image3.jpg' \
-F 'images=@image4.jpg'
{
"data": {
"licenseId": "lic_123456789",
"imagesAdded": 2,
"totalImages": 12
},
"message": "Images added to license successfully",
"status": "success"
}
Add License Images
Add additional images to an existing talent license.curl -X PATCH 'https://api.weir.ai/org/talent/license/lic_123456789/image' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'x-source: console' \
-F 'images=@image3.jpg' \
-F 'images=@image4.jpg'
{
"data": {
"licenseId": "lic_123456789",
"imagesAdded": 2,
"totalImages": 12
},
"message": "Images added to license successfully",
"status": "success"
}
Path Parameters
string
required
Unique identifier of the license.
Request Body (multipart/form-data)
file[]
required
Array of image files to add to the license.
Usage Examples
const addLicenseImages = async (licenseId, images, accessToken) => {
const formData = new FormData();
images.forEach(image => {
formData.append('images', image);
});
const response = await fetch(`https://api.weir.ai/org/talent/license/${licenseId}/image`, {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${accessToken}`,
'x-source': 'console'
},
body: formData
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
import requests
def add_license_images(license_id, image_paths, access_token):
files = [('images', open(img, 'rb')) for img in image_paths]
response = requests.patch(
f'https://api.weir.ai/org/talent/license/{license_id}/image',
headers={
'Authorization': f'Bearer {access_token}',
'x-source': 'console'
},
files=files
)
response.raise_for_status()
return response.json()
Was this page helpful?