Táirgí · Cuir comhaid leis · product_id
Tar éis upload_id a chruthú, uaslódáil na comhaid mar multipart/form-data agus ceangail leis an táirge iad. Teastaíonn comhartha Bearer agus cead do category chun íoslódáil; bíonn bearta an chomhaid sa fhreagra, gan seoladh poiblí ná pasfhocal. Riail rochtana shainráite don chomhad comhroinnte. new_purchases / recent_and_new / selected / all_purchasers.
POST
/api/v1/products/{product_id}/filesIarratas cURL
curl --disable --globoff --fail-with-body --silent --show-error \
--proto '=https' --connect-timeout 5 --max-time 30 \
--request POST \
--url 'https://shop.onshopently.com/api/v1/products/example/files?category=digital' \
--header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
--header 'Idempotency-Key: files-example-assign_file_api_v1_products__product_id__files_post' \
--header 'Content-Type: application/json' \
--data-raw '{"audience":{"mode":"new_purchases"},"expected_version":1,"upload_id":"00000000-0000-4000-8000-000000000001"}'
Freagra
{
"data": {
"deleted": false,
"id": "00000000-0000-4000-8000-000000000001",
"version": 2
},
"meta": {
"request_id": "example"
}
}
Ceadanna riachtanacha
- Fíordheimhniú
- Comhartha rochtana
- Ar fáil ó
- STANDARD
- Ceadanna riachtanacha
Ceadanna breise do réimsí roghnaithe
category=internal: Comhaid táirge a bhainistiú · Comhaid inmheánachacatalog.product_file:write_internalcategory=customer_document: Comhaid táirge a bhainistiú · Doiciméid do chustaiméirícatalog.product_file:write_customer_documentcategory=digital: Comhaid táirge a bhainistiú · Táirgí digiteachacatalog.product_file:write_digital