Temporary Upload
Temporary upload allows you to upload data to S3 storage and then process it further. This could include CSV data or images.
Most endpoints in the Master API work with CSV data and not with images.
#Get Upload Url
Request
POST /temporary-upload-url HTTP/1.1
{
"content_type": "text/plain",
"file_name": "example.csv"
}
Response
{
"path": "tmp/a6273055-b7c4-4bed-9955-e41fbe09ce5b-metaZXhhbXBsZS5jc3Y=-.csv",
"url": "https://smake-local.s3.eu-west-1.amazonaws.com/tmp/a6273055-b7c4-4bed-9955-e41fbe09ce5b-metaZXhhbXBsZS5jc3Y%3D-.csv?X-Amz-Content ....",
"headers": {
"Content-Type": "text/plain"
}
}
Note: The upload URL is valid for 10 minutes.
#Upload Content
Use the URL from the POST response and upload your data there.
Upload the Content
Request
PUT https://smake-local.s3.eu-west-1.amazonaws.com/tmp/a6273055-b7c4-4bed-9955-e41fbe09ce5b-metaZXhhbXBsZS5jc3Y%3D-.csv?X-Amz-Content .... HTTP/1.1
Content-Type: text/plain
id,handle,locale,name,description,manufacturer,manufacturer_number,brand
361,OTkvY6Q0EPzMbOk4,en,"T-Shirt 6 designable","Iste dolorum cumque ab quas voluptatum.","Kellie Sauer",Zos9y9pfXbhVG3TJ,"Bertram Douglas"
Response
HTTP/1.1 200 OK
Note: Uploaded files will be automatically deleted after 24 hours.