I like to upload a return label using stagedUploadTargetsGenerate.
This is my call to upload a return label:
{
“query”: “mutation stagedUploadTargetsGenerate($input: [StageImageInput!]!) {\n stagedUploadTargetsGenerate(input: $input) {\n urls {\n parameters {\n name,\n value\n }\n url\n }\n userErrors {\n field\n message\n }\n }\n}”,
“variables”: {
“input”: [
{
“filename”: “#11213-R1.pdf”,
“httpMethod”: “PUT”,
“mimeType”: “application/pdf”,
“resource”: “RETURN_LABEL”
}
]
}
This is what I get:
{
“data”: {
“stagedUploadTargetsGenerate”: {
“urls”: [
{
“parameters”: ,
“url”: “”
}
],
“userErrors”: [
{
“field”: [
“input”,
“0”,
“mimeType”
],
“message”: “RETURN_LABEL: Unsupported resource provided. Use one of: PRODUCT_IMAGE, COLLECTION_IMAGE, IMAGE, SHOP_IMAGE, TIMELINE, ARTICLE_IMAGE, THEME_IMAGE”
}
]
}
},
“extensions”: {
“cost”: {
“requestedQueryCost”: 11,
“actualQueryCost”: 11,
“throttleStatus”: {
“maximumAvailable”: 2000,
“currentlyAvailable”: 1989,
“restoreRate”: 100
}
}
}
}