CopyHero

Library start_import

POST
/api/v1/library/imports

Imports 1 to 10000 product URLs into the Product Library in one transaction: one task per entry in the order of entries, all in one new batch titled "Import #<batch_id>". Values in the body override the import profile; without either, images are PNG. An entry whose link matches a product in an exclusion folder or its subfolders is skipped and costs nothing. A workflow that costs credits is checked against the quota of the whole list and reserved in the same transaction; an unpriced import queues its first jobs at once. With an Idempotency-Key, a repeat with the same body answers the first import again.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

Idempotency-Key?|

1 to 255 visible ASCII characters. The same key with the same body returns the first import; with another body it is refused with 422.

Request Body

application/json
  1. body
entries*array<|>
exclude_by_image?boolean|null
exclude_library_folder_ids?array<string>|null
folder_ids?array<string>|null
image_output?|null
import_profile_id?|
Formatuuid
options?|null
source_extras?array<|null>|null
task_blueprint_id?|
Formatint32

Response Body

The batch and one row per entry, in the order of entries.

application/json
  1. response
count*integer
Range0 <= value
rows*array<>
Example Request
curl -X POST 'https://app.copyhero.app/api/v1/library/imports' \  -H 'Content-Type: application/json' \  -d '{  "entries": [    {      "url": "string"    }  ]}'
Example Response
{  "count": 0,  "rows": [    {      "batch_id": 0,      "skip": {        "folder_id": "7695bac3-9397-4ec2-9335-45a2a16f1901",        "matched_product_id": "58781463-d64e-401a-ada0-d94ad1295fc2",        "reason": "library_link_match"      },      "status": "queued",      "task_id": 0    }  ]}